/* * * Copyright (c) 2022 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #include #include #include #include #include #include #include #include namespace chip { jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVReader & aReader, CHIP_ERROR * aError) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); CHIP_ERROR err = CHIP_NO_ERROR; switch (aPath.mClusterId) { case app::Clusters::Identify::Id: { using namespace app::Clusters::Identify; switch (aPath.mAttributeId) { case Attributes::IdentifyTime::Id: { using TypeInfo = Attributes::IdentifyTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::IdentifyType::Id: { using TypeInfo = Attributes::IdentifyType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::Groups::Id: { using namespace app::Clusters::Groups; switch (aPath.mAttributeId) { case Attributes::NameSupport::Id: { using TypeInfo = Attributes::NameSupport::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::OnOff::Id: { using namespace app::Clusters::OnOff; switch (aPath.mAttributeId) { case Attributes::OnOff::Id: { using TypeInfo = Attributes::OnOff::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GlobalSceneControl::Id: { using TypeInfo = Attributes::GlobalSceneControl::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::OnTime::Id: { using TypeInfo = Attributes::OnTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::OffWaitTime::Id: { using TypeInfo = Attributes::OffWaitTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::StartUpOnOff::Id: { using TypeInfo = Attributes::StartUpOnOff::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::LevelControl::Id: { using namespace app::Clusters::LevelControl; switch (aPath.mAttributeId) { case Attributes::CurrentLevel::Id: { using TypeInfo = Attributes::CurrentLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::RemainingTime::Id: { using TypeInfo = Attributes::RemainingTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MinLevel::Id: { using TypeInfo = Attributes::MinLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MaxLevel::Id: { using TypeInfo = Attributes::MaxLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CurrentFrequency::Id: { using TypeInfo = Attributes::CurrentFrequency::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MinFrequency::Id: { using TypeInfo = Attributes::MinFrequency::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MaxFrequency::Id: { using TypeInfo = Attributes::MaxFrequency::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Options::Id: { using TypeInfo = Attributes::Options::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::OnOffTransitionTime::Id: { using TypeInfo = Attributes::OnOffTransitionTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::OnLevel::Id: { using TypeInfo = Attributes::OnLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OnTransitionTime::Id: { using TypeInfo = Attributes::OnTransitionTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OffTransitionTime::Id: { using TypeInfo = Attributes::OffTransitionTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::DefaultMoveRate::Id: { using TypeInfo = Attributes::DefaultMoveRate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::StartUpCurrentLevel::Id: { using TypeInfo = Attributes::StartUpCurrentLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::PulseWidthModulation::Id: { using namespace app::Clusters::PulseWidthModulation; switch (aPath.mAttributeId) { case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::Descriptor::Id: { using namespace app::Clusters::Descriptor; switch (aPath.mAttributeId) { case Attributes::DeviceTypeList::Id: { using TypeInfo = Attributes::DeviceTypeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_deviceType; std::string newElement_0_deviceTypeClassName = "java/lang/Long"; std::string newElement_0_deviceTypeCtorSignature = "(J)V"; jlong jninewElement_0_deviceType = static_cast(entry_0.deviceType); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceTypeClassName.c_str(), newElement_0_deviceTypeCtorSignature.c_str(), jninewElement_0_deviceType, newElement_0_deviceType); jobject newElement_0_revision; std::string newElement_0_revisionClassName = "java/lang/Integer"; std::string newElement_0_revisionCtorSignature = "(I)V"; jint jninewElement_0_revision = static_cast(entry_0.revision); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_revisionClassName.c_str(), newElement_0_revisionCtorSignature.c_str(), jninewElement_0_revision, newElement_0_revision); { jclass deviceTypeStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DescriptorClusterDeviceTypeStruct", deviceTypeStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$DescriptorClusterDeviceTypeStruct"); return nullptr; } jmethodID deviceTypeStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, deviceTypeStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Integer;)V", &deviceTypeStructStructCtor_1); if (err != CHIP_NO_ERROR || deviceTypeStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$DescriptorClusterDeviceTypeStruct constructor"); return nullptr; } newElement_0 = env->NewObject(deviceTypeStructStructClass_1, deviceTypeStructStructCtor_1, newElement_0_deviceType, newElement_0_revision); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::ServerList::Id: { using TypeInfo = Attributes::ServerList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::ClientList::Id: { using TypeInfo = Attributes::ClientList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::PartsList::Id: { using TypeInfo = Attributes::PartsList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::TagList::Id: { using TypeInfo = Attributes::TagList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_mfgCode; if (entry_0.mfgCode.IsNull()) { newElement_0_mfgCode = nullptr; } else { std::string newElement_0_mfgCodeClassName = "java/lang/Integer"; std::string newElement_0_mfgCodeCtorSignature = "(I)V"; jint jninewElement_0_mfgCode = static_cast(entry_0.mfgCode.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_mfgCodeClassName.c_str(), newElement_0_mfgCodeCtorSignature.c_str(), jninewElement_0_mfgCode, newElement_0_mfgCode); } jobject newElement_0_namespaceID; std::string newElement_0_namespaceIDClassName = "java/lang/Integer"; std::string newElement_0_namespaceIDCtorSignature = "(I)V"; jint jninewElement_0_namespaceID = static_cast(entry_0.namespaceID); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_namespaceIDClassName.c_str(), newElement_0_namespaceIDCtorSignature.c_str(), jninewElement_0_namespaceID, newElement_0_namespaceID); jobject newElement_0_tag; std::string newElement_0_tagClassName = "java/lang/Integer"; std::string newElement_0_tagCtorSignature = "(I)V"; jint jninewElement_0_tag = static_cast(entry_0.tag); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_tagClassName.c_str(), newElement_0_tagCtorSignature.c_str(), jninewElement_0_tag, newElement_0_tag); jobject newElement_0_label; if (!entry_0.label.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_label); } else { jobject newElement_0_labelInsideOptional; if (entry_0.label.Value().IsNull()) { newElement_0_labelInsideOptional = nullptr; } else { LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label.Value().Value(), newElement_0_labelInsideOptional)); } chip::JniReferences::GetInstance().CreateOptional(newElement_0_labelInsideOptional, newElement_0_label); } { jclass semanticTagStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DescriptorClusterSemanticTagStruct", semanticTagStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$DescriptorClusterSemanticTagStruct"); return nullptr; } jmethodID semanticTagStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, semanticTagStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;)V", &semanticTagStructStructCtor_1); if (err != CHIP_NO_ERROR || semanticTagStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$DescriptorClusterSemanticTagStruct constructor"); return nullptr; } newElement_0 = env->NewObject(semanticTagStructStructClass_1, semanticTagStructStructCtor_1, newElement_0_mfgCode, newElement_0_namespaceID, newElement_0_tag, newElement_0_label); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::Binding::Id: { using namespace app::Clusters::Binding; switch (aPath.mAttributeId) { case Attributes::Binding::Id: { using TypeInfo = Attributes::Binding::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_node; if (!entry_0.node.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_node); } else { jobject newElement_0_nodeInsideOptional; std::string newElement_0_nodeInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_nodeInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_0_nodeInsideOptional = static_cast(entry_0.node.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nodeInsideOptionalClassName.c_str(), newElement_0_nodeInsideOptionalCtorSignature.c_str(), jninewElement_0_nodeInsideOptional, newElement_0_nodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_nodeInsideOptional, newElement_0_node); } jobject newElement_0_group; if (!entry_0.group.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_group); } else { jobject newElement_0_groupInsideOptional; std::string newElement_0_groupInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_groupInsideOptionalCtorSignature = "(I)V"; jint jninewElement_0_groupInsideOptional = static_cast(entry_0.group.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_groupInsideOptionalClassName.c_str(), newElement_0_groupInsideOptionalCtorSignature.c_str(), jninewElement_0_groupInsideOptional, newElement_0_groupInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_groupInsideOptional, newElement_0_group); } jobject newElement_0_endpoint; if (!entry_0.endpoint.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_endpoint); } else { jobject newElement_0_endpointInsideOptional; std::string newElement_0_endpointInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_endpointInsideOptionalCtorSignature = "(I)V"; jint jninewElement_0_endpointInsideOptional = static_cast(entry_0.endpoint.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_endpointInsideOptionalClassName.c_str(), newElement_0_endpointInsideOptionalCtorSignature.c_str(), jninewElement_0_endpointInsideOptional, newElement_0_endpointInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_endpointInsideOptional, newElement_0_endpoint); } jobject newElement_0_cluster; if (!entry_0.cluster.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_cluster); } else { jobject newElement_0_clusterInsideOptional; std::string newElement_0_clusterInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_clusterInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_0_clusterInsideOptional = static_cast(entry_0.cluster.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_clusterInsideOptionalClassName.c_str(), newElement_0_clusterInsideOptionalCtorSignature.c_str(), jninewElement_0_clusterInsideOptional, newElement_0_clusterInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_clusterInsideOptional, newElement_0_cluster); } jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); { jclass targetStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$BindingClusterTargetStruct", targetStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$BindingClusterTargetStruct"); return nullptr; } jmethodID targetStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, targetStructStructClass_1, "", "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V", &targetStructStructCtor_1); if (err != CHIP_NO_ERROR || targetStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$BindingClusterTargetStruct constructor"); return nullptr; } newElement_0 = env->NewObject(targetStructStructClass_1, targetStructStructCtor_1, newElement_0_node, newElement_0_group, newElement_0_endpoint, newElement_0_cluster, newElement_0_fabricIndex); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::AccessControl::Id: { using namespace app::Clusters::AccessControl; switch (aPath.mAttributeId) { case Attributes::Acl::Id: { using TypeInfo = Attributes::Acl::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_privilege; std::string newElement_0_privilegeClassName = "java/lang/Integer"; std::string newElement_0_privilegeCtorSignature = "(I)V"; jint jninewElement_0_privilege = static_cast(entry_0.privilege); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_privilegeClassName.c_str(), newElement_0_privilegeCtorSignature.c_str(), jninewElement_0_privilege, newElement_0_privilege); jobject newElement_0_authMode; std::string newElement_0_authModeClassName = "java/lang/Integer"; std::string newElement_0_authModeCtorSignature = "(I)V"; jint jninewElement_0_authMode = static_cast(entry_0.authMode); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_authModeClassName.c_str(), newElement_0_authModeCtorSignature.c_str(), jninewElement_0_authMode, newElement_0_authMode); jobject newElement_0_subjects; if (entry_0.subjects.IsNull()) { newElement_0_subjects = nullptr; } else { chip::JniReferences::GetInstance().CreateArrayList(newElement_0_subjects); auto iter_newElement_0_subjects_3 = entry_0.subjects.Value().begin(); while (iter_newElement_0_subjects_3.Next()) { auto & entry_3 = iter_newElement_0_subjects_3.GetValue(); jobject newElement_3; std::string newElement_3ClassName = "java/lang/Long"; std::string newElement_3CtorSignature = "(J)V"; jlong jninewElement_3 = static_cast(entry_3); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); chip::JniReferences::GetInstance().AddToList(newElement_0_subjects, newElement_3); } } jobject newElement_0_targets; if (entry_0.targets.IsNull()) { newElement_0_targets = nullptr; } else { chip::JniReferences::GetInstance().CreateArrayList(newElement_0_targets); auto iter_newElement_0_targets_3 = entry_0.targets.Value().begin(); while (iter_newElement_0_targets_3.Next()) { auto & entry_3 = iter_newElement_0_targets_3.GetValue(); jobject newElement_3; jobject newElement_3_cluster; if (entry_3.cluster.IsNull()) { newElement_3_cluster = nullptr; } else { std::string newElement_3_clusterClassName = "java/lang/Long"; std::string newElement_3_clusterCtorSignature = "(J)V"; jlong jninewElement_3_cluster = static_cast(entry_3.cluster.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3_clusterClassName.c_str(), newElement_3_clusterCtorSignature.c_str(), jninewElement_3_cluster, newElement_3_cluster); } jobject newElement_3_endpoint; if (entry_3.endpoint.IsNull()) { newElement_3_endpoint = nullptr; } else { std::string newElement_3_endpointClassName = "java/lang/Integer"; std::string newElement_3_endpointCtorSignature = "(I)V"; jint jninewElement_3_endpoint = static_cast(entry_3.endpoint.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3_endpointClassName.c_str(), newElement_3_endpointCtorSignature.c_str(), jninewElement_3_endpoint, newElement_3_endpoint); } jobject newElement_3_deviceType; if (entry_3.deviceType.IsNull()) { newElement_3_deviceType = nullptr; } else { std::string newElement_3_deviceTypeClassName = "java/lang/Long"; std::string newElement_3_deviceTypeCtorSignature = "(J)V"; jlong jninewElement_3_deviceType = static_cast(entry_3.deviceType.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3_deviceTypeClassName.c_str(), newElement_3_deviceTypeCtorSignature.c_str(), jninewElement_3_deviceType, newElement_3_deviceType); } { jclass accessControlTargetStructStructClass_4; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlTargetStruct", accessControlTargetStructStructClass_4); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlTargetStruct"); return nullptr; } jmethodID accessControlTargetStructStructCtor_4; err = chip::JniReferences::GetInstance().FindMethod( env, accessControlTargetStructStructClass_4, "", "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;)V", &accessControlTargetStructStructCtor_4); if (err != CHIP_NO_ERROR || accessControlTargetStructStructCtor_4 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlTargetStruct constructor"); return nullptr; } newElement_3 = env->NewObject(accessControlTargetStructStructClass_4, accessControlTargetStructStructCtor_4, newElement_3_cluster, newElement_3_endpoint, newElement_3_deviceType); } chip::JniReferences::GetInstance().AddToList(newElement_0_targets, newElement_3); } } jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); { jclass accessControlEntryStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlEntryStruct", accessControlEntryStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlEntryStruct"); return nullptr; } jmethodID accessControlEntryStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, accessControlEntryStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/lang/Integer;)V", &accessControlEntryStructStructCtor_1); if (err != CHIP_NO_ERROR || accessControlEntryStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlEntryStruct constructor"); return nullptr; } newElement_0 = env->NewObject(accessControlEntryStructStructClass_1, accessControlEntryStructStructCtor_1, newElement_0_privilege, newElement_0_authMode, newElement_0_subjects, newElement_0_targets, newElement_0_fabricIndex); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::Extension::Id: { using TypeInfo = Attributes::Extension::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_data; jbyteArray newElement_0_dataByteArray = env->NewByteArray(static_cast(entry_0.data.size())); env->SetByteArrayRegion(newElement_0_dataByteArray, 0, static_cast(entry_0.data.size()), reinterpret_cast(entry_0.data.data())); newElement_0_data = newElement_0_dataByteArray; jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); { jclass accessControlExtensionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlExtensionStruct", accessControlExtensionStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlExtensionStruct"); return nullptr; } jmethodID accessControlExtensionStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, accessControlExtensionStructStructClass_1, "", "([BLjava/lang/Integer;)V", &accessControlExtensionStructStructCtor_1); if (err != CHIP_NO_ERROR || accessControlExtensionStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlExtensionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(accessControlExtensionStructStructClass_1, accessControlExtensionStructStructCtor_1, newElement_0_data, newElement_0_fabricIndex); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::SubjectsPerAccessControlEntry::Id: { using TypeInfo = Attributes::SubjectsPerAccessControlEntry::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TargetsPerAccessControlEntry::Id: { using TypeInfo = Attributes::TargetsPerAccessControlEntry::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AccessControlEntriesPerFabric::Id: { using TypeInfo = Attributes::AccessControlEntriesPerFabric::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CommissioningARL::Id: { using TypeInfo = Attributes::CommissioningARL::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_endpoint; std::string newElement_0_endpointClassName = "java/lang/Integer"; std::string newElement_0_endpointCtorSignature = "(I)V"; jint jninewElement_0_endpoint = static_cast(entry_0.endpoint); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointClassName.c_str(), newElement_0_endpointCtorSignature.c_str(), jninewElement_0_endpoint, newElement_0_endpoint); jobject newElement_0_cluster; std::string newElement_0_clusterClassName = "java/lang/Long"; std::string newElement_0_clusterCtorSignature = "(J)V"; jlong jninewElement_0_cluster = static_cast(entry_0.cluster); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_clusterClassName.c_str(), newElement_0_clusterCtorSignature.c_str(), jninewElement_0_cluster, newElement_0_cluster); jobject newElement_0_restrictions; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_restrictions); auto iter_newElement_0_restrictions_2 = entry_0.restrictions.begin(); while (iter_newElement_0_restrictions_2.Next()) { auto & entry_2 = iter_newElement_0_restrictions_2.GetValue(); jobject newElement_2; jobject newElement_2_type; std::string newElement_2_typeClassName = "java/lang/Integer"; std::string newElement_2_typeCtorSignature = "(I)V"; jint jninewElement_2_type = static_cast(entry_2.type); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_typeClassName.c_str(), newElement_2_typeCtorSignature.c_str(), jninewElement_2_type, newElement_2_type); jobject newElement_2_id; if (entry_2.id.IsNull()) { newElement_2_id = nullptr; } else { std::string newElement_2_idClassName = "java/lang/Long"; std::string newElement_2_idCtorSignature = "(J)V"; jlong jninewElement_2_id = static_cast(entry_2.id.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_idClassName.c_str(), newElement_2_idCtorSignature.c_str(), jninewElement_2_id, newElement_2_id); } { jclass accessRestrictionStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessRestrictionStruct", accessRestrictionStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessRestrictionStruct"); return nullptr; } jmethodID accessRestrictionStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod(env, accessRestrictionStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Long;)V", &accessRestrictionStructStructCtor_3); if (err != CHIP_NO_ERROR || accessRestrictionStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessRestrictionStruct constructor"); return nullptr; } newElement_2 = env->NewObject(accessRestrictionStructStructClass_3, accessRestrictionStructStructCtor_3, newElement_2_type, newElement_2_id); } chip::JniReferences::GetInstance().AddToList(newElement_0_restrictions, newElement_2); } { jclass commissioningAccessRestrictionEntryStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$AccessControlClusterCommissioningAccessRestrictionEntryStruct", commissioningAccessRestrictionEntryStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$AccessControlClusterCommissioningAccessRestrictionEntryStruct"); return nullptr; } jmethodID commissioningAccessRestrictionEntryStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, commissioningAccessRestrictionEntryStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/util/ArrayList;)V", &commissioningAccessRestrictionEntryStructStructCtor_1); if (err != CHIP_NO_ERROR || commissioningAccessRestrictionEntryStructStructCtor_1 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$AccessControlClusterCommissioningAccessRestrictionEntryStruct constructor"); return nullptr; } newElement_0 = env->NewObject(commissioningAccessRestrictionEntryStructStructClass_1, commissioningAccessRestrictionEntryStructStructCtor_1, newElement_0_endpoint, newElement_0_cluster, newElement_0_restrictions); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::Arl::Id: { using TypeInfo = Attributes::Arl::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_endpoint; std::string newElement_0_endpointClassName = "java/lang/Integer"; std::string newElement_0_endpointCtorSignature = "(I)V"; jint jninewElement_0_endpoint = static_cast(entry_0.endpoint); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointClassName.c_str(), newElement_0_endpointCtorSignature.c_str(), jninewElement_0_endpoint, newElement_0_endpoint); jobject newElement_0_cluster; std::string newElement_0_clusterClassName = "java/lang/Long"; std::string newElement_0_clusterCtorSignature = "(J)V"; jlong jninewElement_0_cluster = static_cast(entry_0.cluster); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_clusterClassName.c_str(), newElement_0_clusterCtorSignature.c_str(), jninewElement_0_cluster, newElement_0_cluster); jobject newElement_0_restrictions; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_restrictions); auto iter_newElement_0_restrictions_2 = entry_0.restrictions.begin(); while (iter_newElement_0_restrictions_2.Next()) { auto & entry_2 = iter_newElement_0_restrictions_2.GetValue(); jobject newElement_2; jobject newElement_2_type; std::string newElement_2_typeClassName = "java/lang/Integer"; std::string newElement_2_typeCtorSignature = "(I)V"; jint jninewElement_2_type = static_cast(entry_2.type); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_typeClassName.c_str(), newElement_2_typeCtorSignature.c_str(), jninewElement_2_type, newElement_2_type); jobject newElement_2_id; if (entry_2.id.IsNull()) { newElement_2_id = nullptr; } else { std::string newElement_2_idClassName = "java/lang/Long"; std::string newElement_2_idCtorSignature = "(J)V"; jlong jninewElement_2_id = static_cast(entry_2.id.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_idClassName.c_str(), newElement_2_idCtorSignature.c_str(), jninewElement_2_id, newElement_2_id); } { jclass accessRestrictionStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessRestrictionStruct", accessRestrictionStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessRestrictionStruct"); return nullptr; } jmethodID accessRestrictionStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod(env, accessRestrictionStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Long;)V", &accessRestrictionStructStructCtor_3); if (err != CHIP_NO_ERROR || accessRestrictionStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessRestrictionStruct constructor"); return nullptr; } newElement_2 = env->NewObject(accessRestrictionStructStructClass_3, accessRestrictionStructStructCtor_3, newElement_2_type, newElement_2_id); } chip::JniReferences::GetInstance().AddToList(newElement_0_restrictions, newElement_2); } jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); { jclass accessRestrictionEntryStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessRestrictionEntryStruct", accessRestrictionEntryStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessRestrictionEntryStruct"); return nullptr; } jmethodID accessRestrictionEntryStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, accessRestrictionEntryStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/util/ArrayList;Ljava/lang/Integer;)V", &accessRestrictionEntryStructStructCtor_1); if (err != CHIP_NO_ERROR || accessRestrictionEntryStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessRestrictionEntryStruct constructor"); return nullptr; } newElement_0 = env->NewObject(accessRestrictionEntryStructStructClass_1, accessRestrictionEntryStructStructCtor_1, newElement_0_endpoint, newElement_0_cluster, newElement_0_restrictions, newElement_0_fabricIndex); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::Actions::Id: { using namespace app::Clusters::Actions; switch (aPath.mAttributeId) { case Attributes::ActionList::Id: { using TypeInfo = Attributes::ActionList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_actionID; std::string newElement_0_actionIDClassName = "java/lang/Integer"; std::string newElement_0_actionIDCtorSignature = "(I)V"; jint jninewElement_0_actionID = static_cast(entry_0.actionID); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_actionIDClassName.c_str(), newElement_0_actionIDCtorSignature.c_str(), jninewElement_0_actionID, newElement_0_actionID); jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); jobject newElement_0_type; std::string newElement_0_typeClassName = "java/lang/Integer"; std::string newElement_0_typeCtorSignature = "(I)V"; jint jninewElement_0_type = static_cast(entry_0.type); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), jninewElement_0_type, newElement_0_type); jobject newElement_0_endpointListID; std::string newElement_0_endpointListIDClassName = "java/lang/Integer"; std::string newElement_0_endpointListIDCtorSignature = "(I)V"; jint jninewElement_0_endpointListID = static_cast(entry_0.endpointListID); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_endpointListIDClassName.c_str(), newElement_0_endpointListIDCtorSignature.c_str(), jninewElement_0_endpointListID, newElement_0_endpointListID); jobject newElement_0_supportedCommands; std::string newElement_0_supportedCommandsClassName = "java/lang/Integer"; std::string newElement_0_supportedCommandsCtorSignature = "(I)V"; jint jninewElement_0_supportedCommands = static_cast(entry_0.supportedCommands.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_supportedCommandsClassName.c_str(), newElement_0_supportedCommandsCtorSignature.c_str(), jninewElement_0_supportedCommands, newElement_0_supportedCommands); jobject newElement_0_state; std::string newElement_0_stateClassName = "java/lang/Integer"; std::string newElement_0_stateCtorSignature = "(I)V"; jint jninewElement_0_state = static_cast(entry_0.state); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_stateClassName.c_str(), newElement_0_stateCtorSignature.c_str(), jninewElement_0_state, newElement_0_state); { jclass actionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ActionsClusterActionStruct", actionStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ActionsClusterActionStruct"); return nullptr; } jmethodID actionStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, actionStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" "Integer;)V", &actionStructStructCtor_1); if (err != CHIP_NO_ERROR || actionStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ActionsClusterActionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(actionStructStructClass_1, actionStructStructCtor_1, newElement_0_actionID, newElement_0_name, newElement_0_type, newElement_0_endpointListID, newElement_0_supportedCommands, newElement_0_state); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EndpointLists::Id: { using TypeInfo = Attributes::EndpointLists::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_endpointListID; std::string newElement_0_endpointListIDClassName = "java/lang/Integer"; std::string newElement_0_endpointListIDCtorSignature = "(I)V"; jint jninewElement_0_endpointListID = static_cast(entry_0.endpointListID); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_endpointListIDClassName.c_str(), newElement_0_endpointListIDCtorSignature.c_str(), jninewElement_0_endpointListID, newElement_0_endpointListID); jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); jobject newElement_0_type; std::string newElement_0_typeClassName = "java/lang/Integer"; std::string newElement_0_typeCtorSignature = "(I)V"; jint jninewElement_0_type = static_cast(entry_0.type); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), jninewElement_0_type, newElement_0_type); jobject newElement_0_endpoints; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); auto iter_newElement_0_endpoints_2 = entry_0.endpoints.begin(); while (iter_newElement_0_endpoints_2.Next()) { auto & entry_2 = iter_newElement_0_endpoints_2.GetValue(); jobject newElement_2; std::string newElement_2ClassName = "java/lang/Integer"; std::string newElement_2CtorSignature = "(I)V"; jint jninewElement_2 = static_cast(entry_2); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); chip::JniReferences::GetInstance().AddToList(newElement_0_endpoints, newElement_2); } { jclass endpointListStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ActionsClusterEndpointListStruct", endpointListStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ActionsClusterEndpointListStruct"); return nullptr; } jmethodID endpointListStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, endpointListStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &endpointListStructStructCtor_1); if (err != CHIP_NO_ERROR || endpointListStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ActionsClusterEndpointListStruct constructor"); return nullptr; } newElement_0 = env->NewObject(endpointListStructStructClass_1, endpointListStructStructCtor_1, newElement_0_endpointListID, newElement_0_name, newElement_0_type, newElement_0_endpoints); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::SetupURL::Id: { using TypeInfo = Attributes::SetupURL::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::BasicInformation::Id: { using namespace app::Clusters::BasicInformation; switch (aPath.mAttributeId) { case Attributes::DataModelRevision::Id: { using TypeInfo = Attributes::DataModelRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::VendorName::Id: { using TypeInfo = Attributes::VendorName::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::VendorID::Id: { using TypeInfo = Attributes::VendorID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ProductName::Id: { using TypeInfo = Attributes::ProductName::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::ProductID::Id: { using TypeInfo = Attributes::ProductID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NodeLabel::Id: { using TypeInfo = Attributes::NodeLabel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::Location::Id: { using TypeInfo = Attributes::Location::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::HardwareVersion::Id: { using TypeInfo = Attributes::HardwareVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::HardwareVersionString::Id: { using TypeInfo = Attributes::HardwareVersionString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::SoftwareVersion::Id: { using TypeInfo = Attributes::SoftwareVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SoftwareVersionString::Id: { using TypeInfo = Attributes::SoftwareVersionString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::ManufacturingDate::Id: { using TypeInfo = Attributes::ManufacturingDate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::PartNumber::Id: { using TypeInfo = Attributes::PartNumber::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::ProductURL::Id: { using TypeInfo = Attributes::ProductURL::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::ProductLabel::Id: { using TypeInfo = Attributes::ProductLabel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::SerialNumber::Id: { using TypeInfo = Attributes::SerialNumber::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::LocalConfigDisabled::Id: { using TypeInfo = Attributes::LocalConfigDisabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Reachable::Id: { using TypeInfo = Attributes::Reachable::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::UniqueID::Id: { using TypeInfo = Attributes::UniqueID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::CapabilityMinima::Id: { using TypeInfo = Attributes::CapabilityMinima::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_caseSessionsPerFabric; std::string value_caseSessionsPerFabricClassName = "java/lang/Integer"; std::string value_caseSessionsPerFabricCtorSignature = "(I)V"; jint jnivalue_caseSessionsPerFabric = static_cast(cppValue.caseSessionsPerFabric); chip::JniReferences::GetInstance().CreateBoxedObject(value_caseSessionsPerFabricClassName.c_str(), value_caseSessionsPerFabricCtorSignature.c_str(), jnivalue_caseSessionsPerFabric, value_caseSessionsPerFabric); jobject value_subscriptionsPerFabric; std::string value_subscriptionsPerFabricClassName = "java/lang/Integer"; std::string value_subscriptionsPerFabricCtorSignature = "(I)V"; jint jnivalue_subscriptionsPerFabric = static_cast(cppValue.subscriptionsPerFabric); chip::JniReferences::GetInstance().CreateBoxedObject( value_subscriptionsPerFabricClassName.c_str(), value_subscriptionsPerFabricCtorSignature.c_str(), jnivalue_subscriptionsPerFabric, value_subscriptionsPerFabric); { jclass capabilityMinimaStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$BasicInformationClusterCapabilityMinimaStruct", capabilityMinimaStructStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$BasicInformationClusterCapabilityMinimaStruct"); return nullptr; } jmethodID capabilityMinimaStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod(env, capabilityMinimaStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &capabilityMinimaStructStructCtor_0); if (err != CHIP_NO_ERROR || capabilityMinimaStructStructCtor_0 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$BasicInformationClusterCapabilityMinimaStruct constructor"); return nullptr; } value = env->NewObject(capabilityMinimaStructStructClass_0, capabilityMinimaStructStructCtor_0, value_caseSessionsPerFabric, value_subscriptionsPerFabric); } return value; } case Attributes::ProductAppearance::Id: { using TypeInfo = Attributes::ProductAppearance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_finish; std::string value_finishClassName = "java/lang/Integer"; std::string value_finishCtorSignature = "(I)V"; jint jnivalue_finish = static_cast(cppValue.finish); chip::JniReferences::GetInstance().CreateBoxedObject( value_finishClassName.c_str(), value_finishCtorSignature.c_str(), jnivalue_finish, value_finish); jobject value_primaryColor; if (cppValue.primaryColor.IsNull()) { value_primaryColor = nullptr; } else { std::string value_primaryColorClassName = "java/lang/Integer"; std::string value_primaryColorCtorSignature = "(I)V"; jint jnivalue_primaryColor = static_cast(cppValue.primaryColor.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(value_primaryColorClassName.c_str(), value_primaryColorCtorSignature.c_str(), jnivalue_primaryColor, value_primaryColor); } { jclass productAppearanceStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$BasicInformationClusterProductAppearanceStruct", productAppearanceStructStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$BasicInformationClusterProductAppearanceStruct"); return nullptr; } jmethodID productAppearanceStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod(env, productAppearanceStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &productAppearanceStructStructCtor_0); if (err != CHIP_NO_ERROR || productAppearanceStructStructCtor_0 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$BasicInformationClusterProductAppearanceStruct constructor"); return nullptr; } value = env->NewObject(productAppearanceStructStructClass_0, productAppearanceStructStructCtor_0, value_finish, value_primaryColor); } return value; } case Attributes::SpecificationVersion::Id: { using TypeInfo = Attributes::SpecificationVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MaxPathsPerInvoke::Id: { using TypeInfo = Attributes::MaxPathsPerInvoke::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::OtaSoftwareUpdateProvider::Id: { using namespace app::Clusters::OtaSoftwareUpdateProvider; switch (aPath.mAttributeId) { case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::OtaSoftwareUpdateRequestor::Id: { using namespace app::Clusters::OtaSoftwareUpdateRequestor; switch (aPath.mAttributeId) { case Attributes::DefaultOTAProviders::Id: { using TypeInfo = Attributes::DefaultOTAProviders::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_providerNodeID; std::string newElement_0_providerNodeIDClassName = "java/lang/Long"; std::string newElement_0_providerNodeIDCtorSignature = "(J)V"; jlong jninewElement_0_providerNodeID = static_cast(entry_0.providerNodeID); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_providerNodeIDClassName.c_str(), newElement_0_providerNodeIDCtorSignature.c_str(), jninewElement_0_providerNodeID, newElement_0_providerNodeID); jobject newElement_0_endpoint; std::string newElement_0_endpointClassName = "java/lang/Integer"; std::string newElement_0_endpointCtorSignature = "(I)V"; jint jninewElement_0_endpoint = static_cast(entry_0.endpoint); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointClassName.c_str(), newElement_0_endpointCtorSignature.c_str(), jninewElement_0_endpoint, newElement_0_endpoint); jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); { jclass providerLocationStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation", providerLocationStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation"); return nullptr; } jmethodID providerLocationStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, providerLocationStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;)V", &providerLocationStructCtor_1); if (err != CHIP_NO_ERROR || providerLocationStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation constructor"); return nullptr; } newElement_0 = env->NewObject(providerLocationStructClass_1, providerLocationStructCtor_1, newElement_0_providerNodeID, newElement_0_endpoint, newElement_0_fabricIndex); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::UpdatePossible::Id: { using TypeInfo = Attributes::UpdatePossible::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::UpdateState::Id: { using TypeInfo = Attributes::UpdateState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::UpdateStateProgress::Id: { using TypeInfo = Attributes::UpdateStateProgress::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::LocalizationConfiguration::Id: { using namespace app::Clusters::LocalizationConfiguration; switch (aPath.mAttributeId) { case Attributes::ActiveLocale::Id: { using TypeInfo = Attributes::ActiveLocale::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::SupportedLocales::Id: { using TypeInfo = Attributes::SupportedLocales::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::TimeFormatLocalization::Id: { using namespace app::Clusters::TimeFormatLocalization; switch (aPath.mAttributeId) { case Attributes::HourFormat::Id: { using TypeInfo = Attributes::HourFormat::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ActiveCalendarType::Id: { using TypeInfo = Attributes::ActiveCalendarType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SupportedCalendarTypes::Id: { using TypeInfo = Attributes::SupportedCalendarTypes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::UnitLocalization::Id: { using namespace app::Clusters::UnitLocalization; switch (aPath.mAttributeId) { case Attributes::TemperatureUnit::Id: { using TypeInfo = Attributes::TemperatureUnit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::PowerSourceConfiguration::Id: { using namespace app::Clusters::PowerSourceConfiguration; switch (aPath.mAttributeId) { case Attributes::Sources::Id: { using TypeInfo = Attributes::Sources::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::PowerSource::Id: { using namespace app::Clusters::PowerSource; switch (aPath.mAttributeId) { case Attributes::Status::Id: { using TypeInfo = Attributes::Status::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Order::Id: { using TypeInfo = Attributes::Order::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Description::Id: { using TypeInfo = Attributes::Description::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::WiredAssessedInputVoltage::Id: { using TypeInfo = Attributes::WiredAssessedInputVoltage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::WiredAssessedInputFrequency::Id: { using TypeInfo = Attributes::WiredAssessedInputFrequency::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::WiredCurrentType::Id: { using TypeInfo = Attributes::WiredCurrentType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::WiredAssessedCurrent::Id: { using TypeInfo = Attributes::WiredAssessedCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::WiredNominalVoltage::Id: { using TypeInfo = Attributes::WiredNominalVoltage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::WiredMaximumCurrent::Id: { using TypeInfo = Attributes::WiredMaximumCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::WiredPresent::Id: { using TypeInfo = Attributes::WiredPresent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ActiveWiredFaults::Id: { using TypeInfo = Attributes::ActiveWiredFaults::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::BatVoltage::Id: { using TypeInfo = Attributes::BatVoltage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::BatPercentRemaining::Id: { using TypeInfo = Attributes::BatPercentRemaining::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::BatTimeRemaining::Id: { using TypeInfo = Attributes::BatTimeRemaining::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::BatChargeLevel::Id: { using TypeInfo = Attributes::BatChargeLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::BatReplacementNeeded::Id: { using TypeInfo = Attributes::BatReplacementNeeded::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::BatReplaceability::Id: { using TypeInfo = Attributes::BatReplaceability::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::BatPresent::Id: { using TypeInfo = Attributes::BatPresent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ActiveBatFaults::Id: { using TypeInfo = Attributes::ActiveBatFaults::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::BatReplacementDescription::Id: { using TypeInfo = Attributes::BatReplacementDescription::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::BatCommonDesignation::Id: { using TypeInfo = Attributes::BatCommonDesignation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::BatANSIDesignation::Id: { using TypeInfo = Attributes::BatANSIDesignation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::BatIECDesignation::Id: { using TypeInfo = Attributes::BatIECDesignation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::BatApprovedChemistry::Id: { using TypeInfo = Attributes::BatApprovedChemistry::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::BatCapacity::Id: { using TypeInfo = Attributes::BatCapacity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::BatQuantity::Id: { using TypeInfo = Attributes::BatQuantity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::BatChargeState::Id: { using TypeInfo = Attributes::BatChargeState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::BatTimeToFullCharge::Id: { using TypeInfo = Attributes::BatTimeToFullCharge::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::BatFunctionalWhileCharging::Id: { using TypeInfo = Attributes::BatFunctionalWhileCharging::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::BatChargingCurrent::Id: { using TypeInfo = Attributes::BatChargingCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ActiveBatChargeFaults::Id: { using TypeInfo = Attributes::ActiveBatChargeFaults::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EndpointList::Id: { using TypeInfo = Attributes::EndpointList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::GeneralCommissioning::Id: { using namespace app::Clusters::GeneralCommissioning; switch (aPath.mAttributeId) { case Attributes::Breadcrumb::Id: { using TypeInfo = Attributes::Breadcrumb::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::BasicCommissioningInfo::Id: { using TypeInfo = Attributes::BasicCommissioningInfo::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_failSafeExpiryLengthSeconds; std::string value_failSafeExpiryLengthSecondsClassName = "java/lang/Integer"; std::string value_failSafeExpiryLengthSecondsCtorSignature = "(I)V"; jint jnivalue_failSafeExpiryLengthSeconds = static_cast(cppValue.failSafeExpiryLengthSeconds); chip::JniReferences::GetInstance().CreateBoxedObject( value_failSafeExpiryLengthSecondsClassName.c_str(), value_failSafeExpiryLengthSecondsCtorSignature.c_str(), jnivalue_failSafeExpiryLengthSeconds, value_failSafeExpiryLengthSeconds); jobject value_maxCumulativeFailsafeSeconds; std::string value_maxCumulativeFailsafeSecondsClassName = "java/lang/Integer"; std::string value_maxCumulativeFailsafeSecondsCtorSignature = "(I)V"; jint jnivalue_maxCumulativeFailsafeSeconds = static_cast(cppValue.maxCumulativeFailsafeSeconds); chip::JniReferences::GetInstance().CreateBoxedObject( value_maxCumulativeFailsafeSecondsClassName.c_str(), value_maxCumulativeFailsafeSecondsCtorSignature.c_str(), jnivalue_maxCumulativeFailsafeSeconds, value_maxCumulativeFailsafeSeconds); { jclass basicCommissioningInfoStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$GeneralCommissioningClusterBasicCommissioningInfo", basicCommissioningInfoStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$GeneralCommissioningClusterBasicCommissioningInfo"); return nullptr; } jmethodID basicCommissioningInfoStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod(env, basicCommissioningInfoStructClass_0, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &basicCommissioningInfoStructCtor_0); if (err != CHIP_NO_ERROR || basicCommissioningInfoStructCtor_0 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$GeneralCommissioningClusterBasicCommissioningInfo constructor"); return nullptr; } value = env->NewObject(basicCommissioningInfoStructClass_0, basicCommissioningInfoStructCtor_0, value_failSafeExpiryLengthSeconds, value_maxCumulativeFailsafeSeconds); } return value; } case Attributes::RegulatoryConfig::Id: { using TypeInfo = Attributes::RegulatoryConfig::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LocationCapability::Id: { using TypeInfo = Attributes::LocationCapability::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SupportsConcurrentConnection::Id: { using TypeInfo = Attributes::SupportsConcurrentConnection::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TCAcceptedVersion::Id: { using TypeInfo = Attributes::TCAcceptedVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TCMinRequiredVersion::Id: { using TypeInfo = Attributes::TCMinRequiredVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TCAcknowledgements::Id: { using TypeInfo = Attributes::TCAcknowledgements::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TCAcknowledgementsRequired::Id: { using TypeInfo = Attributes::TCAcknowledgementsRequired::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TCUpdateDeadline::Id: { using TypeInfo = Attributes::TCUpdateDeadline::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::NetworkCommissioning::Id: { using namespace app::Clusters::NetworkCommissioning; switch (aPath.mAttributeId) { case Attributes::MaxNetworks::Id: { using TypeInfo = Attributes::MaxNetworks::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Networks::Id: { using TypeInfo = Attributes::Networks::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_networkID; jbyteArray newElement_0_networkIDByteArray = env->NewByteArray(static_cast(entry_0.networkID.size())); env->SetByteArrayRegion(newElement_0_networkIDByteArray, 0, static_cast(entry_0.networkID.size()), reinterpret_cast(entry_0.networkID.data())); newElement_0_networkID = newElement_0_networkIDByteArray; jobject newElement_0_connected; std::string newElement_0_connectedClassName = "java/lang/Boolean"; std::string newElement_0_connectedCtorSignature = "(Z)V"; jboolean jninewElement_0_connected = static_cast(entry_0.connected); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_connectedClassName.c_str(), newElement_0_connectedCtorSignature.c_str(), jninewElement_0_connected, newElement_0_connected); jobject newElement_0_networkIdentifier; if (!entry_0.networkIdentifier.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_networkIdentifier); } else { jobject newElement_0_networkIdentifierInsideOptional; if (entry_0.networkIdentifier.Value().IsNull()) { newElement_0_networkIdentifierInsideOptional = nullptr; } else { jbyteArray newElement_0_networkIdentifierInsideOptionalByteArray = env->NewByteArray(static_cast(entry_0.networkIdentifier.Value().Value().size())); env->SetByteArrayRegion(newElement_0_networkIdentifierInsideOptionalByteArray, 0, static_cast(entry_0.networkIdentifier.Value().Value().size()), reinterpret_cast(entry_0.networkIdentifier.Value().Value().data())); newElement_0_networkIdentifierInsideOptional = newElement_0_networkIdentifierInsideOptionalByteArray; } chip::JniReferences::GetInstance().CreateOptional(newElement_0_networkIdentifierInsideOptional, newElement_0_networkIdentifier); } jobject newElement_0_clientIdentifier; if (!entry_0.clientIdentifier.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_clientIdentifier); } else { jobject newElement_0_clientIdentifierInsideOptional; if (entry_0.clientIdentifier.Value().IsNull()) { newElement_0_clientIdentifierInsideOptional = nullptr; } else { jbyteArray newElement_0_clientIdentifierInsideOptionalByteArray = env->NewByteArray(static_cast(entry_0.clientIdentifier.Value().Value().size())); env->SetByteArrayRegion(newElement_0_clientIdentifierInsideOptionalByteArray, 0, static_cast(entry_0.clientIdentifier.Value().Value().size()), reinterpret_cast(entry_0.clientIdentifier.Value().Value().data())); newElement_0_clientIdentifierInsideOptional = newElement_0_clientIdentifierInsideOptionalByteArray; } chip::JniReferences::GetInstance().CreateOptional(newElement_0_clientIdentifierInsideOptional, newElement_0_clientIdentifier); } { jclass networkInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterNetworkInfoStruct", networkInfoStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterNetworkInfoStruct"); return nullptr; } jmethodID networkInfoStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, networkInfoStructStructClass_1, "", "([BLjava/lang/Boolean;Ljava/util/Optional;Ljava/util/Optional;)V", &networkInfoStructStructCtor_1); if (err != CHIP_NO_ERROR || networkInfoStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$NetworkCommissioningClusterNetworkInfoStruct constructor"); return nullptr; } newElement_0 = env->NewObject(networkInfoStructStructClass_1, networkInfoStructStructCtor_1, newElement_0_networkID, newElement_0_connected, newElement_0_networkIdentifier, newElement_0_clientIdentifier); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::ScanMaxTimeSeconds::Id: { using TypeInfo = Attributes::ScanMaxTimeSeconds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ConnectMaxTimeSeconds::Id: { using TypeInfo = Attributes::ConnectMaxTimeSeconds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::InterfaceEnabled::Id: { using TypeInfo = Attributes::InterfaceEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LastNetworkingStatus::Id: { using TypeInfo = Attributes::LastNetworkingStatus::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::LastNetworkID::Id: { using TypeInfo = Attributes::LastNetworkID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.Value().size())); env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.Value().size()), reinterpret_cast(cppValue.Value().data())); value = valueByteArray; } return value; } case Attributes::LastConnectErrorValue::Id: { using TypeInfo = Attributes::LastConnectErrorValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::SupportedWiFiBands::Id: { using TypeInfo = Attributes::SupportedWiFiBands::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::SupportedThreadFeatures::Id: { using TypeInfo = Attributes::SupportedThreadFeatures::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ThreadVersion::Id: { using TypeInfo = Attributes::ThreadVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::DiagnosticLogs::Id: { using namespace app::Clusters::DiagnosticLogs; switch (aPath.mAttributeId) { case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::GeneralDiagnostics::Id: { using namespace app::Clusters::GeneralDiagnostics; switch (aPath.mAttributeId) { case Attributes::NetworkInterfaces::Id: { using TypeInfo = Attributes::NetworkInterfaces::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); jobject newElement_0_isOperational; std::string newElement_0_isOperationalClassName = "java/lang/Boolean"; std::string newElement_0_isOperationalCtorSignature = "(Z)V"; jboolean jninewElement_0_isOperational = static_cast(entry_0.isOperational); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_isOperationalClassName.c_str(), newElement_0_isOperationalCtorSignature.c_str(), jninewElement_0_isOperational, newElement_0_isOperational); jobject newElement_0_offPremiseServicesReachableIPv4; if (entry_0.offPremiseServicesReachableIPv4.IsNull()) { newElement_0_offPremiseServicesReachableIPv4 = nullptr; } else { std::string newElement_0_offPremiseServicesReachableIPv4ClassName = "java/lang/Boolean"; std::string newElement_0_offPremiseServicesReachableIPv4CtorSignature = "(Z)V"; jboolean jninewElement_0_offPremiseServicesReachableIPv4 = static_cast(entry_0.offPremiseServicesReachableIPv4.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_offPremiseServicesReachableIPv4ClassName.c_str(), newElement_0_offPremiseServicesReachableIPv4CtorSignature.c_str(), jninewElement_0_offPremiseServicesReachableIPv4, newElement_0_offPremiseServicesReachableIPv4); } jobject newElement_0_offPremiseServicesReachableIPv6; if (entry_0.offPremiseServicesReachableIPv6.IsNull()) { newElement_0_offPremiseServicesReachableIPv6 = nullptr; } else { std::string newElement_0_offPremiseServicesReachableIPv6ClassName = "java/lang/Boolean"; std::string newElement_0_offPremiseServicesReachableIPv6CtorSignature = "(Z)V"; jboolean jninewElement_0_offPremiseServicesReachableIPv6 = static_cast(entry_0.offPremiseServicesReachableIPv6.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_offPremiseServicesReachableIPv6ClassName.c_str(), newElement_0_offPremiseServicesReachableIPv6CtorSignature.c_str(), jninewElement_0_offPremiseServicesReachableIPv6, newElement_0_offPremiseServicesReachableIPv6); } jobject newElement_0_hardwareAddress; jbyteArray newElement_0_hardwareAddressByteArray = env->NewByteArray(static_cast(entry_0.hardwareAddress.size())); env->SetByteArrayRegion(newElement_0_hardwareAddressByteArray, 0, static_cast(entry_0.hardwareAddress.size()), reinterpret_cast(entry_0.hardwareAddress.data())); newElement_0_hardwareAddress = newElement_0_hardwareAddressByteArray; jobject newElement_0_IPv4Addresses; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_IPv4Addresses); auto iter_newElement_0_IPv4Addresses_2 = entry_0.IPv4Addresses.begin(); while (iter_newElement_0_IPv4Addresses_2.Next()) { auto & entry_2 = iter_newElement_0_IPv4Addresses_2.GetValue(); jobject newElement_2; jbyteArray newElement_2ByteArray = env->NewByteArray(static_cast(entry_2.size())); env->SetByteArrayRegion(newElement_2ByteArray, 0, static_cast(entry_2.size()), reinterpret_cast(entry_2.data())); newElement_2 = newElement_2ByteArray; chip::JniReferences::GetInstance().AddToList(newElement_0_IPv4Addresses, newElement_2); } jobject newElement_0_IPv6Addresses; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_IPv6Addresses); auto iter_newElement_0_IPv6Addresses_2 = entry_0.IPv6Addresses.begin(); while (iter_newElement_0_IPv6Addresses_2.Next()) { auto & entry_2 = iter_newElement_0_IPv6Addresses_2.GetValue(); jobject newElement_2; jbyteArray newElement_2ByteArray = env->NewByteArray(static_cast(entry_2.size())); env->SetByteArrayRegion(newElement_2ByteArray, 0, static_cast(entry_2.size()), reinterpret_cast(entry_2.data())); newElement_2 = newElement_2ByteArray; chip::JniReferences::GetInstance().AddToList(newElement_0_IPv6Addresses, newElement_2); } jobject newElement_0_type; std::string newElement_0_typeClassName = "java/lang/Integer"; std::string newElement_0_typeCtorSignature = "(I)V"; jint jninewElement_0_type = static_cast(entry_0.type); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), jninewElement_0_type, newElement_0_type); { jclass networkInterfaceStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$GeneralDiagnosticsClusterNetworkInterface", networkInterfaceStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$GeneralDiagnosticsClusterNetworkInterface"); return nullptr; } jmethodID networkInterfaceStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, networkInterfaceStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;[BLjava/util/ArrayList;Ljava/" "util/ArrayList;Ljava/lang/Integer;)V", &networkInterfaceStructCtor_1); if (err != CHIP_NO_ERROR || networkInterfaceStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$GeneralDiagnosticsClusterNetworkInterface constructor"); return nullptr; } newElement_0 = env->NewObject(networkInterfaceStructClass_1, networkInterfaceStructCtor_1, newElement_0_name, newElement_0_isOperational, newElement_0_offPremiseServicesReachableIPv4, newElement_0_offPremiseServicesReachableIPv6, newElement_0_hardwareAddress, newElement_0_IPv4Addresses, newElement_0_IPv6Addresses, newElement_0_type); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::RebootCount::Id: { using TypeInfo = Attributes::RebootCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::UpTime::Id: { using TypeInfo = Attributes::UpTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TotalOperationalHours::Id: { using TypeInfo = Attributes::TotalOperationalHours::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::BootReason::Id: { using TypeInfo = Attributes::BootReason::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ActiveHardwareFaults::Id: { using TypeInfo = Attributes::ActiveHardwareFaults::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::ActiveRadioFaults::Id: { using TypeInfo = Attributes::ActiveRadioFaults::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::ActiveNetworkFaults::Id: { using TypeInfo = Attributes::ActiveNetworkFaults::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::TestEventTriggersEnabled::Id: { using TypeInfo = Attributes::TestEventTriggersEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::SoftwareDiagnostics::Id: { using namespace app::Clusters::SoftwareDiagnostics; switch (aPath.mAttributeId) { case Attributes::ThreadMetrics::Id: { using TypeInfo = Attributes::ThreadMetrics::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_id; std::string newElement_0_idClassName = "java/lang/Long"; std::string newElement_0_idCtorSignature = "(J)V"; jlong jninewElement_0_id = static_cast(entry_0.id); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_idClassName.c_str(), newElement_0_idCtorSignature.c_str(), jninewElement_0_id, newElement_0_id); jobject newElement_0_name; if (!entry_0.name.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); } else { jobject newElement_0_nameInsideOptional; LogErrorOnFailure( chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); } jobject newElement_0_stackFreeCurrent; if (!entry_0.stackFreeCurrent.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_stackFreeCurrent); } else { jobject newElement_0_stackFreeCurrentInsideOptional; std::string newElement_0_stackFreeCurrentInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_stackFreeCurrentInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_0_stackFreeCurrentInsideOptional = static_cast(entry_0.stackFreeCurrent.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_stackFreeCurrentInsideOptionalClassName.c_str(), newElement_0_stackFreeCurrentInsideOptionalCtorSignature.c_str(), jninewElement_0_stackFreeCurrentInsideOptional, newElement_0_stackFreeCurrentInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackFreeCurrentInsideOptional, newElement_0_stackFreeCurrent); } jobject newElement_0_stackFreeMinimum; if (!entry_0.stackFreeMinimum.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_stackFreeMinimum); } else { jobject newElement_0_stackFreeMinimumInsideOptional; std::string newElement_0_stackFreeMinimumInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_stackFreeMinimumInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_0_stackFreeMinimumInsideOptional = static_cast(entry_0.stackFreeMinimum.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_stackFreeMinimumInsideOptionalClassName.c_str(), newElement_0_stackFreeMinimumInsideOptionalCtorSignature.c_str(), jninewElement_0_stackFreeMinimumInsideOptional, newElement_0_stackFreeMinimumInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackFreeMinimumInsideOptional, newElement_0_stackFreeMinimum); } jobject newElement_0_stackSize; if (!entry_0.stackSize.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_stackSize); } else { jobject newElement_0_stackSizeInsideOptional; std::string newElement_0_stackSizeInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_stackSizeInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_0_stackSizeInsideOptional = static_cast(entry_0.stackSize.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_stackSizeInsideOptionalClassName.c_str(), newElement_0_stackSizeInsideOptionalCtorSignature.c_str(), jninewElement_0_stackSizeInsideOptional, newElement_0_stackSizeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackSizeInsideOptional, newElement_0_stackSize); } { jclass threadMetricsStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct", threadMetricsStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct"); return nullptr; } jmethodID threadMetricsStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, threadMetricsStructStructClass_1, "", "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &threadMetricsStructStructCtor_1); if (err != CHIP_NO_ERROR || threadMetricsStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct constructor"); return nullptr; } newElement_0 = env->NewObject(threadMetricsStructStructClass_1, threadMetricsStructStructCtor_1, newElement_0_id, newElement_0_name, newElement_0_stackFreeCurrent, newElement_0_stackFreeMinimum, newElement_0_stackSize); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentHeapFree::Id: { using TypeInfo = Attributes::CurrentHeapFree::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CurrentHeapUsed::Id: { using TypeInfo = Attributes::CurrentHeapUsed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CurrentHeapHighWatermark::Id: { using TypeInfo = Attributes::CurrentHeapHighWatermark::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ThreadNetworkDiagnostics::Id: { using namespace app::Clusters::ThreadNetworkDiagnostics; switch (aPath.mAttributeId) { case Attributes::Channel::Id: { using TypeInfo = Attributes::Channel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::RoutingRole::Id: { using TypeInfo = Attributes::RoutingRole::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NetworkName::Id: { using TypeInfo = Attributes::NetworkName::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value(), value)); } return value; } case Attributes::PanId::Id: { using TypeInfo = Attributes::PanId::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ExtendedPanId::Id: { using TypeInfo = Attributes::ExtendedPanId::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MeshLocalPrefix::Id: { using TypeInfo = Attributes::MeshLocalPrefix::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.Value().size())); env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.Value().size()), reinterpret_cast(cppValue.Value().data())); value = valueByteArray; } return value; } case Attributes::OverrunCount::Id: { using TypeInfo = Attributes::OverrunCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NeighborTable::Id: { using TypeInfo = Attributes::NeighborTable::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_extAddress; std::string newElement_0_extAddressClassName = "java/lang/Long"; std::string newElement_0_extAddressCtorSignature = "(J)V"; jlong jninewElement_0_extAddress = static_cast(entry_0.extAddress); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), newElement_0_extAddressCtorSignature.c_str(), jninewElement_0_extAddress, newElement_0_extAddress); jobject newElement_0_age; std::string newElement_0_ageClassName = "java/lang/Long"; std::string newElement_0_ageCtorSignature = "(J)V"; jlong jninewElement_0_age = static_cast(entry_0.age); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_ageClassName.c_str(), newElement_0_ageCtorSignature.c_str(), jninewElement_0_age, newElement_0_age); jobject newElement_0_rloc16; std::string newElement_0_rloc16ClassName = "java/lang/Integer"; std::string newElement_0_rloc16CtorSignature = "(I)V"; jint jninewElement_0_rloc16 = static_cast(entry_0.rloc16); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rloc16ClassName.c_str(), newElement_0_rloc16CtorSignature.c_str(), jninewElement_0_rloc16, newElement_0_rloc16); jobject newElement_0_linkFrameCounter; std::string newElement_0_linkFrameCounterClassName = "java/lang/Long"; std::string newElement_0_linkFrameCounterCtorSignature = "(J)V"; jlong jninewElement_0_linkFrameCounter = static_cast(entry_0.linkFrameCounter); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_linkFrameCounterClassName.c_str(), newElement_0_linkFrameCounterCtorSignature.c_str(), jninewElement_0_linkFrameCounter, newElement_0_linkFrameCounter); jobject newElement_0_mleFrameCounter; std::string newElement_0_mleFrameCounterClassName = "java/lang/Long"; std::string newElement_0_mleFrameCounterCtorSignature = "(J)V"; jlong jninewElement_0_mleFrameCounter = static_cast(entry_0.mleFrameCounter); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_mleFrameCounterClassName.c_str(), newElement_0_mleFrameCounterCtorSignature.c_str(), jninewElement_0_mleFrameCounter, newElement_0_mleFrameCounter); jobject newElement_0_lqi; std::string newElement_0_lqiClassName = "java/lang/Integer"; std::string newElement_0_lqiCtorSignature = "(I)V"; jint jninewElement_0_lqi = static_cast(entry_0.lqi); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_lqiClassName.c_str(), newElement_0_lqiCtorSignature.c_str(), jninewElement_0_lqi, newElement_0_lqi); jobject newElement_0_averageRssi; if (entry_0.averageRssi.IsNull()) { newElement_0_averageRssi = nullptr; } else { std::string newElement_0_averageRssiClassName = "java/lang/Integer"; std::string newElement_0_averageRssiCtorSignature = "(I)V"; jint jninewElement_0_averageRssi = static_cast(entry_0.averageRssi.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_averageRssiClassName.c_str(), newElement_0_averageRssiCtorSignature.c_str(), jninewElement_0_averageRssi, newElement_0_averageRssi); } jobject newElement_0_lastRssi; if (entry_0.lastRssi.IsNull()) { newElement_0_lastRssi = nullptr; } else { std::string newElement_0_lastRssiClassName = "java/lang/Integer"; std::string newElement_0_lastRssiCtorSignature = "(I)V"; jint jninewElement_0_lastRssi = static_cast(entry_0.lastRssi.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_lastRssiClassName.c_str(), newElement_0_lastRssiCtorSignature.c_str(), jninewElement_0_lastRssi, newElement_0_lastRssi); } jobject newElement_0_frameErrorRate; std::string newElement_0_frameErrorRateClassName = "java/lang/Integer"; std::string newElement_0_frameErrorRateCtorSignature = "(I)V"; jint jninewElement_0_frameErrorRate = static_cast(entry_0.frameErrorRate); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_frameErrorRateClassName.c_str(), newElement_0_frameErrorRateCtorSignature.c_str(), jninewElement_0_frameErrorRate, newElement_0_frameErrorRate); jobject newElement_0_messageErrorRate; std::string newElement_0_messageErrorRateClassName = "java/lang/Integer"; std::string newElement_0_messageErrorRateCtorSignature = "(I)V"; jint jninewElement_0_messageErrorRate = static_cast(entry_0.messageErrorRate); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_messageErrorRateClassName.c_str(), newElement_0_messageErrorRateCtorSignature.c_str(), jninewElement_0_messageErrorRate, newElement_0_messageErrorRate); jobject newElement_0_rxOnWhenIdle; std::string newElement_0_rxOnWhenIdleClassName = "java/lang/Boolean"; std::string newElement_0_rxOnWhenIdleCtorSignature = "(Z)V"; jboolean jninewElement_0_rxOnWhenIdle = static_cast(entry_0.rxOnWhenIdle); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_rxOnWhenIdleClassName.c_str(), newElement_0_rxOnWhenIdleCtorSignature.c_str(), jninewElement_0_rxOnWhenIdle, newElement_0_rxOnWhenIdle); jobject newElement_0_fullThreadDevice; std::string newElement_0_fullThreadDeviceClassName = "java/lang/Boolean"; std::string newElement_0_fullThreadDeviceCtorSignature = "(Z)V"; jboolean jninewElement_0_fullThreadDevice = static_cast(entry_0.fullThreadDevice); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fullThreadDeviceClassName.c_str(), newElement_0_fullThreadDeviceCtorSignature.c_str(), jninewElement_0_fullThreadDevice, newElement_0_fullThreadDevice); jobject newElement_0_fullNetworkData; std::string newElement_0_fullNetworkDataClassName = "java/lang/Boolean"; std::string newElement_0_fullNetworkDataCtorSignature = "(Z)V"; jboolean jninewElement_0_fullNetworkData = static_cast(entry_0.fullNetworkData); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fullNetworkDataClassName.c_str(), newElement_0_fullNetworkDataCtorSignature.c_str(), jninewElement_0_fullNetworkData, newElement_0_fullNetworkData); jobject newElement_0_isChild; std::string newElement_0_isChildClassName = "java/lang/Boolean"; std::string newElement_0_isChildCtorSignature = "(Z)V"; jboolean jninewElement_0_isChild = static_cast(entry_0.isChild); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_isChildClassName.c_str(), newElement_0_isChildCtorSignature.c_str(), jninewElement_0_isChild, newElement_0_isChild); { jclass neighborTableStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct", neighborTableStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct"); return nullptr; } jmethodID neighborTableStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, neighborTableStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/" "Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" "Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)V", &neighborTableStructStructCtor_1); if (err != CHIP_NO_ERROR || neighborTableStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct constructor"); return nullptr; } newElement_0 = env->NewObject( neighborTableStructStructClass_1, neighborTableStructStructCtor_1, newElement_0_extAddress, newElement_0_age, newElement_0_rloc16, newElement_0_linkFrameCounter, newElement_0_mleFrameCounter, newElement_0_lqi, newElement_0_averageRssi, newElement_0_lastRssi, newElement_0_frameErrorRate, newElement_0_messageErrorRate, newElement_0_rxOnWhenIdle, newElement_0_fullThreadDevice, newElement_0_fullNetworkData, newElement_0_isChild); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::RouteTable::Id: { using TypeInfo = Attributes::RouteTable::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_extAddress; std::string newElement_0_extAddressClassName = "java/lang/Long"; std::string newElement_0_extAddressCtorSignature = "(J)V"; jlong jninewElement_0_extAddress = static_cast(entry_0.extAddress); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), newElement_0_extAddressCtorSignature.c_str(), jninewElement_0_extAddress, newElement_0_extAddress); jobject newElement_0_rloc16; std::string newElement_0_rloc16ClassName = "java/lang/Integer"; std::string newElement_0_rloc16CtorSignature = "(I)V"; jint jninewElement_0_rloc16 = static_cast(entry_0.rloc16); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rloc16ClassName.c_str(), newElement_0_rloc16CtorSignature.c_str(), jninewElement_0_rloc16, newElement_0_rloc16); jobject newElement_0_routerId; std::string newElement_0_routerIdClassName = "java/lang/Integer"; std::string newElement_0_routerIdCtorSignature = "(I)V"; jint jninewElement_0_routerId = static_cast(entry_0.routerId); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_routerIdClassName.c_str(), newElement_0_routerIdCtorSignature.c_str(), jninewElement_0_routerId, newElement_0_routerId); jobject newElement_0_nextHop; std::string newElement_0_nextHopClassName = "java/lang/Integer"; std::string newElement_0_nextHopCtorSignature = "(I)V"; jint jninewElement_0_nextHop = static_cast(entry_0.nextHop); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nextHopClassName.c_str(), newElement_0_nextHopCtorSignature.c_str(), jninewElement_0_nextHop, newElement_0_nextHop); jobject newElement_0_pathCost; std::string newElement_0_pathCostClassName = "java/lang/Integer"; std::string newElement_0_pathCostCtorSignature = "(I)V"; jint jninewElement_0_pathCost = static_cast(entry_0.pathCost); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_pathCostClassName.c_str(), newElement_0_pathCostCtorSignature.c_str(), jninewElement_0_pathCost, newElement_0_pathCost); jobject newElement_0_LQIIn; std::string newElement_0_LQIInClassName = "java/lang/Integer"; std::string newElement_0_LQIInCtorSignature = "(I)V"; jint jninewElement_0_LQIIn = static_cast(entry_0.LQIIn); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_LQIInClassName.c_str(), newElement_0_LQIInCtorSignature.c_str(), jninewElement_0_LQIIn, newElement_0_LQIIn); jobject newElement_0_LQIOut; std::string newElement_0_LQIOutClassName = "java/lang/Integer"; std::string newElement_0_LQIOutCtorSignature = "(I)V"; jint jninewElement_0_LQIOut = static_cast(entry_0.LQIOut); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_LQIOutClassName.c_str(), newElement_0_LQIOutCtorSignature.c_str(), jninewElement_0_LQIOut, newElement_0_LQIOut); jobject newElement_0_age; std::string newElement_0_ageClassName = "java/lang/Integer"; std::string newElement_0_ageCtorSignature = "(I)V"; jint jninewElement_0_age = static_cast(entry_0.age); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_ageClassName.c_str(), newElement_0_ageCtorSignature.c_str(), jninewElement_0_age, newElement_0_age); jobject newElement_0_allocated; std::string newElement_0_allocatedClassName = "java/lang/Boolean"; std::string newElement_0_allocatedCtorSignature = "(Z)V"; jboolean jninewElement_0_allocated = static_cast(entry_0.allocated); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_allocatedClassName.c_str(), newElement_0_allocatedCtorSignature.c_str(), jninewElement_0_allocated, newElement_0_allocated); jobject newElement_0_linkEstablished; std::string newElement_0_linkEstablishedClassName = "java/lang/Boolean"; std::string newElement_0_linkEstablishedCtorSignature = "(Z)V"; jboolean jninewElement_0_linkEstablished = static_cast(entry_0.linkEstablished); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_linkEstablishedClassName.c_str(), newElement_0_linkEstablishedCtorSignature.c_str(), jninewElement_0_linkEstablished, newElement_0_linkEstablished); { jclass routeTableStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct", routeTableStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct"); return nullptr; } jmethodID routeTableStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, routeTableStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" "Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;)V", &routeTableStructStructCtor_1); if (err != CHIP_NO_ERROR || routeTableStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct constructor"); return nullptr; } newElement_0 = env->NewObject( routeTableStructStructClass_1, routeTableStructStructCtor_1, newElement_0_extAddress, newElement_0_rloc16, newElement_0_routerId, newElement_0_nextHop, newElement_0_pathCost, newElement_0_LQIIn, newElement_0_LQIOut, newElement_0_age, newElement_0_allocated, newElement_0_linkEstablished); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::PartitionId::Id: { using TypeInfo = Attributes::PartitionId::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Weighting::Id: { using TypeInfo = Attributes::Weighting::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::DataVersion::Id: { using TypeInfo = Attributes::DataVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::StableDataVersion::Id: { using TypeInfo = Attributes::StableDataVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::LeaderRouterId::Id: { using TypeInfo = Attributes::LeaderRouterId::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::DetachedRoleCount::Id: { using TypeInfo = Attributes::DetachedRoleCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ChildRoleCount::Id: { using TypeInfo = Attributes::ChildRoleCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RouterRoleCount::Id: { using TypeInfo = Attributes::RouterRoleCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LeaderRoleCount::Id: { using TypeInfo = Attributes::LeaderRoleCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AttachAttemptCount::Id: { using TypeInfo = Attributes::AttachAttemptCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::PartitionIdChangeCount::Id: { using TypeInfo = Attributes::PartitionIdChangeCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::BetterPartitionAttachAttemptCount::Id: { using TypeInfo = Attributes::BetterPartitionAttachAttemptCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ParentChangeCount::Id: { using TypeInfo = Attributes::ParentChangeCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxTotalCount::Id: { using TypeInfo = Attributes::TxTotalCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxUnicastCount::Id: { using TypeInfo = Attributes::TxUnicastCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxBroadcastCount::Id: { using TypeInfo = Attributes::TxBroadcastCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxAckRequestedCount::Id: { using TypeInfo = Attributes::TxAckRequestedCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxAckedCount::Id: { using TypeInfo = Attributes::TxAckedCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxNoAckRequestedCount::Id: { using TypeInfo = Attributes::TxNoAckRequestedCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxDataCount::Id: { using TypeInfo = Attributes::TxDataCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxDataPollCount::Id: { using TypeInfo = Attributes::TxDataPollCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxBeaconCount::Id: { using TypeInfo = Attributes::TxBeaconCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxBeaconRequestCount::Id: { using TypeInfo = Attributes::TxBeaconRequestCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxOtherCount::Id: { using TypeInfo = Attributes::TxOtherCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxRetryCount::Id: { using TypeInfo = Attributes::TxRetryCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxDirectMaxRetryExpiryCount::Id: { using TypeInfo = Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxIndirectMaxRetryExpiryCount::Id: { using TypeInfo = Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxErrCcaCount::Id: { using TypeInfo = Attributes::TxErrCcaCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxErrAbortCount::Id: { using TypeInfo = Attributes::TxErrAbortCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxErrBusyChannelCount::Id: { using TypeInfo = Attributes::TxErrBusyChannelCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RxTotalCount::Id: { using TypeInfo = Attributes::RxTotalCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RxUnicastCount::Id: { using TypeInfo = Attributes::RxUnicastCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RxBroadcastCount::Id: { using TypeInfo = Attributes::RxBroadcastCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RxDataCount::Id: { using TypeInfo = Attributes::RxDataCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RxDataPollCount::Id: { using TypeInfo = Attributes::RxDataPollCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RxBeaconCount::Id: { using TypeInfo = Attributes::RxBeaconCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RxBeaconRequestCount::Id: { using TypeInfo = Attributes::RxBeaconRequestCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RxOtherCount::Id: { using TypeInfo = Attributes::RxOtherCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RxAddressFilteredCount::Id: { using TypeInfo = Attributes::RxAddressFilteredCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RxDestAddrFilteredCount::Id: { using TypeInfo = Attributes::RxDestAddrFilteredCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RxDuplicatedCount::Id: { using TypeInfo = Attributes::RxDuplicatedCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RxErrNoFrameCount::Id: { using TypeInfo = Attributes::RxErrNoFrameCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RxErrUnknownNeighborCount::Id: { using TypeInfo = Attributes::RxErrUnknownNeighborCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RxErrInvalidSrcAddrCount::Id: { using TypeInfo = Attributes::RxErrInvalidSrcAddrCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RxErrSecCount::Id: { using TypeInfo = Attributes::RxErrSecCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RxErrFcsCount::Id: { using TypeInfo = Attributes::RxErrFcsCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RxErrOtherCount::Id: { using TypeInfo = Attributes::RxErrOtherCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ActiveTimestamp::Id: { using TypeInfo = Attributes::ActiveTimestamp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PendingTimestamp::Id: { using TypeInfo = Attributes::PendingTimestamp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Delay::Id: { using TypeInfo = Attributes::Delay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::SecurityPolicy::Id: { using TypeInfo = Attributes::SecurityPolicy::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_rotationTime; std::string value_rotationTimeClassName = "java/lang/Integer"; std::string value_rotationTimeCtorSignature = "(I)V"; jint jnivalue_rotationTime = static_cast(cppValue.Value().rotationTime); chip::JniReferences::GetInstance().CreateBoxedObject(value_rotationTimeClassName.c_str(), value_rotationTimeCtorSignature.c_str(), jnivalue_rotationTime, value_rotationTime); jobject value_flags; std::string value_flagsClassName = "java/lang/Integer"; std::string value_flagsCtorSignature = "(I)V"; jint jnivalue_flags = static_cast(cppValue.Value().flags); chip::JniReferences::GetInstance().CreateBoxedObject( value_flagsClassName.c_str(), value_flagsCtorSignature.c_str(), jnivalue_flags, value_flags); { jclass securityPolicyStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterSecurityPolicy", securityPolicyStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterSecurityPolicy"); return nullptr; } jmethodID securityPolicyStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, securityPolicyStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &securityPolicyStructCtor_1); if (err != CHIP_NO_ERROR || securityPolicyStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterSecurityPolicy constructor"); return nullptr; } value = env->NewObject(securityPolicyStructClass_1, securityPolicyStructCtor_1, value_rotationTime, value_flags); } } return value; } case Attributes::ChannelPage0Mask::Id: { using TypeInfo = Attributes::ChannelPage0Mask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.Value().size())); env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.Value().size()), reinterpret_cast(cppValue.Value().data())); value = valueByteArray; } return value; } case Attributes::OperationalDatasetComponents::Id: { using TypeInfo = Attributes::OperationalDatasetComponents::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_activeTimestampPresent; std::string value_activeTimestampPresentClassName = "java/lang/Boolean"; std::string value_activeTimestampPresentCtorSignature = "(Z)V"; jboolean jnivalue_activeTimestampPresent = static_cast(cppValue.Value().activeTimestampPresent); chip::JniReferences::GetInstance().CreateBoxedObject( value_activeTimestampPresentClassName.c_str(), value_activeTimestampPresentCtorSignature.c_str(), jnivalue_activeTimestampPresent, value_activeTimestampPresent); jobject value_pendingTimestampPresent; std::string value_pendingTimestampPresentClassName = "java/lang/Boolean"; std::string value_pendingTimestampPresentCtorSignature = "(Z)V"; jboolean jnivalue_pendingTimestampPresent = static_cast(cppValue.Value().pendingTimestampPresent); chip::JniReferences::GetInstance().CreateBoxedObject( value_pendingTimestampPresentClassName.c_str(), value_pendingTimestampPresentCtorSignature.c_str(), jnivalue_pendingTimestampPresent, value_pendingTimestampPresent); jobject value_masterKeyPresent; std::string value_masterKeyPresentClassName = "java/lang/Boolean"; std::string value_masterKeyPresentCtorSignature = "(Z)V"; jboolean jnivalue_masterKeyPresent = static_cast(cppValue.Value().masterKeyPresent); chip::JniReferences::GetInstance().CreateBoxedObject(value_masterKeyPresentClassName.c_str(), value_masterKeyPresentCtorSignature.c_str(), jnivalue_masterKeyPresent, value_masterKeyPresent); jobject value_networkNamePresent; std::string value_networkNamePresentClassName = "java/lang/Boolean"; std::string value_networkNamePresentCtorSignature = "(Z)V"; jboolean jnivalue_networkNamePresent = static_cast(cppValue.Value().networkNamePresent); chip::JniReferences::GetInstance().CreateBoxedObject( value_networkNamePresentClassName.c_str(), value_networkNamePresentCtorSignature.c_str(), jnivalue_networkNamePresent, value_networkNamePresent); jobject value_extendedPanIdPresent; std::string value_extendedPanIdPresentClassName = "java/lang/Boolean"; std::string value_extendedPanIdPresentCtorSignature = "(Z)V"; jboolean jnivalue_extendedPanIdPresent = static_cast(cppValue.Value().extendedPanIdPresent); chip::JniReferences::GetInstance().CreateBoxedObject( value_extendedPanIdPresentClassName.c_str(), value_extendedPanIdPresentCtorSignature.c_str(), jnivalue_extendedPanIdPresent, value_extendedPanIdPresent); jobject value_meshLocalPrefixPresent; std::string value_meshLocalPrefixPresentClassName = "java/lang/Boolean"; std::string value_meshLocalPrefixPresentCtorSignature = "(Z)V"; jboolean jnivalue_meshLocalPrefixPresent = static_cast(cppValue.Value().meshLocalPrefixPresent); chip::JniReferences::GetInstance().CreateBoxedObject( value_meshLocalPrefixPresentClassName.c_str(), value_meshLocalPrefixPresentCtorSignature.c_str(), jnivalue_meshLocalPrefixPresent, value_meshLocalPrefixPresent); jobject value_delayPresent; std::string value_delayPresentClassName = "java/lang/Boolean"; std::string value_delayPresentCtorSignature = "(Z)V"; jboolean jnivalue_delayPresent = static_cast(cppValue.Value().delayPresent); chip::JniReferences::GetInstance().CreateBoxedObject(value_delayPresentClassName.c_str(), value_delayPresentCtorSignature.c_str(), jnivalue_delayPresent, value_delayPresent); jobject value_panIdPresent; std::string value_panIdPresentClassName = "java/lang/Boolean"; std::string value_panIdPresentCtorSignature = "(Z)V"; jboolean jnivalue_panIdPresent = static_cast(cppValue.Value().panIdPresent); chip::JniReferences::GetInstance().CreateBoxedObject(value_panIdPresentClassName.c_str(), value_panIdPresentCtorSignature.c_str(), jnivalue_panIdPresent, value_panIdPresent); jobject value_channelPresent; std::string value_channelPresentClassName = "java/lang/Boolean"; std::string value_channelPresentCtorSignature = "(Z)V"; jboolean jnivalue_channelPresent = static_cast(cppValue.Value().channelPresent); chip::JniReferences::GetInstance().CreateBoxedObject(value_channelPresentClassName.c_str(), value_channelPresentCtorSignature.c_str(), jnivalue_channelPresent, value_channelPresent); jobject value_pskcPresent; std::string value_pskcPresentClassName = "java/lang/Boolean"; std::string value_pskcPresentCtorSignature = "(Z)V"; jboolean jnivalue_pskcPresent = static_cast(cppValue.Value().pskcPresent); chip::JniReferences::GetInstance().CreateBoxedObject(value_pskcPresentClassName.c_str(), value_pskcPresentCtorSignature.c_str(), jnivalue_pskcPresent, value_pskcPresent); jobject value_securityPolicyPresent; std::string value_securityPolicyPresentClassName = "java/lang/Boolean"; std::string value_securityPolicyPresentCtorSignature = "(Z)V"; jboolean jnivalue_securityPolicyPresent = static_cast(cppValue.Value().securityPolicyPresent); chip::JniReferences::GetInstance().CreateBoxedObject( value_securityPolicyPresentClassName.c_str(), value_securityPolicyPresentCtorSignature.c_str(), jnivalue_securityPolicyPresent, value_securityPolicyPresent); jobject value_channelMaskPresent; std::string value_channelMaskPresentClassName = "java/lang/Boolean"; std::string value_channelMaskPresentCtorSignature = "(Z)V"; jboolean jnivalue_channelMaskPresent = static_cast(cppValue.Value().channelMaskPresent); chip::JniReferences::GetInstance().CreateBoxedObject( value_channelMaskPresentClassName.c_str(), value_channelMaskPresentCtorSignature.c_str(), jnivalue_channelMaskPresent, value_channelMaskPresent); { jclass operationalDatasetComponentsStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterOperationalDatasetComponents", operationalDatasetComponentsStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterOperationalDatasetComponents"); return nullptr; } jmethodID operationalDatasetComponentsStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, operationalDatasetComponentsStructClass_1, "", "(Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/" "lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/" "Boolean;Ljava/lang/Boolean;)V", &operationalDatasetComponentsStructCtor_1); if (err != CHIP_NO_ERROR || operationalDatasetComponentsStructCtor_1 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterOperationalDatasetComponents constructor"); return nullptr; } value = env->NewObject(operationalDatasetComponentsStructClass_1, operationalDatasetComponentsStructCtor_1, value_activeTimestampPresent, value_pendingTimestampPresent, value_masterKeyPresent, value_networkNamePresent, value_extendedPanIdPresent, value_meshLocalPrefixPresent, value_delayPresent, value_panIdPresent, value_channelPresent, value_pskcPresent, value_securityPolicyPresent, value_channelMaskPresent); } } return value; } case Attributes::ActiveNetworkFaultsList::Id: { using TypeInfo = Attributes::ActiveNetworkFaultsList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::WiFiNetworkDiagnostics::Id: { using namespace app::Clusters::WiFiNetworkDiagnostics; switch (aPath.mAttributeId) { case Attributes::Bssid::Id: { using TypeInfo = Attributes::Bssid::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.Value().size())); env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.Value().size()), reinterpret_cast(cppValue.Value().data())); value = valueByteArray; } return value; } case Attributes::SecurityType::Id: { using TypeInfo = Attributes::SecurityType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::WiFiVersion::Id: { using TypeInfo = Attributes::WiFiVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ChannelNumber::Id: { using TypeInfo = Attributes::ChannelNumber::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Rssi::Id: { using TypeInfo = Attributes::Rssi::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::BeaconLostCount::Id: { using TypeInfo = Attributes::BeaconLostCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::BeaconRxCount::Id: { using TypeInfo = Attributes::BeaconRxCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PacketMulticastRxCount::Id: { using TypeInfo = Attributes::PacketMulticastRxCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PacketMulticastTxCount::Id: { using TypeInfo = Attributes::PacketMulticastTxCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PacketUnicastRxCount::Id: { using TypeInfo = Attributes::PacketUnicastRxCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PacketUnicastTxCount::Id: { using TypeInfo = Attributes::PacketUnicastTxCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::CurrentMaxRate::Id: { using TypeInfo = Attributes::CurrentMaxRate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OverrunCount::Id: { using TypeInfo = Attributes::OverrunCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::EthernetNetworkDiagnostics::Id: { using namespace app::Clusters::EthernetNetworkDiagnostics; switch (aPath.mAttributeId) { case Attributes::PHYRate::Id: { using TypeInfo = Attributes::PHYRate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::FullDuplex::Id: { using TypeInfo = Attributes::FullDuplex::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PacketRxCount::Id: { using TypeInfo = Attributes::PacketRxCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::PacketTxCount::Id: { using TypeInfo = Attributes::PacketTxCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TxErrCount::Id: { using TypeInfo = Attributes::TxErrCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CollisionCount::Id: { using TypeInfo = Attributes::CollisionCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::OverrunCount::Id: { using TypeInfo = Attributes::OverrunCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CarrierDetect::Id: { using TypeInfo = Attributes::CarrierDetect::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::TimeSinceReset::Id: { using TypeInfo = Attributes::TimeSinceReset::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::TimeSynchronization::Id: { using namespace app::Clusters::TimeSynchronization; switch (aPath.mAttributeId) { case Attributes::UTCTime::Id: { using TypeInfo = Attributes::UTCTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Granularity::Id: { using TypeInfo = Attributes::Granularity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TimeSource::Id: { using TypeInfo = Attributes::TimeSource::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TrustedTimeSource::Id: { using TypeInfo = Attributes::TrustedTimeSource::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_fabricIndex; std::string value_fabricIndexClassName = "java/lang/Integer"; std::string value_fabricIndexCtorSignature = "(I)V"; jint jnivalue_fabricIndex = static_cast(cppValue.Value().fabricIndex); chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), value_fabricIndexCtorSignature.c_str(), jnivalue_fabricIndex, value_fabricIndex); jobject value_nodeID; std::string value_nodeIDClassName = "java/lang/Long"; std::string value_nodeIDCtorSignature = "(J)V"; jlong jnivalue_nodeID = static_cast(cppValue.Value().nodeID); chip::JniReferences::GetInstance().CreateBoxedObject( value_nodeIDClassName.c_str(), value_nodeIDCtorSignature.c_str(), jnivalue_nodeID, value_nodeID); jobject value_endpoint; std::string value_endpointClassName = "java/lang/Integer"; std::string value_endpointCtorSignature = "(I)V"; jint jnivalue_endpoint = static_cast(cppValue.Value().endpoint); chip::JniReferences::GetInstance().CreateBoxedObject( value_endpointClassName.c_str(), value_endpointCtorSignature.c_str(), jnivalue_endpoint, value_endpoint); { jclass trustedTimeSourceStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterTrustedTimeSourceStruct", trustedTimeSourceStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterTrustedTimeSourceStruct"); return nullptr; } jmethodID trustedTimeSourceStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, trustedTimeSourceStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;)V", &trustedTimeSourceStructStructCtor_1); if (err != CHIP_NO_ERROR || trustedTimeSourceStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterTrustedTimeSourceStruct constructor"); return nullptr; } value = env->NewObject(trustedTimeSourceStructStructClass_1, trustedTimeSourceStructStructCtor_1, value_fabricIndex, value_nodeID, value_endpoint); } } return value; } case Attributes::DefaultNTP::Id: { using TypeInfo = Attributes::DefaultNTP::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value(), value)); } return value; } case Attributes::TimeZone::Id: { using TypeInfo = Attributes::TimeZone::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_offset; std::string newElement_0_offsetClassName = "java/lang/Long"; std::string newElement_0_offsetCtorSignature = "(J)V"; jlong jninewElement_0_offset = static_cast(entry_0.offset); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_offsetClassName.c_str(), newElement_0_offsetCtorSignature.c_str(), jninewElement_0_offset, newElement_0_offset); jobject newElement_0_validAt; std::string newElement_0_validAtClassName = "java/lang/Long"; std::string newElement_0_validAtCtorSignature = "(J)V"; jlong jninewElement_0_validAt = static_cast(entry_0.validAt); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validAtClassName.c_str(), newElement_0_validAtCtorSignature.c_str(), jninewElement_0_validAt, newElement_0_validAt); jobject newElement_0_name; if (!entry_0.name.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); } else { jobject newElement_0_nameInsideOptional; LogErrorOnFailure( chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); } { jclass timeZoneStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterTimeZoneStruct", timeZoneStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterTimeZoneStruct"); return nullptr; } jmethodID timeZoneStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, timeZoneStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;)V", &timeZoneStructStructCtor_1); if (err != CHIP_NO_ERROR || timeZoneStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterTimeZoneStruct constructor"); return nullptr; } newElement_0 = env->NewObject(timeZoneStructStructClass_1, timeZoneStructStructCtor_1, newElement_0_offset, newElement_0_validAt, newElement_0_name); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::DSTOffset::Id: { using TypeInfo = Attributes::DSTOffset::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_offset; std::string newElement_0_offsetClassName = "java/lang/Long"; std::string newElement_0_offsetCtorSignature = "(J)V"; jlong jninewElement_0_offset = static_cast(entry_0.offset); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_offsetClassName.c_str(), newElement_0_offsetCtorSignature.c_str(), jninewElement_0_offset, newElement_0_offset); jobject newElement_0_validStarting; std::string newElement_0_validStartingClassName = "java/lang/Long"; std::string newElement_0_validStartingCtorSignature = "(J)V"; jlong jninewElement_0_validStarting = static_cast(entry_0.validStarting); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_validStartingClassName.c_str(), newElement_0_validStartingCtorSignature.c_str(), jninewElement_0_validStarting, newElement_0_validStarting); jobject newElement_0_validUntil; if (entry_0.validUntil.IsNull()) { newElement_0_validUntil = nullptr; } else { std::string newElement_0_validUntilClassName = "java/lang/Long"; std::string newElement_0_validUntilCtorSignature = "(J)V"; jlong jninewElement_0_validUntil = static_cast(entry_0.validUntil.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_validUntilClassName.c_str(), newElement_0_validUntilCtorSignature.c_str(), jninewElement_0_validUntil, newElement_0_validUntil); } { jclass DSTOffsetStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterDSTOffsetStruct", DSTOffsetStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterDSTOffsetStruct"); return nullptr; } jmethodID DSTOffsetStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, DSTOffsetStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V", &DSTOffsetStructStructCtor_1); if (err != CHIP_NO_ERROR || DSTOffsetStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterDSTOffsetStruct constructor"); return nullptr; } newElement_0 = env->NewObject(DSTOffsetStructStructClass_1, DSTOffsetStructStructCtor_1, newElement_0_offset, newElement_0_validStarting, newElement_0_validUntil); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::LocalTime::Id: { using TypeInfo = Attributes::LocalTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::TimeZoneDatabase::Id: { using TypeInfo = Attributes::TimeZoneDatabase::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NTPServerAvailable::Id: { using TypeInfo = Attributes::NTPServerAvailable::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TimeZoneListMaxSize::Id: { using TypeInfo = Attributes::TimeZoneListMaxSize::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::DSTOffsetListMaxSize::Id: { using TypeInfo = Attributes::DSTOffsetListMaxSize::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SupportsDNSResolve::Id: { using TypeInfo = Attributes::SupportsDNSResolve::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::BridgedDeviceBasicInformation::Id: { using namespace app::Clusters::BridgedDeviceBasicInformation; switch (aPath.mAttributeId) { case Attributes::VendorName::Id: { using TypeInfo = Attributes::VendorName::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::VendorID::Id: { using TypeInfo = Attributes::VendorID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ProductName::Id: { using TypeInfo = Attributes::ProductName::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::ProductID::Id: { using TypeInfo = Attributes::ProductID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NodeLabel::Id: { using TypeInfo = Attributes::NodeLabel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::HardwareVersion::Id: { using TypeInfo = Attributes::HardwareVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::HardwareVersionString::Id: { using TypeInfo = Attributes::HardwareVersionString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::SoftwareVersion::Id: { using TypeInfo = Attributes::SoftwareVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SoftwareVersionString::Id: { using TypeInfo = Attributes::SoftwareVersionString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::ManufacturingDate::Id: { using TypeInfo = Attributes::ManufacturingDate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::PartNumber::Id: { using TypeInfo = Attributes::PartNumber::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::ProductURL::Id: { using TypeInfo = Attributes::ProductURL::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::ProductLabel::Id: { using TypeInfo = Attributes::ProductLabel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::SerialNumber::Id: { using TypeInfo = Attributes::SerialNumber::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::Reachable::Id: { using TypeInfo = Attributes::Reachable::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::UniqueID::Id: { using TypeInfo = Attributes::UniqueID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::ProductAppearance::Id: { using TypeInfo = Attributes::ProductAppearance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_finish; std::string value_finishClassName = "java/lang/Integer"; std::string value_finishCtorSignature = "(I)V"; jint jnivalue_finish = static_cast(cppValue.finish); chip::JniReferences::GetInstance().CreateBoxedObject( value_finishClassName.c_str(), value_finishCtorSignature.c_str(), jnivalue_finish, value_finish); jobject value_primaryColor; if (cppValue.primaryColor.IsNull()) { value_primaryColor = nullptr; } else { std::string value_primaryColorClassName = "java/lang/Integer"; std::string value_primaryColorCtorSignature = "(I)V"; jint jnivalue_primaryColor = static_cast(cppValue.primaryColor.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(value_primaryColorClassName.c_str(), value_primaryColorCtorSignature.c_str(), jnivalue_primaryColor, value_primaryColor); } { jclass productAppearanceStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$BridgedDeviceBasicInformationClusterProductAppearanceStruct", productAppearanceStructStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$BridgedDeviceBasicInformationClusterProductAppearanceStruct"); return nullptr; } jmethodID productAppearanceStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod(env, productAppearanceStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &productAppearanceStructStructCtor_0); if (err != CHIP_NO_ERROR || productAppearanceStructStructCtor_0 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$BridgedDeviceBasicInformationClusterProductAppearanceStruct constructor"); return nullptr; } value = env->NewObject(productAppearanceStructStructClass_0, productAppearanceStructStructCtor_0, value_finish, value_primaryColor); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::Switch::Id: { using namespace app::Clusters::Switch; switch (aPath.mAttributeId) { case Attributes::NumberOfPositions::Id: { using TypeInfo = Attributes::NumberOfPositions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CurrentPosition::Id: { using TypeInfo = Attributes::CurrentPosition::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MultiPressMax::Id: { using TypeInfo = Attributes::MultiPressMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::AdministratorCommissioning::Id: { using namespace app::Clusters::AdministratorCommissioning; switch (aPath.mAttributeId) { case Attributes::WindowStatus::Id: { using TypeInfo = Attributes::WindowStatus::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AdminFabricIndex::Id: { using TypeInfo = Attributes::AdminFabricIndex::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::AdminVendorId::Id: { using TypeInfo = Attributes::AdminVendorId::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::OperationalCredentials::Id: { using namespace app::Clusters::OperationalCredentials; switch (aPath.mAttributeId) { case Attributes::NOCs::Id: { using TypeInfo = Attributes::NOCs::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_noc; jbyteArray newElement_0_nocByteArray = env->NewByteArray(static_cast(entry_0.noc.size())); env->SetByteArrayRegion(newElement_0_nocByteArray, 0, static_cast(entry_0.noc.size()), reinterpret_cast(entry_0.noc.data())); newElement_0_noc = newElement_0_nocByteArray; jobject newElement_0_icac; if (entry_0.icac.IsNull()) { newElement_0_icac = nullptr; } else { jbyteArray newElement_0_icacByteArray = env->NewByteArray(static_cast(entry_0.icac.Value().size())); env->SetByteArrayRegion(newElement_0_icacByteArray, 0, static_cast(entry_0.icac.Value().size()), reinterpret_cast(entry_0.icac.Value().data())); newElement_0_icac = newElement_0_icacByteArray; } jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); { jclass NOCStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterNOCStruct", NOCStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterNOCStruct"); return nullptr; } jmethodID NOCStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, NOCStructStructClass_1, "", "([B[BLjava/lang/Integer;)V", &NOCStructStructCtor_1); if (err != CHIP_NO_ERROR || NOCStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterNOCStruct constructor"); return nullptr; } newElement_0 = env->NewObject(NOCStructStructClass_1, NOCStructStructCtor_1, newElement_0_noc, newElement_0_icac, newElement_0_fabricIndex); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::Fabrics::Id: { using TypeInfo = Attributes::Fabrics::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_rootPublicKey; jbyteArray newElement_0_rootPublicKeyByteArray = env->NewByteArray(static_cast(entry_0.rootPublicKey.size())); env->SetByteArrayRegion(newElement_0_rootPublicKeyByteArray, 0, static_cast(entry_0.rootPublicKey.size()), reinterpret_cast(entry_0.rootPublicKey.data())); newElement_0_rootPublicKey = newElement_0_rootPublicKeyByteArray; jobject newElement_0_vendorID; std::string newElement_0_vendorIDClassName = "java/lang/Integer"; std::string newElement_0_vendorIDCtorSignature = "(I)V"; jint jninewElement_0_vendorID = static_cast(entry_0.vendorID); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_vendorIDClassName.c_str(), newElement_0_vendorIDCtorSignature.c_str(), jninewElement_0_vendorID, newElement_0_vendorID); jobject newElement_0_fabricID; std::string newElement_0_fabricIDClassName = "java/lang/Long"; std::string newElement_0_fabricIDCtorSignature = "(J)V"; jlong jninewElement_0_fabricID = static_cast(entry_0.fabricID); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIDClassName.c_str(), newElement_0_fabricIDCtorSignature.c_str(), jninewElement_0_fabricID, newElement_0_fabricID); jobject newElement_0_nodeID; std::string newElement_0_nodeIDClassName = "java/lang/Long"; std::string newElement_0_nodeIDCtorSignature = "(J)V"; jlong jninewElement_0_nodeID = static_cast(entry_0.nodeID); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nodeIDClassName.c_str(), newElement_0_nodeIDCtorSignature.c_str(), jninewElement_0_nodeID, newElement_0_nodeID); jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); { jclass fabricDescriptorStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct", fabricDescriptorStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct"); return nullptr; } jmethodID fabricDescriptorStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, fabricDescriptorStructStructClass_1, "", "([BLjava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;)V", &fabricDescriptorStructStructCtor_1); if (err != CHIP_NO_ERROR || fabricDescriptorStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct constructor"); return nullptr; } newElement_0 = env->NewObject(fabricDescriptorStructStructClass_1, fabricDescriptorStructStructCtor_1, newElement_0_rootPublicKey, newElement_0_vendorID, newElement_0_fabricID, newElement_0_nodeID, newElement_0_label, newElement_0_fabricIndex); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::SupportedFabrics::Id: { using TypeInfo = Attributes::SupportedFabrics::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CommissionedFabrics::Id: { using TypeInfo = Attributes::CommissionedFabrics::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TrustedRootCertificates::Id: { using TypeInfo = Attributes::TrustedRootCertificates::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), reinterpret_cast(entry_0.data())); newElement_0 = newElement_0ByteArray; chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentFabricIndex::Id: { using TypeInfo = Attributes::CurrentFabricIndex::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::GroupKeyManagement::Id: { using namespace app::Clusters::GroupKeyManagement; switch (aPath.mAttributeId) { case Attributes::GroupKeyMap::Id: { using TypeInfo = Attributes::GroupKeyMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_groupId; std::string newElement_0_groupIdClassName = "java/lang/Integer"; std::string newElement_0_groupIdCtorSignature = "(I)V"; jint jninewElement_0_groupId = static_cast(entry_0.groupId); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), newElement_0_groupIdCtorSignature.c_str(), jninewElement_0_groupId, newElement_0_groupId); jobject newElement_0_groupKeySetID; std::string newElement_0_groupKeySetIDClassName = "java/lang/Integer"; std::string newElement_0_groupKeySetIDCtorSignature = "(I)V"; jint jninewElement_0_groupKeySetID = static_cast(entry_0.groupKeySetID); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_groupKeySetIDClassName.c_str(), newElement_0_groupKeySetIDCtorSignature.c_str(), jninewElement_0_groupKeySetID, newElement_0_groupKeySetID); jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); { jclass groupKeyMapStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct", groupKeyMapStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct"); return nullptr; } jmethodID groupKeyMapStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, groupKeyMapStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &groupKeyMapStructStructCtor_1); if (err != CHIP_NO_ERROR || groupKeyMapStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct constructor"); return nullptr; } newElement_0 = env->NewObject(groupKeyMapStructStructClass_1, groupKeyMapStructStructCtor_1, newElement_0_groupId, newElement_0_groupKeySetID, newElement_0_fabricIndex); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GroupTable::Id: { using TypeInfo = Attributes::GroupTable::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_groupId; std::string newElement_0_groupIdClassName = "java/lang/Integer"; std::string newElement_0_groupIdCtorSignature = "(I)V"; jint jninewElement_0_groupId = static_cast(entry_0.groupId); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), newElement_0_groupIdCtorSignature.c_str(), jninewElement_0_groupId, newElement_0_groupId); jobject newElement_0_endpoints; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); auto iter_newElement_0_endpoints_2 = entry_0.endpoints.begin(); while (iter_newElement_0_endpoints_2.Next()) { auto & entry_2 = iter_newElement_0_endpoints_2.GetValue(); jobject newElement_2; std::string newElement_2ClassName = "java/lang/Integer"; std::string newElement_2CtorSignature = "(I)V"; jint jninewElement_2 = static_cast(entry_2); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); chip::JniReferences::GetInstance().AddToList(newElement_0_endpoints, newElement_2); } jobject newElement_0_groupName; if (!entry_0.groupName.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_groupName); } else { jobject newElement_0_groupNameInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.groupName.Value(), newElement_0_groupNameInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_0_groupNameInsideOptional, newElement_0_groupName); } jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); { jclass groupInfoMapStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct", groupInfoMapStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct"); return nullptr; } jmethodID groupInfoMapStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, groupInfoMapStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/Optional;Ljava/lang/Integer;)V", &groupInfoMapStructStructCtor_1); if (err != CHIP_NO_ERROR || groupInfoMapStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct constructor"); return nullptr; } newElement_0 = env->NewObject(groupInfoMapStructStructClass_1, groupInfoMapStructStructCtor_1, newElement_0_groupId, newElement_0_endpoints, newElement_0_groupName, newElement_0_fabricIndex); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::MaxGroupsPerFabric::Id: { using TypeInfo = Attributes::MaxGroupsPerFabric::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MaxGroupKeysPerFabric::Id: { using TypeInfo = Attributes::MaxGroupKeysPerFabric::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::FixedLabel::Id: { using namespace app::Clusters::FixedLabel; switch (aPath.mAttributeId) { case Attributes::LabelList::Id: { using TypeInfo = Attributes::LabelList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); jobject newElement_0_value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.value, newElement_0_value)); { jclass labelStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$FixedLabelClusterLabelStruct", labelStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$FixedLabelClusterLabelStruct"); return nullptr; } jmethodID labelStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, labelStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/String;)V", &labelStructStructCtor_1); if (err != CHIP_NO_ERROR || labelStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$FixedLabelClusterLabelStruct constructor"); return nullptr; } newElement_0 = env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::UserLabel::Id: { using namespace app::Clusters::UserLabel; switch (aPath.mAttributeId) { case Attributes::LabelList::Id: { using TypeInfo = Attributes::LabelList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); jobject newElement_0_value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.value, newElement_0_value)); { jclass labelStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$UserLabelClusterLabelStruct", labelStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$UserLabelClusterLabelStruct"); return nullptr; } jmethodID labelStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, labelStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/String;)V", &labelStructStructCtor_1); if (err != CHIP_NO_ERROR || labelStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$UserLabelClusterLabelStruct constructor"); return nullptr; } newElement_0 = env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ProxyConfiguration::Id: { using namespace app::Clusters::ProxyConfiguration; switch (aPath.mAttributeId) { case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ProxyDiscovery::Id: { using namespace app::Clusters::ProxyDiscovery; switch (aPath.mAttributeId) { case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ProxyValid::Id: { using namespace app::Clusters::ProxyValid; switch (aPath.mAttributeId) { case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::BooleanState::Id: { using namespace app::Clusters::BooleanState; switch (aPath.mAttributeId) { case Attributes::StateValue::Id: { using TypeInfo = Attributes::StateValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::IcdManagement::Id: { using namespace app::Clusters::IcdManagement; switch (aPath.mAttributeId) { case Attributes::IdleModeDuration::Id: { using TypeInfo = Attributes::IdleModeDuration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ActiveModeDuration::Id: { using TypeInfo = Attributes::ActiveModeDuration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ActiveModeThreshold::Id: { using TypeInfo = Attributes::ActiveModeThreshold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RegisteredClients::Id: { using TypeInfo = Attributes::RegisteredClients::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_checkInNodeID; std::string newElement_0_checkInNodeIDClassName = "java/lang/Long"; std::string newElement_0_checkInNodeIDCtorSignature = "(J)V"; jlong jninewElement_0_checkInNodeID = static_cast(entry_0.checkInNodeID); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_checkInNodeIDClassName.c_str(), newElement_0_checkInNodeIDCtorSignature.c_str(), jninewElement_0_checkInNodeID, newElement_0_checkInNodeID); jobject newElement_0_monitoredSubject; std::string newElement_0_monitoredSubjectClassName = "java/lang/Long"; std::string newElement_0_monitoredSubjectCtorSignature = "(J)V"; jlong jninewElement_0_monitoredSubject = static_cast(entry_0.monitoredSubject); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_monitoredSubjectClassName.c_str(), newElement_0_monitoredSubjectCtorSignature.c_str(), jninewElement_0_monitoredSubject, newElement_0_monitoredSubject); jobject newElement_0_clientType; std::string newElement_0_clientTypeClassName = "java/lang/Integer"; std::string newElement_0_clientTypeCtorSignature = "(I)V"; jint jninewElement_0_clientType = static_cast(entry_0.clientType); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_clientTypeClassName.c_str(), newElement_0_clientTypeCtorSignature.c_str(), jninewElement_0_clientType, newElement_0_clientType); jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); { jclass monitoringRegistrationStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$IcdManagementClusterMonitoringRegistrationStruct", monitoringRegistrationStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$IcdManagementClusterMonitoringRegistrationStruct"); return nullptr; } jmethodID monitoringRegistrationStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, monitoringRegistrationStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;)V", &monitoringRegistrationStructStructCtor_1); if (err != CHIP_NO_ERROR || monitoringRegistrationStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$IcdManagementClusterMonitoringRegistrationStruct constructor"); return nullptr; } newElement_0 = env->NewObject(monitoringRegistrationStructStructClass_1, monitoringRegistrationStructStructCtor_1, newElement_0_checkInNodeID, newElement_0_monitoredSubject, newElement_0_clientType, newElement_0_fabricIndex); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::ICDCounter::Id: { using TypeInfo = Attributes::ICDCounter::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClientsSupportedPerFabric::Id: { using TypeInfo = Attributes::ClientsSupportedPerFabric::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::UserActiveModeTriggerHint::Id: { using TypeInfo = Attributes::UserActiveModeTriggerHint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::UserActiveModeTriggerInstruction::Id: { using TypeInfo = Attributes::UserActiveModeTriggerInstruction::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::OperatingMode::Id: { using TypeInfo = Attributes::OperatingMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MaximumCheckInBackOff::Id: { using TypeInfo = Attributes::MaximumCheckInBackOff::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::Timer::Id: { using namespace app::Clusters::Timer; switch (aPath.mAttributeId) { case Attributes::SetTime::Id: { using TypeInfo = Attributes::SetTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TimeRemaining::Id: { using TypeInfo = Attributes::TimeRemaining::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TimerState::Id: { using TypeInfo = Attributes::TimerState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::OvenCavityOperationalState::Id: { using namespace app::Clusters::OvenCavityOperationalState; switch (aPath.mAttributeId) { case Attributes::PhaseList::Id: { using TypeInfo = Attributes::PhaseList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_1 = cppValue.Value().begin(); while (iter_value_1.Next()) { auto & entry_1 = iter_value_1.GetValue(); jobject newElement_1; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); chip::JniReferences::GetInstance().AddToList(value, newElement_1); } } return value; } case Attributes::CurrentPhase::Id: { using TypeInfo = Attributes::CurrentPhase::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::CountdownTime::Id: { using TypeInfo = Attributes::CountdownTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OperationalStateList::Id: { using TypeInfo = Attributes::OperationalStateList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_operationalStateID; std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), jninewElement_0_operationalStateID, newElement_0_operationalStateID); jobject newElement_0_operationalStateLabel; if (!entry_0.operationalStateLabel.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); } else { jobject newElement_0_operationalStateLabelInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( entry_0.operationalStateLabel.Value(), newElement_0_operationalStateLabelInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, newElement_0_operationalStateLabel); } { jclass operationalStateStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct", operationalStateStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct"); return nullptr; } jmethodID operationalStateStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, operationalStateStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V", &operationalStateStructStructCtor_1); if (err != CHIP_NO_ERROR || operationalStateStructStructCtor_1 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct constructor"); return nullptr; } newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, newElement_0_operationalStateID, newElement_0_operationalStateLabel); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::OperationalState::Id: { using TypeInfo = Attributes::OperationalState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::OperationalError::Id: { using TypeInfo = Attributes::OperationalError::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_errorStateID; std::string value_errorStateIDClassName = "java/lang/Integer"; std::string value_errorStateIDCtorSignature = "(I)V"; jint jnivalue_errorStateID = static_cast(cppValue.errorStateID); chip::JniReferences::GetInstance().CreateBoxedObject(value_errorStateIDClassName.c_str(), value_errorStateIDCtorSignature.c_str(), jnivalue_errorStateID, value_errorStateID); jobject value_errorStateLabel; if (!cppValue.errorStateLabel.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateLabel); } else { jobject value_errorStateLabelInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateLabel.Value(), value_errorStateLabelInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(value_errorStateLabelInsideOptional, value_errorStateLabel); } jobject value_errorStateDetails; if (!cppValue.errorStateDetails.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateDetails); } else { jobject value_errorStateDetailsInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateDetails.Value(), value_errorStateDetailsInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(value_errorStateDetailsInsideOptional, value_errorStateDetails); } { jclass errorStateStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct"); return nullptr; } jmethodID errorStateStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod( env, errorStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", &errorStateStructStructCtor_0); if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct constructor"); return nullptr; } value = env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorStateID, value_errorStateLabel, value_errorStateDetails); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::OvenMode::Id: { using namespace app::Clusters::OvenMode; switch (aPath.mAttributeId) { case Attributes::SupportedModes::Id: { using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; jint jninewElement_0_mode = static_cast(entry_0.mode); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); while (iter_newElement_0_modeTags_2.Next()) { auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; if (!entry_2.mfgCode.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); } else { jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; jint jninewElement_2_value = static_cast(entry_2.value); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); { jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeTagStruct"); return nullptr; } jmethodID modeTagStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V", &modeTagStructStructCtor_3); if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeTagStruct constructor"); return nullptr; } newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); } chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } { jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeOptionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, newElement_0_mode, newElement_0_modeTags); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentMode::Id: { using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::StartUpMode::Id: { using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OnMode::Id: { using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::LaundryDryerControls::Id: { using namespace app::Clusters::LaundryDryerControls; switch (aPath.mAttributeId) { case Attributes::SupportedDrynessLevels::Id: { using TypeInfo = Attributes::SupportedDrynessLevels::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::SelectedDrynessLevel::Id: { using TypeInfo = Attributes::SelectedDrynessLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ModeSelect::Id: { using namespace app::Clusters::ModeSelect; switch (aPath.mAttributeId) { case Attributes::Description::Id: { using TypeInfo = Attributes::Description::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::StandardNamespace::Id: { using TypeInfo = Attributes::StandardNamespace::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::SupportedModes::Id: { using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; jint jninewElement_0_mode = static_cast(entry_0.mode); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); jobject newElement_0_semanticTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); auto iter_newElement_0_semanticTags_2 = entry_0.semanticTags.begin(); while (iter_newElement_0_semanticTags_2.Next()) { auto & entry_2 = iter_newElement_0_semanticTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeCtorSignature = "(I)V"; jint jninewElement_2_mfgCode = static_cast(entry_2.mfgCode); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_mfgCodeClassName.c_str(), newElement_2_mfgCodeCtorSignature.c_str(), jninewElement_2_mfgCode, newElement_2_mfgCode); jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; jint jninewElement_2_value = static_cast(entry_2.value); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); { jclass semanticTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", semanticTagStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); return nullptr; } jmethodID semanticTagStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod(env, semanticTagStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &semanticTagStructStructCtor_3); if (err != CHIP_NO_ERROR || semanticTagStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); return nullptr; } newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); } chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); } { jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, newElement_0_mode, newElement_0_semanticTags); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentMode::Id: { using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::StartUpMode::Id: { using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OnMode::Id: { using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::LaundryWasherMode::Id: { using namespace app::Clusters::LaundryWasherMode; switch (aPath.mAttributeId) { case Attributes::SupportedModes::Id: { using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; jint jninewElement_0_mode = static_cast(entry_0.mode); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); while (iter_newElement_0_modeTags_2.Next()) { auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; if (!entry_2.mfgCode.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); } else { jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; jint jninewElement_2_value = static_cast(entry_2.value); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); { jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeTagStruct"); return nullptr; } jmethodID modeTagStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V", &modeTagStructStructCtor_3); if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeTagStruct constructor"); return nullptr; } newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); } chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } { jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeOptionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, newElement_0_mode, newElement_0_modeTags); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentMode::Id: { using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::StartUpMode::Id: { using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OnMode::Id: { using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id: { using namespace app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode; switch (aPath.mAttributeId) { case Attributes::SupportedModes::Id: { using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; jint jninewElement_0_mode = static_cast(entry_0.mode); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); while (iter_newElement_0_modeTags_2.Next()) { auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; if (!entry_2.mfgCode.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); } else { jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; jint jninewElement_2_value = static_cast(entry_2.value); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); { jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class " "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct"); return nullptr; } jmethodID modeTagStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V", &modeTagStructStructCtor_3); if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct " "constructor"); return nullptr; } newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); } chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } { jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class " "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct " "constructor"); return nullptr; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, newElement_0_mode, newElement_0_modeTags); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentMode::Id: { using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::StartUpMode::Id: { using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OnMode::Id: { using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::LaundryWasherControls::Id: { using namespace app::Clusters::LaundryWasherControls; switch (aPath.mAttributeId) { case Attributes::SpinSpeeds::Id: { using TypeInfo = Attributes::SpinSpeeds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::SpinSpeedCurrent::Id: { using TypeInfo = Attributes::SpinSpeedCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NumberOfRinses::Id: { using TypeInfo = Attributes::NumberOfRinses::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SupportedRinses::Id: { using TypeInfo = Attributes::SupportedRinses::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::RvcRunMode::Id: { using namespace app::Clusters::RvcRunMode; switch (aPath.mAttributeId) { case Attributes::SupportedModes::Id: { using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; jint jninewElement_0_mode = static_cast(entry_0.mode); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); while (iter_newElement_0_modeTags_2.Next()) { auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; if (!entry_2.mfgCode.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); } else { jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; jint jninewElement_2_value = static_cast(entry_2.value); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); { jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeTagStruct"); return nullptr; } jmethodID modeTagStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V", &modeTagStructStructCtor_3); if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeTagStruct constructor"); return nullptr; } newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); } chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } { jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeOptionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, newElement_0_mode, newElement_0_modeTags); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentMode::Id: { using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::RvcCleanMode::Id: { using namespace app::Clusters::RvcCleanMode; switch (aPath.mAttributeId) { case Attributes::SupportedModes::Id: { using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; jint jninewElement_0_mode = static_cast(entry_0.mode); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); while (iter_newElement_0_modeTags_2.Next()) { auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; if (!entry_2.mfgCode.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); } else { jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; jint jninewElement_2_value = static_cast(entry_2.value); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); { jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeTagStruct"); return nullptr; } jmethodID modeTagStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V", &modeTagStructStructCtor_3); if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeTagStruct constructor"); return nullptr; } newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); } chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } { jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeOptionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, newElement_0_mode, newElement_0_modeTags); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentMode::Id: { using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::TemperatureControl::Id: { using namespace app::Clusters::TemperatureControl; switch (aPath.mAttributeId) { case Attributes::TemperatureSetpoint::Id: { using TypeInfo = Attributes::TemperatureSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MinTemperature::Id: { using TypeInfo = Attributes::MinTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MaxTemperature::Id: { using TypeInfo = Attributes::MaxTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Step::Id: { using TypeInfo = Attributes::Step::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SelectedTemperatureLevel::Id: { using TypeInfo = Attributes::SelectedTemperatureLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SupportedTemperatureLevels::Id: { using TypeInfo = Attributes::SupportedTemperatureLevels::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::RefrigeratorAlarm::Id: { using namespace app::Clusters::RefrigeratorAlarm; switch (aPath.mAttributeId) { case Attributes::Mask::Id: { using TypeInfo = Attributes::Mask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::State::Id: { using TypeInfo = Attributes::State::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Supported::Id: { using TypeInfo = Attributes::Supported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::DishwasherMode::Id: { using namespace app::Clusters::DishwasherMode; switch (aPath.mAttributeId) { case Attributes::SupportedModes::Id: { using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; jint jninewElement_0_mode = static_cast(entry_0.mode); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); while (iter_newElement_0_modeTags_2.Next()) { auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; if (!entry_2.mfgCode.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); } else { jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; jint jninewElement_2_value = static_cast(entry_2.value); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); { jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeTagStruct"); return nullptr; } jmethodID modeTagStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V", &modeTagStructStructCtor_3); if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeTagStruct constructor"); return nullptr; } newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); } chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } { jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeOptionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, newElement_0_mode, newElement_0_modeTags); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentMode::Id: { using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::StartUpMode::Id: { using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OnMode::Id: { using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::AirQuality::Id: { using namespace app::Clusters::AirQuality; switch (aPath.mAttributeId) { case Attributes::AirQuality::Id: { using TypeInfo = Attributes::AirQuality::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::SmokeCoAlarm::Id: { using namespace app::Clusters::SmokeCoAlarm; switch (aPath.mAttributeId) { case Attributes::ExpressedState::Id: { using TypeInfo = Attributes::ExpressedState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SmokeState::Id: { using TypeInfo = Attributes::SmokeState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::COState::Id: { using TypeInfo = Attributes::COState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::BatteryAlert::Id: { using TypeInfo = Attributes::BatteryAlert::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::DeviceMuted::Id: { using TypeInfo = Attributes::DeviceMuted::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TestInProgress::Id: { using TypeInfo = Attributes::TestInProgress::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::HardwareFaultAlert::Id: { using TypeInfo = Attributes::HardwareFaultAlert::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::EndOfServiceAlert::Id: { using TypeInfo = Attributes::EndOfServiceAlert::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::InterconnectSmokeAlarm::Id: { using TypeInfo = Attributes::InterconnectSmokeAlarm::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::InterconnectCOAlarm::Id: { using TypeInfo = Attributes::InterconnectCOAlarm::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ContaminationState::Id: { using TypeInfo = Attributes::ContaminationState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SmokeSensitivityLevel::Id: { using TypeInfo = Attributes::SmokeSensitivityLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ExpiryDate::Id: { using TypeInfo = Attributes::ExpiryDate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::DishwasherAlarm::Id: { using namespace app::Clusters::DishwasherAlarm; switch (aPath.mAttributeId) { case Attributes::Mask::Id: { using TypeInfo = Attributes::Mask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Latch::Id: { using TypeInfo = Attributes::Latch::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::State::Id: { using TypeInfo = Attributes::State::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Supported::Id: { using TypeInfo = Attributes::Supported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::MicrowaveOvenMode::Id: { using namespace app::Clusters::MicrowaveOvenMode; switch (aPath.mAttributeId) { case Attributes::SupportedModes::Id: { using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; jint jninewElement_0_mode = static_cast(entry_0.mode); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); while (iter_newElement_0_modeTags_2.Next()) { auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; if (!entry_2.mfgCode.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); } else { jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; jint jninewElement_2_value = static_cast(entry_2.value); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); { jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeTagStruct"); return nullptr; } jmethodID modeTagStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V", &modeTagStructStructCtor_3); if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeTagStruct constructor"); return nullptr; } newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); } chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } { jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeOptionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, newElement_0_mode, newElement_0_modeTags); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentMode::Id: { using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::MicrowaveOvenControl::Id: { using namespace app::Clusters::MicrowaveOvenControl; switch (aPath.mAttributeId) { case Attributes::CookTime::Id: { using TypeInfo = Attributes::CookTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MaxCookTime::Id: { using TypeInfo = Attributes::MaxCookTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::PowerSetting::Id: { using TypeInfo = Attributes::PowerSetting::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MinPower::Id: { using TypeInfo = Attributes::MinPower::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MaxPower::Id: { using TypeInfo = Attributes::MaxPower::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::PowerStep::Id: { using TypeInfo = Attributes::PowerStep::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SupportedWatts::Id: { using TypeInfo = Attributes::SupportedWatts::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::SelectedWattIndex::Id: { using TypeInfo = Attributes::SelectedWattIndex::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::WattRating::Id: { using TypeInfo = Attributes::WattRating::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::OperationalState::Id: { using namespace app::Clusters::OperationalState; switch (aPath.mAttributeId) { case Attributes::PhaseList::Id: { using TypeInfo = Attributes::PhaseList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_1 = cppValue.Value().begin(); while (iter_value_1.Next()) { auto & entry_1 = iter_value_1.GetValue(); jobject newElement_1; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); chip::JniReferences::GetInstance().AddToList(value, newElement_1); } } return value; } case Attributes::CurrentPhase::Id: { using TypeInfo = Attributes::CurrentPhase::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::CountdownTime::Id: { using TypeInfo = Attributes::CountdownTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OperationalStateList::Id: { using TypeInfo = Attributes::OperationalStateList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_operationalStateID; std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), jninewElement_0_operationalStateID, newElement_0_operationalStateID); jobject newElement_0_operationalStateLabel; if (!entry_0.operationalStateLabel.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); } else { jobject newElement_0_operationalStateLabelInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( entry_0.operationalStateLabel.Value(), newElement_0_operationalStateLabelInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, newElement_0_operationalStateLabel); } { jclass operationalStateStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$OperationalStateClusterOperationalStateStruct", operationalStateStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterOperationalStateStruct"); return nullptr; } jmethodID operationalStateStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, operationalStateStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V", &operationalStateStructStructCtor_1); if (err != CHIP_NO_ERROR || operationalStateStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterOperationalStateStruct constructor"); return nullptr; } newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, newElement_0_operationalStateID, newElement_0_operationalStateLabel); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::OperationalState::Id: { using TypeInfo = Attributes::OperationalState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::OperationalError::Id: { using TypeInfo = Attributes::OperationalError::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_errorStateID; std::string value_errorStateIDClassName = "java/lang/Integer"; std::string value_errorStateIDCtorSignature = "(I)V"; jint jnivalue_errorStateID = static_cast(cppValue.errorStateID); chip::JniReferences::GetInstance().CreateBoxedObject(value_errorStateIDClassName.c_str(), value_errorStateIDCtorSignature.c_str(), jnivalue_errorStateID, value_errorStateID); jobject value_errorStateLabel; if (!cppValue.errorStateLabel.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateLabel); } else { jobject value_errorStateLabelInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateLabel.Value(), value_errorStateLabelInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(value_errorStateLabelInsideOptional, value_errorStateLabel); } jobject value_errorStateDetails; if (!cppValue.errorStateDetails.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateDetails); } else { jobject value_errorStateDetailsInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateDetails.Value(), value_errorStateDetailsInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(value_errorStateDetailsInsideOptional, value_errorStateDetails); } { jclass errorStateStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$OperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterErrorStateStruct"); return nullptr; } jmethodID errorStateStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod( env, errorStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", &errorStateStructStructCtor_0); if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterErrorStateStruct constructor"); return nullptr; } value = env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorStateID, value_errorStateLabel, value_errorStateDetails); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::RvcOperationalState::Id: { using namespace app::Clusters::RvcOperationalState; switch (aPath.mAttributeId) { case Attributes::PhaseList::Id: { using TypeInfo = Attributes::PhaseList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_1 = cppValue.Value().begin(); while (iter_value_1.Next()) { auto & entry_1 = iter_value_1.GetValue(); jobject newElement_1; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); chip::JniReferences::GetInstance().AddToList(value, newElement_1); } } return value; } case Attributes::CurrentPhase::Id: { using TypeInfo = Attributes::CurrentPhase::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::CountdownTime::Id: { using TypeInfo = Attributes::CountdownTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OperationalStateList::Id: { using TypeInfo = Attributes::OperationalStateList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_operationalStateID; std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), jninewElement_0_operationalStateID, newElement_0_operationalStateID); jobject newElement_0_operationalStateLabel; if (!entry_0.operationalStateLabel.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); } else { jobject newElement_0_operationalStateLabelInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( entry_0.operationalStateLabel.Value(), newElement_0_operationalStateLabelInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, newElement_0_operationalStateLabel); } { jclass operationalStateStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterOperationalStateStruct", operationalStateStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterOperationalStateStruct"); return nullptr; } jmethodID operationalStateStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, operationalStateStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V", &operationalStateStructStructCtor_1); if (err != CHIP_NO_ERROR || operationalStateStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterOperationalStateStruct constructor"); return nullptr; } newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, newElement_0_operationalStateID, newElement_0_operationalStateLabel); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::OperationalState::Id: { using TypeInfo = Attributes::OperationalState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::OperationalError::Id: { using TypeInfo = Attributes::OperationalError::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_errorStateID; std::string value_errorStateIDClassName = "java/lang/Integer"; std::string value_errorStateIDCtorSignature = "(I)V"; jint jnivalue_errorStateID = static_cast(cppValue.errorStateID); chip::JniReferences::GetInstance().CreateBoxedObject(value_errorStateIDClassName.c_str(), value_errorStateIDCtorSignature.c_str(), jnivalue_errorStateID, value_errorStateID); jobject value_errorStateLabel; if (!cppValue.errorStateLabel.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateLabel); } else { jobject value_errorStateLabelInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateLabel.Value(), value_errorStateLabelInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(value_errorStateLabelInsideOptional, value_errorStateLabel); } jobject value_errorStateDetails; if (!cppValue.errorStateDetails.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateDetails); } else { jobject value_errorStateDetailsInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateDetails.Value(), value_errorStateDetailsInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(value_errorStateDetailsInsideOptional, value_errorStateDetails); } { jclass errorStateStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterErrorStateStruct"); return nullptr; } jmethodID errorStateStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod( env, errorStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", &errorStateStructStructCtor_0); if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterErrorStateStruct constructor"); return nullptr; } value = env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorStateID, value_errorStateLabel, value_errorStateDetails); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ScenesManagement::Id: { using namespace app::Clusters::ScenesManagement; switch (aPath.mAttributeId) { case Attributes::LastConfiguredBy::Id: { using TypeInfo = Attributes::LastConfiguredBy::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::SceneTableSize::Id: { using TypeInfo = Attributes::SceneTableSize::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::FabricSceneInfo::Id: { using TypeInfo = Attributes::FabricSceneInfo::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_sceneCount; std::string newElement_0_sceneCountClassName = "java/lang/Integer"; std::string newElement_0_sceneCountCtorSignature = "(I)V"; jint jninewElement_0_sceneCount = static_cast(entry_0.sceneCount); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneCountClassName.c_str(), newElement_0_sceneCountCtorSignature.c_str(), jninewElement_0_sceneCount, newElement_0_sceneCount); jobject newElement_0_currentScene; std::string newElement_0_currentSceneClassName = "java/lang/Integer"; std::string newElement_0_currentSceneCtorSignature = "(I)V"; jint jninewElement_0_currentScene = static_cast(entry_0.currentScene); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentSceneClassName.c_str(), newElement_0_currentSceneCtorSignature.c_str(), jninewElement_0_currentScene, newElement_0_currentScene); jobject newElement_0_currentGroup; std::string newElement_0_currentGroupClassName = "java/lang/Integer"; std::string newElement_0_currentGroupCtorSignature = "(I)V"; jint jninewElement_0_currentGroup = static_cast(entry_0.currentGroup); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentGroupClassName.c_str(), newElement_0_currentGroupCtorSignature.c_str(), jninewElement_0_currentGroup, newElement_0_currentGroup); jobject newElement_0_sceneValid; std::string newElement_0_sceneValidClassName = "java/lang/Boolean"; std::string newElement_0_sceneValidCtorSignature = "(Z)V"; jboolean jninewElement_0_sceneValid = static_cast(entry_0.sceneValid); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneValidClassName.c_str(), newElement_0_sceneValidCtorSignature.c_str(), jninewElement_0_sceneValid, newElement_0_sceneValid); jobject newElement_0_remainingCapacity; std::string newElement_0_remainingCapacityClassName = "java/lang/Integer"; std::string newElement_0_remainingCapacityCtorSignature = "(I)V"; jint jninewElement_0_remainingCapacity = static_cast(entry_0.remainingCapacity); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_remainingCapacityClassName.c_str(), newElement_0_remainingCapacityCtorSignature.c_str(), jninewElement_0_remainingCapacity, newElement_0_remainingCapacity); jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); { jclass sceneInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ScenesManagementClusterSceneInfoStruct", sceneInfoStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ScenesManagementClusterSceneInfoStruct"); return nullptr; } jmethodID sceneInfoStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, sceneInfoStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/" "lang/Integer;)V", &sceneInfoStructStructCtor_1); if (err != CHIP_NO_ERROR || sceneInfoStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ScenesManagementClusterSceneInfoStruct constructor"); return nullptr; } newElement_0 = env->NewObject(sceneInfoStructStructClass_1, sceneInfoStructStructCtor_1, newElement_0_sceneCount, newElement_0_currentScene, newElement_0_currentGroup, newElement_0_sceneValid, newElement_0_remainingCapacity, newElement_0_fabricIndex); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::HepaFilterMonitoring::Id: { using namespace app::Clusters::HepaFilterMonitoring; switch (aPath.mAttributeId) { case Attributes::Condition::Id: { using TypeInfo = Attributes::Condition::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::DegradationDirection::Id: { using TypeInfo = Attributes::DegradationDirection::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ChangeIndication::Id: { using TypeInfo = Attributes::ChangeIndication::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::InPlaceIndicator::Id: { using TypeInfo = Attributes::InPlaceIndicator::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LastChangedTime::Id: { using TypeInfo = Attributes::LastChangedTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ReplacementProductList::Id: { using TypeInfo = Attributes::ReplacementProductList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_productIdentifierType; std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); jobject newElement_0_productIdentifierValue; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, newElement_0_productIdentifierValue)); { jclass replacementProductStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct", replacementProductStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct"); return nullptr; } jmethodID replacementProductStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, replacementProductStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V", &replacementProductStructStructCtor_1); if (err != CHIP_NO_ERROR || replacementProductStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct constructor"); return nullptr; } newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, newElement_0_productIdentifierType, newElement_0_productIdentifierValue); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ActivatedCarbonFilterMonitoring::Id: { using namespace app::Clusters::ActivatedCarbonFilterMonitoring; switch (aPath.mAttributeId) { case Attributes::Condition::Id: { using TypeInfo = Attributes::Condition::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::DegradationDirection::Id: { using TypeInfo = Attributes::DegradationDirection::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ChangeIndication::Id: { using TypeInfo = Attributes::ChangeIndication::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::InPlaceIndicator::Id: { using TypeInfo = Attributes::InPlaceIndicator::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LastChangedTime::Id: { using TypeInfo = Attributes::LastChangedTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ReplacementProductList::Id: { using TypeInfo = Attributes::ReplacementProductList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_productIdentifierType; std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); jobject newElement_0_productIdentifierValue; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, newElement_0_productIdentifierValue)); { jclass replacementProductStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct", replacementProductStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct"); return nullptr; } jmethodID replacementProductStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, replacementProductStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V", &replacementProductStructStructCtor_1); if (err != CHIP_NO_ERROR || replacementProductStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct " "constructor"); return nullptr; } newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, newElement_0_productIdentifierType, newElement_0_productIdentifierValue); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::BooleanStateConfiguration::Id: { using namespace app::Clusters::BooleanStateConfiguration; switch (aPath.mAttributeId) { case Attributes::CurrentSensitivityLevel::Id: { using TypeInfo = Attributes::CurrentSensitivityLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SupportedSensitivityLevels::Id: { using TypeInfo = Attributes::SupportedSensitivityLevels::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::DefaultSensitivityLevel::Id: { using TypeInfo = Attributes::DefaultSensitivityLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AlarmsActive::Id: { using TypeInfo = Attributes::AlarmsActive::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AlarmsSuppressed::Id: { using TypeInfo = Attributes::AlarmsSuppressed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AlarmsEnabled::Id: { using TypeInfo = Attributes::AlarmsEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AlarmsSupported::Id: { using TypeInfo = Attributes::AlarmsSupported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SensorFault::Id: { using TypeInfo = Attributes::SensorFault::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ValveConfigurationAndControl::Id: { using namespace app::Clusters::ValveConfigurationAndControl; switch (aPath.mAttributeId) { case Attributes::OpenDuration::Id: { using TypeInfo = Attributes::OpenDuration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::DefaultOpenDuration::Id: { using TypeInfo = Attributes::DefaultOpenDuration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::AutoCloseTime::Id: { using TypeInfo = Attributes::AutoCloseTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::RemainingDuration::Id: { using TypeInfo = Attributes::RemainingDuration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::CurrentState::Id: { using TypeInfo = Attributes::CurrentState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::TargetState::Id: { using TypeInfo = Attributes::TargetState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::CurrentLevel::Id: { using TypeInfo = Attributes::CurrentLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::TargetLevel::Id: { using TypeInfo = Attributes::TargetLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::DefaultOpenLevel::Id: { using TypeInfo = Attributes::DefaultOpenLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ValveFault::Id: { using TypeInfo = Attributes::ValveFault::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LevelStep::Id: { using TypeInfo = Attributes::LevelStep::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ElectricalPowerMeasurement::Id: { using namespace app::Clusters::ElectricalPowerMeasurement; switch (aPath.mAttributeId) { case Attributes::PowerMode::Id: { using TypeInfo = Attributes::PowerMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfMeasurementTypes::Id: { using TypeInfo = Attributes::NumberOfMeasurementTypes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Accuracy::Id: { using TypeInfo = Attributes::Accuracy::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_measurementType; std::string newElement_0_measurementTypeClassName = "java/lang/Integer"; std::string newElement_0_measurementTypeCtorSignature = "(I)V"; jint jninewElement_0_measurementType = static_cast(entry_0.measurementType); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_measurementTypeClassName.c_str(), newElement_0_measurementTypeCtorSignature.c_str(), jninewElement_0_measurementType, newElement_0_measurementType); jobject newElement_0_measured; std::string newElement_0_measuredClassName = "java/lang/Boolean"; std::string newElement_0_measuredCtorSignature = "(Z)V"; jboolean jninewElement_0_measured = static_cast(entry_0.measured); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_measuredClassName.c_str(), newElement_0_measuredCtorSignature.c_str(), jninewElement_0_measured, newElement_0_measured); jobject newElement_0_minMeasuredValue; std::string newElement_0_minMeasuredValueClassName = "java/lang/Long"; std::string newElement_0_minMeasuredValueCtorSignature = "(J)V"; jlong jninewElement_0_minMeasuredValue = static_cast(entry_0.minMeasuredValue); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_minMeasuredValueClassName.c_str(), newElement_0_minMeasuredValueCtorSignature.c_str(), jninewElement_0_minMeasuredValue, newElement_0_minMeasuredValue); jobject newElement_0_maxMeasuredValue; std::string newElement_0_maxMeasuredValueClassName = "java/lang/Long"; std::string newElement_0_maxMeasuredValueCtorSignature = "(J)V"; jlong jninewElement_0_maxMeasuredValue = static_cast(entry_0.maxMeasuredValue); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_maxMeasuredValueClassName.c_str(), newElement_0_maxMeasuredValueCtorSignature.c_str(), jninewElement_0_maxMeasuredValue, newElement_0_maxMeasuredValue); jobject newElement_0_accuracyRanges; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_accuracyRanges); auto iter_newElement_0_accuracyRanges_2 = entry_0.accuracyRanges.begin(); while (iter_newElement_0_accuracyRanges_2.Next()) { auto & entry_2 = iter_newElement_0_accuracyRanges_2.GetValue(); jobject newElement_2; jobject newElement_2_rangeMin; std::string newElement_2_rangeMinClassName = "java/lang/Long"; std::string newElement_2_rangeMinCtorSignature = "(J)V"; jlong jninewElement_2_rangeMin = static_cast(entry_2.rangeMin); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_rangeMinClassName.c_str(), newElement_2_rangeMinCtorSignature.c_str(), jninewElement_2_rangeMin, newElement_2_rangeMin); jobject newElement_2_rangeMax; std::string newElement_2_rangeMaxClassName = "java/lang/Long"; std::string newElement_2_rangeMaxCtorSignature = "(J)V"; jlong jninewElement_2_rangeMax = static_cast(entry_2.rangeMax); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_rangeMaxClassName.c_str(), newElement_2_rangeMaxCtorSignature.c_str(), jninewElement_2_rangeMax, newElement_2_rangeMax); jobject newElement_2_percentMax; if (!entry_2.percentMax.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_percentMax); } else { jobject newElement_2_percentMaxInsideOptional; std::string newElement_2_percentMaxInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_percentMaxInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_percentMaxInsideOptional = static_cast(entry_2.percentMax.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_percentMaxInsideOptionalClassName.c_str(), newElement_2_percentMaxInsideOptionalCtorSignature.c_str(), jninewElement_2_percentMaxInsideOptional, newElement_2_percentMaxInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_percentMaxInsideOptional, newElement_2_percentMax); } jobject newElement_2_percentMin; if (!entry_2.percentMin.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_percentMin); } else { jobject newElement_2_percentMinInsideOptional; std::string newElement_2_percentMinInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_percentMinInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_percentMinInsideOptional = static_cast(entry_2.percentMin.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_percentMinInsideOptionalClassName.c_str(), newElement_2_percentMinInsideOptionalCtorSignature.c_str(), jninewElement_2_percentMinInsideOptional, newElement_2_percentMinInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_percentMinInsideOptional, newElement_2_percentMin); } jobject newElement_2_percentTypical; if (!entry_2.percentTypical.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_percentTypical); } else { jobject newElement_2_percentTypicalInsideOptional; std::string newElement_2_percentTypicalInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_percentTypicalInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_percentTypicalInsideOptional = static_cast(entry_2.percentTypical.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_percentTypicalInsideOptionalClassName.c_str(), newElement_2_percentTypicalInsideOptionalCtorSignature.c_str(), jninewElement_2_percentTypicalInsideOptional, newElement_2_percentTypicalInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_percentTypicalInsideOptional, newElement_2_percentTypical); } jobject newElement_2_fixedMax; if (!entry_2.fixedMax.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_fixedMax); } else { jobject newElement_2_fixedMaxInsideOptional; std::string newElement_2_fixedMaxInsideOptionalClassName = "java/lang/Long"; std::string newElement_2_fixedMaxInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_2_fixedMaxInsideOptional = static_cast(entry_2.fixedMax.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_fixedMaxInsideOptionalClassName.c_str(), newElement_2_fixedMaxInsideOptionalCtorSignature.c_str(), jninewElement_2_fixedMaxInsideOptional, newElement_2_fixedMaxInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_fixedMaxInsideOptional, newElement_2_fixedMax); } jobject newElement_2_fixedMin; if (!entry_2.fixedMin.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_fixedMin); } else { jobject newElement_2_fixedMinInsideOptional; std::string newElement_2_fixedMinInsideOptionalClassName = "java/lang/Long"; std::string newElement_2_fixedMinInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_2_fixedMinInsideOptional = static_cast(entry_2.fixedMin.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_fixedMinInsideOptionalClassName.c_str(), newElement_2_fixedMinInsideOptionalCtorSignature.c_str(), jninewElement_2_fixedMinInsideOptional, newElement_2_fixedMinInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_fixedMinInsideOptional, newElement_2_fixedMin); } jobject newElement_2_fixedTypical; if (!entry_2.fixedTypical.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_fixedTypical); } else { jobject newElement_2_fixedTypicalInsideOptional; std::string newElement_2_fixedTypicalInsideOptionalClassName = "java/lang/Long"; std::string newElement_2_fixedTypicalInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_2_fixedTypicalInsideOptional = static_cast(entry_2.fixedTypical.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_fixedTypicalInsideOptionalClassName.c_str(), newElement_2_fixedTypicalInsideOptionalCtorSignature.c_str(), jninewElement_2_fixedTypicalInsideOptional, newElement_2_fixedTypicalInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_fixedTypicalInsideOptional, newElement_2_fixedTypical); } { jclass measurementAccuracyRangeStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct", measurementAccuracyRangeStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct"); return nullptr; } jmethodID measurementAccuracyRangeStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod( env, measurementAccuracyRangeStructStructClass_3, "", "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/" "util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &measurementAccuracyRangeStructStructCtor_3); if (err != CHIP_NO_ERROR || measurementAccuracyRangeStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find " "ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct constructor"); return nullptr; } newElement_2 = env->NewObject( measurementAccuracyRangeStructStructClass_3, measurementAccuracyRangeStructStructCtor_3, newElement_2_rangeMin, newElement_2_rangeMax, newElement_2_percentMax, newElement_2_percentMin, newElement_2_percentTypical, newElement_2_fixedMax, newElement_2_fixedMin, newElement_2_fixedTypical); } chip::JniReferences::GetInstance().AddToList(newElement_0_accuracyRanges, newElement_2); } { jclass measurementAccuracyStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyStruct", measurementAccuracyStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyStruct"); return nullptr; } jmethodID measurementAccuracyStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, measurementAccuracyStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/ArrayList;)V", &measurementAccuracyStructStructCtor_1); if (err != CHIP_NO_ERROR || measurementAccuracyStructStructCtor_1 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyStruct constructor"); return nullptr; } newElement_0 = env->NewObject(measurementAccuracyStructStructClass_1, measurementAccuracyStructStructCtor_1, newElement_0_measurementType, newElement_0_measured, newElement_0_minMeasuredValue, newElement_0_maxMeasuredValue, newElement_0_accuracyRanges); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::Ranges::Id: { using TypeInfo = Attributes::Ranges::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_measurementType; std::string newElement_0_measurementTypeClassName = "java/lang/Integer"; std::string newElement_0_measurementTypeCtorSignature = "(I)V"; jint jninewElement_0_measurementType = static_cast(entry_0.measurementType); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_measurementTypeClassName.c_str(), newElement_0_measurementTypeCtorSignature.c_str(), jninewElement_0_measurementType, newElement_0_measurementType); jobject newElement_0_min; std::string newElement_0_minClassName = "java/lang/Long"; std::string newElement_0_minCtorSignature = "(J)V"; jlong jninewElement_0_min = static_cast(entry_0.min); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minClassName.c_str(), newElement_0_minCtorSignature.c_str(), jninewElement_0_min, newElement_0_min); jobject newElement_0_max; std::string newElement_0_maxClassName = "java/lang/Long"; std::string newElement_0_maxCtorSignature = "(J)V"; jlong jninewElement_0_max = static_cast(entry_0.max); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_maxClassName.c_str(), newElement_0_maxCtorSignature.c_str(), jninewElement_0_max, newElement_0_max); jobject newElement_0_startTimestamp; if (!entry_0.startTimestamp.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_startTimestamp); } else { jobject newElement_0_startTimestampInsideOptional; std::string newElement_0_startTimestampInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_startTimestampInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_0_startTimestampInsideOptional = static_cast(entry_0.startTimestamp.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_startTimestampInsideOptionalClassName.c_str(), newElement_0_startTimestampInsideOptionalCtorSignature.c_str(), jninewElement_0_startTimestampInsideOptional, newElement_0_startTimestampInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_startTimestampInsideOptional, newElement_0_startTimestamp); } jobject newElement_0_endTimestamp; if (!entry_0.endTimestamp.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_endTimestamp); } else { jobject newElement_0_endTimestampInsideOptional; std::string newElement_0_endTimestampInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_endTimestampInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_0_endTimestampInsideOptional = static_cast(entry_0.endTimestamp.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_endTimestampInsideOptionalClassName.c_str(), newElement_0_endTimestampInsideOptionalCtorSignature.c_str(), jninewElement_0_endTimestampInsideOptional, newElement_0_endTimestampInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_endTimestampInsideOptional, newElement_0_endTimestamp); } jobject newElement_0_minTimestamp; if (!entry_0.minTimestamp.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_minTimestamp); } else { jobject newElement_0_minTimestampInsideOptional; std::string newElement_0_minTimestampInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_minTimestampInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_0_minTimestampInsideOptional = static_cast(entry_0.minTimestamp.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_minTimestampInsideOptionalClassName.c_str(), newElement_0_minTimestampInsideOptionalCtorSignature.c_str(), jninewElement_0_minTimestampInsideOptional, newElement_0_minTimestampInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_minTimestampInsideOptional, newElement_0_minTimestamp); } jobject newElement_0_maxTimestamp; if (!entry_0.maxTimestamp.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_maxTimestamp); } else { jobject newElement_0_maxTimestampInsideOptional; std::string newElement_0_maxTimestampInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_maxTimestampInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_0_maxTimestampInsideOptional = static_cast(entry_0.maxTimestamp.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_maxTimestampInsideOptionalClassName.c_str(), newElement_0_maxTimestampInsideOptionalCtorSignature.c_str(), jninewElement_0_maxTimestampInsideOptional, newElement_0_maxTimestampInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_maxTimestampInsideOptional, newElement_0_maxTimestamp); } jobject newElement_0_startSystime; if (!entry_0.startSystime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_startSystime); } else { jobject newElement_0_startSystimeInsideOptional; std::string newElement_0_startSystimeInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_startSystimeInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_0_startSystimeInsideOptional = static_cast(entry_0.startSystime.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_startSystimeInsideOptionalClassName.c_str(), newElement_0_startSystimeInsideOptionalCtorSignature.c_str(), jninewElement_0_startSystimeInsideOptional, newElement_0_startSystimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_startSystimeInsideOptional, newElement_0_startSystime); } jobject newElement_0_endSystime; if (!entry_0.endSystime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_endSystime); } else { jobject newElement_0_endSystimeInsideOptional; std::string newElement_0_endSystimeInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_endSystimeInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_0_endSystimeInsideOptional = static_cast(entry_0.endSystime.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_endSystimeInsideOptionalClassName.c_str(), newElement_0_endSystimeInsideOptionalCtorSignature.c_str(), jninewElement_0_endSystimeInsideOptional, newElement_0_endSystimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_endSystimeInsideOptional, newElement_0_endSystime); } jobject newElement_0_minSystime; if (!entry_0.minSystime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_minSystime); } else { jobject newElement_0_minSystimeInsideOptional; std::string newElement_0_minSystimeInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_minSystimeInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_0_minSystimeInsideOptional = static_cast(entry_0.minSystime.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_minSystimeInsideOptionalClassName.c_str(), newElement_0_minSystimeInsideOptionalCtorSignature.c_str(), jninewElement_0_minSystimeInsideOptional, newElement_0_minSystimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_minSystimeInsideOptional, newElement_0_minSystime); } jobject newElement_0_maxSystime; if (!entry_0.maxSystime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_maxSystime); } else { jobject newElement_0_maxSystimeInsideOptional; std::string newElement_0_maxSystimeInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_maxSystimeInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_0_maxSystimeInsideOptional = static_cast(entry_0.maxSystime.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_maxSystimeInsideOptionalClassName.c_str(), newElement_0_maxSystimeInsideOptionalCtorSignature.c_str(), jninewElement_0_maxSystimeInsideOptional, newElement_0_maxSystimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_maxSystimeInsideOptional, newElement_0_maxSystime); } { jclass measurementRangeStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ElectricalPowerMeasurementClusterMeasurementRangeStruct", measurementRangeStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalPowerMeasurementClusterMeasurementRangeStruct"); return nullptr; } jmethodID measurementRangeStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, measurementRangeStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" "Optional;)V", &measurementRangeStructStructCtor_1); if (err != CHIP_NO_ERROR || measurementRangeStructStructCtor_1 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$ElectricalPowerMeasurementClusterMeasurementRangeStruct constructor"); return nullptr; } newElement_0 = env->NewObject(measurementRangeStructStructClass_1, measurementRangeStructStructCtor_1, newElement_0_measurementType, newElement_0_min, newElement_0_max, newElement_0_startTimestamp, newElement_0_endTimestamp, newElement_0_minTimestamp, newElement_0_maxTimestamp, newElement_0_startSystime, newElement_0_endSystime, newElement_0_minSystime, newElement_0_maxSystime); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::Voltage::Id: { using TypeInfo = Attributes::Voltage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ActiveCurrent::Id: { using TypeInfo = Attributes::ActiveCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ReactiveCurrent::Id: { using TypeInfo = Attributes::ReactiveCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ApparentCurrent::Id: { using TypeInfo = Attributes::ApparentCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ActivePower::Id: { using TypeInfo = Attributes::ActivePower::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ReactivePower::Id: { using TypeInfo = Attributes::ReactivePower::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ApparentPower::Id: { using TypeInfo = Attributes::ApparentPower::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::RMSVoltage::Id: { using TypeInfo = Attributes::RMSVoltage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::RMSCurrent::Id: { using TypeInfo = Attributes::RMSCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::RMSPower::Id: { using TypeInfo = Attributes::RMSPower::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Frequency::Id: { using TypeInfo = Attributes::Frequency::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::HarmonicCurrents::Id: { using TypeInfo = Attributes::HarmonicCurrents::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_1 = cppValue.Value().begin(); while (iter_value_1.Next()) { auto & entry_1 = iter_value_1.GetValue(); jobject newElement_1; jobject newElement_1_order; std::string newElement_1_orderClassName = "java/lang/Integer"; std::string newElement_1_orderCtorSignature = "(I)V"; jint jninewElement_1_order = static_cast(entry_1.order); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_orderClassName.c_str(), newElement_1_orderCtorSignature.c_str(), jninewElement_1_order, newElement_1_order); jobject newElement_1_measurement; if (entry_1.measurement.IsNull()) { newElement_1_measurement = nullptr; } else { std::string newElement_1_measurementClassName = "java/lang/Long"; std::string newElement_1_measurementCtorSignature = "(J)V"; jlong jninewElement_1_measurement = static_cast(entry_1.measurement.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_1_measurementClassName.c_str(), newElement_1_measurementCtorSignature.c_str(), jninewElement_1_measurement, newElement_1_measurement); } { jclass harmonicMeasurementStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct", harmonicMeasurementStructStructClass_2); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct"); return nullptr; } jmethodID harmonicMeasurementStructStructCtor_2; err = chip::JniReferences::GetInstance().FindMethod(env, harmonicMeasurementStructStructClass_2, "", "(Ljava/lang/Integer;Ljava/lang/Long;)V", &harmonicMeasurementStructStructCtor_2); if (err != CHIP_NO_ERROR || harmonicMeasurementStructStructCtor_2 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct " "constructor"); return nullptr; } newElement_1 = env->NewObject(harmonicMeasurementStructStructClass_2, harmonicMeasurementStructStructCtor_2, newElement_1_order, newElement_1_measurement); } chip::JniReferences::GetInstance().AddToList(value, newElement_1); } } return value; } case Attributes::HarmonicPhases::Id: { using TypeInfo = Attributes::HarmonicPhases::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_1 = cppValue.Value().begin(); while (iter_value_1.Next()) { auto & entry_1 = iter_value_1.GetValue(); jobject newElement_1; jobject newElement_1_order; std::string newElement_1_orderClassName = "java/lang/Integer"; std::string newElement_1_orderCtorSignature = "(I)V"; jint jninewElement_1_order = static_cast(entry_1.order); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_orderClassName.c_str(), newElement_1_orderCtorSignature.c_str(), jninewElement_1_order, newElement_1_order); jobject newElement_1_measurement; if (entry_1.measurement.IsNull()) { newElement_1_measurement = nullptr; } else { std::string newElement_1_measurementClassName = "java/lang/Long"; std::string newElement_1_measurementCtorSignature = "(J)V"; jlong jninewElement_1_measurement = static_cast(entry_1.measurement.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_1_measurementClassName.c_str(), newElement_1_measurementCtorSignature.c_str(), jninewElement_1_measurement, newElement_1_measurement); } { jclass harmonicMeasurementStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct", harmonicMeasurementStructStructClass_2); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct"); return nullptr; } jmethodID harmonicMeasurementStructStructCtor_2; err = chip::JniReferences::GetInstance().FindMethod(env, harmonicMeasurementStructStructClass_2, "", "(Ljava/lang/Integer;Ljava/lang/Long;)V", &harmonicMeasurementStructStructCtor_2); if (err != CHIP_NO_ERROR || harmonicMeasurementStructStructCtor_2 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct " "constructor"); return nullptr; } newElement_1 = env->NewObject(harmonicMeasurementStructStructClass_2, harmonicMeasurementStructStructCtor_2, newElement_1_order, newElement_1_measurement); } chip::JniReferences::GetInstance().AddToList(value, newElement_1); } } return value; } case Attributes::PowerFactor::Id: { using TypeInfo = Attributes::PowerFactor::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NeutralCurrent::Id: { using TypeInfo = Attributes::NeutralCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ElectricalEnergyMeasurement::Id: { using namespace app::Clusters::ElectricalEnergyMeasurement; switch (aPath.mAttributeId) { case Attributes::Accuracy::Id: { using TypeInfo = Attributes::Accuracy::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_measurementType; std::string value_measurementTypeClassName = "java/lang/Integer"; std::string value_measurementTypeCtorSignature = "(I)V"; jint jnivalue_measurementType = static_cast(cppValue.measurementType); chip::JniReferences::GetInstance().CreateBoxedObject(value_measurementTypeClassName.c_str(), value_measurementTypeCtorSignature.c_str(), jnivalue_measurementType, value_measurementType); jobject value_measured; std::string value_measuredClassName = "java/lang/Boolean"; std::string value_measuredCtorSignature = "(Z)V"; jboolean jnivalue_measured = static_cast(cppValue.measured); chip::JniReferences::GetInstance().CreateBoxedObject( value_measuredClassName.c_str(), value_measuredCtorSignature.c_str(), jnivalue_measured, value_measured); jobject value_minMeasuredValue; std::string value_minMeasuredValueClassName = "java/lang/Long"; std::string value_minMeasuredValueCtorSignature = "(J)V"; jlong jnivalue_minMeasuredValue = static_cast(cppValue.minMeasuredValue); chip::JniReferences::GetInstance().CreateBoxedObject(value_minMeasuredValueClassName.c_str(), value_minMeasuredValueCtorSignature.c_str(), jnivalue_minMeasuredValue, value_minMeasuredValue); jobject value_maxMeasuredValue; std::string value_maxMeasuredValueClassName = "java/lang/Long"; std::string value_maxMeasuredValueCtorSignature = "(J)V"; jlong jnivalue_maxMeasuredValue = static_cast(cppValue.maxMeasuredValue); chip::JniReferences::GetInstance().CreateBoxedObject(value_maxMeasuredValueClassName.c_str(), value_maxMeasuredValueCtorSignature.c_str(), jnivalue_maxMeasuredValue, value_maxMeasuredValue); jobject value_accuracyRanges; chip::JniReferences::GetInstance().CreateArrayList(value_accuracyRanges); auto iter_value_accuracyRanges_1 = cppValue.accuracyRanges.begin(); while (iter_value_accuracyRanges_1.Next()) { auto & entry_1 = iter_value_accuracyRanges_1.GetValue(); jobject newElement_1; jobject newElement_1_rangeMin; std::string newElement_1_rangeMinClassName = "java/lang/Long"; std::string newElement_1_rangeMinCtorSignature = "(J)V"; jlong jninewElement_1_rangeMin = static_cast(entry_1.rangeMin); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_rangeMinClassName.c_str(), newElement_1_rangeMinCtorSignature.c_str(), jninewElement_1_rangeMin, newElement_1_rangeMin); jobject newElement_1_rangeMax; std::string newElement_1_rangeMaxClassName = "java/lang/Long"; std::string newElement_1_rangeMaxCtorSignature = "(J)V"; jlong jninewElement_1_rangeMax = static_cast(entry_1.rangeMax); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_rangeMaxClassName.c_str(), newElement_1_rangeMaxCtorSignature.c_str(), jninewElement_1_rangeMax, newElement_1_rangeMax); jobject newElement_1_percentMax; if (!entry_1.percentMax.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_percentMax); } else { jobject newElement_1_percentMaxInsideOptional; std::string newElement_1_percentMaxInsideOptionalClassName = "java/lang/Integer"; std::string newElement_1_percentMaxInsideOptionalCtorSignature = "(I)V"; jint jninewElement_1_percentMaxInsideOptional = static_cast(entry_1.percentMax.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_1_percentMaxInsideOptionalClassName.c_str(), newElement_1_percentMaxInsideOptionalCtorSignature.c_str(), jninewElement_1_percentMaxInsideOptional, newElement_1_percentMaxInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_1_percentMaxInsideOptional, newElement_1_percentMax); } jobject newElement_1_percentMin; if (!entry_1.percentMin.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_percentMin); } else { jobject newElement_1_percentMinInsideOptional; std::string newElement_1_percentMinInsideOptionalClassName = "java/lang/Integer"; std::string newElement_1_percentMinInsideOptionalCtorSignature = "(I)V"; jint jninewElement_1_percentMinInsideOptional = static_cast(entry_1.percentMin.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_1_percentMinInsideOptionalClassName.c_str(), newElement_1_percentMinInsideOptionalCtorSignature.c_str(), jninewElement_1_percentMinInsideOptional, newElement_1_percentMinInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_1_percentMinInsideOptional, newElement_1_percentMin); } jobject newElement_1_percentTypical; if (!entry_1.percentTypical.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_percentTypical); } else { jobject newElement_1_percentTypicalInsideOptional; std::string newElement_1_percentTypicalInsideOptionalClassName = "java/lang/Integer"; std::string newElement_1_percentTypicalInsideOptionalCtorSignature = "(I)V"; jint jninewElement_1_percentTypicalInsideOptional = static_cast(entry_1.percentTypical.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_1_percentTypicalInsideOptionalClassName.c_str(), newElement_1_percentTypicalInsideOptionalCtorSignature.c_str(), jninewElement_1_percentTypicalInsideOptional, newElement_1_percentTypicalInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_1_percentTypicalInsideOptional, newElement_1_percentTypical); } jobject newElement_1_fixedMax; if (!entry_1.fixedMax.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_fixedMax); } else { jobject newElement_1_fixedMaxInsideOptional; std::string newElement_1_fixedMaxInsideOptionalClassName = "java/lang/Long"; std::string newElement_1_fixedMaxInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_1_fixedMaxInsideOptional = static_cast(entry_1.fixedMax.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_1_fixedMaxInsideOptionalClassName.c_str(), newElement_1_fixedMaxInsideOptionalCtorSignature.c_str(), jninewElement_1_fixedMaxInsideOptional, newElement_1_fixedMaxInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_1_fixedMaxInsideOptional, newElement_1_fixedMax); } jobject newElement_1_fixedMin; if (!entry_1.fixedMin.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_fixedMin); } else { jobject newElement_1_fixedMinInsideOptional; std::string newElement_1_fixedMinInsideOptionalClassName = "java/lang/Long"; std::string newElement_1_fixedMinInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_1_fixedMinInsideOptional = static_cast(entry_1.fixedMin.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_1_fixedMinInsideOptionalClassName.c_str(), newElement_1_fixedMinInsideOptionalCtorSignature.c_str(), jninewElement_1_fixedMinInsideOptional, newElement_1_fixedMinInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_1_fixedMinInsideOptional, newElement_1_fixedMin); } jobject newElement_1_fixedTypical; if (!entry_1.fixedTypical.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_fixedTypical); } else { jobject newElement_1_fixedTypicalInsideOptional; std::string newElement_1_fixedTypicalInsideOptionalClassName = "java/lang/Long"; std::string newElement_1_fixedTypicalInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_1_fixedTypicalInsideOptional = static_cast(entry_1.fixedTypical.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_1_fixedTypicalInsideOptionalClassName.c_str(), newElement_1_fixedTypicalInsideOptionalCtorSignature.c_str(), jninewElement_1_fixedTypicalInsideOptional, newElement_1_fixedTypicalInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_1_fixedTypicalInsideOptional, newElement_1_fixedTypical); } { jclass measurementAccuracyRangeStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct", measurementAccuracyRangeStructStructClass_2); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct"); return nullptr; } jmethodID measurementAccuracyRangeStructStructCtor_2; err = chip::JniReferences::GetInstance().FindMethod( env, measurementAccuracyRangeStructStructClass_2, "", "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &measurementAccuracyRangeStructStructCtor_2); if (err != CHIP_NO_ERROR || measurementAccuracyRangeStructStructCtor_2 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct " "constructor"); return nullptr; } newElement_1 = env->NewObject( measurementAccuracyRangeStructStructClass_2, measurementAccuracyRangeStructStructCtor_2, newElement_1_rangeMin, newElement_1_rangeMax, newElement_1_percentMax, newElement_1_percentMin, newElement_1_percentTypical, newElement_1_fixedMax, newElement_1_fixedMin, newElement_1_fixedTypical); } chip::JniReferences::GetInstance().AddToList(value_accuracyRanges, newElement_1); } { jclass measurementAccuracyStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct", measurementAccuracyStructStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct"); return nullptr; } jmethodID measurementAccuracyStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod( env, measurementAccuracyStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/ArrayList;)V", &measurementAccuracyStructStructCtor_0); if (err != CHIP_NO_ERROR || measurementAccuracyStructStructCtor_0 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct constructor"); return nullptr; } value = env->NewObject(measurementAccuracyStructStructClass_0, measurementAccuracyStructStructCtor_0, value_measurementType, value_measured, value_minMeasuredValue, value_maxMeasuredValue, value_accuracyRanges); } return value; } case Attributes::CumulativeEnergyImported::Id: { using TypeInfo = Attributes::CumulativeEnergyImported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_energy; std::string value_energyClassName = "java/lang/Long"; std::string value_energyCtorSignature = "(J)V"; jlong jnivalue_energy = static_cast(cppValue.Value().energy); chip::JniReferences::GetInstance().CreateBoxedObject( value_energyClassName.c_str(), value_energyCtorSignature.c_str(), jnivalue_energy, value_energy); jobject value_startTimestamp; if (!cppValue.Value().startTimestamp.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_startTimestamp); } else { jobject value_startTimestampInsideOptional; std::string value_startTimestampInsideOptionalClassName = "java/lang/Long"; std::string value_startTimestampInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_startTimestampInsideOptional = static_cast(cppValue.Value().startTimestamp.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_startTimestampInsideOptionalClassName.c_str(), value_startTimestampInsideOptionalCtorSignature.c_str(), jnivalue_startTimestampInsideOptional, value_startTimestampInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_startTimestampInsideOptional, value_startTimestamp); } jobject value_endTimestamp; if (!cppValue.Value().endTimestamp.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endTimestamp); } else { jobject value_endTimestampInsideOptional; std::string value_endTimestampInsideOptionalClassName = "java/lang/Long"; std::string value_endTimestampInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_endTimestampInsideOptional = static_cast(cppValue.Value().endTimestamp.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_endTimestampInsideOptionalClassName.c_str(), value_endTimestampInsideOptionalCtorSignature.c_str(), jnivalue_endTimestampInsideOptional, value_endTimestampInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_endTimestampInsideOptional, value_endTimestamp); } jobject value_startSystime; if (!cppValue.Value().startSystime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_startSystime); } else { jobject value_startSystimeInsideOptional; std::string value_startSystimeInsideOptionalClassName = "java/lang/Long"; std::string value_startSystimeInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_startSystimeInsideOptional = static_cast(cppValue.Value().startSystime.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_startSystimeInsideOptionalClassName.c_str(), value_startSystimeInsideOptionalCtorSignature.c_str(), jnivalue_startSystimeInsideOptional, value_startSystimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_startSystimeInsideOptional, value_startSystime); } jobject value_endSystime; if (!cppValue.Value().endSystime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endSystime); } else { jobject value_endSystimeInsideOptional; std::string value_endSystimeInsideOptionalClassName = "java/lang/Long"; std::string value_endSystimeInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_endSystimeInsideOptional = static_cast(cppValue.Value().endSystime.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_endSystimeInsideOptionalClassName.c_str(), value_endSystimeInsideOptionalCtorSignature.c_str(), jnivalue_endSystimeInsideOptional, value_endSystimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_endSystimeInsideOptional, value_endSystime); } { jclass energyMeasurementStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", energyMeasurementStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); return nullptr; } jmethodID energyMeasurementStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, energyMeasurementStructStructClass_1, "", "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &energyMeasurementStructStructCtor_1); if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); return nullptr; } value = env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, value_energy, value_startTimestamp, value_endTimestamp, value_startSystime, value_endSystime); } } return value; } case Attributes::CumulativeEnergyExported::Id: { using TypeInfo = Attributes::CumulativeEnergyExported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_energy; std::string value_energyClassName = "java/lang/Long"; std::string value_energyCtorSignature = "(J)V"; jlong jnivalue_energy = static_cast(cppValue.Value().energy); chip::JniReferences::GetInstance().CreateBoxedObject( value_energyClassName.c_str(), value_energyCtorSignature.c_str(), jnivalue_energy, value_energy); jobject value_startTimestamp; if (!cppValue.Value().startTimestamp.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_startTimestamp); } else { jobject value_startTimestampInsideOptional; std::string value_startTimestampInsideOptionalClassName = "java/lang/Long"; std::string value_startTimestampInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_startTimestampInsideOptional = static_cast(cppValue.Value().startTimestamp.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_startTimestampInsideOptionalClassName.c_str(), value_startTimestampInsideOptionalCtorSignature.c_str(), jnivalue_startTimestampInsideOptional, value_startTimestampInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_startTimestampInsideOptional, value_startTimestamp); } jobject value_endTimestamp; if (!cppValue.Value().endTimestamp.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endTimestamp); } else { jobject value_endTimestampInsideOptional; std::string value_endTimestampInsideOptionalClassName = "java/lang/Long"; std::string value_endTimestampInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_endTimestampInsideOptional = static_cast(cppValue.Value().endTimestamp.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_endTimestampInsideOptionalClassName.c_str(), value_endTimestampInsideOptionalCtorSignature.c_str(), jnivalue_endTimestampInsideOptional, value_endTimestampInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_endTimestampInsideOptional, value_endTimestamp); } jobject value_startSystime; if (!cppValue.Value().startSystime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_startSystime); } else { jobject value_startSystimeInsideOptional; std::string value_startSystimeInsideOptionalClassName = "java/lang/Long"; std::string value_startSystimeInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_startSystimeInsideOptional = static_cast(cppValue.Value().startSystime.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_startSystimeInsideOptionalClassName.c_str(), value_startSystimeInsideOptionalCtorSignature.c_str(), jnivalue_startSystimeInsideOptional, value_startSystimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_startSystimeInsideOptional, value_startSystime); } jobject value_endSystime; if (!cppValue.Value().endSystime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endSystime); } else { jobject value_endSystimeInsideOptional; std::string value_endSystimeInsideOptionalClassName = "java/lang/Long"; std::string value_endSystimeInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_endSystimeInsideOptional = static_cast(cppValue.Value().endSystime.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_endSystimeInsideOptionalClassName.c_str(), value_endSystimeInsideOptionalCtorSignature.c_str(), jnivalue_endSystimeInsideOptional, value_endSystimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_endSystimeInsideOptional, value_endSystime); } { jclass energyMeasurementStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", energyMeasurementStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); return nullptr; } jmethodID energyMeasurementStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, energyMeasurementStructStructClass_1, "", "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &energyMeasurementStructStructCtor_1); if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); return nullptr; } value = env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, value_energy, value_startTimestamp, value_endTimestamp, value_startSystime, value_endSystime); } } return value; } case Attributes::PeriodicEnergyImported::Id: { using TypeInfo = Attributes::PeriodicEnergyImported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_energy; std::string value_energyClassName = "java/lang/Long"; std::string value_energyCtorSignature = "(J)V"; jlong jnivalue_energy = static_cast(cppValue.Value().energy); chip::JniReferences::GetInstance().CreateBoxedObject( value_energyClassName.c_str(), value_energyCtorSignature.c_str(), jnivalue_energy, value_energy); jobject value_startTimestamp; if (!cppValue.Value().startTimestamp.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_startTimestamp); } else { jobject value_startTimestampInsideOptional; std::string value_startTimestampInsideOptionalClassName = "java/lang/Long"; std::string value_startTimestampInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_startTimestampInsideOptional = static_cast(cppValue.Value().startTimestamp.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_startTimestampInsideOptionalClassName.c_str(), value_startTimestampInsideOptionalCtorSignature.c_str(), jnivalue_startTimestampInsideOptional, value_startTimestampInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_startTimestampInsideOptional, value_startTimestamp); } jobject value_endTimestamp; if (!cppValue.Value().endTimestamp.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endTimestamp); } else { jobject value_endTimestampInsideOptional; std::string value_endTimestampInsideOptionalClassName = "java/lang/Long"; std::string value_endTimestampInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_endTimestampInsideOptional = static_cast(cppValue.Value().endTimestamp.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_endTimestampInsideOptionalClassName.c_str(), value_endTimestampInsideOptionalCtorSignature.c_str(), jnivalue_endTimestampInsideOptional, value_endTimestampInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_endTimestampInsideOptional, value_endTimestamp); } jobject value_startSystime; if (!cppValue.Value().startSystime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_startSystime); } else { jobject value_startSystimeInsideOptional; std::string value_startSystimeInsideOptionalClassName = "java/lang/Long"; std::string value_startSystimeInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_startSystimeInsideOptional = static_cast(cppValue.Value().startSystime.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_startSystimeInsideOptionalClassName.c_str(), value_startSystimeInsideOptionalCtorSignature.c_str(), jnivalue_startSystimeInsideOptional, value_startSystimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_startSystimeInsideOptional, value_startSystime); } jobject value_endSystime; if (!cppValue.Value().endSystime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endSystime); } else { jobject value_endSystimeInsideOptional; std::string value_endSystimeInsideOptionalClassName = "java/lang/Long"; std::string value_endSystimeInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_endSystimeInsideOptional = static_cast(cppValue.Value().endSystime.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_endSystimeInsideOptionalClassName.c_str(), value_endSystimeInsideOptionalCtorSignature.c_str(), jnivalue_endSystimeInsideOptional, value_endSystimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_endSystimeInsideOptional, value_endSystime); } { jclass energyMeasurementStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", energyMeasurementStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); return nullptr; } jmethodID energyMeasurementStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, energyMeasurementStructStructClass_1, "", "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &energyMeasurementStructStructCtor_1); if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); return nullptr; } value = env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, value_energy, value_startTimestamp, value_endTimestamp, value_startSystime, value_endSystime); } } return value; } case Attributes::PeriodicEnergyExported::Id: { using TypeInfo = Attributes::PeriodicEnergyExported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_energy; std::string value_energyClassName = "java/lang/Long"; std::string value_energyCtorSignature = "(J)V"; jlong jnivalue_energy = static_cast(cppValue.Value().energy); chip::JniReferences::GetInstance().CreateBoxedObject( value_energyClassName.c_str(), value_energyCtorSignature.c_str(), jnivalue_energy, value_energy); jobject value_startTimestamp; if (!cppValue.Value().startTimestamp.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_startTimestamp); } else { jobject value_startTimestampInsideOptional; std::string value_startTimestampInsideOptionalClassName = "java/lang/Long"; std::string value_startTimestampInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_startTimestampInsideOptional = static_cast(cppValue.Value().startTimestamp.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_startTimestampInsideOptionalClassName.c_str(), value_startTimestampInsideOptionalCtorSignature.c_str(), jnivalue_startTimestampInsideOptional, value_startTimestampInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_startTimestampInsideOptional, value_startTimestamp); } jobject value_endTimestamp; if (!cppValue.Value().endTimestamp.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endTimestamp); } else { jobject value_endTimestampInsideOptional; std::string value_endTimestampInsideOptionalClassName = "java/lang/Long"; std::string value_endTimestampInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_endTimestampInsideOptional = static_cast(cppValue.Value().endTimestamp.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_endTimestampInsideOptionalClassName.c_str(), value_endTimestampInsideOptionalCtorSignature.c_str(), jnivalue_endTimestampInsideOptional, value_endTimestampInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_endTimestampInsideOptional, value_endTimestamp); } jobject value_startSystime; if (!cppValue.Value().startSystime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_startSystime); } else { jobject value_startSystimeInsideOptional; std::string value_startSystimeInsideOptionalClassName = "java/lang/Long"; std::string value_startSystimeInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_startSystimeInsideOptional = static_cast(cppValue.Value().startSystime.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_startSystimeInsideOptionalClassName.c_str(), value_startSystimeInsideOptionalCtorSignature.c_str(), jnivalue_startSystimeInsideOptional, value_startSystimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_startSystimeInsideOptional, value_startSystime); } jobject value_endSystime; if (!cppValue.Value().endSystime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endSystime); } else { jobject value_endSystimeInsideOptional; std::string value_endSystimeInsideOptionalClassName = "java/lang/Long"; std::string value_endSystimeInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_endSystimeInsideOptional = static_cast(cppValue.Value().endSystime.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_endSystimeInsideOptionalClassName.c_str(), value_endSystimeInsideOptionalCtorSignature.c_str(), jnivalue_endSystimeInsideOptional, value_endSystimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_endSystimeInsideOptional, value_endSystime); } { jclass energyMeasurementStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", energyMeasurementStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); return nullptr; } jmethodID energyMeasurementStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, energyMeasurementStructStructClass_1, "", "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &energyMeasurementStructStructCtor_1); if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); return nullptr; } value = env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, value_energy, value_startTimestamp, value_endTimestamp, value_startSystime, value_endSystime); } } return value; } case Attributes::CumulativeEnergyReset::Id: { using TypeInfo = Attributes::CumulativeEnergyReset::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_importedResetTimestamp; if (!cppValue.Value().importedResetTimestamp.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_importedResetTimestamp); } else { jobject value_importedResetTimestampInsideOptional; if (cppValue.Value().importedResetTimestamp.Value().IsNull()) { value_importedResetTimestampInsideOptional = nullptr; } else { std::string value_importedResetTimestampInsideOptionalClassName = "java/lang/Long"; std::string value_importedResetTimestampInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_importedResetTimestampInsideOptional = static_cast(cppValue.Value().importedResetTimestamp.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_importedResetTimestampInsideOptionalClassName.c_str(), value_importedResetTimestampInsideOptionalCtorSignature.c_str(), jnivalue_importedResetTimestampInsideOptional, value_importedResetTimestampInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(value_importedResetTimestampInsideOptional, value_importedResetTimestamp); } jobject value_exportedResetTimestamp; if (!cppValue.Value().exportedResetTimestamp.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_exportedResetTimestamp); } else { jobject value_exportedResetTimestampInsideOptional; if (cppValue.Value().exportedResetTimestamp.Value().IsNull()) { value_exportedResetTimestampInsideOptional = nullptr; } else { std::string value_exportedResetTimestampInsideOptionalClassName = "java/lang/Long"; std::string value_exportedResetTimestampInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_exportedResetTimestampInsideOptional = static_cast(cppValue.Value().exportedResetTimestamp.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_exportedResetTimestampInsideOptionalClassName.c_str(), value_exportedResetTimestampInsideOptionalCtorSignature.c_str(), jnivalue_exportedResetTimestampInsideOptional, value_exportedResetTimestampInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(value_exportedResetTimestampInsideOptional, value_exportedResetTimestamp); } jobject value_importedResetSystime; if (!cppValue.Value().importedResetSystime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_importedResetSystime); } else { jobject value_importedResetSystimeInsideOptional; if (cppValue.Value().importedResetSystime.Value().IsNull()) { value_importedResetSystimeInsideOptional = nullptr; } else { std::string value_importedResetSystimeInsideOptionalClassName = "java/lang/Long"; std::string value_importedResetSystimeInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_importedResetSystimeInsideOptional = static_cast(cppValue.Value().importedResetSystime.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_importedResetSystimeInsideOptionalClassName.c_str(), value_importedResetSystimeInsideOptionalCtorSignature.c_str(), jnivalue_importedResetSystimeInsideOptional, value_importedResetSystimeInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(value_importedResetSystimeInsideOptional, value_importedResetSystime); } jobject value_exportedResetSystime; if (!cppValue.Value().exportedResetSystime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_exportedResetSystime); } else { jobject value_exportedResetSystimeInsideOptional; if (cppValue.Value().exportedResetSystime.Value().IsNull()) { value_exportedResetSystimeInsideOptional = nullptr; } else { std::string value_exportedResetSystimeInsideOptionalClassName = "java/lang/Long"; std::string value_exportedResetSystimeInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_exportedResetSystimeInsideOptional = static_cast(cppValue.Value().exportedResetSystime.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_exportedResetSystimeInsideOptionalClassName.c_str(), value_exportedResetSystimeInsideOptionalCtorSignature.c_str(), jnivalue_exportedResetSystimeInsideOptional, value_exportedResetSystimeInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(value_exportedResetSystimeInsideOptional, value_exportedResetSystime); } { jclass cumulativeEnergyResetStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct", cumulativeEnergyResetStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct"); return nullptr; } jmethodID cumulativeEnergyResetStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, cumulativeEnergyResetStructStructClass_1, "", "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &cumulativeEnergyResetStructStructCtor_1); if (err != CHIP_NO_ERROR || cumulativeEnergyResetStructStructCtor_1 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct constructor"); return nullptr; } value = env->NewObject(cumulativeEnergyResetStructStructClass_1, cumulativeEnergyResetStructStructCtor_1, value_importedResetTimestamp, value_exportedResetTimestamp, value_importedResetSystime, value_exportedResetSystime); } } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::WaterHeaterManagement::Id: { using namespace app::Clusters::WaterHeaterManagement; switch (aPath.mAttributeId) { case Attributes::HeaterTypes::Id: { using TypeInfo = Attributes::HeaterTypes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::HeatDemand::Id: { using TypeInfo = Attributes::HeatDemand::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TankVolume::Id: { using TypeInfo = Attributes::TankVolume::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::EstimatedHeatRequired::Id: { using TypeInfo = Attributes::EstimatedHeatRequired::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TankPercentage::Id: { using TypeInfo = Attributes::TankPercentage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::BoostState::Id: { using TypeInfo = Attributes::BoostState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::DemandResponseLoadControl::Id: { using namespace app::Clusters::DemandResponseLoadControl; switch (aPath.mAttributeId) { case Attributes::LoadControlPrograms::Id: { using TypeInfo = Attributes::LoadControlPrograms::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_programID; jbyteArray newElement_0_programIDByteArray = env->NewByteArray(static_cast(entry_0.programID.size())); env->SetByteArrayRegion(newElement_0_programIDByteArray, 0, static_cast(entry_0.programID.size()), reinterpret_cast(entry_0.programID.data())); newElement_0_programID = newElement_0_programIDByteArray; jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); jobject newElement_0_enrollmentGroup; if (entry_0.enrollmentGroup.IsNull()) { newElement_0_enrollmentGroup = nullptr; } else { std::string newElement_0_enrollmentGroupClassName = "java/lang/Integer"; std::string newElement_0_enrollmentGroupCtorSignature = "(I)V"; jint jninewElement_0_enrollmentGroup = static_cast(entry_0.enrollmentGroup.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_enrollmentGroupClassName.c_str(), newElement_0_enrollmentGroupCtorSignature.c_str(), jninewElement_0_enrollmentGroup, newElement_0_enrollmentGroup); } jobject newElement_0_randomStartMinutes; if (entry_0.randomStartMinutes.IsNull()) { newElement_0_randomStartMinutes = nullptr; } else { std::string newElement_0_randomStartMinutesClassName = "java/lang/Integer"; std::string newElement_0_randomStartMinutesCtorSignature = "(I)V"; jint jninewElement_0_randomStartMinutes = static_cast(entry_0.randomStartMinutes.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_randomStartMinutesClassName.c_str(), newElement_0_randomStartMinutesCtorSignature.c_str(), jninewElement_0_randomStartMinutes, newElement_0_randomStartMinutes); } jobject newElement_0_randomDurationMinutes; if (entry_0.randomDurationMinutes.IsNull()) { newElement_0_randomDurationMinutes = nullptr; } else { std::string newElement_0_randomDurationMinutesClassName = "java/lang/Integer"; std::string newElement_0_randomDurationMinutesCtorSignature = "(I)V"; jint jninewElement_0_randomDurationMinutes = static_cast(entry_0.randomDurationMinutes.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_randomDurationMinutesClassName.c_str(), newElement_0_randomDurationMinutesCtorSignature.c_str(), jninewElement_0_randomDurationMinutes, newElement_0_randomDurationMinutes); } { jclass loadControlProgramStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct", loadControlProgramStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct"); return nullptr; } jmethodID loadControlProgramStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, loadControlProgramStructStructClass_1, "", "([BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &loadControlProgramStructStructCtor_1); if (err != CHIP_NO_ERROR || loadControlProgramStructStructCtor_1 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct constructor"); return nullptr; } newElement_0 = env->NewObject(loadControlProgramStructStructClass_1, loadControlProgramStructStructCtor_1, newElement_0_programID, newElement_0_name, newElement_0_enrollmentGroup, newElement_0_randomStartMinutes, newElement_0_randomDurationMinutes); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::NumberOfLoadControlPrograms::Id: { using TypeInfo = Attributes::NumberOfLoadControlPrograms::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Events::Id: { using TypeInfo = Attributes::Events::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_eventID; jbyteArray newElement_0_eventIDByteArray = env->NewByteArray(static_cast(entry_0.eventID.size())); env->SetByteArrayRegion(newElement_0_eventIDByteArray, 0, static_cast(entry_0.eventID.size()), reinterpret_cast(entry_0.eventID.data())); newElement_0_eventID = newElement_0_eventIDByteArray; jobject newElement_0_programID; if (entry_0.programID.IsNull()) { newElement_0_programID = nullptr; } else { jbyteArray newElement_0_programIDByteArray = env->NewByteArray(static_cast(entry_0.programID.Value().size())); env->SetByteArrayRegion(newElement_0_programIDByteArray, 0, static_cast(entry_0.programID.Value().size()), reinterpret_cast(entry_0.programID.Value().data())); newElement_0_programID = newElement_0_programIDByteArray; } jobject newElement_0_control; std::string newElement_0_controlClassName = "java/lang/Integer"; std::string newElement_0_controlCtorSignature = "(I)V"; jint jninewElement_0_control = static_cast(entry_0.control.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_controlClassName.c_str(), newElement_0_controlCtorSignature.c_str(), jninewElement_0_control, newElement_0_control); jobject newElement_0_deviceClass; std::string newElement_0_deviceClassClassName = "java/lang/Long"; std::string newElement_0_deviceClassCtorSignature = "(J)V"; jlong jninewElement_0_deviceClass = static_cast(entry_0.deviceClass.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceClassClassName.c_str(), newElement_0_deviceClassCtorSignature.c_str(), jninewElement_0_deviceClass, newElement_0_deviceClass); jobject newElement_0_enrollmentGroup; if (!entry_0.enrollmentGroup.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_enrollmentGroup); } else { jobject newElement_0_enrollmentGroupInsideOptional; std::string newElement_0_enrollmentGroupInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_enrollmentGroupInsideOptionalCtorSignature = "(I)V"; jint jninewElement_0_enrollmentGroupInsideOptional = static_cast(entry_0.enrollmentGroup.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_enrollmentGroupInsideOptionalClassName.c_str(), newElement_0_enrollmentGroupInsideOptionalCtorSignature.c_str(), jninewElement_0_enrollmentGroupInsideOptional, newElement_0_enrollmentGroupInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_enrollmentGroupInsideOptional, newElement_0_enrollmentGroup); } jobject newElement_0_criticality; std::string newElement_0_criticalityClassName = "java/lang/Integer"; std::string newElement_0_criticalityCtorSignature = "(I)V"; jint jninewElement_0_criticality = static_cast(entry_0.criticality); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_criticalityClassName.c_str(), newElement_0_criticalityCtorSignature.c_str(), jninewElement_0_criticality, newElement_0_criticality); jobject newElement_0_startTime; if (entry_0.startTime.IsNull()) { newElement_0_startTime = nullptr; } else { std::string newElement_0_startTimeClassName = "java/lang/Long"; std::string newElement_0_startTimeCtorSignature = "(J)V"; jlong jninewElement_0_startTime = static_cast(entry_0.startTime.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_startTimeClassName.c_str(), newElement_0_startTimeCtorSignature.c_str(), jninewElement_0_startTime, newElement_0_startTime); } jobject newElement_0_transitions; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_transitions); auto iter_newElement_0_transitions_2 = entry_0.transitions.begin(); while (iter_newElement_0_transitions_2.Next()) { auto & entry_2 = iter_newElement_0_transitions_2.GetValue(); jobject newElement_2; jobject newElement_2_duration; std::string newElement_2_durationClassName = "java/lang/Integer"; std::string newElement_2_durationCtorSignature = "(I)V"; jint jninewElement_2_duration = static_cast(entry_2.duration); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_durationClassName.c_str(), newElement_2_durationCtorSignature.c_str(), jninewElement_2_duration, newElement_2_duration); jobject newElement_2_control; std::string newElement_2_controlClassName = "java/lang/Integer"; std::string newElement_2_controlCtorSignature = "(I)V"; jint jninewElement_2_control = static_cast(entry_2.control.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_controlClassName.c_str(), newElement_2_controlCtorSignature.c_str(), jninewElement_2_control, newElement_2_control); jobject newElement_2_temperatureControl; if (!entry_2.temperatureControl.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_temperatureControl); } else { jobject newElement_2_temperatureControlInsideOptional; jobject newElement_2_temperatureControlInsideOptional_coolingTempOffset; if (!entry_2.temperatureControl.Value().coolingTempOffset.HasValue()) { chip::JniReferences::GetInstance().CreateOptional( nullptr, newElement_2_temperatureControlInsideOptional_coolingTempOffset); } else { jobject newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional; if (entry_2.temperatureControl.Value().coolingTempOffset.Value().IsNull()) { newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = nullptr; } else { std::string newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = static_cast(entry_2.temperatureControl.Value().coolingTempOffset.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName.c_str(), newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature .c_str(), jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional); } chip::JniReferences::GetInstance().CreateOptional( newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, newElement_2_temperatureControlInsideOptional_coolingTempOffset); } jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffset; if (!entry_2.temperatureControl.Value().heatingtTempOffset.HasValue()) { chip::JniReferences::GetInstance().CreateOptional( nullptr, newElement_2_temperatureControlInsideOptional_heatingtTempOffset); } else { jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional; if (entry_2.temperatureControl.Value().heatingtTempOffset.Value().IsNull()) { newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = nullptr; } else { std::string newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = static_cast(entry_2.temperatureControl.Value().heatingtTempOffset.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName.c_str(), newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature .c_str(), jninewElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional); } chip::JniReferences::GetInstance().CreateOptional( newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, newElement_2_temperatureControlInsideOptional_heatingtTempOffset); } jobject newElement_2_temperatureControlInsideOptional_coolingTempSetpoint; if (!entry_2.temperatureControl.Value().coolingTempSetpoint.HasValue()) { chip::JniReferences::GetInstance().CreateOptional( nullptr, newElement_2_temperatureControlInsideOptional_coolingTempSetpoint); } else { jobject newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional; if (entry_2.temperatureControl.Value().coolingTempSetpoint.Value().IsNull()) { newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = nullptr; } else { std::string newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = static_cast(entry_2.temperatureControl.Value().coolingTempSetpoint.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName .c_str(), newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature .c_str(), jninewElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional); } chip::JniReferences::GetInstance().CreateOptional( newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, newElement_2_temperatureControlInsideOptional_coolingTempSetpoint); } jobject newElement_2_temperatureControlInsideOptional_heatingTempSetpoint; if (!entry_2.temperatureControl.Value().heatingTempSetpoint.HasValue()) { chip::JniReferences::GetInstance().CreateOptional( nullptr, newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); } else { jobject newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional; if (entry_2.temperatureControl.Value().heatingTempSetpoint.Value().IsNull()) { newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = nullptr; } else { std::string newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = static_cast(entry_2.temperatureControl.Value().heatingTempSetpoint.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName .c_str(), newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature .c_str(), jninewElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional); } chip::JniReferences::GetInstance().CreateOptional( newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); } { jclass temperatureControlStructStructClass_5; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct", temperatureControlStructStructClass_5); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct"); return nullptr; } jmethodID temperatureControlStructStructCtor_5; err = chip::JniReferences::GetInstance().FindMethod( env, temperatureControlStructStructClass_5, "", "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &temperatureControlStructStructCtor_5); if (err != CHIP_NO_ERROR || temperatureControlStructStructCtor_5 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct " "constructor"); return nullptr; } newElement_2_temperatureControlInsideOptional = env->NewObject(temperatureControlStructStructClass_5, temperatureControlStructStructCtor_5, newElement_2_temperatureControlInsideOptional_coolingTempOffset, newElement_2_temperatureControlInsideOptional_heatingtTempOffset, newElement_2_temperatureControlInsideOptional_coolingTempSetpoint, newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); } chip::JniReferences::GetInstance().CreateOptional(newElement_2_temperatureControlInsideOptional, newElement_2_temperatureControl); } jobject newElement_2_averageLoadControl; if (!entry_2.averageLoadControl.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_averageLoadControl); } else { jobject newElement_2_averageLoadControlInsideOptional; jobject newElement_2_averageLoadControlInsideOptional_loadAdjustment; std::string newElement_2_averageLoadControlInsideOptional_loadAdjustmentClassName = "java/lang/Integer"; std::string newElement_2_averageLoadControlInsideOptional_loadAdjustmentCtorSignature = "(I)V"; jint jninewElement_2_averageLoadControlInsideOptional_loadAdjustment = static_cast(entry_2.averageLoadControl.Value().loadAdjustment); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_averageLoadControlInsideOptional_loadAdjustmentClassName.c_str(), newElement_2_averageLoadControlInsideOptional_loadAdjustmentCtorSignature.c_str(), jninewElement_2_averageLoadControlInsideOptional_loadAdjustment, newElement_2_averageLoadControlInsideOptional_loadAdjustment); { jclass averageLoadControlStructStructClass_5; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct", averageLoadControlStructStructClass_5); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct"); return nullptr; } jmethodID averageLoadControlStructStructCtor_5; err = chip::JniReferences::GetInstance().FindMethod(env, averageLoadControlStructStructClass_5, "", "(Ljava/lang/Integer;)V", &averageLoadControlStructStructCtor_5); if (err != CHIP_NO_ERROR || averageLoadControlStructStructCtor_5 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct " "constructor"); return nullptr; } newElement_2_averageLoadControlInsideOptional = env->NewObject(averageLoadControlStructStructClass_5, averageLoadControlStructStructCtor_5, newElement_2_averageLoadControlInsideOptional_loadAdjustment); } chip::JniReferences::GetInstance().CreateOptional(newElement_2_averageLoadControlInsideOptional, newElement_2_averageLoadControl); } jobject newElement_2_dutyCycleControl; if (!entry_2.dutyCycleControl.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_dutyCycleControl); } else { jobject newElement_2_dutyCycleControlInsideOptional; jobject newElement_2_dutyCycleControlInsideOptional_dutyCycle; std::string newElement_2_dutyCycleControlInsideOptional_dutyCycleClassName = "java/lang/Integer"; std::string newElement_2_dutyCycleControlInsideOptional_dutyCycleCtorSignature = "(I)V"; jint jninewElement_2_dutyCycleControlInsideOptional_dutyCycle = static_cast(entry_2.dutyCycleControl.Value().dutyCycle); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_dutyCycleControlInsideOptional_dutyCycleClassName.c_str(), newElement_2_dutyCycleControlInsideOptional_dutyCycleCtorSignature.c_str(), jninewElement_2_dutyCycleControlInsideOptional_dutyCycle, newElement_2_dutyCycleControlInsideOptional_dutyCycle); { jclass dutyCycleControlStructStructClass_5; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct", dutyCycleControlStructStructClass_5); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct"); return nullptr; } jmethodID dutyCycleControlStructStructCtor_5; err = chip::JniReferences::GetInstance().FindMethod(env, dutyCycleControlStructStructClass_5, "", "(Ljava/lang/Integer;)V", &dutyCycleControlStructStructCtor_5); if (err != CHIP_NO_ERROR || dutyCycleControlStructStructCtor_5 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct " "constructor"); return nullptr; } newElement_2_dutyCycleControlInsideOptional = env->NewObject(dutyCycleControlStructStructClass_5, dutyCycleControlStructStructCtor_5, newElement_2_dutyCycleControlInsideOptional_dutyCycle); } chip::JniReferences::GetInstance().CreateOptional(newElement_2_dutyCycleControlInsideOptional, newElement_2_dutyCycleControl); } jobject newElement_2_powerSavingsControl; if (!entry_2.powerSavingsControl.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_powerSavingsControl); } else { jobject newElement_2_powerSavingsControlInsideOptional; jobject newElement_2_powerSavingsControlInsideOptional_powerSavings; std::string newElement_2_powerSavingsControlInsideOptional_powerSavingsClassName = "java/lang/Integer"; std::string newElement_2_powerSavingsControlInsideOptional_powerSavingsCtorSignature = "(I)V"; jint jninewElement_2_powerSavingsControlInsideOptional_powerSavings = static_cast(entry_2.powerSavingsControl.Value().powerSavings); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_powerSavingsControlInsideOptional_powerSavingsClassName.c_str(), newElement_2_powerSavingsControlInsideOptional_powerSavingsCtorSignature.c_str(), jninewElement_2_powerSavingsControlInsideOptional_powerSavings, newElement_2_powerSavingsControlInsideOptional_powerSavings); { jclass powerSavingsControlStructStructClass_5; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct", powerSavingsControlStructStructClass_5); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct"); return nullptr; } jmethodID powerSavingsControlStructStructCtor_5; err = chip::JniReferences::GetInstance().FindMethod(env, powerSavingsControlStructStructClass_5, "", "(Ljava/lang/Integer;)V", &powerSavingsControlStructStructCtor_5); if (err != CHIP_NO_ERROR || powerSavingsControlStructStructCtor_5 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct " "constructor"); return nullptr; } newElement_2_powerSavingsControlInsideOptional = env->NewObject(powerSavingsControlStructStructClass_5, powerSavingsControlStructStructCtor_5, newElement_2_powerSavingsControlInsideOptional_powerSavings); } chip::JniReferences::GetInstance().CreateOptional(newElement_2_powerSavingsControlInsideOptional, newElement_2_powerSavingsControl); } jobject newElement_2_heatingSourceControl; if (!entry_2.heatingSourceControl.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_heatingSourceControl); } else { jobject newElement_2_heatingSourceControlInsideOptional; jobject newElement_2_heatingSourceControlInsideOptional_heatingSource; std::string newElement_2_heatingSourceControlInsideOptional_heatingSourceClassName = "java/lang/Integer"; std::string newElement_2_heatingSourceControlInsideOptional_heatingSourceCtorSignature = "(I)V"; jint jninewElement_2_heatingSourceControlInsideOptional_heatingSource = static_cast(entry_2.heatingSourceControl.Value().heatingSource); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_heatingSourceControlInsideOptional_heatingSourceClassName.c_str(), newElement_2_heatingSourceControlInsideOptional_heatingSourceCtorSignature.c_str(), jninewElement_2_heatingSourceControlInsideOptional_heatingSource, newElement_2_heatingSourceControlInsideOptional_heatingSource); { jclass heatingSourceControlStructStructClass_5; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct", heatingSourceControlStructStructClass_5); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct"); return nullptr; } jmethodID heatingSourceControlStructStructCtor_5; err = chip::JniReferences::GetInstance().FindMethod(env, heatingSourceControlStructStructClass_5, "", "(Ljava/lang/Integer;)V", &heatingSourceControlStructStructCtor_5); if (err != CHIP_NO_ERROR || heatingSourceControlStructStructCtor_5 == nullptr) { ChipLogError(Zcl, "Could not find " "ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct constructor"); return nullptr; } newElement_2_heatingSourceControlInsideOptional = env->NewObject(heatingSourceControlStructStructClass_5, heatingSourceControlStructStructCtor_5, newElement_2_heatingSourceControlInsideOptional_heatingSource); } chip::JniReferences::GetInstance().CreateOptional(newElement_2_heatingSourceControlInsideOptional, newElement_2_heatingSourceControl); } { jclass loadControlEventTransitionStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct", loadControlEventTransitionStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class " "ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct"); return nullptr; } jmethodID loadControlEventTransitionStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod( env, loadControlEventTransitionStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &loadControlEventTransitionStructStructCtor_3); if (err != CHIP_NO_ERROR || loadControlEventTransitionStructStructCtor_3 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct " "constructor"); return nullptr; } newElement_2 = env->NewObject(loadControlEventTransitionStructStructClass_3, loadControlEventTransitionStructStructCtor_3, newElement_2_duration, newElement_2_control, newElement_2_temperatureControl, newElement_2_averageLoadControl, newElement_2_dutyCycleControl, newElement_2_powerSavingsControl, newElement_2_heatingSourceControl); } chip::JniReferences::GetInstance().AddToList(newElement_0_transitions, newElement_2); } { jclass loadControlEventStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct", loadControlEventStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct"); return nullptr; } jmethodID loadControlEventStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, loadControlEventStructStructClass_1, "", "([B[BLjava/lang/Integer;Ljava/lang/Long;Ljava/util/Optional;Ljava/lang/Integer;Ljava/lang/Long;Ljava/util/" "ArrayList;)V", &loadControlEventStructStructCtor_1); if (err != CHIP_NO_ERROR || loadControlEventStructStructCtor_1 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct constructor"); return nullptr; } newElement_0 = env->NewObject(loadControlEventStructStructClass_1, loadControlEventStructStructCtor_1, newElement_0_eventID, newElement_0_programID, newElement_0_control, newElement_0_deviceClass, newElement_0_enrollmentGroup, newElement_0_criticality, newElement_0_startTime, newElement_0_transitions); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::ActiveEvents::Id: { using TypeInfo = Attributes::ActiveEvents::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_eventID; jbyteArray newElement_0_eventIDByteArray = env->NewByteArray(static_cast(entry_0.eventID.size())); env->SetByteArrayRegion(newElement_0_eventIDByteArray, 0, static_cast(entry_0.eventID.size()), reinterpret_cast(entry_0.eventID.data())); newElement_0_eventID = newElement_0_eventIDByteArray; jobject newElement_0_programID; if (entry_0.programID.IsNull()) { newElement_0_programID = nullptr; } else { jbyteArray newElement_0_programIDByteArray = env->NewByteArray(static_cast(entry_0.programID.Value().size())); env->SetByteArrayRegion(newElement_0_programIDByteArray, 0, static_cast(entry_0.programID.Value().size()), reinterpret_cast(entry_0.programID.Value().data())); newElement_0_programID = newElement_0_programIDByteArray; } jobject newElement_0_control; std::string newElement_0_controlClassName = "java/lang/Integer"; std::string newElement_0_controlCtorSignature = "(I)V"; jint jninewElement_0_control = static_cast(entry_0.control.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_controlClassName.c_str(), newElement_0_controlCtorSignature.c_str(), jninewElement_0_control, newElement_0_control); jobject newElement_0_deviceClass; std::string newElement_0_deviceClassClassName = "java/lang/Long"; std::string newElement_0_deviceClassCtorSignature = "(J)V"; jlong jninewElement_0_deviceClass = static_cast(entry_0.deviceClass.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceClassClassName.c_str(), newElement_0_deviceClassCtorSignature.c_str(), jninewElement_0_deviceClass, newElement_0_deviceClass); jobject newElement_0_enrollmentGroup; if (!entry_0.enrollmentGroup.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_enrollmentGroup); } else { jobject newElement_0_enrollmentGroupInsideOptional; std::string newElement_0_enrollmentGroupInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_enrollmentGroupInsideOptionalCtorSignature = "(I)V"; jint jninewElement_0_enrollmentGroupInsideOptional = static_cast(entry_0.enrollmentGroup.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_enrollmentGroupInsideOptionalClassName.c_str(), newElement_0_enrollmentGroupInsideOptionalCtorSignature.c_str(), jninewElement_0_enrollmentGroupInsideOptional, newElement_0_enrollmentGroupInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_enrollmentGroupInsideOptional, newElement_0_enrollmentGroup); } jobject newElement_0_criticality; std::string newElement_0_criticalityClassName = "java/lang/Integer"; std::string newElement_0_criticalityCtorSignature = "(I)V"; jint jninewElement_0_criticality = static_cast(entry_0.criticality); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_criticalityClassName.c_str(), newElement_0_criticalityCtorSignature.c_str(), jninewElement_0_criticality, newElement_0_criticality); jobject newElement_0_startTime; if (entry_0.startTime.IsNull()) { newElement_0_startTime = nullptr; } else { std::string newElement_0_startTimeClassName = "java/lang/Long"; std::string newElement_0_startTimeCtorSignature = "(J)V"; jlong jninewElement_0_startTime = static_cast(entry_0.startTime.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_startTimeClassName.c_str(), newElement_0_startTimeCtorSignature.c_str(), jninewElement_0_startTime, newElement_0_startTime); } jobject newElement_0_transitions; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_transitions); auto iter_newElement_0_transitions_2 = entry_0.transitions.begin(); while (iter_newElement_0_transitions_2.Next()) { auto & entry_2 = iter_newElement_0_transitions_2.GetValue(); jobject newElement_2; jobject newElement_2_duration; std::string newElement_2_durationClassName = "java/lang/Integer"; std::string newElement_2_durationCtorSignature = "(I)V"; jint jninewElement_2_duration = static_cast(entry_2.duration); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_durationClassName.c_str(), newElement_2_durationCtorSignature.c_str(), jninewElement_2_duration, newElement_2_duration); jobject newElement_2_control; std::string newElement_2_controlClassName = "java/lang/Integer"; std::string newElement_2_controlCtorSignature = "(I)V"; jint jninewElement_2_control = static_cast(entry_2.control.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_controlClassName.c_str(), newElement_2_controlCtorSignature.c_str(), jninewElement_2_control, newElement_2_control); jobject newElement_2_temperatureControl; if (!entry_2.temperatureControl.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_temperatureControl); } else { jobject newElement_2_temperatureControlInsideOptional; jobject newElement_2_temperatureControlInsideOptional_coolingTempOffset; if (!entry_2.temperatureControl.Value().coolingTempOffset.HasValue()) { chip::JniReferences::GetInstance().CreateOptional( nullptr, newElement_2_temperatureControlInsideOptional_coolingTempOffset); } else { jobject newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional; if (entry_2.temperatureControl.Value().coolingTempOffset.Value().IsNull()) { newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = nullptr; } else { std::string newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional = static_cast(entry_2.temperatureControl.Value().coolingTempOffset.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalClassName.c_str(), newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptionalCtorSignature .c_str(), jninewElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional); } chip::JniReferences::GetInstance().CreateOptional( newElement_2_temperatureControlInsideOptional_coolingTempOffsetInsideOptional, newElement_2_temperatureControlInsideOptional_coolingTempOffset); } jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffset; if (!entry_2.temperatureControl.Value().heatingtTempOffset.HasValue()) { chip::JniReferences::GetInstance().CreateOptional( nullptr, newElement_2_temperatureControlInsideOptional_heatingtTempOffset); } else { jobject newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional; if (entry_2.temperatureControl.Value().heatingtTempOffset.Value().IsNull()) { newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = nullptr; } else { std::string newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional = static_cast(entry_2.temperatureControl.Value().heatingtTempOffset.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalClassName.c_str(), newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptionalCtorSignature .c_str(), jninewElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional); } chip::JniReferences::GetInstance().CreateOptional( newElement_2_temperatureControlInsideOptional_heatingtTempOffsetInsideOptional, newElement_2_temperatureControlInsideOptional_heatingtTempOffset); } jobject newElement_2_temperatureControlInsideOptional_coolingTempSetpoint; if (!entry_2.temperatureControl.Value().coolingTempSetpoint.HasValue()) { chip::JniReferences::GetInstance().CreateOptional( nullptr, newElement_2_temperatureControlInsideOptional_coolingTempSetpoint); } else { jobject newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional; if (entry_2.temperatureControl.Value().coolingTempSetpoint.Value().IsNull()) { newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = nullptr; } else { std::string newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional = static_cast(entry_2.temperatureControl.Value().coolingTempSetpoint.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalClassName .c_str(), newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptionalCtorSignature .c_str(), jninewElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional); } chip::JniReferences::GetInstance().CreateOptional( newElement_2_temperatureControlInsideOptional_coolingTempSetpointInsideOptional, newElement_2_temperatureControlInsideOptional_coolingTempSetpoint); } jobject newElement_2_temperatureControlInsideOptional_heatingTempSetpoint; if (!entry_2.temperatureControl.Value().heatingTempSetpoint.HasValue()) { chip::JniReferences::GetInstance().CreateOptional( nullptr, newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); } else { jobject newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional; if (entry_2.temperatureControl.Value().heatingTempSetpoint.Value().IsNull()) { newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = nullptr; } else { std::string newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional = static_cast(entry_2.temperatureControl.Value().heatingTempSetpoint.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalClassName .c_str(), newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptionalCtorSignature .c_str(), jninewElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional); } chip::JniReferences::GetInstance().CreateOptional( newElement_2_temperatureControlInsideOptional_heatingTempSetpointInsideOptional, newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); } { jclass temperatureControlStructStructClass_5; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct", temperatureControlStructStructClass_5); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct"); return nullptr; } jmethodID temperatureControlStructStructCtor_5; err = chip::JniReferences::GetInstance().FindMethod( env, temperatureControlStructStructClass_5, "", "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &temperatureControlStructStructCtor_5); if (err != CHIP_NO_ERROR || temperatureControlStructStructCtor_5 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct " "constructor"); return nullptr; } newElement_2_temperatureControlInsideOptional = env->NewObject(temperatureControlStructStructClass_5, temperatureControlStructStructCtor_5, newElement_2_temperatureControlInsideOptional_coolingTempOffset, newElement_2_temperatureControlInsideOptional_heatingtTempOffset, newElement_2_temperatureControlInsideOptional_coolingTempSetpoint, newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); } chip::JniReferences::GetInstance().CreateOptional(newElement_2_temperatureControlInsideOptional, newElement_2_temperatureControl); } jobject newElement_2_averageLoadControl; if (!entry_2.averageLoadControl.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_averageLoadControl); } else { jobject newElement_2_averageLoadControlInsideOptional; jobject newElement_2_averageLoadControlInsideOptional_loadAdjustment; std::string newElement_2_averageLoadControlInsideOptional_loadAdjustmentClassName = "java/lang/Integer"; std::string newElement_2_averageLoadControlInsideOptional_loadAdjustmentCtorSignature = "(I)V"; jint jninewElement_2_averageLoadControlInsideOptional_loadAdjustment = static_cast(entry_2.averageLoadControl.Value().loadAdjustment); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_averageLoadControlInsideOptional_loadAdjustmentClassName.c_str(), newElement_2_averageLoadControlInsideOptional_loadAdjustmentCtorSignature.c_str(), jninewElement_2_averageLoadControlInsideOptional_loadAdjustment, newElement_2_averageLoadControlInsideOptional_loadAdjustment); { jclass averageLoadControlStructStructClass_5; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct", averageLoadControlStructStructClass_5); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct"); return nullptr; } jmethodID averageLoadControlStructStructCtor_5; err = chip::JniReferences::GetInstance().FindMethod(env, averageLoadControlStructStructClass_5, "", "(Ljava/lang/Integer;)V", &averageLoadControlStructStructCtor_5); if (err != CHIP_NO_ERROR || averageLoadControlStructStructCtor_5 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct " "constructor"); return nullptr; } newElement_2_averageLoadControlInsideOptional = env->NewObject(averageLoadControlStructStructClass_5, averageLoadControlStructStructCtor_5, newElement_2_averageLoadControlInsideOptional_loadAdjustment); } chip::JniReferences::GetInstance().CreateOptional(newElement_2_averageLoadControlInsideOptional, newElement_2_averageLoadControl); } jobject newElement_2_dutyCycleControl; if (!entry_2.dutyCycleControl.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_dutyCycleControl); } else { jobject newElement_2_dutyCycleControlInsideOptional; jobject newElement_2_dutyCycleControlInsideOptional_dutyCycle; std::string newElement_2_dutyCycleControlInsideOptional_dutyCycleClassName = "java/lang/Integer"; std::string newElement_2_dutyCycleControlInsideOptional_dutyCycleCtorSignature = "(I)V"; jint jninewElement_2_dutyCycleControlInsideOptional_dutyCycle = static_cast(entry_2.dutyCycleControl.Value().dutyCycle); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_dutyCycleControlInsideOptional_dutyCycleClassName.c_str(), newElement_2_dutyCycleControlInsideOptional_dutyCycleCtorSignature.c_str(), jninewElement_2_dutyCycleControlInsideOptional_dutyCycle, newElement_2_dutyCycleControlInsideOptional_dutyCycle); { jclass dutyCycleControlStructStructClass_5; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct", dutyCycleControlStructStructClass_5); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct"); return nullptr; } jmethodID dutyCycleControlStructStructCtor_5; err = chip::JniReferences::GetInstance().FindMethod(env, dutyCycleControlStructStructClass_5, "", "(Ljava/lang/Integer;)V", &dutyCycleControlStructStructCtor_5); if (err != CHIP_NO_ERROR || dutyCycleControlStructStructCtor_5 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct " "constructor"); return nullptr; } newElement_2_dutyCycleControlInsideOptional = env->NewObject(dutyCycleControlStructStructClass_5, dutyCycleControlStructStructCtor_5, newElement_2_dutyCycleControlInsideOptional_dutyCycle); } chip::JniReferences::GetInstance().CreateOptional(newElement_2_dutyCycleControlInsideOptional, newElement_2_dutyCycleControl); } jobject newElement_2_powerSavingsControl; if (!entry_2.powerSavingsControl.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_powerSavingsControl); } else { jobject newElement_2_powerSavingsControlInsideOptional; jobject newElement_2_powerSavingsControlInsideOptional_powerSavings; std::string newElement_2_powerSavingsControlInsideOptional_powerSavingsClassName = "java/lang/Integer"; std::string newElement_2_powerSavingsControlInsideOptional_powerSavingsCtorSignature = "(I)V"; jint jninewElement_2_powerSavingsControlInsideOptional_powerSavings = static_cast(entry_2.powerSavingsControl.Value().powerSavings); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_powerSavingsControlInsideOptional_powerSavingsClassName.c_str(), newElement_2_powerSavingsControlInsideOptional_powerSavingsCtorSignature.c_str(), jninewElement_2_powerSavingsControlInsideOptional_powerSavings, newElement_2_powerSavingsControlInsideOptional_powerSavings); { jclass powerSavingsControlStructStructClass_5; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct", powerSavingsControlStructStructClass_5); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct"); return nullptr; } jmethodID powerSavingsControlStructStructCtor_5; err = chip::JniReferences::GetInstance().FindMethod(env, powerSavingsControlStructStructClass_5, "", "(Ljava/lang/Integer;)V", &powerSavingsControlStructStructCtor_5); if (err != CHIP_NO_ERROR || powerSavingsControlStructStructCtor_5 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct " "constructor"); return nullptr; } newElement_2_powerSavingsControlInsideOptional = env->NewObject(powerSavingsControlStructStructClass_5, powerSavingsControlStructStructCtor_5, newElement_2_powerSavingsControlInsideOptional_powerSavings); } chip::JniReferences::GetInstance().CreateOptional(newElement_2_powerSavingsControlInsideOptional, newElement_2_powerSavingsControl); } jobject newElement_2_heatingSourceControl; if (!entry_2.heatingSourceControl.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_heatingSourceControl); } else { jobject newElement_2_heatingSourceControlInsideOptional; jobject newElement_2_heatingSourceControlInsideOptional_heatingSource; std::string newElement_2_heatingSourceControlInsideOptional_heatingSourceClassName = "java/lang/Integer"; std::string newElement_2_heatingSourceControlInsideOptional_heatingSourceCtorSignature = "(I)V"; jint jninewElement_2_heatingSourceControlInsideOptional_heatingSource = static_cast(entry_2.heatingSourceControl.Value().heatingSource); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_heatingSourceControlInsideOptional_heatingSourceClassName.c_str(), newElement_2_heatingSourceControlInsideOptional_heatingSourceCtorSignature.c_str(), jninewElement_2_heatingSourceControlInsideOptional_heatingSource, newElement_2_heatingSourceControlInsideOptional_heatingSource); { jclass heatingSourceControlStructStructClass_5; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct", heatingSourceControlStructStructClass_5); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct"); return nullptr; } jmethodID heatingSourceControlStructStructCtor_5; err = chip::JniReferences::GetInstance().FindMethod(env, heatingSourceControlStructStructClass_5, "", "(Ljava/lang/Integer;)V", &heatingSourceControlStructStructCtor_5); if (err != CHIP_NO_ERROR || heatingSourceControlStructStructCtor_5 == nullptr) { ChipLogError(Zcl, "Could not find " "ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct constructor"); return nullptr; } newElement_2_heatingSourceControlInsideOptional = env->NewObject(heatingSourceControlStructStructClass_5, heatingSourceControlStructStructCtor_5, newElement_2_heatingSourceControlInsideOptional_heatingSource); } chip::JniReferences::GetInstance().CreateOptional(newElement_2_heatingSourceControlInsideOptional, newElement_2_heatingSourceControl); } { jclass loadControlEventTransitionStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct", loadControlEventTransitionStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class " "ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct"); return nullptr; } jmethodID loadControlEventTransitionStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod( env, loadControlEventTransitionStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &loadControlEventTransitionStructStructCtor_3); if (err != CHIP_NO_ERROR || loadControlEventTransitionStructStructCtor_3 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct " "constructor"); return nullptr; } newElement_2 = env->NewObject(loadControlEventTransitionStructStructClass_3, loadControlEventTransitionStructStructCtor_3, newElement_2_duration, newElement_2_control, newElement_2_temperatureControl, newElement_2_averageLoadControl, newElement_2_dutyCycleControl, newElement_2_powerSavingsControl, newElement_2_heatingSourceControl); } chip::JniReferences::GetInstance().AddToList(newElement_0_transitions, newElement_2); } { jclass loadControlEventStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct", loadControlEventStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct"); return nullptr; } jmethodID loadControlEventStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, loadControlEventStructStructClass_1, "", "([B[BLjava/lang/Integer;Ljava/lang/Long;Ljava/util/Optional;Ljava/lang/Integer;Ljava/lang/Long;Ljava/util/" "ArrayList;)V", &loadControlEventStructStructCtor_1); if (err != CHIP_NO_ERROR || loadControlEventStructStructCtor_1 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct constructor"); return nullptr; } newElement_0 = env->NewObject(loadControlEventStructStructClass_1, loadControlEventStructStructCtor_1, newElement_0_eventID, newElement_0_programID, newElement_0_control, newElement_0_deviceClass, newElement_0_enrollmentGroup, newElement_0_criticality, newElement_0_startTime, newElement_0_transitions); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::NumberOfEventsPerProgram::Id: { using TypeInfo = Attributes::NumberOfEventsPerProgram::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfTransitions::Id: { using TypeInfo = Attributes::NumberOfTransitions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::DefaultRandomStart::Id: { using TypeInfo = Attributes::DefaultRandomStart::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::DefaultRandomDuration::Id: { using TypeInfo = Attributes::DefaultRandomDuration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::Messages::Id: { using namespace app::Clusters::Messages; switch (aPath.mAttributeId) { case Attributes::Messages::Id: { using TypeInfo = Attributes::Messages::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_messageID; jbyteArray newElement_0_messageIDByteArray = env->NewByteArray(static_cast(entry_0.messageID.size())); env->SetByteArrayRegion(newElement_0_messageIDByteArray, 0, static_cast(entry_0.messageID.size()), reinterpret_cast(entry_0.messageID.data())); newElement_0_messageID = newElement_0_messageIDByteArray; jobject newElement_0_priority; std::string newElement_0_priorityClassName = "java/lang/Integer"; std::string newElement_0_priorityCtorSignature = "(I)V"; jint jninewElement_0_priority = static_cast(entry_0.priority); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_priorityClassName.c_str(), newElement_0_priorityCtorSignature.c_str(), jninewElement_0_priority, newElement_0_priority); jobject newElement_0_messageControl; std::string newElement_0_messageControlClassName = "java/lang/Integer"; std::string newElement_0_messageControlCtorSignature = "(I)V"; jint jninewElement_0_messageControl = static_cast(entry_0.messageControl.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_messageControlClassName.c_str(), newElement_0_messageControlCtorSignature.c_str(), jninewElement_0_messageControl, newElement_0_messageControl); jobject newElement_0_startTime; if (entry_0.startTime.IsNull()) { newElement_0_startTime = nullptr; } else { std::string newElement_0_startTimeClassName = "java/lang/Long"; std::string newElement_0_startTimeCtorSignature = "(J)V"; jlong jninewElement_0_startTime = static_cast(entry_0.startTime.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_startTimeClassName.c_str(), newElement_0_startTimeCtorSignature.c_str(), jninewElement_0_startTime, newElement_0_startTime); } jobject newElement_0_duration; if (entry_0.duration.IsNull()) { newElement_0_duration = nullptr; } else { std::string newElement_0_durationClassName = "java/lang/Long"; std::string newElement_0_durationCtorSignature = "(J)V"; jlong jninewElement_0_duration = static_cast(entry_0.duration.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_durationClassName.c_str(), newElement_0_durationCtorSignature.c_str(), jninewElement_0_duration, newElement_0_duration); } jobject newElement_0_messageText; LogErrorOnFailure( chip::JniReferences::GetInstance().CharToStringUTF(entry_0.messageText, newElement_0_messageText)); jobject newElement_0_responses; if (!entry_0.responses.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_responses); } else { jobject newElement_0_responsesInsideOptional; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_responsesInsideOptional); auto iter_newElement_0_responsesInsideOptional_3 = entry_0.responses.Value().begin(); while (iter_newElement_0_responsesInsideOptional_3.Next()) { auto & entry_3 = iter_newElement_0_responsesInsideOptional_3.GetValue(); jobject newElement_3; jobject newElement_3_messageResponseID; if (!entry_3.messageResponseID.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_3_messageResponseID); } else { jobject newElement_3_messageResponseIDInsideOptional; std::string newElement_3_messageResponseIDInsideOptionalClassName = "java/lang/Long"; std::string newElement_3_messageResponseIDInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_3_messageResponseIDInsideOptional = static_cast(entry_3.messageResponseID.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3_messageResponseIDInsideOptionalClassName.c_str(), newElement_3_messageResponseIDInsideOptionalCtorSignature.c_str(), jninewElement_3_messageResponseIDInsideOptional, newElement_3_messageResponseIDInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_3_messageResponseIDInsideOptional, newElement_3_messageResponseID); } jobject newElement_3_label; if (!entry_3.label.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_3_label); } else { jobject newElement_3_labelInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_3.label.Value(), newElement_3_labelInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_3_labelInsideOptional, newElement_3_label); } { jclass messageResponseOptionStructStructClass_4; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MessagesClusterMessageResponseOptionStruct", messageResponseOptionStructStructClass_4); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$MessagesClusterMessageResponseOptionStruct"); return nullptr; } jmethodID messageResponseOptionStructStructCtor_4; err = chip::JniReferences::GetInstance().FindMethod( env, messageResponseOptionStructStructClass_4, "", "(Ljava/util/Optional;Ljava/util/Optional;)V", &messageResponseOptionStructStructCtor_4); if (err != CHIP_NO_ERROR || messageResponseOptionStructStructCtor_4 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$MessagesClusterMessageResponseOptionStruct constructor"); return nullptr; } newElement_3 = env->NewObject(messageResponseOptionStructStructClass_4, messageResponseOptionStructStructCtor_4, newElement_3_messageResponseID, newElement_3_label); } chip::JniReferences::GetInstance().AddToList(newElement_0_responsesInsideOptional, newElement_3); } chip::JniReferences::GetInstance().CreateOptional(newElement_0_responsesInsideOptional, newElement_0_responses); } { jclass messageStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MessagesClusterMessageStruct", messageStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$MessagesClusterMessageStruct"); return nullptr; } jmethodID messageStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, messageStructStructClass_1, "", "([BLjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/util/" "Optional;)V", &messageStructStructCtor_1); if (err != CHIP_NO_ERROR || messageStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$MessagesClusterMessageStruct constructor"); return nullptr; } newElement_0 = env->NewObject(messageStructStructClass_1, messageStructStructCtor_1, newElement_0_messageID, newElement_0_priority, newElement_0_messageControl, newElement_0_startTime, newElement_0_duration, newElement_0_messageText, newElement_0_responses); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::ActiveMessageIDs::Id: { using TypeInfo = Attributes::ActiveMessageIDs::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), reinterpret_cast(entry_0.data())); newElement_0 = newElement_0ByteArray; chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::DeviceEnergyManagement::Id: { using namespace app::Clusters::DeviceEnergyManagement; switch (aPath.mAttributeId) { case Attributes::ESAType::Id: { using TypeInfo = Attributes::ESAType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ESACanGenerate::Id: { using TypeInfo = Attributes::ESACanGenerate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ESAState::Id: { using TypeInfo = Attributes::ESAState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AbsMinPower::Id: { using TypeInfo = Attributes::AbsMinPower::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AbsMaxPower::Id: { using TypeInfo = Attributes::AbsMaxPower::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::PowerAdjustmentCapability::Id: { using TypeInfo = Attributes::PowerAdjustmentCapability::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_powerAdjustCapability; if (cppValue.Value().powerAdjustCapability.IsNull()) { value_powerAdjustCapability = nullptr; } else { chip::JniReferences::GetInstance().CreateArrayList(value_powerAdjustCapability); auto iter_value_powerAdjustCapability_3 = cppValue.Value().powerAdjustCapability.Value().begin(); while (iter_value_powerAdjustCapability_3.Next()) { auto & entry_3 = iter_value_powerAdjustCapability_3.GetValue(); jobject newElement_3; jobject newElement_3_minPower; std::string newElement_3_minPowerClassName = "java/lang/Long"; std::string newElement_3_minPowerCtorSignature = "(J)V"; jlong jninewElement_3_minPower = static_cast(entry_3.minPower); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3_minPowerClassName.c_str(), newElement_3_minPowerCtorSignature.c_str(), jninewElement_3_minPower, newElement_3_minPower); jobject newElement_3_maxPower; std::string newElement_3_maxPowerClassName = "java/lang/Long"; std::string newElement_3_maxPowerCtorSignature = "(J)V"; jlong jninewElement_3_maxPower = static_cast(entry_3.maxPower); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3_maxPowerClassName.c_str(), newElement_3_maxPowerCtorSignature.c_str(), jninewElement_3_maxPower, newElement_3_maxPower); jobject newElement_3_minDuration; std::string newElement_3_minDurationClassName = "java/lang/Long"; std::string newElement_3_minDurationCtorSignature = "(J)V"; jlong jninewElement_3_minDuration = static_cast(entry_3.minDuration); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3_minDurationClassName.c_str(), newElement_3_minDurationCtorSignature.c_str(), jninewElement_3_minDuration, newElement_3_minDuration); jobject newElement_3_maxDuration; std::string newElement_3_maxDurationClassName = "java/lang/Long"; std::string newElement_3_maxDurationCtorSignature = "(J)V"; jlong jninewElement_3_maxDuration = static_cast(entry_3.maxDuration); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3_maxDurationClassName.c_str(), newElement_3_maxDurationCtorSignature.c_str(), jninewElement_3_maxDuration, newElement_3_maxDuration); { jclass powerAdjustStructStructClass_4; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct", powerAdjustStructStructClass_4); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct"); return nullptr; } jmethodID powerAdjustStructStructCtor_4; err = chip::JniReferences::GetInstance().FindMethod( env, powerAdjustStructStructClass_4, "", "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V", &powerAdjustStructStructCtor_4); if (err != CHIP_NO_ERROR || powerAdjustStructStructCtor_4 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct constructor"); return nullptr; } newElement_3 = env->NewObject(powerAdjustStructStructClass_4, powerAdjustStructStructCtor_4, newElement_3_minPower, newElement_3_maxPower, newElement_3_minDuration, newElement_3_maxDuration); } chip::JniReferences::GetInstance().AddToList(value_powerAdjustCapability, newElement_3); } } jobject value_cause; std::string value_causeClassName = "java/lang/Integer"; std::string value_causeCtorSignature = "(I)V"; jint jnivalue_cause = static_cast(cppValue.Value().cause); chip::JniReferences::GetInstance().CreateBoxedObject( value_causeClassName.c_str(), value_causeCtorSignature.c_str(), jnivalue_cause, value_cause); { jclass powerAdjustCapabilityStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterPowerAdjustCapabilityStruct", powerAdjustCapabilityStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterPowerAdjustCapabilityStruct"); return nullptr; } jmethodID powerAdjustCapabilityStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, powerAdjustCapabilityStructStructClass_1, "", "(Ljava/util/ArrayList;Ljava/lang/Integer;)V", &powerAdjustCapabilityStructStructCtor_1); if (err != CHIP_NO_ERROR || powerAdjustCapabilityStructStructCtor_1 == nullptr) { ChipLogError( Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterPowerAdjustCapabilityStruct constructor"); return nullptr; } value = env->NewObject(powerAdjustCapabilityStructStructClass_1, powerAdjustCapabilityStructStructCtor_1, value_powerAdjustCapability, value_cause); } } return value; } case Attributes::Forecast::Id: { using TypeInfo = Attributes::Forecast::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_forecastID; std::string value_forecastIDClassName = "java/lang/Long"; std::string value_forecastIDCtorSignature = "(J)V"; jlong jnivalue_forecastID = static_cast(cppValue.Value().forecastID); chip::JniReferences::GetInstance().CreateBoxedObject(value_forecastIDClassName.c_str(), value_forecastIDCtorSignature.c_str(), jnivalue_forecastID, value_forecastID); jobject value_activeSlotNumber; if (cppValue.Value().activeSlotNumber.IsNull()) { value_activeSlotNumber = nullptr; } else { std::string value_activeSlotNumberClassName = "java/lang/Integer"; std::string value_activeSlotNumberCtorSignature = "(I)V"; jint jnivalue_activeSlotNumber = static_cast(cppValue.Value().activeSlotNumber.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(value_activeSlotNumberClassName.c_str(), value_activeSlotNumberCtorSignature.c_str(), jnivalue_activeSlotNumber, value_activeSlotNumber); } jobject value_startTime; std::string value_startTimeClassName = "java/lang/Long"; std::string value_startTimeCtorSignature = "(J)V"; jlong jnivalue_startTime = static_cast(cppValue.Value().startTime); chip::JniReferences::GetInstance().CreateBoxedObject( value_startTimeClassName.c_str(), value_startTimeCtorSignature.c_str(), jnivalue_startTime, value_startTime); jobject value_endTime; std::string value_endTimeClassName = "java/lang/Long"; std::string value_endTimeCtorSignature = "(J)V"; jlong jnivalue_endTime = static_cast(cppValue.Value().endTime); chip::JniReferences::GetInstance().CreateBoxedObject( value_endTimeClassName.c_str(), value_endTimeCtorSignature.c_str(), jnivalue_endTime, value_endTime); jobject value_earliestStartTime; if (!cppValue.Value().earliestStartTime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_earliestStartTime); } else { jobject value_earliestStartTimeInsideOptional; if (cppValue.Value().earliestStartTime.Value().IsNull()) { value_earliestStartTimeInsideOptional = nullptr; } else { std::string value_earliestStartTimeInsideOptionalClassName = "java/lang/Long"; std::string value_earliestStartTimeInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_earliestStartTimeInsideOptional = static_cast(cppValue.Value().earliestStartTime.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_earliestStartTimeInsideOptionalClassName.c_str(), value_earliestStartTimeInsideOptionalCtorSignature.c_str(), jnivalue_earliestStartTimeInsideOptional, value_earliestStartTimeInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(value_earliestStartTimeInsideOptional, value_earliestStartTime); } jobject value_latestEndTime; if (!cppValue.Value().latestEndTime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_latestEndTime); } else { jobject value_latestEndTimeInsideOptional; std::string value_latestEndTimeInsideOptionalClassName = "java/lang/Long"; std::string value_latestEndTimeInsideOptionalCtorSignature = "(J)V"; jlong jnivalue_latestEndTimeInsideOptional = static_cast(cppValue.Value().latestEndTime.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_latestEndTimeInsideOptionalClassName.c_str(), value_latestEndTimeInsideOptionalCtorSignature.c_str(), jnivalue_latestEndTimeInsideOptional, value_latestEndTimeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_latestEndTimeInsideOptional, value_latestEndTime); } jobject value_isPausable; std::string value_isPausableClassName = "java/lang/Boolean"; std::string value_isPausableCtorSignature = "(Z)V"; jboolean jnivalue_isPausable = static_cast(cppValue.Value().isPausable); chip::JniReferences::GetInstance().CreateBoxedObject(value_isPausableClassName.c_str(), value_isPausableCtorSignature.c_str(), jnivalue_isPausable, value_isPausable); jobject value_slots; chip::JniReferences::GetInstance().CreateArrayList(value_slots); auto iter_value_slots_2 = cppValue.Value().slots.begin(); while (iter_value_slots_2.Next()) { auto & entry_2 = iter_value_slots_2.GetValue(); jobject newElement_2; jobject newElement_2_minDuration; std::string newElement_2_minDurationClassName = "java/lang/Long"; std::string newElement_2_minDurationCtorSignature = "(J)V"; jlong jninewElement_2_minDuration = static_cast(entry_2.minDuration); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_minDurationClassName.c_str(), newElement_2_minDurationCtorSignature.c_str(), jninewElement_2_minDuration, newElement_2_minDuration); jobject newElement_2_maxDuration; std::string newElement_2_maxDurationClassName = "java/lang/Long"; std::string newElement_2_maxDurationCtorSignature = "(J)V"; jlong jninewElement_2_maxDuration = static_cast(entry_2.maxDuration); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_maxDurationClassName.c_str(), newElement_2_maxDurationCtorSignature.c_str(), jninewElement_2_maxDuration, newElement_2_maxDuration); jobject newElement_2_defaultDuration; std::string newElement_2_defaultDurationClassName = "java/lang/Long"; std::string newElement_2_defaultDurationCtorSignature = "(J)V"; jlong jninewElement_2_defaultDuration = static_cast(entry_2.defaultDuration); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_defaultDurationClassName.c_str(), newElement_2_defaultDurationCtorSignature.c_str(), jninewElement_2_defaultDuration, newElement_2_defaultDuration); jobject newElement_2_elapsedSlotTime; std::string newElement_2_elapsedSlotTimeClassName = "java/lang/Long"; std::string newElement_2_elapsedSlotTimeCtorSignature = "(J)V"; jlong jninewElement_2_elapsedSlotTime = static_cast(entry_2.elapsedSlotTime); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_elapsedSlotTimeClassName.c_str(), newElement_2_elapsedSlotTimeCtorSignature.c_str(), jninewElement_2_elapsedSlotTime, newElement_2_elapsedSlotTime); jobject newElement_2_remainingSlotTime; std::string newElement_2_remainingSlotTimeClassName = "java/lang/Long"; std::string newElement_2_remainingSlotTimeCtorSignature = "(J)V"; jlong jninewElement_2_remainingSlotTime = static_cast(entry_2.remainingSlotTime); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_remainingSlotTimeClassName.c_str(), newElement_2_remainingSlotTimeCtorSignature.c_str(), jninewElement_2_remainingSlotTime, newElement_2_remainingSlotTime); jobject newElement_2_slotIsPausable; if (!entry_2.slotIsPausable.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_slotIsPausable); } else { jobject newElement_2_slotIsPausableInsideOptional; std::string newElement_2_slotIsPausableInsideOptionalClassName = "java/lang/Boolean"; std::string newElement_2_slotIsPausableInsideOptionalCtorSignature = "(Z)V"; jboolean jninewElement_2_slotIsPausableInsideOptional = static_cast(entry_2.slotIsPausable.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_slotIsPausableInsideOptionalClassName.c_str(), newElement_2_slotIsPausableInsideOptionalCtorSignature.c_str(), jninewElement_2_slotIsPausableInsideOptional, newElement_2_slotIsPausableInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_slotIsPausableInsideOptional, newElement_2_slotIsPausable); } jobject newElement_2_minPauseDuration; if (!entry_2.minPauseDuration.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_minPauseDuration); } else { jobject newElement_2_minPauseDurationInsideOptional; std::string newElement_2_minPauseDurationInsideOptionalClassName = "java/lang/Long"; std::string newElement_2_minPauseDurationInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_2_minPauseDurationInsideOptional = static_cast(entry_2.minPauseDuration.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_minPauseDurationInsideOptionalClassName.c_str(), newElement_2_minPauseDurationInsideOptionalCtorSignature.c_str(), jninewElement_2_minPauseDurationInsideOptional, newElement_2_minPauseDurationInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_minPauseDurationInsideOptional, newElement_2_minPauseDuration); } jobject newElement_2_maxPauseDuration; if (!entry_2.maxPauseDuration.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_maxPauseDuration); } else { jobject newElement_2_maxPauseDurationInsideOptional; std::string newElement_2_maxPauseDurationInsideOptionalClassName = "java/lang/Long"; std::string newElement_2_maxPauseDurationInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_2_maxPauseDurationInsideOptional = static_cast(entry_2.maxPauseDuration.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_maxPauseDurationInsideOptionalClassName.c_str(), newElement_2_maxPauseDurationInsideOptionalCtorSignature.c_str(), jninewElement_2_maxPauseDurationInsideOptional, newElement_2_maxPauseDurationInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_maxPauseDurationInsideOptional, newElement_2_maxPauseDuration); } jobject newElement_2_manufacturerESAState; if (!entry_2.manufacturerESAState.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_manufacturerESAState); } else { jobject newElement_2_manufacturerESAStateInsideOptional; std::string newElement_2_manufacturerESAStateInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_manufacturerESAStateInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_manufacturerESAStateInsideOptional = static_cast(entry_2.manufacturerESAState.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_manufacturerESAStateInsideOptionalClassName.c_str(), newElement_2_manufacturerESAStateInsideOptionalCtorSignature.c_str(), jninewElement_2_manufacturerESAStateInsideOptional, newElement_2_manufacturerESAStateInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_manufacturerESAStateInsideOptional, newElement_2_manufacturerESAState); } jobject newElement_2_nominalPower; if (!entry_2.nominalPower.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_nominalPower); } else { jobject newElement_2_nominalPowerInsideOptional; std::string newElement_2_nominalPowerInsideOptionalClassName = "java/lang/Long"; std::string newElement_2_nominalPowerInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_2_nominalPowerInsideOptional = static_cast(entry_2.nominalPower.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_nominalPowerInsideOptionalClassName.c_str(), newElement_2_nominalPowerInsideOptionalCtorSignature.c_str(), jninewElement_2_nominalPowerInsideOptional, newElement_2_nominalPowerInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_nominalPowerInsideOptional, newElement_2_nominalPower); } jobject newElement_2_minPower; if (!entry_2.minPower.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_minPower); } else { jobject newElement_2_minPowerInsideOptional; std::string newElement_2_minPowerInsideOptionalClassName = "java/lang/Long"; std::string newElement_2_minPowerInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_2_minPowerInsideOptional = static_cast(entry_2.minPower.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_minPowerInsideOptionalClassName.c_str(), newElement_2_minPowerInsideOptionalCtorSignature.c_str(), jninewElement_2_minPowerInsideOptional, newElement_2_minPowerInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_minPowerInsideOptional, newElement_2_minPower); } jobject newElement_2_maxPower; if (!entry_2.maxPower.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_maxPower); } else { jobject newElement_2_maxPowerInsideOptional; std::string newElement_2_maxPowerInsideOptionalClassName = "java/lang/Long"; std::string newElement_2_maxPowerInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_2_maxPowerInsideOptional = static_cast(entry_2.maxPower.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_maxPowerInsideOptionalClassName.c_str(), newElement_2_maxPowerInsideOptionalCtorSignature.c_str(), jninewElement_2_maxPowerInsideOptional, newElement_2_maxPowerInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_maxPowerInsideOptional, newElement_2_maxPower); } jobject newElement_2_nominalEnergy; if (!entry_2.nominalEnergy.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_nominalEnergy); } else { jobject newElement_2_nominalEnergyInsideOptional; std::string newElement_2_nominalEnergyInsideOptionalClassName = "java/lang/Long"; std::string newElement_2_nominalEnergyInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_2_nominalEnergyInsideOptional = static_cast(entry_2.nominalEnergy.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_nominalEnergyInsideOptionalClassName.c_str(), newElement_2_nominalEnergyInsideOptionalCtorSignature.c_str(), jninewElement_2_nominalEnergyInsideOptional, newElement_2_nominalEnergyInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_nominalEnergyInsideOptional, newElement_2_nominalEnergy); } jobject newElement_2_costs; if (!entry_2.costs.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_costs); } else { jobject newElement_2_costsInsideOptional; chip::JniReferences::GetInstance().CreateArrayList(newElement_2_costsInsideOptional); auto iter_newElement_2_costsInsideOptional_5 = entry_2.costs.Value().begin(); while (iter_newElement_2_costsInsideOptional_5.Next()) { auto & entry_5 = iter_newElement_2_costsInsideOptional_5.GetValue(); jobject newElement_5; jobject newElement_5_costType; std::string newElement_5_costTypeClassName = "java/lang/Integer"; std::string newElement_5_costTypeCtorSignature = "(I)V"; jint jninewElement_5_costType = static_cast(entry_5.costType); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_5_costTypeClassName.c_str(), newElement_5_costTypeCtorSignature.c_str(), jninewElement_5_costType, newElement_5_costType); jobject newElement_5_value; std::string newElement_5_valueClassName = "java/lang/Long"; std::string newElement_5_valueCtorSignature = "(J)V"; jlong jninewElement_5_value = static_cast(entry_5.value); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_5_valueClassName.c_str(), newElement_5_valueCtorSignature.c_str(), jninewElement_5_value, newElement_5_value); jobject newElement_5_decimalPoints; std::string newElement_5_decimalPointsClassName = "java/lang/Integer"; std::string newElement_5_decimalPointsCtorSignature = "(I)V"; jint jninewElement_5_decimalPoints = static_cast(entry_5.decimalPoints); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_5_decimalPointsClassName.c_str(), newElement_5_decimalPointsCtorSignature.c_str(), jninewElement_5_decimalPoints, newElement_5_decimalPoints); jobject newElement_5_currency; if (!entry_5.currency.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_5_currency); } else { jobject newElement_5_currencyInsideOptional; std::string newElement_5_currencyInsideOptionalClassName = "java/lang/Integer"; std::string newElement_5_currencyInsideOptionalCtorSignature = "(I)V"; jint jninewElement_5_currencyInsideOptional = static_cast(entry_5.currency.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_5_currencyInsideOptionalClassName.c_str(), newElement_5_currencyInsideOptionalCtorSignature.c_str(), jninewElement_5_currencyInsideOptional, newElement_5_currencyInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_5_currencyInsideOptional, newElement_5_currency); } { jclass costStructStructClass_6; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterCostStruct", costStructStructClass_6); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterCostStruct"); return nullptr; } jmethodID costStructStructCtor_6; err = chip::JniReferences::GetInstance().FindMethod( env, costStructStructClass_6, "", "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/Optional;)V", &costStructStructCtor_6); if (err != CHIP_NO_ERROR || costStructStructCtor_6 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterCostStruct constructor"); return nullptr; } newElement_5 = env->NewObject(costStructStructClass_6, costStructStructCtor_6, newElement_5_costType, newElement_5_value, newElement_5_decimalPoints, newElement_5_currency); } chip::JniReferences::GetInstance().AddToList(newElement_2_costsInsideOptional, newElement_5); } chip::JniReferences::GetInstance().CreateOptional(newElement_2_costsInsideOptional, newElement_2_costs); } jobject newElement_2_minPowerAdjustment; if (!entry_2.minPowerAdjustment.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_minPowerAdjustment); } else { jobject newElement_2_minPowerAdjustmentInsideOptional; std::string newElement_2_minPowerAdjustmentInsideOptionalClassName = "java/lang/Long"; std::string newElement_2_minPowerAdjustmentInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_2_minPowerAdjustmentInsideOptional = static_cast(entry_2.minPowerAdjustment.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_minPowerAdjustmentInsideOptionalClassName.c_str(), newElement_2_minPowerAdjustmentInsideOptionalCtorSignature.c_str(), jninewElement_2_minPowerAdjustmentInsideOptional, newElement_2_minPowerAdjustmentInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_minPowerAdjustmentInsideOptional, newElement_2_minPowerAdjustment); } jobject newElement_2_maxPowerAdjustment; if (!entry_2.maxPowerAdjustment.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_maxPowerAdjustment); } else { jobject newElement_2_maxPowerAdjustmentInsideOptional; std::string newElement_2_maxPowerAdjustmentInsideOptionalClassName = "java/lang/Long"; std::string newElement_2_maxPowerAdjustmentInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_2_maxPowerAdjustmentInsideOptional = static_cast(entry_2.maxPowerAdjustment.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_maxPowerAdjustmentInsideOptionalClassName.c_str(), newElement_2_maxPowerAdjustmentInsideOptionalCtorSignature.c_str(), jninewElement_2_maxPowerAdjustmentInsideOptional, newElement_2_maxPowerAdjustmentInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_maxPowerAdjustmentInsideOptional, newElement_2_maxPowerAdjustment); } jobject newElement_2_minDurationAdjustment; if (!entry_2.minDurationAdjustment.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_minDurationAdjustment); } else { jobject newElement_2_minDurationAdjustmentInsideOptional; std::string newElement_2_minDurationAdjustmentInsideOptionalClassName = "java/lang/Long"; std::string newElement_2_minDurationAdjustmentInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_2_minDurationAdjustmentInsideOptional = static_cast(entry_2.minDurationAdjustment.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_minDurationAdjustmentInsideOptionalClassName.c_str(), newElement_2_minDurationAdjustmentInsideOptionalCtorSignature.c_str(), jninewElement_2_minDurationAdjustmentInsideOptional, newElement_2_minDurationAdjustmentInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_minDurationAdjustmentInsideOptional, newElement_2_minDurationAdjustment); } jobject newElement_2_maxDurationAdjustment; if (!entry_2.maxDurationAdjustment.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_maxDurationAdjustment); } else { jobject newElement_2_maxDurationAdjustmentInsideOptional; std::string newElement_2_maxDurationAdjustmentInsideOptionalClassName = "java/lang/Long"; std::string newElement_2_maxDurationAdjustmentInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_2_maxDurationAdjustmentInsideOptional = static_cast(entry_2.maxDurationAdjustment.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_maxDurationAdjustmentInsideOptionalClassName.c_str(), newElement_2_maxDurationAdjustmentInsideOptionalCtorSignature.c_str(), jninewElement_2_maxDurationAdjustmentInsideOptional, newElement_2_maxDurationAdjustmentInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_maxDurationAdjustmentInsideOptional, newElement_2_maxDurationAdjustment); } { jclass slotStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterSlotStruct", slotStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterSlotStruct"); return nullptr; } jmethodID slotStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod( env, slotStructStructClass_3, "", "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/" "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &slotStructStructCtor_3); if (err != CHIP_NO_ERROR || slotStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterSlotStruct constructor"); return nullptr; } newElement_2 = env->NewObject( slotStructStructClass_3, slotStructStructCtor_3, newElement_2_minDuration, newElement_2_maxDuration, newElement_2_defaultDuration, newElement_2_elapsedSlotTime, newElement_2_remainingSlotTime, newElement_2_slotIsPausable, newElement_2_minPauseDuration, newElement_2_maxPauseDuration, newElement_2_manufacturerESAState, newElement_2_nominalPower, newElement_2_minPower, newElement_2_maxPower, newElement_2_nominalEnergy, newElement_2_costs, newElement_2_minPowerAdjustment, newElement_2_maxPowerAdjustment, newElement_2_minDurationAdjustment, newElement_2_maxDurationAdjustment); } chip::JniReferences::GetInstance().AddToList(value_slots, newElement_2); } jobject value_forecastUpdateReason; std::string value_forecastUpdateReasonClassName = "java/lang/Integer"; std::string value_forecastUpdateReasonCtorSignature = "(I)V"; jint jnivalue_forecastUpdateReason = static_cast(cppValue.Value().forecastUpdateReason); chip::JniReferences::GetInstance().CreateBoxedObject( value_forecastUpdateReasonClassName.c_str(), value_forecastUpdateReasonCtorSignature.c_str(), jnivalue_forecastUpdateReason, value_forecastUpdateReason); { jclass forecastStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterForecastStruct", forecastStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterForecastStruct"); return nullptr; } jmethodID forecastStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, forecastStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/" "Optional;Ljava/lang/Boolean;Ljava/util/ArrayList;Ljava/lang/Integer;)V", &forecastStructStructCtor_1); if (err != CHIP_NO_ERROR || forecastStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterForecastStruct constructor"); return nullptr; } value = env->NewObject(forecastStructStructClass_1, forecastStructStructCtor_1, value_forecastID, value_activeSlotNumber, value_startTime, value_endTime, value_earliestStartTime, value_latestEndTime, value_isPausable, value_slots, value_forecastUpdateReason); } } return value; } case Attributes::OptOutState::Id: { using TypeInfo = Attributes::OptOutState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::EnergyEvse::Id: { using namespace app::Clusters::EnergyEvse; switch (aPath.mAttributeId) { case Attributes::State::Id: { using TypeInfo = Attributes::State::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::SupplyState::Id: { using TypeInfo = Attributes::SupplyState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::FaultState::Id: { using TypeInfo = Attributes::FaultState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ChargingEnabledUntil::Id: { using TypeInfo = Attributes::ChargingEnabledUntil::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::DischargingEnabledUntil::Id: { using TypeInfo = Attributes::DischargingEnabledUntil::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::CircuitCapacity::Id: { using TypeInfo = Attributes::CircuitCapacity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MinimumChargeCurrent::Id: { using TypeInfo = Attributes::MinimumChargeCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MaximumChargeCurrent::Id: { using TypeInfo = Attributes::MaximumChargeCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MaximumDischargeCurrent::Id: { using TypeInfo = Attributes::MaximumDischargeCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::UserMaximumChargeCurrent::Id: { using TypeInfo = Attributes::UserMaximumChargeCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RandomizationDelayWindow::Id: { using TypeInfo = Attributes::RandomizationDelayWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NextChargeStartTime::Id: { using TypeInfo = Attributes::NextChargeStartTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NextChargeTargetTime::Id: { using TypeInfo = Attributes::NextChargeTargetTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NextChargeRequiredEnergy::Id: { using TypeInfo = Attributes::NextChargeRequiredEnergy::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NextChargeTargetSoC::Id: { using TypeInfo = Attributes::NextChargeTargetSoC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ApproximateEVEfficiency::Id: { using TypeInfo = Attributes::ApproximateEVEfficiency::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::StateOfCharge::Id: { using TypeInfo = Attributes::StateOfCharge::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::BatteryCapacity::Id: { using TypeInfo = Attributes::BatteryCapacity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::VehicleID::Id: { using TypeInfo = Attributes::VehicleID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value(), value)); } return value; } case Attributes::SessionID::Id: { using TypeInfo = Attributes::SessionID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::SessionDuration::Id: { using TypeInfo = Attributes::SessionDuration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::SessionEnergyCharged::Id: { using TypeInfo = Attributes::SessionEnergyCharged::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::SessionEnergyDischarged::Id: { using TypeInfo = Attributes::SessionEnergyDischarged::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::EnergyPreference::Id: { using namespace app::Clusters::EnergyPreference; switch (aPath.mAttributeId) { case Attributes::EnergyBalances::Id: { using TypeInfo = Attributes::EnergyBalances::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_step; std::string newElement_0_stepClassName = "java/lang/Integer"; std::string newElement_0_stepCtorSignature = "(I)V"; jint jninewElement_0_step = static_cast(entry_0.step); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_stepClassName.c_str(), newElement_0_stepCtorSignature.c_str(), jninewElement_0_step, newElement_0_step); jobject newElement_0_label; if (!entry_0.label.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_label); } else { jobject newElement_0_labelInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label.Value(), newElement_0_labelInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_0_labelInsideOptional, newElement_0_label); } { jclass balanceStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$EnergyPreferenceClusterBalanceStruct", balanceStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$EnergyPreferenceClusterBalanceStruct"); return nullptr; } jmethodID balanceStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, balanceStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V", &balanceStructStructCtor_1); if (err != CHIP_NO_ERROR || balanceStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$EnergyPreferenceClusterBalanceStruct constructor"); return nullptr; } newElement_0 = env->NewObject(balanceStructStructClass_1, balanceStructStructCtor_1, newElement_0_step, newElement_0_label); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentEnergyBalance::Id: { using TypeInfo = Attributes::CurrentEnergyBalance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::EnergyPriorities::Id: { using TypeInfo = Attributes::EnergyPriorities::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::LowPowerModeSensitivities::Id: { using TypeInfo = Attributes::LowPowerModeSensitivities::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_step; std::string newElement_0_stepClassName = "java/lang/Integer"; std::string newElement_0_stepCtorSignature = "(I)V"; jint jninewElement_0_step = static_cast(entry_0.step); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_stepClassName.c_str(), newElement_0_stepCtorSignature.c_str(), jninewElement_0_step, newElement_0_step); jobject newElement_0_label; if (!entry_0.label.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_label); } else { jobject newElement_0_labelInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label.Value(), newElement_0_labelInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_0_labelInsideOptional, newElement_0_label); } { jclass balanceStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$EnergyPreferenceClusterBalanceStruct", balanceStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$EnergyPreferenceClusterBalanceStruct"); return nullptr; } jmethodID balanceStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, balanceStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V", &balanceStructStructCtor_1); if (err != CHIP_NO_ERROR || balanceStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$EnergyPreferenceClusterBalanceStruct constructor"); return nullptr; } newElement_0 = env->NewObject(balanceStructStructClass_1, balanceStructStructCtor_1, newElement_0_step, newElement_0_label); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentLowPowerModeSensitivity::Id: { using TypeInfo = Attributes::CurrentLowPowerModeSensitivity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::PowerTopology::Id: { using namespace app::Clusters::PowerTopology; switch (aPath.mAttributeId) { case Attributes::AvailableEndpoints::Id: { using TypeInfo = Attributes::AvailableEndpoints::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::ActiveEndpoints::Id: { using TypeInfo = Attributes::ActiveEndpoints::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::EnergyEvseMode::Id: { using namespace app::Clusters::EnergyEvseMode; switch (aPath.mAttributeId) { case Attributes::SupportedModes::Id: { using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; jint jninewElement_0_mode = static_cast(entry_0.mode); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); while (iter_newElement_0_modeTags_2.Next()) { auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; if (!entry_2.mfgCode.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); } else { jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; jint jninewElement_2_value = static_cast(entry_2.value); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); { jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$EnergyEvseModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$EnergyEvseModeClusterModeTagStruct"); return nullptr; } jmethodID modeTagStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V", &modeTagStructStructCtor_3); if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$EnergyEvseModeClusterModeTagStruct constructor"); return nullptr; } newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); } chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } { jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$EnergyEvseModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$EnergyEvseModeClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$EnergyEvseModeClusterModeOptionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, newElement_0_mode, newElement_0_modeTags); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentMode::Id: { using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::StartUpMode::Id: { using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OnMode::Id: { using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::WaterHeaterMode::Id: { using namespace app::Clusters::WaterHeaterMode; switch (aPath.mAttributeId) { case Attributes::SupportedModes::Id: { using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; jint jninewElement_0_mode = static_cast(entry_0.mode); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); while (iter_newElement_0_modeTags_2.Next()) { auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; if (!entry_2.mfgCode.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); } else { jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; jint jninewElement_2_value = static_cast(entry_2.value); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); { jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$WaterHeaterModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$WaterHeaterModeClusterModeTagStruct"); return nullptr; } jmethodID modeTagStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V", &modeTagStructStructCtor_3); if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$WaterHeaterModeClusterModeTagStruct constructor"); return nullptr; } newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); } chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } { jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$WaterHeaterModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$WaterHeaterModeClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$WaterHeaterModeClusterModeOptionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, newElement_0_mode, newElement_0_modeTags); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentMode::Id: { using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::StartUpMode::Id: { using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OnMode::Id: { using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::DeviceEnergyManagementMode::Id: { using namespace app::Clusters::DeviceEnergyManagementMode; switch (aPath.mAttributeId) { case Attributes::SupportedModes::Id: { using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_label; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); jobject newElement_0_mode; std::string newElement_0_modeClassName = "java/lang/Integer"; std::string newElement_0_modeCtorSignature = "(I)V"; jint jninewElement_0_mode = static_cast(entry_0.mode); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); jobject newElement_0_modeTags; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); while (iter_newElement_0_modeTags_2.Next()) { auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; if (!entry_2.mfgCode.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); } else { jobject newElement_2_mfgCodeInsideOptional; std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; jint jninewElement_2_value = static_cast(entry_2.value); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); { jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementModeClusterModeTagStruct"); return nullptr; } jmethodID modeTagStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V", &modeTagStructStructCtor_3); if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementModeClusterModeTagStruct constructor"); return nullptr; } newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); } chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } { jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementModeClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementModeClusterModeOptionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, newElement_0_mode, newElement_0_modeTags); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentMode::Id: { using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::StartUpMode::Id: { using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OnMode::Id: { using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::DoorLock::Id: { using namespace app::Clusters::DoorLock; switch (aPath.mAttributeId) { case Attributes::LockState::Id: { using TypeInfo = Attributes::LockState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::LockType::Id: { using TypeInfo = Attributes::LockType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ActuatorEnabled::Id: { using TypeInfo = Attributes::ActuatorEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::DoorState::Id: { using TypeInfo = Attributes::DoorState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::DoorOpenEvents::Id: { using TypeInfo = Attributes::DoorOpenEvents::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::DoorClosedEvents::Id: { using TypeInfo = Attributes::DoorClosedEvents::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::OpenPeriod::Id: { using TypeInfo = Attributes::OpenPeriod::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfTotalUsersSupported::Id: { using TypeInfo = Attributes::NumberOfTotalUsersSupported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfPINUsersSupported::Id: { using TypeInfo = Attributes::NumberOfPINUsersSupported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfRFIDUsersSupported::Id: { using TypeInfo = Attributes::NumberOfRFIDUsersSupported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id: { using TypeInfo = Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id: { using TypeInfo = Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfHolidaySchedulesSupported::Id: { using TypeInfo = Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MaxPINCodeLength::Id: { using TypeInfo = Attributes::MaxPINCodeLength::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MinPINCodeLength::Id: { using TypeInfo = Attributes::MinPINCodeLength::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MaxRFIDCodeLength::Id: { using TypeInfo = Attributes::MaxRFIDCodeLength::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MinRFIDCodeLength::Id: { using TypeInfo = Attributes::MinRFIDCodeLength::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CredentialRulesSupport::Id: { using TypeInfo = Attributes::CredentialRulesSupport::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfCredentialsSupportedPerUser::Id: { using TypeInfo = Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Language::Id: { using TypeInfo = Attributes::Language::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::LEDSettings::Id: { using TypeInfo = Attributes::LEDSettings::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AutoRelockTime::Id: { using TypeInfo = Attributes::AutoRelockTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SoundVolume::Id: { using TypeInfo = Attributes::SoundVolume::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::OperatingMode::Id: { using TypeInfo = Attributes::OperatingMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SupportedOperatingModes::Id: { using TypeInfo = Attributes::SupportedOperatingModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::DefaultConfigurationRegister::Id: { using TypeInfo = Attributes::DefaultConfigurationRegister::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::EnableLocalProgramming::Id: { using TypeInfo = Attributes::EnableLocalProgramming::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::EnableOneTouchLocking::Id: { using TypeInfo = Attributes::EnableOneTouchLocking::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::EnableInsideStatusLED::Id: { using TypeInfo = Attributes::EnableInsideStatusLED::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::EnablePrivacyModeButton::Id: { using TypeInfo = Attributes::EnablePrivacyModeButton::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LocalProgrammingFeatures::Id: { using TypeInfo = Attributes::LocalProgrammingFeatures::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::WrongCodeEntryLimit::Id: { using TypeInfo = Attributes::WrongCodeEntryLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::UserCodeTemporaryDisableTime::Id: { using TypeInfo = Attributes::UserCodeTemporaryDisableTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SendPINOverTheAir::Id: { using TypeInfo = Attributes::SendPINOverTheAir::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RequirePINforRemoteOperation::Id: { using TypeInfo = Attributes::RequirePINforRemoteOperation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ExpiringUserTimeout::Id: { using TypeInfo = Attributes::ExpiringUserTimeout::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AliroReaderVerificationKey::Id: { using TypeInfo = Attributes::AliroReaderVerificationKey::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.Value().size())); env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.Value().size()), reinterpret_cast(cppValue.Value().data())); value = valueByteArray; } return value; } case Attributes::AliroReaderGroupIdentifier::Id: { using TypeInfo = Attributes::AliroReaderGroupIdentifier::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.Value().size())); env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.Value().size()), reinterpret_cast(cppValue.Value().data())); value = valueByteArray; } return value; } case Attributes::AliroReaderGroupSubIdentifier::Id: { using TypeInfo = Attributes::AliroReaderGroupSubIdentifier::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.size())); env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.size()), reinterpret_cast(cppValue.data())); value = valueByteArray; return value; } case Attributes::AliroExpeditedTransactionSupportedProtocolVersions::Id: { using TypeInfo = Attributes::AliroExpeditedTransactionSupportedProtocolVersions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), reinterpret_cast(entry_0.data())); newElement_0 = newElement_0ByteArray; chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AliroGroupResolvingKey::Id: { using TypeInfo = Attributes::AliroGroupResolvingKey::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.Value().size())); env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.Value().size()), reinterpret_cast(cppValue.Value().data())); value = valueByteArray; } return value; } case Attributes::AliroSupportedBLEUWBProtocolVersions::Id: { using TypeInfo = Attributes::AliroSupportedBLEUWBProtocolVersions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), reinterpret_cast(entry_0.data())); newElement_0 = newElement_0ByteArray; chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AliroBLEAdvertisingVersion::Id: { using TypeInfo = Attributes::AliroBLEAdvertisingVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfAliroCredentialIssuerKeysSupported::Id: { using TypeInfo = Attributes::NumberOfAliroCredentialIssuerKeysSupported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfAliroEndpointKeysSupported::Id: { using TypeInfo = Attributes::NumberOfAliroEndpointKeysSupported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::WindowCovering::Id: { using namespace app::Clusters::WindowCovering; switch (aPath.mAttributeId) { case Attributes::Type::Id: { using TypeInfo = Attributes::Type::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::PhysicalClosedLimitLift::Id: { using TypeInfo = Attributes::PhysicalClosedLimitLift::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::PhysicalClosedLimitTilt::Id: { using TypeInfo = Attributes::PhysicalClosedLimitTilt::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CurrentPositionLift::Id: { using TypeInfo = Attributes::CurrentPositionLift::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::CurrentPositionTilt::Id: { using TypeInfo = Attributes::CurrentPositionTilt::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NumberOfActuationsLift::Id: { using TypeInfo = Attributes::NumberOfActuationsLift::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfActuationsTilt::Id: { using TypeInfo = Attributes::NumberOfActuationsTilt::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ConfigStatus::Id: { using TypeInfo = Attributes::ConfigStatus::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CurrentPositionLiftPercentage::Id: { using TypeInfo = Attributes::CurrentPositionLiftPercentage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::CurrentPositionTiltPercentage::Id: { using TypeInfo = Attributes::CurrentPositionTiltPercentage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OperationalStatus::Id: { using TypeInfo = Attributes::OperationalStatus::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TargetPositionLiftPercent100ths::Id: { using TypeInfo = Attributes::TargetPositionLiftPercent100ths::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::TargetPositionTiltPercent100ths::Id: { using TypeInfo = Attributes::TargetPositionTiltPercent100ths::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::EndProductType::Id: { using TypeInfo = Attributes::EndProductType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CurrentPositionLiftPercent100ths::Id: { using TypeInfo = Attributes::CurrentPositionLiftPercent100ths::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::CurrentPositionTiltPercent100ths::Id: { using TypeInfo = Attributes::CurrentPositionTiltPercent100ths::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::InstalledOpenLimitLift::Id: { using TypeInfo = Attributes::InstalledOpenLimitLift::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::InstalledClosedLimitLift::Id: { using TypeInfo = Attributes::InstalledClosedLimitLift::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::InstalledOpenLimitTilt::Id: { using TypeInfo = Attributes::InstalledOpenLimitTilt::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::InstalledClosedLimitTilt::Id: { using TypeInfo = Attributes::InstalledClosedLimitTilt::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Mode::Id: { using TypeInfo = Attributes::Mode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SafetyStatus::Id: { using TypeInfo = Attributes::SafetyStatus::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ServiceArea::Id: { using namespace app::Clusters::ServiceArea; switch (aPath.mAttributeId) { case Attributes::SupportedAreas::Id: { using TypeInfo = Attributes::SupportedAreas::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_areaID; std::string newElement_0_areaIDClassName = "java/lang/Long"; std::string newElement_0_areaIDCtorSignature = "(J)V"; jlong jninewElement_0_areaID = static_cast(entry_0.areaID); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_areaIDClassName.c_str(), newElement_0_areaIDCtorSignature.c_str(), jninewElement_0_areaID, newElement_0_areaID); jobject newElement_0_mapID; if (entry_0.mapID.IsNull()) { newElement_0_mapID = nullptr; } else { std::string newElement_0_mapIDClassName = "java/lang/Long"; std::string newElement_0_mapIDCtorSignature = "(J)V"; jlong jninewElement_0_mapID = static_cast(entry_0.mapID.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_mapIDClassName.c_str(), newElement_0_mapIDCtorSignature.c_str(), jninewElement_0_mapID, newElement_0_mapID); } jobject newElement_0_areaInfo; jobject newElement_0_areaInfo_locationInfo; if (entry_0.areaInfo.locationInfo.IsNull()) { newElement_0_areaInfo_locationInfo = nullptr; } else { jobject newElement_0_areaInfo_locationInfo_locationName; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( entry_0.areaInfo.locationInfo.Value().locationName, newElement_0_areaInfo_locationInfo_locationName)); jobject newElement_0_areaInfo_locationInfo_floorNumber; if (entry_0.areaInfo.locationInfo.Value().floorNumber.IsNull()) { newElement_0_areaInfo_locationInfo_floorNumber = nullptr; } else { std::string newElement_0_areaInfo_locationInfo_floorNumberClassName = "java/lang/Integer"; std::string newElement_0_areaInfo_locationInfo_floorNumberCtorSignature = "(I)V"; jint jninewElement_0_areaInfo_locationInfo_floorNumber = static_cast(entry_0.areaInfo.locationInfo.Value().floorNumber.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_areaInfo_locationInfo_floorNumberClassName.c_str(), newElement_0_areaInfo_locationInfo_floorNumberCtorSignature.c_str(), jninewElement_0_areaInfo_locationInfo_floorNumber, newElement_0_areaInfo_locationInfo_floorNumber); } jobject newElement_0_areaInfo_locationInfo_areaType; if (entry_0.areaInfo.locationInfo.Value().areaType.IsNull()) { newElement_0_areaInfo_locationInfo_areaType = nullptr; } else { std::string newElement_0_areaInfo_locationInfo_areaTypeClassName = "java/lang/Integer"; std::string newElement_0_areaInfo_locationInfo_areaTypeCtorSignature = "(I)V"; jint jninewElement_0_areaInfo_locationInfo_areaType = static_cast(entry_0.areaInfo.locationInfo.Value().areaType.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_areaInfo_locationInfo_areaTypeClassName.c_str(), newElement_0_areaInfo_locationInfo_areaTypeCtorSignature.c_str(), jninewElement_0_areaInfo_locationInfo_areaType, newElement_0_areaInfo_locationInfo_areaType); } { jclass locationDescriptorStructStructClass_4; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterLocationDescriptorStruct", locationDescriptorStructStructClass_4); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterLocationDescriptorStruct"); return nullptr; } jmethodID locationDescriptorStructStructCtor_4; err = chip::JniReferences::GetInstance().FindMethod( env, locationDescriptorStructStructClass_4, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;)V", &locationDescriptorStructStructCtor_4); if (err != CHIP_NO_ERROR || locationDescriptorStructStructCtor_4 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterLocationDescriptorStruct constructor"); return nullptr; } newElement_0_areaInfo_locationInfo = env->NewObject( locationDescriptorStructStructClass_4, locationDescriptorStructStructCtor_4, newElement_0_areaInfo_locationInfo_locationName, newElement_0_areaInfo_locationInfo_floorNumber, newElement_0_areaInfo_locationInfo_areaType); } } jobject newElement_0_areaInfo_landmarkInfo; if (entry_0.areaInfo.landmarkInfo.IsNull()) { newElement_0_areaInfo_landmarkInfo = nullptr; } else { jobject newElement_0_areaInfo_landmarkInfo_landmarkTag; std::string newElement_0_areaInfo_landmarkInfo_landmarkTagClassName = "java/lang/Integer"; std::string newElement_0_areaInfo_landmarkInfo_landmarkTagCtorSignature = "(I)V"; jint jninewElement_0_areaInfo_landmarkInfo_landmarkTag = static_cast(entry_0.areaInfo.landmarkInfo.Value().landmarkTag); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_areaInfo_landmarkInfo_landmarkTagClassName.c_str(), newElement_0_areaInfo_landmarkInfo_landmarkTagCtorSignature.c_str(), jninewElement_0_areaInfo_landmarkInfo_landmarkTag, newElement_0_areaInfo_landmarkInfo_landmarkTag); jobject newElement_0_areaInfo_landmarkInfo_relativePositionTag; if (entry_0.areaInfo.landmarkInfo.Value().relativePositionTag.IsNull()) { newElement_0_areaInfo_landmarkInfo_relativePositionTag = nullptr; } else { std::string newElement_0_areaInfo_landmarkInfo_relativePositionTagClassName = "java/lang/Integer"; std::string newElement_0_areaInfo_landmarkInfo_relativePositionTagCtorSignature = "(I)V"; jint jninewElement_0_areaInfo_landmarkInfo_relativePositionTag = static_cast(entry_0.areaInfo.landmarkInfo.Value().relativePositionTag.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_areaInfo_landmarkInfo_relativePositionTagClassName.c_str(), newElement_0_areaInfo_landmarkInfo_relativePositionTagCtorSignature.c_str(), jninewElement_0_areaInfo_landmarkInfo_relativePositionTag, newElement_0_areaInfo_landmarkInfo_relativePositionTag); } { jclass landmarkInfoStructStructClass_4; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterLandmarkInfoStruct", landmarkInfoStructStructClass_4); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterLandmarkInfoStruct"); return nullptr; } jmethodID landmarkInfoStructStructCtor_4; err = chip::JniReferences::GetInstance().FindMethod(env, landmarkInfoStructStructClass_4, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &landmarkInfoStructStructCtor_4); if (err != CHIP_NO_ERROR || landmarkInfoStructStructCtor_4 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterLandmarkInfoStruct constructor"); return nullptr; } newElement_0_areaInfo_landmarkInfo = env->NewObject( landmarkInfoStructStructClass_4, landmarkInfoStructStructCtor_4, newElement_0_areaInfo_landmarkInfo_landmarkTag, newElement_0_areaInfo_landmarkInfo_relativePositionTag); } } { jclass areaInfoStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterAreaInfoStruct", areaInfoStructStructClass_2); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterAreaInfoStruct"); return nullptr; } jmethodID areaInfoStructStructCtor_2; err = chip::JniReferences::GetInstance().FindMethod( env, areaInfoStructStructClass_2, "", "(Lchip/devicecontroller/ChipStructs$ServiceAreaClusterLocationDescriptorStruct;Lchip/devicecontroller/" "ChipStructs$ServiceAreaClusterLandmarkInfoStruct;)V", &areaInfoStructStructCtor_2); if (err != CHIP_NO_ERROR || areaInfoStructStructCtor_2 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterAreaInfoStruct constructor"); return nullptr; } newElement_0_areaInfo = env->NewObject(areaInfoStructStructClass_2, areaInfoStructStructCtor_2, newElement_0_areaInfo_locationInfo, newElement_0_areaInfo_landmarkInfo); } { jclass areaStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterAreaStruct", areaStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterAreaStruct"); return nullptr; } jmethodID areaStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, areaStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Long;Lchip/devicecontroller/ChipStructs$ServiceAreaClusterAreaInfoStruct;)V", &areaStructStructCtor_1); if (err != CHIP_NO_ERROR || areaStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterAreaStruct constructor"); return nullptr; } newElement_0 = env->NewObject(areaStructStructClass_1, areaStructStructCtor_1, newElement_0_areaID, newElement_0_mapID, newElement_0_areaInfo); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::SupportedMaps::Id: { using TypeInfo = Attributes::SupportedMaps::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_mapID; std::string newElement_0_mapIDClassName = "java/lang/Long"; std::string newElement_0_mapIDCtorSignature = "(J)V"; jlong jninewElement_0_mapID = static_cast(entry_0.mapID); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_mapIDClassName.c_str(), newElement_0_mapIDCtorSignature.c_str(), jninewElement_0_mapID, newElement_0_mapID); jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); { jclass mapStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterMapStruct", mapStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterMapStruct"); return nullptr; } jmethodID mapStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, mapStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/String;)V", &mapStructStructCtor_1); if (err != CHIP_NO_ERROR || mapStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterMapStruct constructor"); return nullptr; } newElement_0 = env->NewObject(mapStructStructClass_1, mapStructStructCtor_1, newElement_0_mapID, newElement_0_name); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::SelectedAreas::Id: { using TypeInfo = Attributes::SelectedAreas::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentArea::Id: { using TypeInfo = Attributes::CurrentArea::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::EstimatedEndTime::Id: { using TypeInfo = Attributes::EstimatedEndTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Progress::Id: { using TypeInfo = Attributes::Progress::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_areaID; std::string newElement_0_areaIDClassName = "java/lang/Long"; std::string newElement_0_areaIDCtorSignature = "(J)V"; jlong jninewElement_0_areaID = static_cast(entry_0.areaID); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_areaIDClassName.c_str(), newElement_0_areaIDCtorSignature.c_str(), jninewElement_0_areaID, newElement_0_areaID); jobject newElement_0_status; std::string newElement_0_statusClassName = "java/lang/Integer"; std::string newElement_0_statusCtorSignature = "(I)V"; jint jninewElement_0_status = static_cast(entry_0.status); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_statusClassName.c_str(), newElement_0_statusCtorSignature.c_str(), jninewElement_0_status, newElement_0_status); jobject newElement_0_totalOperationalTime; if (!entry_0.totalOperationalTime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_totalOperationalTime); } else { jobject newElement_0_totalOperationalTimeInsideOptional; if (entry_0.totalOperationalTime.Value().IsNull()) { newElement_0_totalOperationalTimeInsideOptional = nullptr; } else { std::string newElement_0_totalOperationalTimeInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_totalOperationalTimeInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_0_totalOperationalTimeInsideOptional = static_cast(entry_0.totalOperationalTime.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_totalOperationalTimeInsideOptionalClassName.c_str(), newElement_0_totalOperationalTimeInsideOptionalCtorSignature.c_str(), jninewElement_0_totalOperationalTimeInsideOptional, newElement_0_totalOperationalTimeInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(newElement_0_totalOperationalTimeInsideOptional, newElement_0_totalOperationalTime); } jobject newElement_0_estimatedTime; if (!entry_0.estimatedTime.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_estimatedTime); } else { jobject newElement_0_estimatedTimeInsideOptional; if (entry_0.estimatedTime.Value().IsNull()) { newElement_0_estimatedTimeInsideOptional = nullptr; } else { std::string newElement_0_estimatedTimeInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_estimatedTimeInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_0_estimatedTimeInsideOptional = static_cast(entry_0.estimatedTime.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_estimatedTimeInsideOptionalClassName.c_str(), newElement_0_estimatedTimeInsideOptionalCtorSignature.c_str(), jninewElement_0_estimatedTimeInsideOptional, newElement_0_estimatedTimeInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(newElement_0_estimatedTimeInsideOptional, newElement_0_estimatedTime); } { jclass progressStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterProgressStruct", progressStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterProgressStruct"); return nullptr; } jmethodID progressStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, progressStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", &progressStructStructCtor_1); if (err != CHIP_NO_ERROR || progressStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterProgressStruct constructor"); return nullptr; } newElement_0 = env->NewObject(progressStructStructClass_1, progressStructStructCtor_1, newElement_0_areaID, newElement_0_status, newElement_0_totalOperationalTime, newElement_0_estimatedTime); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::PumpConfigurationAndControl::Id: { using namespace app::Clusters::PumpConfigurationAndControl; switch (aPath.mAttributeId) { case Attributes::MaxPressure::Id: { using TypeInfo = Attributes::MaxPressure::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxSpeed::Id: { using TypeInfo = Attributes::MaxSpeed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxFlow::Id: { using TypeInfo = Attributes::MaxFlow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinConstPressure::Id: { using TypeInfo = Attributes::MinConstPressure::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxConstPressure::Id: { using TypeInfo = Attributes::MaxConstPressure::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinCompPressure::Id: { using TypeInfo = Attributes::MinCompPressure::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxCompPressure::Id: { using TypeInfo = Attributes::MaxCompPressure::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinConstSpeed::Id: { using TypeInfo = Attributes::MinConstSpeed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxConstSpeed::Id: { using TypeInfo = Attributes::MaxConstSpeed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinConstFlow::Id: { using TypeInfo = Attributes::MinConstFlow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxConstFlow::Id: { using TypeInfo = Attributes::MaxConstFlow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinConstTemp::Id: { using TypeInfo = Attributes::MinConstTemp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxConstTemp::Id: { using TypeInfo = Attributes::MaxConstTemp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PumpStatus::Id: { using TypeInfo = Attributes::PumpStatus::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::EffectiveOperationMode::Id: { using TypeInfo = Attributes::EffectiveOperationMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::EffectiveControlMode::Id: { using TypeInfo = Attributes::EffectiveControlMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Capacity::Id: { using TypeInfo = Attributes::Capacity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Speed::Id: { using TypeInfo = Attributes::Speed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::LifetimeRunningHours::Id: { using TypeInfo = Attributes::LifetimeRunningHours::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Power::Id: { using TypeInfo = Attributes::Power::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::LifetimeEnergyConsumed::Id: { using TypeInfo = Attributes::LifetimeEnergyConsumed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OperationMode::Id: { using TypeInfo = Attributes::OperationMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ControlMode::Id: { using TypeInfo = Attributes::ControlMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::Thermostat::Id: { using namespace app::Clusters::Thermostat; switch (aPath.mAttributeId) { case Attributes::LocalTemperature::Id: { using TypeInfo = Attributes::LocalTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OutdoorTemperature::Id: { using TypeInfo = Attributes::OutdoorTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Occupancy::Id: { using TypeInfo = Attributes::Occupancy::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AbsMinHeatSetpointLimit::Id: { using TypeInfo = Attributes::AbsMinHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AbsMaxHeatSetpointLimit::Id: { using TypeInfo = Attributes::AbsMaxHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AbsMinCoolSetpointLimit::Id: { using TypeInfo = Attributes::AbsMinCoolSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AbsMaxCoolSetpointLimit::Id: { using TypeInfo = Attributes::AbsMaxCoolSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::PICoolingDemand::Id: { using TypeInfo = Attributes::PICoolingDemand::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::PIHeatingDemand::Id: { using TypeInfo = Attributes::PIHeatingDemand::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::HVACSystemTypeConfiguration::Id: { using TypeInfo = Attributes::HVACSystemTypeConfiguration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LocalTemperatureCalibration::Id: { using TypeInfo = Attributes::LocalTemperatureCalibration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::OccupiedCoolingSetpoint::Id: { using TypeInfo = Attributes::OccupiedCoolingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::OccupiedHeatingSetpoint::Id: { using TypeInfo = Attributes::OccupiedHeatingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::UnoccupiedCoolingSetpoint::Id: { using TypeInfo = Attributes::UnoccupiedCoolingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::UnoccupiedHeatingSetpoint::Id: { using TypeInfo = Attributes::UnoccupiedHeatingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MinHeatSetpointLimit::Id: { using TypeInfo = Attributes::MinHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MaxHeatSetpointLimit::Id: { using TypeInfo = Attributes::MaxHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MinCoolSetpointLimit::Id: { using TypeInfo = Attributes::MinCoolSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MaxCoolSetpointLimit::Id: { using TypeInfo = Attributes::MaxCoolSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MinSetpointDeadBand::Id: { using TypeInfo = Attributes::MinSetpointDeadBand::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RemoteSensing::Id: { using TypeInfo = Attributes::RemoteSensing::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ControlSequenceOfOperation::Id: { using TypeInfo = Attributes::ControlSequenceOfOperation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SystemMode::Id: { using TypeInfo = Attributes::SystemMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ThermostatRunningMode::Id: { using TypeInfo = Attributes::ThermostatRunningMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::StartOfWeek::Id: { using TypeInfo = Attributes::StartOfWeek::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfWeeklyTransitions::Id: { using TypeInfo = Attributes::NumberOfWeeklyTransitions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfDailyTransitions::Id: { using TypeInfo = Attributes::NumberOfDailyTransitions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TemperatureSetpointHold::Id: { using TypeInfo = Attributes::TemperatureSetpointHold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::TemperatureSetpointHoldDuration::Id: { using TypeInfo = Attributes::TemperatureSetpointHoldDuration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ThermostatProgrammingOperationMode::Id: { using TypeInfo = Attributes::ThermostatProgrammingOperationMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ThermostatRunningState::Id: { using TypeInfo = Attributes::ThermostatRunningState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SetpointChangeSource::Id: { using TypeInfo = Attributes::SetpointChangeSource::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SetpointChangeAmount::Id: { using TypeInfo = Attributes::SetpointChangeAmount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::SetpointChangeSourceTimestamp::Id: { using TypeInfo = Attributes::SetpointChangeSourceTimestamp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::OccupiedSetback::Id: { using TypeInfo = Attributes::OccupiedSetback::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OccupiedSetbackMin::Id: { using TypeInfo = Attributes::OccupiedSetbackMin::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::OccupiedSetbackMax::Id: { using TypeInfo = Attributes::OccupiedSetbackMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::UnoccupiedSetback::Id: { using TypeInfo = Attributes::UnoccupiedSetback::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::UnoccupiedSetbackMin::Id: { using TypeInfo = Attributes::UnoccupiedSetbackMin::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::UnoccupiedSetbackMax::Id: { using TypeInfo = Attributes::UnoccupiedSetbackMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::EmergencyHeatDelta::Id: { using TypeInfo = Attributes::EmergencyHeatDelta::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ACType::Id: { using TypeInfo = Attributes::ACType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ACCapacity::Id: { using TypeInfo = Attributes::ACCapacity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ACRefrigerantType::Id: { using TypeInfo = Attributes::ACRefrigerantType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ACCompressorType::Id: { using TypeInfo = Attributes::ACCompressorType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ACErrorCode::Id: { using TypeInfo = Attributes::ACErrorCode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ACLouverPosition::Id: { using TypeInfo = Attributes::ACLouverPosition::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ACCoilTemperature::Id: { using TypeInfo = Attributes::ACCoilTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ACCapacityformat::Id: { using TypeInfo = Attributes::ACCapacityformat::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::PresetTypes::Id: { using TypeInfo = Attributes::PresetTypes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_presetScenario; std::string newElement_0_presetScenarioClassName = "java/lang/Integer"; std::string newElement_0_presetScenarioCtorSignature = "(I)V"; jint jninewElement_0_presetScenario = static_cast(entry_0.presetScenario); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_presetScenarioClassName.c_str(), newElement_0_presetScenarioCtorSignature.c_str(), jninewElement_0_presetScenario, newElement_0_presetScenario); jobject newElement_0_numberOfPresets; std::string newElement_0_numberOfPresetsClassName = "java/lang/Integer"; std::string newElement_0_numberOfPresetsCtorSignature = "(I)V"; jint jninewElement_0_numberOfPresets = static_cast(entry_0.numberOfPresets); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_numberOfPresetsClassName.c_str(), newElement_0_numberOfPresetsCtorSignature.c_str(), jninewElement_0_numberOfPresets, newElement_0_numberOfPresets); jobject newElement_0_presetTypeFeatures; std::string newElement_0_presetTypeFeaturesClassName = "java/lang/Integer"; std::string newElement_0_presetTypeFeaturesCtorSignature = "(I)V"; jint jninewElement_0_presetTypeFeatures = static_cast(entry_0.presetTypeFeatures.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_presetTypeFeaturesClassName.c_str(), newElement_0_presetTypeFeaturesCtorSignature.c_str(), jninewElement_0_presetTypeFeatures, newElement_0_presetTypeFeatures); { jclass presetTypeStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ThermostatClusterPresetTypeStruct", presetTypeStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterPresetTypeStruct"); return nullptr; } jmethodID presetTypeStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, presetTypeStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &presetTypeStructStructCtor_1); if (err != CHIP_NO_ERROR || presetTypeStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterPresetTypeStruct constructor"); return nullptr; } newElement_0 = env->NewObject(presetTypeStructStructClass_1, presetTypeStructStructCtor_1, newElement_0_presetScenario, newElement_0_numberOfPresets, newElement_0_presetTypeFeatures); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::ScheduleTypes::Id: { using TypeInfo = Attributes::ScheduleTypes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_systemMode; std::string newElement_0_systemModeClassName = "java/lang/Integer"; std::string newElement_0_systemModeCtorSignature = "(I)V"; jint jninewElement_0_systemMode = static_cast(entry_0.systemMode); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_systemModeClassName.c_str(), newElement_0_systemModeCtorSignature.c_str(), jninewElement_0_systemMode, newElement_0_systemMode); jobject newElement_0_numberOfSchedules; std::string newElement_0_numberOfSchedulesClassName = "java/lang/Integer"; std::string newElement_0_numberOfSchedulesCtorSignature = "(I)V"; jint jninewElement_0_numberOfSchedules = static_cast(entry_0.numberOfSchedules); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_numberOfSchedulesClassName.c_str(), newElement_0_numberOfSchedulesCtorSignature.c_str(), jninewElement_0_numberOfSchedules, newElement_0_numberOfSchedules); jobject newElement_0_scheduleTypeFeatures; std::string newElement_0_scheduleTypeFeaturesClassName = "java/lang/Integer"; std::string newElement_0_scheduleTypeFeaturesCtorSignature = "(I)V"; jint jninewElement_0_scheduleTypeFeatures = static_cast(entry_0.scheduleTypeFeatures.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_scheduleTypeFeaturesClassName.c_str(), newElement_0_scheduleTypeFeaturesCtorSignature.c_str(), jninewElement_0_scheduleTypeFeatures, newElement_0_scheduleTypeFeatures); { jclass scheduleTypeStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleTypeStruct", scheduleTypeStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleTypeStruct"); return nullptr; } jmethodID scheduleTypeStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, scheduleTypeStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &scheduleTypeStructStructCtor_1); if (err != CHIP_NO_ERROR || scheduleTypeStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleTypeStruct constructor"); return nullptr; } newElement_0 = env->NewObject(scheduleTypeStructStructClass_1, scheduleTypeStructStructCtor_1, newElement_0_systemMode, newElement_0_numberOfSchedules, newElement_0_scheduleTypeFeatures); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::NumberOfPresets::Id: { using TypeInfo = Attributes::NumberOfPresets::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfSchedules::Id: { using TypeInfo = Attributes::NumberOfSchedules::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfScheduleTransitions::Id: { using TypeInfo = Attributes::NumberOfScheduleTransitions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfScheduleTransitionPerDay::Id: { using TypeInfo = Attributes::NumberOfScheduleTransitionPerDay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ActivePresetHandle::Id: { using TypeInfo = Attributes::ActivePresetHandle::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.Value().size())); env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.Value().size()), reinterpret_cast(cppValue.Value().data())); value = valueByteArray; } return value; } case Attributes::ActiveScheduleHandle::Id: { using TypeInfo = Attributes::ActiveScheduleHandle::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.Value().size())); env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.Value().size()), reinterpret_cast(cppValue.Value().data())); value = valueByteArray; } return value; } case Attributes::Presets::Id: { using TypeInfo = Attributes::Presets::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_presetHandle; if (entry_0.presetHandle.IsNull()) { newElement_0_presetHandle = nullptr; } else { jbyteArray newElement_0_presetHandleByteArray = env->NewByteArray(static_cast(entry_0.presetHandle.Value().size())); env->SetByteArrayRegion(newElement_0_presetHandleByteArray, 0, static_cast(entry_0.presetHandle.Value().size()), reinterpret_cast(entry_0.presetHandle.Value().data())); newElement_0_presetHandle = newElement_0_presetHandleByteArray; } jobject newElement_0_presetScenario; std::string newElement_0_presetScenarioClassName = "java/lang/Integer"; std::string newElement_0_presetScenarioCtorSignature = "(I)V"; jint jninewElement_0_presetScenario = static_cast(entry_0.presetScenario); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_presetScenarioClassName.c_str(), newElement_0_presetScenarioCtorSignature.c_str(), jninewElement_0_presetScenario, newElement_0_presetScenario); jobject newElement_0_name; if (!entry_0.name.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); } else { jobject newElement_0_nameInsideOptional; if (entry_0.name.Value().IsNull()) { newElement_0_nameInsideOptional = nullptr; } else { LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value().Value(), newElement_0_nameInsideOptional)); } chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); } jobject newElement_0_coolingSetpoint; if (!entry_0.coolingSetpoint.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_coolingSetpoint); } else { jobject newElement_0_coolingSetpointInsideOptional; std::string newElement_0_coolingSetpointInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_coolingSetpointInsideOptionalCtorSignature = "(I)V"; jint jninewElement_0_coolingSetpointInsideOptional = static_cast(entry_0.coolingSetpoint.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_coolingSetpointInsideOptionalClassName.c_str(), newElement_0_coolingSetpointInsideOptionalCtorSignature.c_str(), jninewElement_0_coolingSetpointInsideOptional, newElement_0_coolingSetpointInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_coolingSetpointInsideOptional, newElement_0_coolingSetpoint); } jobject newElement_0_heatingSetpoint; if (!entry_0.heatingSetpoint.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_heatingSetpoint); } else { jobject newElement_0_heatingSetpointInsideOptional; std::string newElement_0_heatingSetpointInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_heatingSetpointInsideOptionalCtorSignature = "(I)V"; jint jninewElement_0_heatingSetpointInsideOptional = static_cast(entry_0.heatingSetpoint.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_heatingSetpointInsideOptionalClassName.c_str(), newElement_0_heatingSetpointInsideOptionalCtorSignature.c_str(), jninewElement_0_heatingSetpointInsideOptional, newElement_0_heatingSetpointInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_heatingSetpointInsideOptional, newElement_0_heatingSetpoint); } jobject newElement_0_builtIn; if (entry_0.builtIn.IsNull()) { newElement_0_builtIn = nullptr; } else { std::string newElement_0_builtInClassName = "java/lang/Boolean"; std::string newElement_0_builtInCtorSignature = "(Z)V"; jboolean jninewElement_0_builtIn = static_cast(entry_0.builtIn.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_builtInClassName.c_str(), newElement_0_builtInCtorSignature.c_str(), jninewElement_0_builtIn, newElement_0_builtIn); } { jclass presetStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ThermostatClusterPresetStruct", presetStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterPresetStruct"); return nullptr; } jmethodID presetStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, presetStructStructClass_1, "", "([BLjava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Boolean;)V", &presetStructStructCtor_1); if (err != CHIP_NO_ERROR || presetStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterPresetStruct constructor"); return nullptr; } newElement_0 = env->NewObject(presetStructStructClass_1, presetStructStructCtor_1, newElement_0_presetHandle, newElement_0_presetScenario, newElement_0_name, newElement_0_coolingSetpoint, newElement_0_heatingSetpoint, newElement_0_builtIn); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::Schedules::Id: { using TypeInfo = Attributes::Schedules::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_scheduleHandle; if (entry_0.scheduleHandle.IsNull()) { newElement_0_scheduleHandle = nullptr; } else { jbyteArray newElement_0_scheduleHandleByteArray = env->NewByteArray(static_cast(entry_0.scheduleHandle.Value().size())); env->SetByteArrayRegion(newElement_0_scheduleHandleByteArray, 0, static_cast(entry_0.scheduleHandle.Value().size()), reinterpret_cast(entry_0.scheduleHandle.Value().data())); newElement_0_scheduleHandle = newElement_0_scheduleHandleByteArray; } jobject newElement_0_systemMode; std::string newElement_0_systemModeClassName = "java/lang/Integer"; std::string newElement_0_systemModeCtorSignature = "(I)V"; jint jninewElement_0_systemMode = static_cast(entry_0.systemMode); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_systemModeClassName.c_str(), newElement_0_systemModeCtorSignature.c_str(), jninewElement_0_systemMode, newElement_0_systemMode); jobject newElement_0_name; if (!entry_0.name.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); } else { jobject newElement_0_nameInsideOptional; LogErrorOnFailure( chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); } jobject newElement_0_presetHandle; if (!entry_0.presetHandle.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_presetHandle); } else { jobject newElement_0_presetHandleInsideOptional; jbyteArray newElement_0_presetHandleInsideOptionalByteArray = env->NewByteArray(static_cast(entry_0.presetHandle.Value().size())); env->SetByteArrayRegion(newElement_0_presetHandleInsideOptionalByteArray, 0, static_cast(entry_0.presetHandle.Value().size()), reinterpret_cast(entry_0.presetHandle.Value().data())); newElement_0_presetHandleInsideOptional = newElement_0_presetHandleInsideOptionalByteArray; chip::JniReferences::GetInstance().CreateOptional(newElement_0_presetHandleInsideOptional, newElement_0_presetHandle); } jobject newElement_0_transitions; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_transitions); auto iter_newElement_0_transitions_2 = entry_0.transitions.begin(); while (iter_newElement_0_transitions_2.Next()) { auto & entry_2 = iter_newElement_0_transitions_2.GetValue(); jobject newElement_2; jobject newElement_2_dayOfWeek; std::string newElement_2_dayOfWeekClassName = "java/lang/Integer"; std::string newElement_2_dayOfWeekCtorSignature = "(I)V"; jint jninewElement_2_dayOfWeek = static_cast(entry_2.dayOfWeek.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_dayOfWeekClassName.c_str(), newElement_2_dayOfWeekCtorSignature.c_str(), jninewElement_2_dayOfWeek, newElement_2_dayOfWeek); jobject newElement_2_transitionTime; std::string newElement_2_transitionTimeClassName = "java/lang/Integer"; std::string newElement_2_transitionTimeCtorSignature = "(I)V"; jint jninewElement_2_transitionTime = static_cast(entry_2.transitionTime); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_transitionTimeClassName.c_str(), newElement_2_transitionTimeCtorSignature.c_str(), jninewElement_2_transitionTime, newElement_2_transitionTime); jobject newElement_2_presetHandle; if (!entry_2.presetHandle.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_presetHandle); } else { jobject newElement_2_presetHandleInsideOptional; jbyteArray newElement_2_presetHandleInsideOptionalByteArray = env->NewByteArray(static_cast(entry_2.presetHandle.Value().size())); env->SetByteArrayRegion(newElement_2_presetHandleInsideOptionalByteArray, 0, static_cast(entry_2.presetHandle.Value().size()), reinterpret_cast(entry_2.presetHandle.Value().data())); newElement_2_presetHandleInsideOptional = newElement_2_presetHandleInsideOptionalByteArray; chip::JniReferences::GetInstance().CreateOptional(newElement_2_presetHandleInsideOptional, newElement_2_presetHandle); } jobject newElement_2_systemMode; if (!entry_2.systemMode.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_systemMode); } else { jobject newElement_2_systemModeInsideOptional; std::string newElement_2_systemModeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_systemModeInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_systemModeInsideOptional = static_cast(entry_2.systemMode.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_systemModeInsideOptionalClassName.c_str(), newElement_2_systemModeInsideOptionalCtorSignature.c_str(), jninewElement_2_systemModeInsideOptional, newElement_2_systemModeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_systemModeInsideOptional, newElement_2_systemMode); } jobject newElement_2_coolingSetpoint; if (!entry_2.coolingSetpoint.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_coolingSetpoint); } else { jobject newElement_2_coolingSetpointInsideOptional; std::string newElement_2_coolingSetpointInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_coolingSetpointInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_coolingSetpointInsideOptional = static_cast(entry_2.coolingSetpoint.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_coolingSetpointInsideOptionalClassName.c_str(), newElement_2_coolingSetpointInsideOptionalCtorSignature.c_str(), jninewElement_2_coolingSetpointInsideOptional, newElement_2_coolingSetpointInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_coolingSetpointInsideOptional, newElement_2_coolingSetpoint); } jobject newElement_2_heatingSetpoint; if (!entry_2.heatingSetpoint.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_heatingSetpoint); } else { jobject newElement_2_heatingSetpointInsideOptional; std::string newElement_2_heatingSetpointInsideOptionalClassName = "java/lang/Integer"; std::string newElement_2_heatingSetpointInsideOptionalCtorSignature = "(I)V"; jint jninewElement_2_heatingSetpointInsideOptional = static_cast(entry_2.heatingSetpoint.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_heatingSetpointInsideOptionalClassName.c_str(), newElement_2_heatingSetpointInsideOptionalCtorSignature.c_str(), jninewElement_2_heatingSetpointInsideOptional, newElement_2_heatingSetpointInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_2_heatingSetpointInsideOptional, newElement_2_heatingSetpoint); } { jclass scheduleTransitionStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleTransitionStruct", scheduleTransitionStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleTransitionStruct"); return nullptr; } jmethodID scheduleTransitionStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod( env, scheduleTransitionStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" "Optional;Ljava/util/Optional;)V", &scheduleTransitionStructStructCtor_3); if (err != CHIP_NO_ERROR || scheduleTransitionStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleTransitionStruct constructor"); return nullptr; } newElement_2 = env->NewObject(scheduleTransitionStructStructClass_3, scheduleTransitionStructStructCtor_3, newElement_2_dayOfWeek, newElement_2_transitionTime, newElement_2_presetHandle, newElement_2_systemMode, newElement_2_coolingSetpoint, newElement_2_heatingSetpoint); } chip::JniReferences::GetInstance().AddToList(newElement_0_transitions, newElement_2); } jobject newElement_0_builtIn; if (entry_0.builtIn.IsNull()) { newElement_0_builtIn = nullptr; } else { std::string newElement_0_builtInClassName = "java/lang/Boolean"; std::string newElement_0_builtInCtorSignature = "(Z)V"; jboolean jninewElement_0_builtIn = static_cast(entry_0.builtIn.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_builtInClassName.c_str(), newElement_0_builtInCtorSignature.c_str(), jninewElement_0_builtIn, newElement_0_builtIn); } { jclass scheduleStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleStruct", scheduleStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleStruct"); return nullptr; } jmethodID scheduleStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, scheduleStructStructClass_1, "", "([BLjava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/ArrayList;Ljava/lang/Boolean;)V", &scheduleStructStructCtor_1); if (err != CHIP_NO_ERROR || scheduleStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleStruct constructor"); return nullptr; } newElement_0 = env->NewObject(scheduleStructStructClass_1, scheduleStructStructCtor_1, newElement_0_scheduleHandle, newElement_0_systemMode, newElement_0_name, newElement_0_presetHandle, newElement_0_transitions, newElement_0_builtIn); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::SetpointHoldExpiryTimestamp::Id: { using TypeInfo = Attributes::SetpointHoldExpiryTimestamp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::FanControl::Id: { using namespace app::Clusters::FanControl; switch (aPath.mAttributeId) { case Attributes::FanMode::Id: { using TypeInfo = Attributes::FanMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::FanModeSequence::Id: { using TypeInfo = Attributes::FanModeSequence::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::PercentSetting::Id: { using TypeInfo = Attributes::PercentSetting::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PercentCurrent::Id: { using TypeInfo = Attributes::PercentCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SpeedMax::Id: { using TypeInfo = Attributes::SpeedMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SpeedSetting::Id: { using TypeInfo = Attributes::SpeedSetting::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::SpeedCurrent::Id: { using TypeInfo = Attributes::SpeedCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RockSupport::Id: { using TypeInfo = Attributes::RockSupport::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RockSetting::Id: { using TypeInfo = Attributes::RockSetting::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::WindSupport::Id: { using TypeInfo = Attributes::WindSupport::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::WindSetting::Id: { using TypeInfo = Attributes::WindSetting::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AirflowDirection::Id: { using TypeInfo = Attributes::AirflowDirection::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ThermostatUserInterfaceConfiguration::Id: { using namespace app::Clusters::ThermostatUserInterfaceConfiguration; switch (aPath.mAttributeId) { case Attributes::TemperatureDisplayMode::Id: { using TypeInfo = Attributes::TemperatureDisplayMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::KeypadLockout::Id: { using TypeInfo = Attributes::KeypadLockout::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ScheduleProgrammingVisibility::Id: { using TypeInfo = Attributes::ScheduleProgrammingVisibility::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ColorControl::Id: { using namespace app::Clusters::ColorControl; switch (aPath.mAttributeId) { case Attributes::CurrentHue::Id: { using TypeInfo = Attributes::CurrentHue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CurrentSaturation::Id: { using TypeInfo = Attributes::CurrentSaturation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RemainingTime::Id: { using TypeInfo = Attributes::RemainingTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CurrentX::Id: { using TypeInfo = Attributes::CurrentX::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CurrentY::Id: { using TypeInfo = Attributes::CurrentY::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::DriftCompensation::Id: { using TypeInfo = Attributes::DriftCompensation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CompensationText::Id: { using TypeInfo = Attributes::CompensationText::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::ColorTemperatureMireds::Id: { using TypeInfo = Attributes::ColorTemperatureMireds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ColorMode::Id: { using TypeInfo = Attributes::ColorMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Options::Id: { using TypeInfo = Attributes::Options::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NumberOfPrimaries::Id: { using TypeInfo = Attributes::NumberOfPrimaries::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Primary1X::Id: { using TypeInfo = Attributes::Primary1X::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Primary1Y::Id: { using TypeInfo = Attributes::Primary1Y::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Primary1Intensity::Id: { using TypeInfo = Attributes::Primary1Intensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Primary2X::Id: { using TypeInfo = Attributes::Primary2X::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Primary2Y::Id: { using TypeInfo = Attributes::Primary2Y::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Primary2Intensity::Id: { using TypeInfo = Attributes::Primary2Intensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Primary3X::Id: { using TypeInfo = Attributes::Primary3X::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Primary3Y::Id: { using TypeInfo = Attributes::Primary3Y::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Primary3Intensity::Id: { using TypeInfo = Attributes::Primary3Intensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Primary4X::Id: { using TypeInfo = Attributes::Primary4X::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Primary4Y::Id: { using TypeInfo = Attributes::Primary4Y::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Primary4Intensity::Id: { using TypeInfo = Attributes::Primary4Intensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Primary5X::Id: { using TypeInfo = Attributes::Primary5X::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Primary5Y::Id: { using TypeInfo = Attributes::Primary5Y::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Primary5Intensity::Id: { using TypeInfo = Attributes::Primary5Intensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Primary6X::Id: { using TypeInfo = Attributes::Primary6X::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Primary6Y::Id: { using TypeInfo = Attributes::Primary6Y::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Primary6Intensity::Id: { using TypeInfo = Attributes::Primary6Intensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::WhitePointX::Id: { using TypeInfo = Attributes::WhitePointX::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::WhitePointY::Id: { using TypeInfo = Attributes::WhitePointY::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ColorPointRX::Id: { using TypeInfo = Attributes::ColorPointRX::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ColorPointRY::Id: { using TypeInfo = Attributes::ColorPointRY::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ColorPointRIntensity::Id: { using TypeInfo = Attributes::ColorPointRIntensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ColorPointGX::Id: { using TypeInfo = Attributes::ColorPointGX::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ColorPointGY::Id: { using TypeInfo = Attributes::ColorPointGY::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ColorPointGIntensity::Id: { using TypeInfo = Attributes::ColorPointGIntensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ColorPointBX::Id: { using TypeInfo = Attributes::ColorPointBX::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ColorPointBY::Id: { using TypeInfo = Attributes::ColorPointBY::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ColorPointBIntensity::Id: { using TypeInfo = Attributes::ColorPointBIntensity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::EnhancedCurrentHue::Id: { using TypeInfo = Attributes::EnhancedCurrentHue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::EnhancedColorMode::Id: { using TypeInfo = Attributes::EnhancedColorMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ColorLoopActive::Id: { using TypeInfo = Attributes::ColorLoopActive::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ColorLoopDirection::Id: { using TypeInfo = Attributes::ColorLoopDirection::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ColorLoopTime::Id: { using TypeInfo = Attributes::ColorLoopTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ColorLoopStartEnhancedHue::Id: { using TypeInfo = Attributes::ColorLoopStartEnhancedHue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ColorLoopStoredEnhancedHue::Id: { using TypeInfo = Attributes::ColorLoopStoredEnhancedHue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ColorCapabilities::Id: { using TypeInfo = Attributes::ColorCapabilities::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ColorTempPhysicalMinMireds::Id: { using TypeInfo = Attributes::ColorTempPhysicalMinMireds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ColorTempPhysicalMaxMireds::Id: { using TypeInfo = Attributes::ColorTempPhysicalMaxMireds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CoupleColorTempToLevelMinMireds::Id: { using TypeInfo = Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::StartUpColorTemperatureMireds::Id: { using TypeInfo = Attributes::StartUpColorTemperatureMireds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::BallastConfiguration::Id: { using namespace app::Clusters::BallastConfiguration; switch (aPath.mAttributeId) { case Attributes::PhysicalMinLevel::Id: { using TypeInfo = Attributes::PhysicalMinLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::PhysicalMaxLevel::Id: { using TypeInfo = Attributes::PhysicalMaxLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::BallastStatus::Id: { using TypeInfo = Attributes::BallastStatus::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MinLevel::Id: { using TypeInfo = Attributes::MinLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MaxLevel::Id: { using TypeInfo = Attributes::MaxLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::IntrinsicBallastFactor::Id: { using TypeInfo = Attributes::IntrinsicBallastFactor::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::BallastFactorAdjustment::Id: { using TypeInfo = Attributes::BallastFactorAdjustment::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::LampQuantity::Id: { using TypeInfo = Attributes::LampQuantity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LampType::Id: { using TypeInfo = Attributes::LampType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::LampManufacturer::Id: { using TypeInfo = Attributes::LampManufacturer::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::LampRatedHours::Id: { using TypeInfo = Attributes::LampRatedHours::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::LampBurnHours::Id: { using TypeInfo = Attributes::LampBurnHours::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::LampAlarmMode::Id: { using TypeInfo = Attributes::LampAlarmMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LampBurnHoursTripPoint::Id: { using TypeInfo = Attributes::LampBurnHoursTripPoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::IlluminanceMeasurement::Id: { using namespace app::Clusters::IlluminanceMeasurement; switch (aPath.mAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinMeasuredValue::Id: { using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxMeasuredValue::Id: { using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Tolerance::Id: { using TypeInfo = Attributes::Tolerance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LightSensorType::Id: { using TypeInfo = Attributes::LightSensorType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::TemperatureMeasurement::Id: { using namespace app::Clusters::TemperatureMeasurement; switch (aPath.mAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinMeasuredValue::Id: { using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxMeasuredValue::Id: { using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Tolerance::Id: { using TypeInfo = Attributes::Tolerance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::PressureMeasurement::Id: { using namespace app::Clusters::PressureMeasurement; switch (aPath.mAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinMeasuredValue::Id: { using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxMeasuredValue::Id: { using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Tolerance::Id: { using TypeInfo = Attributes::Tolerance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ScaledValue::Id: { using TypeInfo = Attributes::ScaledValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinScaledValue::Id: { using TypeInfo = Attributes::MinScaledValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxScaledValue::Id: { using TypeInfo = Attributes::MaxScaledValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ScaledTolerance::Id: { using TypeInfo = Attributes::ScaledTolerance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Scale::Id: { using TypeInfo = Attributes::Scale::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::FlowMeasurement::Id: { using namespace app::Clusters::FlowMeasurement; switch (aPath.mAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinMeasuredValue::Id: { using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxMeasuredValue::Id: { using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Tolerance::Id: { using TypeInfo = Attributes::Tolerance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::RelativeHumidityMeasurement::Id: { using namespace app::Clusters::RelativeHumidityMeasurement; switch (aPath.mAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinMeasuredValue::Id: { using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxMeasuredValue::Id: { using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Tolerance::Id: { using TypeInfo = Attributes::Tolerance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::OccupancySensing::Id: { using namespace app::Clusters::OccupancySensing; switch (aPath.mAttributeId) { case Attributes::Occupancy::Id: { using TypeInfo = Attributes::Occupancy::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::OccupancySensorType::Id: { using TypeInfo = Attributes::OccupancySensorType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::OccupancySensorTypeBitmap::Id: { using TypeInfo = Attributes::OccupancySensorTypeBitmap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::HoldTime::Id: { using TypeInfo = Attributes::HoldTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::HoldTimeLimits::Id: { using TypeInfo = Attributes::HoldTimeLimits::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_holdTimeMin; std::string value_holdTimeMinClassName = "java/lang/Integer"; std::string value_holdTimeMinCtorSignature = "(I)V"; jint jnivalue_holdTimeMin = static_cast(cppValue.holdTimeMin); chip::JniReferences::GetInstance().CreateBoxedObject(value_holdTimeMinClassName.c_str(), value_holdTimeMinCtorSignature.c_str(), jnivalue_holdTimeMin, value_holdTimeMin); jobject value_holdTimeMax; std::string value_holdTimeMaxClassName = "java/lang/Integer"; std::string value_holdTimeMaxCtorSignature = "(I)V"; jint jnivalue_holdTimeMax = static_cast(cppValue.holdTimeMax); chip::JniReferences::GetInstance().CreateBoxedObject(value_holdTimeMaxClassName.c_str(), value_holdTimeMaxCtorSignature.c_str(), jnivalue_holdTimeMax, value_holdTimeMax); jobject value_holdTimeDefault; std::string value_holdTimeDefaultClassName = "java/lang/Integer"; std::string value_holdTimeDefaultCtorSignature = "(I)V"; jint jnivalue_holdTimeDefault = static_cast(cppValue.holdTimeDefault); chip::JniReferences::GetInstance().CreateBoxedObject(value_holdTimeDefaultClassName.c_str(), value_holdTimeDefaultCtorSignature.c_str(), jnivalue_holdTimeDefault, value_holdTimeDefault); { jclass holdTimeLimitsStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$OccupancySensingClusterHoldTimeLimitsStruct", holdTimeLimitsStructStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$OccupancySensingClusterHoldTimeLimitsStruct"); return nullptr; } jmethodID holdTimeLimitsStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod(env, holdTimeLimitsStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &holdTimeLimitsStructStructCtor_0); if (err != CHIP_NO_ERROR || holdTimeLimitsStructStructCtor_0 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$OccupancySensingClusterHoldTimeLimitsStruct constructor"); return nullptr; } value = env->NewObject(holdTimeLimitsStructStructClass_0, holdTimeLimitsStructStructCtor_0, value_holdTimeMin, value_holdTimeMax, value_holdTimeDefault); } return value; } case Attributes::PIROccupiedToUnoccupiedDelay::Id: { using TypeInfo = Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::PIRUnoccupiedToOccupiedDelay::Id: { using TypeInfo = Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::PIRUnoccupiedToOccupiedThreshold::Id: { using TypeInfo = Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id: { using TypeInfo = Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id: { using TypeInfo = Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id: { using TypeInfo = Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id: { using TypeInfo = Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id: { using TypeInfo = Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { using TypeInfo = Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::CarbonMonoxideConcentrationMeasurement::Id: { using namespace app::Clusters::CarbonMonoxideConcentrationMeasurement; switch (aPath.mAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinMeasuredValue::Id: { using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxMeasuredValue::Id: { using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValue::Id: { using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValueWindow::Id: { using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::AverageMeasuredValueWindow::Id: { using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Uncertainty::Id: { using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { using TypeInfo = Attributes::MeasurementUnit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementMedium::Id: { using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LevelValue::Id: { using TypeInfo = Attributes::LevelValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::CarbonDioxideConcentrationMeasurement::Id: { using namespace app::Clusters::CarbonDioxideConcentrationMeasurement; switch (aPath.mAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinMeasuredValue::Id: { using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxMeasuredValue::Id: { using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValue::Id: { using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValueWindow::Id: { using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::AverageMeasuredValueWindow::Id: { using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Uncertainty::Id: { using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { using TypeInfo = Attributes::MeasurementUnit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementMedium::Id: { using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LevelValue::Id: { using TypeInfo = Attributes::LevelValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::NitrogenDioxideConcentrationMeasurement::Id: { using namespace app::Clusters::NitrogenDioxideConcentrationMeasurement; switch (aPath.mAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinMeasuredValue::Id: { using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxMeasuredValue::Id: { using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValue::Id: { using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValueWindow::Id: { using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::AverageMeasuredValueWindow::Id: { using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Uncertainty::Id: { using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { using TypeInfo = Attributes::MeasurementUnit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementMedium::Id: { using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LevelValue::Id: { using TypeInfo = Attributes::LevelValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::OzoneConcentrationMeasurement::Id: { using namespace app::Clusters::OzoneConcentrationMeasurement; switch (aPath.mAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinMeasuredValue::Id: { using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxMeasuredValue::Id: { using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValue::Id: { using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValueWindow::Id: { using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::AverageMeasuredValueWindow::Id: { using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Uncertainty::Id: { using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { using TypeInfo = Attributes::MeasurementUnit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementMedium::Id: { using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LevelValue::Id: { using TypeInfo = Attributes::LevelValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::Pm25ConcentrationMeasurement::Id: { using namespace app::Clusters::Pm25ConcentrationMeasurement; switch (aPath.mAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinMeasuredValue::Id: { using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxMeasuredValue::Id: { using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValue::Id: { using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValueWindow::Id: { using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::AverageMeasuredValueWindow::Id: { using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Uncertainty::Id: { using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { using TypeInfo = Attributes::MeasurementUnit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementMedium::Id: { using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LevelValue::Id: { using TypeInfo = Attributes::LevelValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::FormaldehydeConcentrationMeasurement::Id: { using namespace app::Clusters::FormaldehydeConcentrationMeasurement; switch (aPath.mAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinMeasuredValue::Id: { using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxMeasuredValue::Id: { using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValue::Id: { using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValueWindow::Id: { using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::AverageMeasuredValueWindow::Id: { using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Uncertainty::Id: { using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { using TypeInfo = Attributes::MeasurementUnit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementMedium::Id: { using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LevelValue::Id: { using TypeInfo = Attributes::LevelValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::Pm1ConcentrationMeasurement::Id: { using namespace app::Clusters::Pm1ConcentrationMeasurement; switch (aPath.mAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinMeasuredValue::Id: { using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxMeasuredValue::Id: { using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValue::Id: { using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValueWindow::Id: { using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::AverageMeasuredValueWindow::Id: { using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Uncertainty::Id: { using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { using TypeInfo = Attributes::MeasurementUnit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementMedium::Id: { using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LevelValue::Id: { using TypeInfo = Attributes::LevelValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::Pm10ConcentrationMeasurement::Id: { using namespace app::Clusters::Pm10ConcentrationMeasurement; switch (aPath.mAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinMeasuredValue::Id: { using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxMeasuredValue::Id: { using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValue::Id: { using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValueWindow::Id: { using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::AverageMeasuredValueWindow::Id: { using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Uncertainty::Id: { using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { using TypeInfo = Attributes::MeasurementUnit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementMedium::Id: { using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LevelValue::Id: { using TypeInfo = Attributes::LevelValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id: { using namespace app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement; switch (aPath.mAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinMeasuredValue::Id: { using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxMeasuredValue::Id: { using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValue::Id: { using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValueWindow::Id: { using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::AverageMeasuredValueWindow::Id: { using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Uncertainty::Id: { using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { using TypeInfo = Attributes::MeasurementUnit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementMedium::Id: { using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LevelValue::Id: { using TypeInfo = Attributes::LevelValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::RadonConcentrationMeasurement::Id: { using namespace app::Clusters::RadonConcentrationMeasurement; switch (aPath.mAttributeId) { case Attributes::MeasuredValue::Id: { using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MinMeasuredValue::Id: { using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::MaxMeasuredValue::Id: { using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValue::Id: { using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PeakMeasuredValueWindow::Id: { using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AverageMeasuredValue::Id: { using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::AverageMeasuredValueWindow::Id: { using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Uncertainty::Id: { using TypeInfo = Attributes::Uncertainty::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementUnit::Id: { using TypeInfo = Attributes::MeasurementUnit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeasurementMedium::Id: { using TypeInfo = Attributes::MeasurementMedium::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LevelValue::Id: { using TypeInfo = Attributes::LevelValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::WiFiNetworkManagement::Id: { using namespace app::Clusters::WiFiNetworkManagement; switch (aPath.mAttributeId) { case Attributes::Ssid::Id: { using TypeInfo = Attributes::Ssid::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.Value().size())); env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.Value().size()), reinterpret_cast(cppValue.Value().data())); value = valueByteArray; } return value; } case Attributes::PassphraseSurrogate::Id: { using TypeInfo = Attributes::PassphraseSurrogate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ThreadBorderRouterManagement::Id: { using namespace app::Clusters::ThreadBorderRouterManagement; switch (aPath.mAttributeId) { case Attributes::BorderRouterName::Id: { using TypeInfo = Attributes::BorderRouterName::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::BorderAgentID::Id: { using TypeInfo = Attributes::BorderAgentID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.size())); env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.size()), reinterpret_cast(cppValue.data())); value = valueByteArray; return value; } case Attributes::ThreadVersion::Id: { using TypeInfo = Attributes::ThreadVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::InterfaceEnabled::Id: { using TypeInfo = Attributes::InterfaceEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ActiveDatasetTimestamp::Id: { using TypeInfo = Attributes::ActiveDatasetTimestamp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::PendingDatasetTimestamp::Id: { using TypeInfo = Attributes::PendingDatasetTimestamp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ThreadNetworkDirectory::Id: { using namespace app::Clusters::ThreadNetworkDirectory; switch (aPath.mAttributeId) { case Attributes::PreferredExtendedPanID::Id: { using TypeInfo = Attributes::PreferredExtendedPanID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.Value().size())); env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.Value().size()), reinterpret_cast(cppValue.Value().data())); value = valueByteArray; } return value; } case Attributes::ThreadNetworks::Id: { using TypeInfo = Attributes::ThreadNetworks::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_extendedPanID; jbyteArray newElement_0_extendedPanIDByteArray = env->NewByteArray(static_cast(entry_0.extendedPanID.size())); env->SetByteArrayRegion(newElement_0_extendedPanIDByteArray, 0, static_cast(entry_0.extendedPanID.size()), reinterpret_cast(entry_0.extendedPanID.data())); newElement_0_extendedPanID = newElement_0_extendedPanIDByteArray; jobject newElement_0_networkName; LogErrorOnFailure( chip::JniReferences::GetInstance().CharToStringUTF(entry_0.networkName, newElement_0_networkName)); jobject newElement_0_channel; std::string newElement_0_channelClassName = "java/lang/Integer"; std::string newElement_0_channelCtorSignature = "(I)V"; jint jninewElement_0_channel = static_cast(entry_0.channel); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_channelClassName.c_str(), newElement_0_channelCtorSignature.c_str(), jninewElement_0_channel, newElement_0_channel); jobject newElement_0_activeTimestamp; std::string newElement_0_activeTimestampClassName = "java/lang/Long"; std::string newElement_0_activeTimestampCtorSignature = "(J)V"; jlong jninewElement_0_activeTimestamp = static_cast(entry_0.activeTimestamp); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_activeTimestampClassName.c_str(), newElement_0_activeTimestampCtorSignature.c_str(), jninewElement_0_activeTimestamp, newElement_0_activeTimestamp); { jclass threadNetworkStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ThreadNetworkDirectoryClusterThreadNetworkStruct", threadNetworkStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDirectoryClusterThreadNetworkStruct"); return nullptr; } jmethodID threadNetworkStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, threadNetworkStructStructClass_1, "", "([BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/Long;)V", &threadNetworkStructStructCtor_1); if (err != CHIP_NO_ERROR || threadNetworkStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDirectoryClusterThreadNetworkStruct constructor"); return nullptr; } newElement_0 = env->NewObject(threadNetworkStructStructClass_1, threadNetworkStructStructCtor_1, newElement_0_extendedPanID, newElement_0_networkName, newElement_0_channel, newElement_0_activeTimestamp); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::ThreadNetworkTableSize::Id: { using TypeInfo = Attributes::ThreadNetworkTableSize::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::WakeOnLan::Id: { using namespace app::Clusters::WakeOnLan; switch (aPath.mAttributeId) { case Attributes::MACAddress::Id: { using TypeInfo = Attributes::MACAddress::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::LinkLocalAddress::Id: { using TypeInfo = Attributes::LinkLocalAddress::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.size())); env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.size()), reinterpret_cast(cppValue.data())); value = valueByteArray; return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::Channel::Id: { using namespace app::Clusters::Channel; switch (aPath.mAttributeId) { case Attributes::ChannelList::Id: { using TypeInfo = Attributes::ChannelList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_majorNumber; std::string newElement_0_majorNumberClassName = "java/lang/Integer"; std::string newElement_0_majorNumberCtorSignature = "(I)V"; jint jninewElement_0_majorNumber = static_cast(entry_0.majorNumber); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_majorNumberClassName.c_str(), newElement_0_majorNumberCtorSignature.c_str(), jninewElement_0_majorNumber, newElement_0_majorNumber); jobject newElement_0_minorNumber; std::string newElement_0_minorNumberClassName = "java/lang/Integer"; std::string newElement_0_minorNumberCtorSignature = "(I)V"; jint jninewElement_0_minorNumber = static_cast(entry_0.minorNumber); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minorNumberClassName.c_str(), newElement_0_minorNumberCtorSignature.c_str(), jninewElement_0_minorNumber, newElement_0_minorNumber); jobject newElement_0_name; if (!entry_0.name.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); } else { jobject newElement_0_nameInsideOptional; LogErrorOnFailure( chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); } jobject newElement_0_callSign; if (!entry_0.callSign.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_callSign); } else { jobject newElement_0_callSignInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.callSign.Value(), newElement_0_callSignInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_0_callSignInsideOptional, newElement_0_callSign); } jobject newElement_0_affiliateCallSign; if (!entry_0.affiliateCallSign.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_affiliateCallSign); } else { jobject newElement_0_affiliateCallSignInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( entry_0.affiliateCallSign.Value(), newElement_0_affiliateCallSignInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_0_affiliateCallSignInsideOptional, newElement_0_affiliateCallSign); } jobject newElement_0_identifier; if (!entry_0.identifier.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_identifier); } else { jobject newElement_0_identifierInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.identifier.Value(), newElement_0_identifierInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_0_identifierInsideOptional, newElement_0_identifier); } jobject newElement_0_type; if (!entry_0.type.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_type); } else { jobject newElement_0_typeInsideOptional; std::string newElement_0_typeInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_typeInsideOptionalCtorSignature = "(I)V"; jint jninewElement_0_typeInsideOptional = static_cast(entry_0.type.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_typeInsideOptionalClassName.c_str(), newElement_0_typeInsideOptionalCtorSignature.c_str(), jninewElement_0_typeInsideOptional, newElement_0_typeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_typeInsideOptional, newElement_0_type); } { jclass channelInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfoStruct", channelInfoStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfoStruct"); return nullptr; } jmethodID channelInfoStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, channelInfoStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/" "util/Optional;Ljava/util/Optional;)V", &channelInfoStructStructCtor_1); if (err != CHIP_NO_ERROR || channelInfoStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfoStruct constructor"); return nullptr; } newElement_0 = env->NewObject(channelInfoStructStructClass_1, channelInfoStructStructCtor_1, newElement_0_majorNumber, newElement_0_minorNumber, newElement_0_name, newElement_0_callSign, newElement_0_affiliateCallSign, newElement_0_identifier, newElement_0_type); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::Lineup::Id: { using TypeInfo = Attributes::Lineup::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_operatorName; LogErrorOnFailure( chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().operatorName, value_operatorName)); jobject value_lineupName; if (!cppValue.Value().lineupName.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_lineupName); } else { jobject value_lineupNameInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().lineupName.Value(), value_lineupNameInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(value_lineupNameInsideOptional, value_lineupName); } jobject value_postalCode; if (!cppValue.Value().postalCode.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_postalCode); } else { jobject value_postalCodeInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().postalCode.Value(), value_postalCodeInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(value_postalCodeInsideOptional, value_postalCode); } jobject value_lineupInfoType; std::string value_lineupInfoTypeClassName = "java/lang/Integer"; std::string value_lineupInfoTypeCtorSignature = "(I)V"; jint jnivalue_lineupInfoType = static_cast(cppValue.Value().lineupInfoType); chip::JniReferences::GetInstance().CreateBoxedObject(value_lineupInfoTypeClassName.c_str(), value_lineupInfoTypeCtorSignature.c_str(), jnivalue_lineupInfoType, value_lineupInfoType); { jclass lineupInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ChannelClusterLineupInfoStruct", lineupInfoStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterLineupInfoStruct"); return nullptr; } jmethodID lineupInfoStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, lineupInfoStructStructClass_1, "", "(Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V", &lineupInfoStructStructCtor_1); if (err != CHIP_NO_ERROR || lineupInfoStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterLineupInfoStruct constructor"); return nullptr; } value = env->NewObject(lineupInfoStructStructClass_1, lineupInfoStructStructCtor_1, value_operatorName, value_lineupName, value_postalCode, value_lineupInfoType); } } return value; } case Attributes::CurrentChannel::Id: { using TypeInfo = Attributes::CurrentChannel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_majorNumber; std::string value_majorNumberClassName = "java/lang/Integer"; std::string value_majorNumberCtorSignature = "(I)V"; jint jnivalue_majorNumber = static_cast(cppValue.Value().majorNumber); chip::JniReferences::GetInstance().CreateBoxedObject(value_majorNumberClassName.c_str(), value_majorNumberCtorSignature.c_str(), jnivalue_majorNumber, value_majorNumber); jobject value_minorNumber; std::string value_minorNumberClassName = "java/lang/Integer"; std::string value_minorNumberCtorSignature = "(I)V"; jint jnivalue_minorNumber = static_cast(cppValue.Value().minorNumber); chip::JniReferences::GetInstance().CreateBoxedObject(value_minorNumberClassName.c_str(), value_minorNumberCtorSignature.c_str(), jnivalue_minorNumber, value_minorNumber); jobject value_name; if (!cppValue.Value().name.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_name); } else { jobject value_nameInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().name.Value(), value_nameInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(value_nameInsideOptional, value_name); } jobject value_callSign; if (!cppValue.Value().callSign.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_callSign); } else { jobject value_callSignInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().callSign.Value(), value_callSignInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(value_callSignInsideOptional, value_callSign); } jobject value_affiliateCallSign; if (!cppValue.Value().affiliateCallSign.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_affiliateCallSign); } else { jobject value_affiliateCallSignInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().affiliateCallSign.Value(), value_affiliateCallSignInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(value_affiliateCallSignInsideOptional, value_affiliateCallSign); } jobject value_identifier; if (!cppValue.Value().identifier.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_identifier); } else { jobject value_identifierInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().identifier.Value(), value_identifierInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(value_identifierInsideOptional, value_identifier); } jobject value_type; if (!cppValue.Value().type.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_type); } else { jobject value_typeInsideOptional; std::string value_typeInsideOptionalClassName = "java/lang/Integer"; std::string value_typeInsideOptionalCtorSignature = "(I)V"; jint jnivalue_typeInsideOptional = static_cast(cppValue.Value().type.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_typeInsideOptionalClassName.c_str(), value_typeInsideOptionalCtorSignature.c_str(), jnivalue_typeInsideOptional, value_typeInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_typeInsideOptional, value_type); } { jclass channelInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfoStruct", channelInfoStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfoStruct"); return nullptr; } jmethodID channelInfoStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, channelInfoStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/" "util/Optional;Ljava/util/Optional;)V", &channelInfoStructStructCtor_1); if (err != CHIP_NO_ERROR || channelInfoStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfoStruct constructor"); return nullptr; } value = env->NewObject(channelInfoStructStructClass_1, channelInfoStructStructCtor_1, value_majorNumber, value_minorNumber, value_name, value_callSign, value_affiliateCallSign, value_identifier, value_type); } } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::TargetNavigator::Id: { using namespace app::Clusters::TargetNavigator; switch (aPath.mAttributeId) { case Attributes::TargetList::Id: { using TypeInfo = Attributes::TargetList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_identifier; std::string newElement_0_identifierClassName = "java/lang/Integer"; std::string newElement_0_identifierCtorSignature = "(I)V"; jint jninewElement_0_identifier = static_cast(entry_0.identifier); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_identifierClassName.c_str(), newElement_0_identifierCtorSignature.c_str(), jninewElement_0_identifier, newElement_0_identifier); jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); { jclass targetInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$TargetNavigatorClusterTargetInfoStruct", targetInfoStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$TargetNavigatorClusterTargetInfoStruct"); return nullptr; } jmethodID targetInfoStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, targetInfoStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V", &targetInfoStructStructCtor_1); if (err != CHIP_NO_ERROR || targetInfoStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$TargetNavigatorClusterTargetInfoStruct constructor"); return nullptr; } newElement_0 = env->NewObject(targetInfoStructStructClass_1, targetInfoStructStructCtor_1, newElement_0_identifier, newElement_0_name); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentTarget::Id: { using TypeInfo = Attributes::CurrentTarget::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::MediaPlayback::Id: { using namespace app::Clusters::MediaPlayback; switch (aPath.mAttributeId) { case Attributes::CurrentState::Id: { using TypeInfo = Attributes::CurrentState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::StartTime::Id: { using TypeInfo = Attributes::StartTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::Duration::Id: { using TypeInfo = Attributes::Duration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::SampledPosition::Id: { using TypeInfo = Attributes::SampledPosition::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_updatedAt; std::string value_updatedAtClassName = "java/lang/Long"; std::string value_updatedAtCtorSignature = "(J)V"; jlong jnivalue_updatedAt = static_cast(cppValue.Value().updatedAt); chip::JniReferences::GetInstance().CreateBoxedObject( value_updatedAtClassName.c_str(), value_updatedAtCtorSignature.c_str(), jnivalue_updatedAt, value_updatedAt); jobject value_position; if (cppValue.Value().position.IsNull()) { value_position = nullptr; } else { std::string value_positionClassName = "java/lang/Long"; std::string value_positionCtorSignature = "(J)V"; jlong jnivalue_position = static_cast(cppValue.Value().position.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_positionClassName.c_str(), value_positionCtorSignature.c_str(), jnivalue_position, value_position); } { jclass playbackPositionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterPlaybackPositionStruct", playbackPositionStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterPlaybackPositionStruct"); return nullptr; } jmethodID playbackPositionStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, playbackPositionStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Long;)V", &playbackPositionStructStructCtor_1); if (err != CHIP_NO_ERROR || playbackPositionStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterPlaybackPositionStruct constructor"); return nullptr; } value = env->NewObject(playbackPositionStructStructClass_1, playbackPositionStructStructCtor_1, value_updatedAt, value_position); } } return value; } case Attributes::PlaybackSpeed::Id: { using TypeInfo = Attributes::PlaybackSpeed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SeekRangeEnd::Id: { using TypeInfo = Attributes::SeekRangeEnd::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::SeekRangeStart::Id: { using TypeInfo = Attributes::SeekRangeStart::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::ActiveAudioTrack::Id: { using TypeInfo = Attributes::ActiveAudioTrack::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_id; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().id, value_id)); jobject value_trackAttributes; if (cppValue.Value().trackAttributes.IsNull()) { value_trackAttributes = nullptr; } else { jobject value_trackAttributes_languageCode; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( cppValue.Value().trackAttributes.Value().languageCode, value_trackAttributes_languageCode)); jobject value_trackAttributes_displayName; if (!cppValue.Value().trackAttributes.Value().displayName.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_trackAttributes_displayName); } else { jobject value_trackAttributes_displayNameInsideOptional; if (cppValue.Value().trackAttributes.Value().displayName.Value().IsNull()) { value_trackAttributes_displayNameInsideOptional = nullptr; } else { LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( cppValue.Value().trackAttributes.Value().displayName.Value().Value(), value_trackAttributes_displayNameInsideOptional)); } chip::JniReferences::GetInstance().CreateOptional(value_trackAttributes_displayNameInsideOptional, value_trackAttributes_displayName); } { jclass trackAttributesStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", trackAttributesStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); return nullptr; } jmethodID trackAttributesStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_3, "", "(Ljava/lang/String;Ljava/util/Optional;)V", &trackAttributesStructStructCtor_3); if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); return nullptr; } value_trackAttributes = env->NewObject(trackAttributesStructStructClass_3, trackAttributesStructStructCtor_3, value_trackAttributes_languageCode, value_trackAttributes_displayName); } } { jclass trackStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); return nullptr; } jmethodID trackStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, trackStructStructClass_1, "", "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V", &trackStructStructCtor_1); if (err != CHIP_NO_ERROR || trackStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); return nullptr; } value = env->NewObject(trackStructStructClass_1, trackStructStructCtor_1, value_id, value_trackAttributes); } } return value; } case Attributes::AvailableAudioTracks::Id: { using TypeInfo = Attributes::AvailableAudioTracks::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_1 = cppValue.Value().begin(); while (iter_value_1.Next()) { auto & entry_1 = iter_value_1.GetValue(); jobject newElement_1; jobject newElement_1_id; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.id, newElement_1_id)); jobject newElement_1_trackAttributes; if (entry_1.trackAttributes.IsNull()) { newElement_1_trackAttributes = nullptr; } else { jobject newElement_1_trackAttributes_languageCode; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( entry_1.trackAttributes.Value().languageCode, newElement_1_trackAttributes_languageCode)); jobject newElement_1_trackAttributes_displayName; if (!entry_1.trackAttributes.Value().displayName.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_trackAttributes_displayName); } else { jobject newElement_1_trackAttributes_displayNameInsideOptional; if (entry_1.trackAttributes.Value().displayName.Value().IsNull()) { newElement_1_trackAttributes_displayNameInsideOptional = nullptr; } else { LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( entry_1.trackAttributes.Value().displayName.Value().Value(), newElement_1_trackAttributes_displayNameInsideOptional)); } chip::JniReferences::GetInstance().CreateOptional( newElement_1_trackAttributes_displayNameInsideOptional, newElement_1_trackAttributes_displayName); } { jclass trackAttributesStructStructClass_4; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", trackAttributesStructStructClass_4); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); return nullptr; } jmethodID trackAttributesStructStructCtor_4; err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_4, "", "(Ljava/lang/String;Ljava/util/Optional;)V", &trackAttributesStructStructCtor_4); if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_4 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); return nullptr; } newElement_1_trackAttributes = env->NewObject(trackAttributesStructStructClass_4, trackAttributesStructStructCtor_4, newElement_1_trackAttributes_languageCode, newElement_1_trackAttributes_displayName); } } { jclass trackStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_2); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); return nullptr; } jmethodID trackStructStructCtor_2; err = chip::JniReferences::GetInstance().FindMethod( env, trackStructStructClass_2, "", "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V", &trackStructStructCtor_2); if (err != CHIP_NO_ERROR || trackStructStructCtor_2 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); return nullptr; } newElement_1 = env->NewObject(trackStructStructClass_2, trackStructStructCtor_2, newElement_1_id, newElement_1_trackAttributes); } chip::JniReferences::GetInstance().AddToList(value, newElement_1); } } return value; } case Attributes::ActiveTextTrack::Id: { using TypeInfo = Attributes::ActiveTextTrack::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_id; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().id, value_id)); jobject value_trackAttributes; if (cppValue.Value().trackAttributes.IsNull()) { value_trackAttributes = nullptr; } else { jobject value_trackAttributes_languageCode; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( cppValue.Value().trackAttributes.Value().languageCode, value_trackAttributes_languageCode)); jobject value_trackAttributes_displayName; if (!cppValue.Value().trackAttributes.Value().displayName.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_trackAttributes_displayName); } else { jobject value_trackAttributes_displayNameInsideOptional; if (cppValue.Value().trackAttributes.Value().displayName.Value().IsNull()) { value_trackAttributes_displayNameInsideOptional = nullptr; } else { LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( cppValue.Value().trackAttributes.Value().displayName.Value().Value(), value_trackAttributes_displayNameInsideOptional)); } chip::JniReferences::GetInstance().CreateOptional(value_trackAttributes_displayNameInsideOptional, value_trackAttributes_displayName); } { jclass trackAttributesStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", trackAttributesStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); return nullptr; } jmethodID trackAttributesStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_3, "", "(Ljava/lang/String;Ljava/util/Optional;)V", &trackAttributesStructStructCtor_3); if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); return nullptr; } value_trackAttributes = env->NewObject(trackAttributesStructStructClass_3, trackAttributesStructStructCtor_3, value_trackAttributes_languageCode, value_trackAttributes_displayName); } } { jclass trackStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); return nullptr; } jmethodID trackStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, trackStructStructClass_1, "", "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V", &trackStructStructCtor_1); if (err != CHIP_NO_ERROR || trackStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); return nullptr; } value = env->NewObject(trackStructStructClass_1, trackStructStructCtor_1, value_id, value_trackAttributes); } } return value; } case Attributes::AvailableTextTracks::Id: { using TypeInfo = Attributes::AvailableTextTracks::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_1 = cppValue.Value().begin(); while (iter_value_1.Next()) { auto & entry_1 = iter_value_1.GetValue(); jobject newElement_1; jobject newElement_1_id; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.id, newElement_1_id)); jobject newElement_1_trackAttributes; if (entry_1.trackAttributes.IsNull()) { newElement_1_trackAttributes = nullptr; } else { jobject newElement_1_trackAttributes_languageCode; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( entry_1.trackAttributes.Value().languageCode, newElement_1_trackAttributes_languageCode)); jobject newElement_1_trackAttributes_displayName; if (!entry_1.trackAttributes.Value().displayName.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_trackAttributes_displayName); } else { jobject newElement_1_trackAttributes_displayNameInsideOptional; if (entry_1.trackAttributes.Value().displayName.Value().IsNull()) { newElement_1_trackAttributes_displayNameInsideOptional = nullptr; } else { LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( entry_1.trackAttributes.Value().displayName.Value().Value(), newElement_1_trackAttributes_displayNameInsideOptional)); } chip::JniReferences::GetInstance().CreateOptional( newElement_1_trackAttributes_displayNameInsideOptional, newElement_1_trackAttributes_displayName); } { jclass trackAttributesStructStructClass_4; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", trackAttributesStructStructClass_4); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); return nullptr; } jmethodID trackAttributesStructStructCtor_4; err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_4, "", "(Ljava/lang/String;Ljava/util/Optional;)V", &trackAttributesStructStructCtor_4); if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_4 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); return nullptr; } newElement_1_trackAttributes = env->NewObject(trackAttributesStructStructClass_4, trackAttributesStructStructCtor_4, newElement_1_trackAttributes_languageCode, newElement_1_trackAttributes_displayName); } } { jclass trackStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_2); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); return nullptr; } jmethodID trackStructStructCtor_2; err = chip::JniReferences::GetInstance().FindMethod( env, trackStructStructClass_2, "", "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V", &trackStructStructCtor_2); if (err != CHIP_NO_ERROR || trackStructStructCtor_2 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); return nullptr; } newElement_1 = env->NewObject(trackStructStructClass_2, trackStructStructCtor_2, newElement_1_id, newElement_1_trackAttributes); } chip::JniReferences::GetInstance().AddToList(value, newElement_1); } } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::MediaInput::Id: { using namespace app::Clusters::MediaInput; switch (aPath.mAttributeId) { case Attributes::InputList::Id: { using TypeInfo = Attributes::InputList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_index; std::string newElement_0_indexClassName = "java/lang/Integer"; std::string newElement_0_indexCtorSignature = "(I)V"; jint jninewElement_0_index = static_cast(entry_0.index); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_indexClassName.c_str(), newElement_0_indexCtorSignature.c_str(), jninewElement_0_index, newElement_0_index); jobject newElement_0_inputType; std::string newElement_0_inputTypeClassName = "java/lang/Integer"; std::string newElement_0_inputTypeCtorSignature = "(I)V"; jint jninewElement_0_inputType = static_cast(entry_0.inputType); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_inputTypeClassName.c_str(), newElement_0_inputTypeCtorSignature.c_str(), jninewElement_0_inputType, newElement_0_inputType); jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); jobject newElement_0_description; LogErrorOnFailure( chip::JniReferences::GetInstance().CharToStringUTF(entry_0.description, newElement_0_description)); { jclass inputInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$MediaInputClusterInputInfoStruct", inputInfoStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$MediaInputClusterInputInfoStruct"); return nullptr; } jmethodID inputInfoStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, inputInfoStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;)V", &inputInfoStructStructCtor_1); if (err != CHIP_NO_ERROR || inputInfoStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$MediaInputClusterInputInfoStruct constructor"); return nullptr; } newElement_0 = env->NewObject(inputInfoStructStructClass_1, inputInfoStructStructCtor_1, newElement_0_index, newElement_0_inputType, newElement_0_name, newElement_0_description); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentInput::Id: { using TypeInfo = Attributes::CurrentInput::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::LowPower::Id: { using namespace app::Clusters::LowPower; switch (aPath.mAttributeId) { case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::KeypadInput::Id: { using namespace app::Clusters::KeypadInput; switch (aPath.mAttributeId) { case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ContentLauncher::Id: { using namespace app::Clusters::ContentLauncher; switch (aPath.mAttributeId) { case Attributes::AcceptHeader::Id: { using TypeInfo = Attributes::AcceptHeader::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::SupportedStreamingProtocols::Id: { using TypeInfo = Attributes::SupportedStreamingProtocols::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::AudioOutput::Id: { using namespace app::Clusters::AudioOutput; switch (aPath.mAttributeId) { case Attributes::OutputList::Id: { using TypeInfo = Attributes::OutputList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_index; std::string newElement_0_indexClassName = "java/lang/Integer"; std::string newElement_0_indexCtorSignature = "(I)V"; jint jninewElement_0_index = static_cast(entry_0.index); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_indexClassName.c_str(), newElement_0_indexCtorSignature.c_str(), jninewElement_0_index, newElement_0_index); jobject newElement_0_outputType; std::string newElement_0_outputTypeClassName = "java/lang/Integer"; std::string newElement_0_outputTypeCtorSignature = "(I)V"; jint jninewElement_0_outputType = static_cast(entry_0.outputType); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_outputTypeClassName.c_str(), newElement_0_outputTypeCtorSignature.c_str(), jninewElement_0_outputType, newElement_0_outputType); jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); { jclass outputInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$AudioOutputClusterOutputInfoStruct", outputInfoStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$AudioOutputClusterOutputInfoStruct"); return nullptr; } jmethodID outputInfoStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, outputInfoStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V", &outputInfoStructStructCtor_1); if (err != CHIP_NO_ERROR || outputInfoStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$AudioOutputClusterOutputInfoStruct constructor"); return nullptr; } newElement_0 = env->NewObject(outputInfoStructStructClass_1, outputInfoStructStructCtor_1, newElement_0_index, newElement_0_outputType, newElement_0_name); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentOutput::Id: { using TypeInfo = Attributes::CurrentOutput::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ApplicationLauncher::Id: { using namespace app::Clusters::ApplicationLauncher; switch (aPath.mAttributeId) { case Attributes::CatalogList::Id: { using TypeInfo = Attributes::CatalogList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentApp::Id: { using TypeInfo = Attributes::CurrentApp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_application; jobject value_application_catalogVendorID; std::string value_application_catalogVendorIDClassName = "java/lang/Integer"; std::string value_application_catalogVendorIDCtorSignature = "(I)V"; jint jnivalue_application_catalogVendorID = static_cast(cppValue.Value().application.catalogVendorID); chip::JniReferences::GetInstance().CreateBoxedObject( value_application_catalogVendorIDClassName.c_str(), value_application_catalogVendorIDCtorSignature.c_str(), jnivalue_application_catalogVendorID, value_application_catalogVendorID); jobject value_application_applicationID; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().application.applicationID, value_application_applicationID)); { jclass applicationStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationStruct", applicationStructStructClass_2); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationLauncherClusterApplicationStruct"); return nullptr; } jmethodID applicationStructStructCtor_2; err = chip::JniReferences::GetInstance().FindMethod(env, applicationStructStructClass_2, "", "(Ljava/lang/Integer;Ljava/lang/String;)V", &applicationStructStructCtor_2); if (err != CHIP_NO_ERROR || applicationStructStructCtor_2 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ApplicationLauncherClusterApplicationStruct constructor"); return nullptr; } value_application = env->NewObject(applicationStructStructClass_2, applicationStructStructCtor_2, value_application_catalogVendorID, value_application_applicationID); } jobject value_endpoint; if (!cppValue.Value().endpoint.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endpoint); } else { jobject value_endpointInsideOptional; std::string value_endpointInsideOptionalClassName = "java/lang/Integer"; std::string value_endpointInsideOptionalCtorSignature = "(I)V"; jint jnivalue_endpointInsideOptional = static_cast(cppValue.Value().endpoint.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_endpointInsideOptionalClassName.c_str(), value_endpointInsideOptionalCtorSignature.c_str(), jnivalue_endpointInsideOptional, value_endpointInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_endpointInsideOptional, value_endpoint); } { jclass applicationEPStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationEPStruct", applicationEPStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationLauncherClusterApplicationEPStruct"); return nullptr; } jmethodID applicationEPStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, applicationEPStructStructClass_1, "", "(Lchip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationStruct;Ljava/util/Optional;)V", &applicationEPStructStructCtor_1); if (err != CHIP_NO_ERROR || applicationEPStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ApplicationLauncherClusterApplicationEPStruct constructor"); return nullptr; } value = env->NewObject(applicationEPStructStructClass_1, applicationEPStructStructCtor_1, value_application, value_endpoint); } } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ApplicationBasic::Id: { using namespace app::Clusters::ApplicationBasic; switch (aPath.mAttributeId) { case Attributes::VendorName::Id: { using TypeInfo = Attributes::VendorName::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::VendorID::Id: { using TypeInfo = Attributes::VendorID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ApplicationName::Id: { using TypeInfo = Attributes::ApplicationName::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::ProductID::Id: { using TypeInfo = Attributes::ProductID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Application::Id: { using TypeInfo = Attributes::Application::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_catalogVendorID; std::string value_catalogVendorIDClassName = "java/lang/Integer"; std::string value_catalogVendorIDCtorSignature = "(I)V"; jint jnivalue_catalogVendorID = static_cast(cppValue.catalogVendorID); chip::JniReferences::GetInstance().CreateBoxedObject(value_catalogVendorIDClassName.c_str(), value_catalogVendorIDCtorSignature.c_str(), jnivalue_catalogVendorID, value_catalogVendorID); jobject value_applicationID; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.applicationID, value_applicationID)); { jclass applicationStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ApplicationBasicClusterApplicationStruct", applicationStructStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationBasicClusterApplicationStruct"); return nullptr; } jmethodID applicationStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod(env, applicationStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/lang/String;)V", &applicationStructStructCtor_0); if (err != CHIP_NO_ERROR || applicationStructStructCtor_0 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ApplicationBasicClusterApplicationStruct constructor"); return nullptr; } value = env->NewObject(applicationStructStructClass_0, applicationStructStructCtor_0, value_catalogVendorID, value_applicationID); } return value; } case Attributes::Status::Id: { using TypeInfo = Attributes::Status::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ApplicationVersion::Id: { using TypeInfo = Attributes::ApplicationVersion::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::AllowedVendorList::Id: { using TypeInfo = Attributes::AllowedVendorList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::AccountLogin::Id: { using namespace app::Clusters::AccountLogin; switch (aPath.mAttributeId) { case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ContentControl::Id: { using namespace app::Clusters::ContentControl; switch (aPath.mAttributeId) { case Attributes::Enabled::Id: { using TypeInfo = Attributes::Enabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::OnDemandRatings::Id: { using TypeInfo = Attributes::OnDemandRatings::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_ratingName; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.ratingName, newElement_0_ratingName)); jobject newElement_0_ratingNameDesc; if (!entry_0.ratingNameDesc.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_ratingNameDesc); } else { jobject newElement_0_ratingNameDescInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( entry_0.ratingNameDesc.Value(), newElement_0_ratingNameDescInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_0_ratingNameDescInsideOptional, newElement_0_ratingNameDesc); } { jclass ratingNameStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ContentControlClusterRatingNameStruct", ratingNameStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ContentControlClusterRatingNameStruct"); return nullptr; } jmethodID ratingNameStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, ratingNameStructStructClass_1, "", "(Ljava/lang/String;Ljava/util/Optional;)V", &ratingNameStructStructCtor_1); if (err != CHIP_NO_ERROR || ratingNameStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ContentControlClusterRatingNameStruct constructor"); return nullptr; } newElement_0 = env->NewObject(ratingNameStructStructClass_1, ratingNameStructStructCtor_1, newElement_0_ratingName, newElement_0_ratingNameDesc); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::OnDemandRatingThreshold::Id: { using TypeInfo = Attributes::OnDemandRatingThreshold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::ScheduledContentRatings::Id: { using TypeInfo = Attributes::ScheduledContentRatings::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_ratingName; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.ratingName, newElement_0_ratingName)); jobject newElement_0_ratingNameDesc; if (!entry_0.ratingNameDesc.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_ratingNameDesc); } else { jobject newElement_0_ratingNameDescInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( entry_0.ratingNameDesc.Value(), newElement_0_ratingNameDescInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_0_ratingNameDescInsideOptional, newElement_0_ratingNameDesc); } { jclass ratingNameStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ContentControlClusterRatingNameStruct", ratingNameStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ContentControlClusterRatingNameStruct"); return nullptr; } jmethodID ratingNameStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, ratingNameStructStructClass_1, "", "(Ljava/lang/String;Ljava/util/Optional;)V", &ratingNameStructStructCtor_1); if (err != CHIP_NO_ERROR || ratingNameStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ContentControlClusterRatingNameStruct constructor"); return nullptr; } newElement_0 = env->NewObject(ratingNameStructStructClass_1, ratingNameStructStructCtor_1, newElement_0_ratingName, newElement_0_ratingNameDesc); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::ScheduledContentRatingThreshold::Id: { using TypeInfo = Attributes::ScheduledContentRatingThreshold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::ScreenDailyTime::Id: { using TypeInfo = Attributes::ScreenDailyTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RemainingScreenTime::Id: { using TypeInfo = Attributes::RemainingScreenTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::BlockUnrated::Id: { using TypeInfo = Attributes::BlockUnrated::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ContentAppObserver::Id: { using namespace app::Clusters::ContentAppObserver; switch (aPath.mAttributeId) { case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::ZoneManagement::Id: { using namespace app::Clusters::ZoneManagement; switch (aPath.mAttributeId) { case Attributes::SupportedZoneSources::Id: { using TypeInfo = Attributes::SupportedZoneSources::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::Zones::Id: { using TypeInfo = Attributes::Zones::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_zoneID; std::string newElement_0_zoneIDClassName = "java/lang/Integer"; std::string newElement_0_zoneIDCtorSignature = "(I)V"; jint jninewElement_0_zoneID = static_cast(entry_0.zoneID); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_zoneIDClassName.c_str(), newElement_0_zoneIDCtorSignature.c_str(), jninewElement_0_zoneID, newElement_0_zoneID); jobject newElement_0_zoneType; std::string newElement_0_zoneTypeClassName = "java/lang/Integer"; std::string newElement_0_zoneTypeCtorSignature = "(I)V"; jint jninewElement_0_zoneType = static_cast(entry_0.zoneType); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_zoneTypeClassName.c_str(), newElement_0_zoneTypeCtorSignature.c_str(), jninewElement_0_zoneType, newElement_0_zoneType); jobject newElement_0_zoneSource; std::string newElement_0_zoneSourceClassName = "java/lang/Integer"; std::string newElement_0_zoneSourceCtorSignature = "(I)V"; jint jninewElement_0_zoneSource = static_cast(entry_0.zoneSource); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_zoneSourceClassName.c_str(), newElement_0_zoneSourceCtorSignature.c_str(), jninewElement_0_zoneSource, newElement_0_zoneSource); { jclass zoneInformationStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ZoneManagementClusterZoneInformationStruct", zoneInformationStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ZoneManagementClusterZoneInformationStruct"); return nullptr; } jmethodID zoneInformationStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, zoneInformationStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &zoneInformationStructStructCtor_1); if (err != CHIP_NO_ERROR || zoneInformationStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ZoneManagementClusterZoneInformationStruct constructor"); return nullptr; } newElement_0 = env->NewObject(zoneInformationStructStructClass_1, zoneInformationStructStructCtor_1, newElement_0_zoneID, newElement_0_zoneType, newElement_0_zoneSource); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::TimeControl::Id: { using TypeInfo = Attributes::TimeControl::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_initialDuration; std::string newElement_0_initialDurationClassName = "java/lang/Integer"; std::string newElement_0_initialDurationCtorSignature = "(I)V"; jint jninewElement_0_initialDuration = static_cast(entry_0.initialDuration); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_initialDurationClassName.c_str(), newElement_0_initialDurationCtorSignature.c_str(), jninewElement_0_initialDuration, newElement_0_initialDuration); jobject newElement_0_augmentationDuration; std::string newElement_0_augmentationDurationClassName = "java/lang/Integer"; std::string newElement_0_augmentationDurationCtorSignature = "(I)V"; jint jninewElement_0_augmentationDuration = static_cast(entry_0.augmentationDuration); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_augmentationDurationClassName.c_str(), newElement_0_augmentationDurationCtorSignature.c_str(), jninewElement_0_augmentationDuration, newElement_0_augmentationDuration); jobject newElement_0_maxDuration; std::string newElement_0_maxDurationClassName = "java/lang/Long"; std::string newElement_0_maxDurationCtorSignature = "(J)V"; jlong jninewElement_0_maxDuration = static_cast(entry_0.maxDuration); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_maxDurationClassName.c_str(), newElement_0_maxDurationCtorSignature.c_str(), jninewElement_0_maxDuration, newElement_0_maxDuration); jobject newElement_0_blindDuration; std::string newElement_0_blindDurationClassName = "java/lang/Integer"; std::string newElement_0_blindDurationCtorSignature = "(I)V"; jint jninewElement_0_blindDuration = static_cast(entry_0.blindDuration); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_blindDurationClassName.c_str(), newElement_0_blindDurationCtorSignature.c_str(), jninewElement_0_blindDuration, newElement_0_blindDuration); { jclass zoneTriggeringTimeControlStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ZoneManagementClusterZoneTriggeringTimeControlStruct", zoneTriggeringTimeControlStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ZoneManagementClusterZoneTriggeringTimeControlStruct"); return nullptr; } jmethodID zoneTriggeringTimeControlStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, zoneTriggeringTimeControlStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;)V", &zoneTriggeringTimeControlStructStructCtor_1); if (err != CHIP_NO_ERROR || zoneTriggeringTimeControlStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ZoneManagementClusterZoneTriggeringTimeControlStruct constructor"); return nullptr; } newElement_0 = env->NewObject(zoneTriggeringTimeControlStructStructClass_1, zoneTriggeringTimeControlStructStructCtor_1, newElement_0_initialDuration, newElement_0_augmentationDuration, newElement_0_maxDuration, newElement_0_blindDuration); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::Sensitivity::Id: { using TypeInfo = Attributes::Sensitivity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::CameraAvStreamManagement::Id: { using namespace app::Clusters::CameraAvStreamManagement; switch (aPath.mAttributeId) { case Attributes::MaxConcurrentVideoEncoders::Id: { using TypeInfo = Attributes::MaxConcurrentVideoEncoders::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MaxEncodedPixelRate::Id: { using TypeInfo = Attributes::MaxEncodedPixelRate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::VideoSensorParams::Id: { using TypeInfo = Attributes::VideoSensorParams::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_sensorWidth; std::string value_sensorWidthClassName = "java/lang/Integer"; std::string value_sensorWidthCtorSignature = "(I)V"; jint jnivalue_sensorWidth = static_cast(cppValue.sensorWidth); chip::JniReferences::GetInstance().CreateBoxedObject(value_sensorWidthClassName.c_str(), value_sensorWidthCtorSignature.c_str(), jnivalue_sensorWidth, value_sensorWidth); jobject value_sensorHeight; std::string value_sensorHeightClassName = "java/lang/Integer"; std::string value_sensorHeightCtorSignature = "(I)V"; jint jnivalue_sensorHeight = static_cast(cppValue.sensorHeight); chip::JniReferences::GetInstance().CreateBoxedObject(value_sensorHeightClassName.c_str(), value_sensorHeightCtorSignature.c_str(), jnivalue_sensorHeight, value_sensorHeight); jobject value_HDRCapable; std::string value_HDRCapableClassName = "java/lang/Boolean"; std::string value_HDRCapableCtorSignature = "(Z)V"; jboolean jnivalue_HDRCapable = static_cast(cppValue.HDRCapable); chip::JniReferences::GetInstance().CreateBoxedObject( value_HDRCapableClassName.c_str(), value_HDRCapableCtorSignature.c_str(), jnivalue_HDRCapable, value_HDRCapable); jobject value_maxFPS; std::string value_maxFPSClassName = "java/lang/Integer"; std::string value_maxFPSCtorSignature = "(I)V"; jint jnivalue_maxFPS = static_cast(cppValue.maxFPS); chip::JniReferences::GetInstance().CreateBoxedObject( value_maxFPSClassName.c_str(), value_maxFPSCtorSignature.c_str(), jnivalue_maxFPS, value_maxFPS); jobject value_maxHDRFPS; std::string value_maxHDRFPSClassName = "java/lang/Integer"; std::string value_maxHDRFPSCtorSignature = "(I)V"; jint jnivalue_maxHDRFPS = static_cast(cppValue.maxHDRFPS); chip::JniReferences::GetInstance().CreateBoxedObject( value_maxHDRFPSClassName.c_str(), value_maxHDRFPSCtorSignature.c_str(), jnivalue_maxHDRFPS, value_maxHDRFPS); { jclass videoSensorParamsStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoSensorParamsStruct", videoSensorParamsStructStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoSensorParamsStruct"); return nullptr; } jmethodID videoSensorParamsStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod( env, videoSensorParamsStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;)V", &videoSensorParamsStructStructCtor_0); if (err != CHIP_NO_ERROR || videoSensorParamsStructStructCtor_0 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterVideoSensorParamsStruct constructor"); return nullptr; } value = env->NewObject(videoSensorParamsStructStructClass_0, videoSensorParamsStructStructCtor_0, value_sensorWidth, value_sensorHeight, value_HDRCapable, value_maxFPS, value_maxHDRFPS); } return value; } case Attributes::NightVisionCapable::Id: { using TypeInfo = Attributes::NightVisionCapable::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MinViewport::Id: { using TypeInfo = Attributes::MinViewport::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_width; std::string value_widthClassName = "java/lang/Integer"; std::string value_widthCtorSignature = "(I)V"; jint jnivalue_width = static_cast(cppValue.width); chip::JniReferences::GetInstance().CreateBoxedObject( value_widthClassName.c_str(), value_widthCtorSignature.c_str(), jnivalue_width, value_width); jobject value_height; std::string value_heightClassName = "java/lang/Integer"; std::string value_heightCtorSignature = "(I)V"; jint jnivalue_height = static_cast(cppValue.height); chip::JniReferences::GetInstance().CreateBoxedObject( value_heightClassName.c_str(), value_heightCtorSignature.c_str(), jnivalue_height, value_height); { jclass videoResolutionStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", videoResolutionStructStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); return nullptr; } jmethodID videoResolutionStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &videoResolutionStructStructCtor_0); if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_0 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); return nullptr; } value = env->NewObject(videoResolutionStructStructClass_0, videoResolutionStructStructCtor_0, value_width, value_height); } return value; } case Attributes::RateDistortionTradeOffPoints::Id: { using TypeInfo = Attributes::RateDistortionTradeOffPoints::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_codec; std::string newElement_0_codecClassName = "java/lang/Integer"; std::string newElement_0_codecCtorSignature = "(I)V"; jint jninewElement_0_codec = static_cast(entry_0.codec); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_codecClassName.c_str(), newElement_0_codecCtorSignature.c_str(), jninewElement_0_codec, newElement_0_codec); jobject newElement_0_resolution; jobject newElement_0_resolution_width; std::string newElement_0_resolution_widthClassName = "java/lang/Integer"; std::string newElement_0_resolution_widthCtorSignature = "(I)V"; jint jninewElement_0_resolution_width = static_cast(entry_0.resolution.width); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_resolution_widthClassName.c_str(), newElement_0_resolution_widthCtorSignature.c_str(), jninewElement_0_resolution_width, newElement_0_resolution_width); jobject newElement_0_resolution_height; std::string newElement_0_resolution_heightClassName = "java/lang/Integer"; std::string newElement_0_resolution_heightCtorSignature = "(I)V"; jint jninewElement_0_resolution_height = static_cast(entry_0.resolution.height); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_resolution_heightClassName.c_str(), newElement_0_resolution_heightCtorSignature.c_str(), jninewElement_0_resolution_height, newElement_0_resolution_height); { jclass videoResolutionStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", videoResolutionStructStructClass_2); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); return nullptr; } jmethodID videoResolutionStructStructCtor_2; err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_2, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &videoResolutionStructStructCtor_2); if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_2 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); return nullptr; } newElement_0_resolution = env->NewObject(videoResolutionStructStructClass_2, videoResolutionStructStructCtor_2, newElement_0_resolution_width, newElement_0_resolution_height); } jobject newElement_0_minBitRate; std::string newElement_0_minBitRateClassName = "java/lang/Long"; std::string newElement_0_minBitRateCtorSignature = "(J)V"; jlong jninewElement_0_minBitRate = static_cast(entry_0.minBitRate); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minBitRateClassName.c_str(), newElement_0_minBitRateCtorSignature.c_str(), jninewElement_0_minBitRate, newElement_0_minBitRate); { jclass rateDistortionTradeOffPointsStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct", rateDistortionTradeOffPointsStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError( Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct"); return nullptr; } jmethodID rateDistortionTradeOffPointsStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, rateDistortionTradeOffPointsStructStructClass_1, "", "(Ljava/lang/Integer;Lchip/devicecontroller/" "ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct;Ljava/lang/Long;)V", &rateDistortionTradeOffPointsStructStructCtor_1); if (err != CHIP_NO_ERROR || rateDistortionTradeOffPointsStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct " "constructor"); return nullptr; } newElement_0 = env->NewObject(rateDistortionTradeOffPointsStructStructClass_1, rateDistortionTradeOffPointsStructStructCtor_1, newElement_0_codec, newElement_0_resolution, newElement_0_minBitRate); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::MaxPreRollBufferSize::Id: { using TypeInfo = Attributes::MaxPreRollBufferSize::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MicrophoneCapabilities::Id: { using TypeInfo = Attributes::MicrophoneCapabilities::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_maxNumberOfChannels; std::string value_maxNumberOfChannelsClassName = "java/lang/Integer"; std::string value_maxNumberOfChannelsCtorSignature = "(I)V"; jint jnivalue_maxNumberOfChannels = static_cast(cppValue.maxNumberOfChannels); chip::JniReferences::GetInstance().CreateBoxedObject(value_maxNumberOfChannelsClassName.c_str(), value_maxNumberOfChannelsCtorSignature.c_str(), jnivalue_maxNumberOfChannels, value_maxNumberOfChannels); jobject value_supportedCodecs; chip::JniReferences::GetInstance().CreateArrayList(value_supportedCodecs); auto iter_value_supportedCodecs_1 = cppValue.supportedCodecs.begin(); while (iter_value_supportedCodecs_1.Next()) { auto & entry_1 = iter_value_supportedCodecs_1.GetValue(); jobject newElement_1; std::string newElement_1ClassName = "java/lang/Integer"; std::string newElement_1CtorSignature = "(I)V"; jint jninewElement_1 = static_cast(entry_1); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); chip::JniReferences::GetInstance().AddToList(value_supportedCodecs, newElement_1); } jobject value_supportedSampleRates; chip::JniReferences::GetInstance().CreateArrayList(value_supportedSampleRates); auto iter_value_supportedSampleRates_1 = cppValue.supportedSampleRates.begin(); while (iter_value_supportedSampleRates_1.Next()) { auto & entry_1 = iter_value_supportedSampleRates_1.GetValue(); jobject newElement_1; std::string newElement_1ClassName = "java/lang/Long"; std::string newElement_1CtorSignature = "(J)V"; jlong jninewElement_1 = static_cast(entry_1); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); chip::JniReferences::GetInstance().AddToList(value_supportedSampleRates, newElement_1); } jobject value_supportedBitDepths; chip::JniReferences::GetInstance().CreateArrayList(value_supportedBitDepths); auto iter_value_supportedBitDepths_1 = cppValue.supportedBitDepths.begin(); while (iter_value_supportedBitDepths_1.Next()) { auto & entry_1 = iter_value_supportedBitDepths_1.GetValue(); jobject newElement_1; std::string newElement_1ClassName = "java/lang/Integer"; std::string newElement_1CtorSignature = "(I)V"; jint jninewElement_1 = static_cast(entry_1); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); chip::JniReferences::GetInstance().AddToList(value_supportedBitDepths, newElement_1); } { jclass audioCapabilitiesStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterAudioCapabilitiesStruct", audioCapabilitiesStructStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterAudioCapabilitiesStruct"); return nullptr; } jmethodID audioCapabilitiesStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod( env, audioCapabilitiesStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;)V", &audioCapabilitiesStructStructCtor_0); if (err != CHIP_NO_ERROR || audioCapabilitiesStructStructCtor_0 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterAudioCapabilitiesStruct constructor"); return nullptr; } value = env->NewObject(audioCapabilitiesStructStructClass_0, audioCapabilitiesStructStructCtor_0, value_maxNumberOfChannels, value_supportedCodecs, value_supportedSampleRates, value_supportedBitDepths); } return value; } case Attributes::SpeakerCapabilities::Id: { using TypeInfo = Attributes::SpeakerCapabilities::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_maxNumberOfChannels; std::string value_maxNumberOfChannelsClassName = "java/lang/Integer"; std::string value_maxNumberOfChannelsCtorSignature = "(I)V"; jint jnivalue_maxNumberOfChannels = static_cast(cppValue.maxNumberOfChannels); chip::JniReferences::GetInstance().CreateBoxedObject(value_maxNumberOfChannelsClassName.c_str(), value_maxNumberOfChannelsCtorSignature.c_str(), jnivalue_maxNumberOfChannels, value_maxNumberOfChannels); jobject value_supportedCodecs; chip::JniReferences::GetInstance().CreateArrayList(value_supportedCodecs); auto iter_value_supportedCodecs_1 = cppValue.supportedCodecs.begin(); while (iter_value_supportedCodecs_1.Next()) { auto & entry_1 = iter_value_supportedCodecs_1.GetValue(); jobject newElement_1; std::string newElement_1ClassName = "java/lang/Integer"; std::string newElement_1CtorSignature = "(I)V"; jint jninewElement_1 = static_cast(entry_1); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); chip::JniReferences::GetInstance().AddToList(value_supportedCodecs, newElement_1); } jobject value_supportedSampleRates; chip::JniReferences::GetInstance().CreateArrayList(value_supportedSampleRates); auto iter_value_supportedSampleRates_1 = cppValue.supportedSampleRates.begin(); while (iter_value_supportedSampleRates_1.Next()) { auto & entry_1 = iter_value_supportedSampleRates_1.GetValue(); jobject newElement_1; std::string newElement_1ClassName = "java/lang/Long"; std::string newElement_1CtorSignature = "(J)V"; jlong jninewElement_1 = static_cast(entry_1); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); chip::JniReferences::GetInstance().AddToList(value_supportedSampleRates, newElement_1); } jobject value_supportedBitDepths; chip::JniReferences::GetInstance().CreateArrayList(value_supportedBitDepths); auto iter_value_supportedBitDepths_1 = cppValue.supportedBitDepths.begin(); while (iter_value_supportedBitDepths_1.Next()) { auto & entry_1 = iter_value_supportedBitDepths_1.GetValue(); jobject newElement_1; std::string newElement_1ClassName = "java/lang/Integer"; std::string newElement_1CtorSignature = "(I)V"; jint jninewElement_1 = static_cast(entry_1); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); chip::JniReferences::GetInstance().AddToList(value_supportedBitDepths, newElement_1); } { jclass audioCapabilitiesStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterAudioCapabilitiesStruct", audioCapabilitiesStructStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterAudioCapabilitiesStruct"); return nullptr; } jmethodID audioCapabilitiesStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod( env, audioCapabilitiesStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;)V", &audioCapabilitiesStructStructCtor_0); if (err != CHIP_NO_ERROR || audioCapabilitiesStructStructCtor_0 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterAudioCapabilitiesStruct constructor"); return nullptr; } value = env->NewObject(audioCapabilitiesStructStructClass_0, audioCapabilitiesStructStructCtor_0, value_maxNumberOfChannels, value_supportedCodecs, value_supportedSampleRates, value_supportedBitDepths); } return value; } case Attributes::TwoWayTalkSupport::Id: { using TypeInfo = Attributes::TwoWayTalkSupport::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SupportedSnapshotParams::Id: { using TypeInfo = Attributes::SupportedSnapshotParams::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_resolution; jobject newElement_0_resolution_width; std::string newElement_0_resolution_widthClassName = "java/lang/Integer"; std::string newElement_0_resolution_widthCtorSignature = "(I)V"; jint jninewElement_0_resolution_width = static_cast(entry_0.resolution.width); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_resolution_widthClassName.c_str(), newElement_0_resolution_widthCtorSignature.c_str(), jninewElement_0_resolution_width, newElement_0_resolution_width); jobject newElement_0_resolution_height; std::string newElement_0_resolution_heightClassName = "java/lang/Integer"; std::string newElement_0_resolution_heightCtorSignature = "(I)V"; jint jninewElement_0_resolution_height = static_cast(entry_0.resolution.height); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_resolution_heightClassName.c_str(), newElement_0_resolution_heightCtorSignature.c_str(), jninewElement_0_resolution_height, newElement_0_resolution_height); { jclass videoResolutionStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", videoResolutionStructStructClass_2); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); return nullptr; } jmethodID videoResolutionStructStructCtor_2; err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_2, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &videoResolutionStructStructCtor_2); if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_2 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); return nullptr; } newElement_0_resolution = env->NewObject(videoResolutionStructStructClass_2, videoResolutionStructStructCtor_2, newElement_0_resolution_width, newElement_0_resolution_height); } jobject newElement_0_maxFrameRate; std::string newElement_0_maxFrameRateClassName = "java/lang/Integer"; std::string newElement_0_maxFrameRateCtorSignature = "(I)V"; jint jninewElement_0_maxFrameRate = static_cast(entry_0.maxFrameRate); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_maxFrameRateClassName.c_str(), newElement_0_maxFrameRateCtorSignature.c_str(), jninewElement_0_maxFrameRate, newElement_0_maxFrameRate); jobject newElement_0_imageCodec; std::string newElement_0_imageCodecClassName = "java/lang/Integer"; std::string newElement_0_imageCodecCtorSignature = "(I)V"; jint jninewElement_0_imageCodec = static_cast(entry_0.imageCodec); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_imageCodecClassName.c_str(), newElement_0_imageCodecCtorSignature.c_str(), jninewElement_0_imageCodec, newElement_0_imageCodec); { jclass snapshotParamsStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterSnapshotParamsStruct", snapshotParamsStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterSnapshotParamsStruct"); return nullptr; } jmethodID snapshotParamsStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, snapshotParamsStructStructClass_1, "", "(Lchip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct;Ljava/lang/" "Integer;Ljava/lang/Integer;)V", &snapshotParamsStructStructCtor_1); if (err != CHIP_NO_ERROR || snapshotParamsStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterSnapshotParamsStruct constructor"); return nullptr; } newElement_0 = env->NewObject(snapshotParamsStructStructClass_1, snapshotParamsStructStructCtor_1, newElement_0_resolution, newElement_0_maxFrameRate, newElement_0_imageCodec); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::MaxNetworkBandwidth::Id: { using TypeInfo = Attributes::MaxNetworkBandwidth::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CurrentFrameRate::Id: { using TypeInfo = Attributes::CurrentFrameRate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::HDRModeEnabled::Id: { using TypeInfo = Attributes::HDRModeEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::CurrentVideoCodecs::Id: { using TypeInfo = Attributes::CurrentVideoCodecs::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::CurrentSnapshotConfig::Id: { using TypeInfo = Attributes::CurrentSnapshotConfig::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_resolution; jobject value_resolution_width; std::string value_resolution_widthClassName = "java/lang/Integer"; std::string value_resolution_widthCtorSignature = "(I)V"; jint jnivalue_resolution_width = static_cast(cppValue.resolution.width); chip::JniReferences::GetInstance().CreateBoxedObject(value_resolution_widthClassName.c_str(), value_resolution_widthCtorSignature.c_str(), jnivalue_resolution_width, value_resolution_width); jobject value_resolution_height; std::string value_resolution_heightClassName = "java/lang/Integer"; std::string value_resolution_heightCtorSignature = "(I)V"; jint jnivalue_resolution_height = static_cast(cppValue.resolution.height); chip::JniReferences::GetInstance().CreateBoxedObject(value_resolution_heightClassName.c_str(), value_resolution_heightCtorSignature.c_str(), jnivalue_resolution_height, value_resolution_height); { jclass videoResolutionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", videoResolutionStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); return nullptr; } jmethodID videoResolutionStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &videoResolutionStructStructCtor_1); if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); return nullptr; } value_resolution = env->NewObject(videoResolutionStructStructClass_1, videoResolutionStructStructCtor_1, value_resolution_width, value_resolution_height); } jobject value_maxFrameRate; std::string value_maxFrameRateClassName = "java/lang/Integer"; std::string value_maxFrameRateCtorSignature = "(I)V"; jint jnivalue_maxFrameRate = static_cast(cppValue.maxFrameRate); chip::JniReferences::GetInstance().CreateBoxedObject(value_maxFrameRateClassName.c_str(), value_maxFrameRateCtorSignature.c_str(), jnivalue_maxFrameRate, value_maxFrameRate); jobject value_imageCodec; std::string value_imageCodecClassName = "java/lang/Integer"; std::string value_imageCodecCtorSignature = "(I)V"; jint jnivalue_imageCodec = static_cast(cppValue.imageCodec); chip::JniReferences::GetInstance().CreateBoxedObject( value_imageCodecClassName.c_str(), value_imageCodecCtorSignature.c_str(), jnivalue_imageCodec, value_imageCodec); { jclass snapshotParamsStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterSnapshotParamsStruct", snapshotParamsStructStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterSnapshotParamsStruct"); return nullptr; } jmethodID snapshotParamsStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod( env, snapshotParamsStructStructClass_0, "", "(Lchip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct;Ljava/lang/" "Integer;Ljava/lang/Integer;)V", &snapshotParamsStructStructCtor_0); if (err != CHIP_NO_ERROR || snapshotParamsStructStructCtor_0 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterSnapshotParamsStruct constructor"); return nullptr; } value = env->NewObject(snapshotParamsStructStructClass_0, snapshotParamsStructStructCtor_0, value_resolution, value_maxFrameRate, value_imageCodec); } return value; } case Attributes::FabricsUsingCamera::Id: { using TypeInfo = Attributes::FabricsUsingCamera::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AllocatedVideoStreams::Id: { using TypeInfo = Attributes::AllocatedVideoStreams::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_videoStreamID; std::string newElement_0_videoStreamIDClassName = "java/lang/Integer"; std::string newElement_0_videoStreamIDCtorSignature = "(I)V"; jint jninewElement_0_videoStreamID = static_cast(entry_0.videoStreamID); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_videoStreamIDClassName.c_str(), newElement_0_videoStreamIDCtorSignature.c_str(), jninewElement_0_videoStreamID, newElement_0_videoStreamID); jobject newElement_0_streamType; std::string newElement_0_streamTypeClassName = "java/lang/Integer"; std::string newElement_0_streamTypeCtorSignature = "(I)V"; jint jninewElement_0_streamType = static_cast(entry_0.streamType); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_streamTypeClassName.c_str(), newElement_0_streamTypeCtorSignature.c_str(), jninewElement_0_streamType, newElement_0_streamType); jobject newElement_0_videoCodec; std::string newElement_0_videoCodecClassName = "java/lang/Integer"; std::string newElement_0_videoCodecCtorSignature = "(I)V"; jint jninewElement_0_videoCodec = static_cast(entry_0.videoCodec); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_videoCodecClassName.c_str(), newElement_0_videoCodecCtorSignature.c_str(), jninewElement_0_videoCodec, newElement_0_videoCodec); jobject newElement_0_minFrameRate; std::string newElement_0_minFrameRateClassName = "java/lang/Integer"; std::string newElement_0_minFrameRateCtorSignature = "(I)V"; jint jninewElement_0_minFrameRate = static_cast(entry_0.minFrameRate); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minFrameRateClassName.c_str(), newElement_0_minFrameRateCtorSignature.c_str(), jninewElement_0_minFrameRate, newElement_0_minFrameRate); jobject newElement_0_maxFrameRate; std::string newElement_0_maxFrameRateClassName = "java/lang/Integer"; std::string newElement_0_maxFrameRateCtorSignature = "(I)V"; jint jninewElement_0_maxFrameRate = static_cast(entry_0.maxFrameRate); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_maxFrameRateClassName.c_str(), newElement_0_maxFrameRateCtorSignature.c_str(), jninewElement_0_maxFrameRate, newElement_0_maxFrameRate); jobject newElement_0_minResolution; jobject newElement_0_minResolution_width; std::string newElement_0_minResolution_widthClassName = "java/lang/Integer"; std::string newElement_0_minResolution_widthCtorSignature = "(I)V"; jint jninewElement_0_minResolution_width = static_cast(entry_0.minResolution.width); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_minResolution_widthClassName.c_str(), newElement_0_minResolution_widthCtorSignature.c_str(), jninewElement_0_minResolution_width, newElement_0_minResolution_width); jobject newElement_0_minResolution_height; std::string newElement_0_minResolution_heightClassName = "java/lang/Integer"; std::string newElement_0_minResolution_heightCtorSignature = "(I)V"; jint jninewElement_0_minResolution_height = static_cast(entry_0.minResolution.height); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_minResolution_heightClassName.c_str(), newElement_0_minResolution_heightCtorSignature.c_str(), jninewElement_0_minResolution_height, newElement_0_minResolution_height); { jclass videoResolutionStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", videoResolutionStructStructClass_2); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); return nullptr; } jmethodID videoResolutionStructStructCtor_2; err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_2, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &videoResolutionStructStructCtor_2); if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_2 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); return nullptr; } newElement_0_minResolution = env->NewObject(videoResolutionStructStructClass_2, videoResolutionStructStructCtor_2, newElement_0_minResolution_width, newElement_0_minResolution_height); } jobject newElement_0_maxResolution; jobject newElement_0_maxResolution_width; std::string newElement_0_maxResolution_widthClassName = "java/lang/Integer"; std::string newElement_0_maxResolution_widthCtorSignature = "(I)V"; jint jninewElement_0_maxResolution_width = static_cast(entry_0.maxResolution.width); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_maxResolution_widthClassName.c_str(), newElement_0_maxResolution_widthCtorSignature.c_str(), jninewElement_0_maxResolution_width, newElement_0_maxResolution_width); jobject newElement_0_maxResolution_height; std::string newElement_0_maxResolution_heightClassName = "java/lang/Integer"; std::string newElement_0_maxResolution_heightCtorSignature = "(I)V"; jint jninewElement_0_maxResolution_height = static_cast(entry_0.maxResolution.height); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_maxResolution_heightClassName.c_str(), newElement_0_maxResolution_heightCtorSignature.c_str(), jninewElement_0_maxResolution_height, newElement_0_maxResolution_height); { jclass videoResolutionStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", videoResolutionStructStructClass_2); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); return nullptr; } jmethodID videoResolutionStructStructCtor_2; err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_2, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &videoResolutionStructStructCtor_2); if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_2 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); return nullptr; } newElement_0_maxResolution = env->NewObject(videoResolutionStructStructClass_2, videoResolutionStructStructCtor_2, newElement_0_maxResolution_width, newElement_0_maxResolution_height); } jobject newElement_0_minBitRate; std::string newElement_0_minBitRateClassName = "java/lang/Long"; std::string newElement_0_minBitRateCtorSignature = "(J)V"; jlong jninewElement_0_minBitRate = static_cast(entry_0.minBitRate); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minBitRateClassName.c_str(), newElement_0_minBitRateCtorSignature.c_str(), jninewElement_0_minBitRate, newElement_0_minBitRate); jobject newElement_0_maxBitRate; std::string newElement_0_maxBitRateClassName = "java/lang/Long"; std::string newElement_0_maxBitRateCtorSignature = "(J)V"; jlong jninewElement_0_maxBitRate = static_cast(entry_0.maxBitRate); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_maxBitRateClassName.c_str(), newElement_0_maxBitRateCtorSignature.c_str(), jninewElement_0_maxBitRate, newElement_0_maxBitRate); jobject newElement_0_minFragmentLen; std::string newElement_0_minFragmentLenClassName = "java/lang/Integer"; std::string newElement_0_minFragmentLenCtorSignature = "(I)V"; jint jninewElement_0_minFragmentLen = static_cast(entry_0.minFragmentLen); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_minFragmentLenClassName.c_str(), newElement_0_minFragmentLenCtorSignature.c_str(), jninewElement_0_minFragmentLen, newElement_0_minFragmentLen); jobject newElement_0_maxFragmentLen; std::string newElement_0_maxFragmentLenClassName = "java/lang/Integer"; std::string newElement_0_maxFragmentLenCtorSignature = "(I)V"; jint jninewElement_0_maxFragmentLen = static_cast(entry_0.maxFragmentLen); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_maxFragmentLenClassName.c_str(), newElement_0_maxFragmentLenCtorSignature.c_str(), jninewElement_0_maxFragmentLen, newElement_0_maxFragmentLen); jobject newElement_0_watermarkEnabled; if (!entry_0.watermarkEnabled.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_watermarkEnabled); } else { jobject newElement_0_watermarkEnabledInsideOptional; std::string newElement_0_watermarkEnabledInsideOptionalClassName = "java/lang/Boolean"; std::string newElement_0_watermarkEnabledInsideOptionalCtorSignature = "(Z)V"; jboolean jninewElement_0_watermarkEnabledInsideOptional = static_cast(entry_0.watermarkEnabled.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_watermarkEnabledInsideOptionalClassName.c_str(), newElement_0_watermarkEnabledInsideOptionalCtorSignature.c_str(), jninewElement_0_watermarkEnabledInsideOptional, newElement_0_watermarkEnabledInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_watermarkEnabledInsideOptional, newElement_0_watermarkEnabled); } jobject newElement_0_OSDEnabled; if (!entry_0.OSDEnabled.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_OSDEnabled); } else { jobject newElement_0_OSDEnabledInsideOptional; std::string newElement_0_OSDEnabledInsideOptionalClassName = "java/lang/Boolean"; std::string newElement_0_OSDEnabledInsideOptionalCtorSignature = "(Z)V"; jboolean jninewElement_0_OSDEnabledInsideOptional = static_cast(entry_0.OSDEnabled.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_OSDEnabledInsideOptionalClassName.c_str(), newElement_0_OSDEnabledInsideOptionalCtorSignature.c_str(), jninewElement_0_OSDEnabledInsideOptional, newElement_0_OSDEnabledInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_OSDEnabledInsideOptional, newElement_0_OSDEnabled); } jobject newElement_0_referenceCount; std::string newElement_0_referenceCountClassName = "java/lang/Integer"; std::string newElement_0_referenceCountCtorSignature = "(I)V"; jint jninewElement_0_referenceCount = static_cast(entry_0.referenceCount); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_referenceCountClassName.c_str(), newElement_0_referenceCountCtorSignature.c_str(), jninewElement_0_referenceCount, newElement_0_referenceCount); { jclass videoStreamStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoStreamStruct", videoStreamStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoStreamStruct"); return nullptr; } jmethodID videoStreamStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, videoStreamStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Lchip/" "devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct;Lchip/devicecontroller/" "ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct;Ljava/lang/Long;Ljava/lang/Long;Ljava/" "lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V", &videoStreamStructStructCtor_1); if (err != CHIP_NO_ERROR || videoStreamStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterVideoStreamStruct constructor"); return nullptr; } newElement_0 = env->NewObject( videoStreamStructStructClass_1, videoStreamStructStructCtor_1, newElement_0_videoStreamID, newElement_0_streamType, newElement_0_videoCodec, newElement_0_minFrameRate, newElement_0_maxFrameRate, newElement_0_minResolution, newElement_0_maxResolution, newElement_0_minBitRate, newElement_0_maxBitRate, newElement_0_minFragmentLen, newElement_0_maxFragmentLen, newElement_0_watermarkEnabled, newElement_0_OSDEnabled, newElement_0_referenceCount); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AllocatedAudioStreams::Id: { using TypeInfo = Attributes::AllocatedAudioStreams::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_audioStreamID; std::string newElement_0_audioStreamIDClassName = "java/lang/Integer"; std::string newElement_0_audioStreamIDCtorSignature = "(I)V"; jint jninewElement_0_audioStreamID = static_cast(entry_0.audioStreamID); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_audioStreamIDClassName.c_str(), newElement_0_audioStreamIDCtorSignature.c_str(), jninewElement_0_audioStreamID, newElement_0_audioStreamID); jobject newElement_0_streamType; std::string newElement_0_streamTypeClassName = "java/lang/Integer"; std::string newElement_0_streamTypeCtorSignature = "(I)V"; jint jninewElement_0_streamType = static_cast(entry_0.streamType); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_streamTypeClassName.c_str(), newElement_0_streamTypeCtorSignature.c_str(), jninewElement_0_streamType, newElement_0_streamType); jobject newElement_0_audioCodec; std::string newElement_0_audioCodecClassName = "java/lang/Integer"; std::string newElement_0_audioCodecCtorSignature = "(I)V"; jint jninewElement_0_audioCodec = static_cast(entry_0.audioCodec); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_audioCodecClassName.c_str(), newElement_0_audioCodecCtorSignature.c_str(), jninewElement_0_audioCodec, newElement_0_audioCodec); jobject newElement_0_channelCount; std::string newElement_0_channelCountClassName = "java/lang/Integer"; std::string newElement_0_channelCountCtorSignature = "(I)V"; jint jninewElement_0_channelCount = static_cast(entry_0.channelCount); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_channelCountClassName.c_str(), newElement_0_channelCountCtorSignature.c_str(), jninewElement_0_channelCount, newElement_0_channelCount); jobject newElement_0_sampleRate; std::string newElement_0_sampleRateClassName = "java/lang/Long"; std::string newElement_0_sampleRateCtorSignature = "(J)V"; jlong jninewElement_0_sampleRate = static_cast(entry_0.sampleRate); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sampleRateClassName.c_str(), newElement_0_sampleRateCtorSignature.c_str(), jninewElement_0_sampleRate, newElement_0_sampleRate); jobject newElement_0_bitRate; std::string newElement_0_bitRateClassName = "java/lang/Long"; std::string newElement_0_bitRateCtorSignature = "(J)V"; jlong jninewElement_0_bitRate = static_cast(entry_0.bitRate); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_bitRateClassName.c_str(), newElement_0_bitRateCtorSignature.c_str(), jninewElement_0_bitRate, newElement_0_bitRate); jobject newElement_0_bitDepth; std::string newElement_0_bitDepthClassName = "java/lang/Integer"; std::string newElement_0_bitDepthCtorSignature = "(I)V"; jint jninewElement_0_bitDepth = static_cast(entry_0.bitDepth); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_bitDepthClassName.c_str(), newElement_0_bitDepthCtorSignature.c_str(), jninewElement_0_bitDepth, newElement_0_bitDepth); jobject newElement_0_referenceCount; std::string newElement_0_referenceCountClassName = "java/lang/Integer"; std::string newElement_0_referenceCountCtorSignature = "(I)V"; jint jninewElement_0_referenceCount = static_cast(entry_0.referenceCount); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_referenceCountClassName.c_str(), newElement_0_referenceCountCtorSignature.c_str(), jninewElement_0_referenceCount, newElement_0_referenceCount); { jclass audioStreamStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterAudioStreamStruct", audioStreamStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterAudioStreamStruct"); return nullptr; } jmethodID audioStreamStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, audioStreamStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/" "Long;Ljava/lang/Integer;Ljava/lang/Integer;)V", &audioStreamStructStructCtor_1); if (err != CHIP_NO_ERROR || audioStreamStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterAudioStreamStruct constructor"); return nullptr; } newElement_0 = env->NewObject(audioStreamStructStructClass_1, audioStreamStructStructCtor_1, newElement_0_audioStreamID, newElement_0_streamType, newElement_0_audioCodec, newElement_0_channelCount, newElement_0_sampleRate, newElement_0_bitRate, newElement_0_bitDepth, newElement_0_referenceCount); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AllocatedSnapshotStreams::Id: { using TypeInfo = Attributes::AllocatedSnapshotStreams::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_snapshotStreamID; std::string newElement_0_snapshotStreamIDClassName = "java/lang/Integer"; std::string newElement_0_snapshotStreamIDCtorSignature = "(I)V"; jint jninewElement_0_snapshotStreamID = static_cast(entry_0.snapshotStreamID); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_snapshotStreamIDClassName.c_str(), newElement_0_snapshotStreamIDCtorSignature.c_str(), jninewElement_0_snapshotStreamID, newElement_0_snapshotStreamID); jobject newElement_0_imageCodec; std::string newElement_0_imageCodecClassName = "java/lang/Integer"; std::string newElement_0_imageCodecCtorSignature = "(I)V"; jint jninewElement_0_imageCodec = static_cast(entry_0.imageCodec); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_imageCodecClassName.c_str(), newElement_0_imageCodecCtorSignature.c_str(), jninewElement_0_imageCodec, newElement_0_imageCodec); jobject newElement_0_frameRate; std::string newElement_0_frameRateClassName = "java/lang/Integer"; std::string newElement_0_frameRateCtorSignature = "(I)V"; jint jninewElement_0_frameRate = static_cast(entry_0.frameRate); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_frameRateClassName.c_str(), newElement_0_frameRateCtorSignature.c_str(), jninewElement_0_frameRate, newElement_0_frameRate); jobject newElement_0_bitRate; std::string newElement_0_bitRateClassName = "java/lang/Long"; std::string newElement_0_bitRateCtorSignature = "(J)V"; jlong jninewElement_0_bitRate = static_cast(entry_0.bitRate); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_bitRateClassName.c_str(), newElement_0_bitRateCtorSignature.c_str(), jninewElement_0_bitRate, newElement_0_bitRate); jobject newElement_0_minResolution; jobject newElement_0_minResolution_width; std::string newElement_0_minResolution_widthClassName = "java/lang/Integer"; std::string newElement_0_minResolution_widthCtorSignature = "(I)V"; jint jninewElement_0_minResolution_width = static_cast(entry_0.minResolution.width); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_minResolution_widthClassName.c_str(), newElement_0_minResolution_widthCtorSignature.c_str(), jninewElement_0_minResolution_width, newElement_0_minResolution_width); jobject newElement_0_minResolution_height; std::string newElement_0_minResolution_heightClassName = "java/lang/Integer"; std::string newElement_0_minResolution_heightCtorSignature = "(I)V"; jint jninewElement_0_minResolution_height = static_cast(entry_0.minResolution.height); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_minResolution_heightClassName.c_str(), newElement_0_minResolution_heightCtorSignature.c_str(), jninewElement_0_minResolution_height, newElement_0_minResolution_height); { jclass videoResolutionStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", videoResolutionStructStructClass_2); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); return nullptr; } jmethodID videoResolutionStructStructCtor_2; err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_2, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &videoResolutionStructStructCtor_2); if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_2 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); return nullptr; } newElement_0_minResolution = env->NewObject(videoResolutionStructStructClass_2, videoResolutionStructStructCtor_2, newElement_0_minResolution_width, newElement_0_minResolution_height); } jobject newElement_0_maxResolution; jobject newElement_0_maxResolution_width; std::string newElement_0_maxResolution_widthClassName = "java/lang/Integer"; std::string newElement_0_maxResolution_widthCtorSignature = "(I)V"; jint jninewElement_0_maxResolution_width = static_cast(entry_0.maxResolution.width); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_maxResolution_widthClassName.c_str(), newElement_0_maxResolution_widthCtorSignature.c_str(), jninewElement_0_maxResolution_width, newElement_0_maxResolution_width); jobject newElement_0_maxResolution_height; std::string newElement_0_maxResolution_heightClassName = "java/lang/Integer"; std::string newElement_0_maxResolution_heightCtorSignature = "(I)V"; jint jninewElement_0_maxResolution_height = static_cast(entry_0.maxResolution.height); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_maxResolution_heightClassName.c_str(), newElement_0_maxResolution_heightCtorSignature.c_str(), jninewElement_0_maxResolution_height, newElement_0_maxResolution_height); { jclass videoResolutionStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", videoResolutionStructStructClass_2); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); return nullptr; } jmethodID videoResolutionStructStructCtor_2; err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_2, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &videoResolutionStructStructCtor_2); if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_2 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); return nullptr; } newElement_0_maxResolution = env->NewObject(videoResolutionStructStructClass_2, videoResolutionStructStructCtor_2, newElement_0_maxResolution_width, newElement_0_maxResolution_height); } jobject newElement_0_quality; std::string newElement_0_qualityClassName = "java/lang/Integer"; std::string newElement_0_qualityCtorSignature = "(I)V"; jint jninewElement_0_quality = static_cast(entry_0.quality); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_qualityClassName.c_str(), newElement_0_qualityCtorSignature.c_str(), jninewElement_0_quality, newElement_0_quality); jobject newElement_0_referenceCount; std::string newElement_0_referenceCountClassName = "java/lang/Integer"; std::string newElement_0_referenceCountCtorSignature = "(I)V"; jint jninewElement_0_referenceCount = static_cast(entry_0.referenceCount); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_referenceCountClassName.c_str(), newElement_0_referenceCountCtorSignature.c_str(), jninewElement_0_referenceCount, newElement_0_referenceCount); { jclass snapshotStreamStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterSnapshotStreamStruct", snapshotStreamStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterSnapshotStreamStruct"); return nullptr; } jmethodID snapshotStreamStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, snapshotStreamStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;Lchip/devicecontroller/" "ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct;Lchip/devicecontroller/" "ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct;Ljava/lang/Integer;Ljava/lang/Integer;)V", &snapshotStreamStructStructCtor_1); if (err != CHIP_NO_ERROR || snapshotStreamStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterSnapshotStreamStruct constructor"); return nullptr; } newElement_0 = env->NewObject(snapshotStreamStructStructClass_1, snapshotStreamStructStructCtor_1, newElement_0_snapshotStreamID, newElement_0_imageCodec, newElement_0_frameRate, newElement_0_bitRate, newElement_0_minResolution, newElement_0_maxResolution, newElement_0_quality, newElement_0_referenceCount); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::RankedVideoStreamPrioritiesList::Id: { using TypeInfo = Attributes::RankedVideoStreamPrioritiesList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::SoftRecordingPrivacyModeEnabled::Id: { using TypeInfo = Attributes::SoftRecordingPrivacyModeEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SoftLivestreamPrivacyModeEnabled::Id: { using TypeInfo = Attributes::SoftLivestreamPrivacyModeEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::HardPrivacyModeOn::Id: { using TypeInfo = Attributes::HardPrivacyModeOn::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NightVision::Id: { using TypeInfo = Attributes::NightVision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NightVisionIllum::Id: { using TypeInfo = Attributes::NightVisionIllum::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AWBEnabled::Id: { using TypeInfo = Attributes::AWBEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AutoShutterSpeedEnabled::Id: { using TypeInfo = Attributes::AutoShutterSpeedEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::AutoISOEnabled::Id: { using TypeInfo = Attributes::AutoISOEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Viewport::Id: { using TypeInfo = Attributes::Viewport::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_x1; std::string value_x1ClassName = "java/lang/Integer"; std::string value_x1CtorSignature = "(I)V"; jint jnivalue_x1 = static_cast(cppValue.x1); chip::JniReferences::GetInstance().CreateBoxedObject(value_x1ClassName.c_str(), value_x1CtorSignature.c_str(), jnivalue_x1, value_x1); jobject value_y1; std::string value_y1ClassName = "java/lang/Integer"; std::string value_y1CtorSignature = "(I)V"; jint jnivalue_y1 = static_cast(cppValue.y1); chip::JniReferences::GetInstance().CreateBoxedObject(value_y1ClassName.c_str(), value_y1CtorSignature.c_str(), jnivalue_y1, value_y1); jobject value_x2; std::string value_x2ClassName = "java/lang/Integer"; std::string value_x2CtorSignature = "(I)V"; jint jnivalue_x2 = static_cast(cppValue.x2); chip::JniReferences::GetInstance().CreateBoxedObject(value_x2ClassName.c_str(), value_x2CtorSignature.c_str(), jnivalue_x2, value_x2); jobject value_y2; std::string value_y2ClassName = "java/lang/Integer"; std::string value_y2CtorSignature = "(I)V"; jint jnivalue_y2 = static_cast(cppValue.y2); chip::JniReferences::GetInstance().CreateBoxedObject(value_y2ClassName.c_str(), value_y2CtorSignature.c_str(), jnivalue_y2, value_y2); { jclass viewportStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterViewportStruct", viewportStructStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterViewportStruct"); return nullptr; } jmethodID viewportStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod( env, viewportStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &viewportStructStructCtor_0); if (err != CHIP_NO_ERROR || viewportStructStructCtor_0 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterViewportStruct constructor"); return nullptr; } value = env->NewObject(viewportStructStructClass_0, viewportStructStructCtor_0, value_x1, value_y1, value_x2, value_y2); } return value; } case Attributes::SpeakerMuted::Id: { using TypeInfo = Attributes::SpeakerMuted::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SpeakerVolumeLevel::Id: { using TypeInfo = Attributes::SpeakerVolumeLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SpeakerMaxLevel::Id: { using TypeInfo = Attributes::SpeakerMaxLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::SpeakerMinLevel::Id: { using TypeInfo = Attributes::SpeakerMinLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MicrophoneMuted::Id: { using TypeInfo = Attributes::MicrophoneMuted::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MicrophoneVolumeLevel::Id: { using TypeInfo = Attributes::MicrophoneVolumeLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MicrophoneMaxLevel::Id: { using TypeInfo = Attributes::MicrophoneMaxLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MicrophoneMinLevel::Id: { using TypeInfo = Attributes::MicrophoneMinLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MicrophoneAGCEnabled::Id: { using TypeInfo = Attributes::MicrophoneAGCEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ImageRotation::Id: { using TypeInfo = Attributes::ImageRotation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ImageFlipHorizontal::Id: { using TypeInfo = Attributes::ImageFlipHorizontal::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ImageFlipVertical::Id: { using TypeInfo = Attributes::ImageFlipVertical::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LocalVideoRecordingEnabled::Id: { using TypeInfo = Attributes::LocalVideoRecordingEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::LocalSnapshotRecordingEnabled::Id: { using TypeInfo = Attributes::LocalSnapshotRecordingEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::StatusLightEnabled::Id: { using TypeInfo = Attributes::StatusLightEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::StatusLightBrightness::Id: { using TypeInfo = Attributes::StatusLightBrightness::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::DepthSensorStatus::Id: { using TypeInfo = Attributes::DepthSensorStatus::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::WebRTCTransportProvider::Id: { using namespace app::Clusters::WebRTCTransportProvider; switch (aPath.mAttributeId) { case Attributes::CurrentSessions::Id: { using TypeInfo = Attributes::CurrentSessions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_id; std::string newElement_0_idClassName = "java/lang/Integer"; std::string newElement_0_idCtorSignature = "(I)V"; jint jninewElement_0_id = static_cast(entry_0.id); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_idClassName.c_str(), newElement_0_idCtorSignature.c_str(), jninewElement_0_id, newElement_0_id); jobject newElement_0_peerNodeID; std::string newElement_0_peerNodeIDClassName = "java/lang/Long"; std::string newElement_0_peerNodeIDCtorSignature = "(J)V"; jlong jninewElement_0_peerNodeID = static_cast(entry_0.peerNodeID); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_peerNodeIDClassName.c_str(), newElement_0_peerNodeIDCtorSignature.c_str(), jninewElement_0_peerNodeID, newElement_0_peerNodeID); jobject newElement_0_peerFabricIndex; std::string newElement_0_peerFabricIndexClassName = "java/lang/Integer"; std::string newElement_0_peerFabricIndexCtorSignature = "(I)V"; jint jninewElement_0_peerFabricIndex = static_cast(entry_0.peerFabricIndex); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_peerFabricIndexClassName.c_str(), newElement_0_peerFabricIndexCtorSignature.c_str(), jninewElement_0_peerFabricIndex, newElement_0_peerFabricIndex); jobject newElement_0_streamType; std::string newElement_0_streamTypeClassName = "java/lang/Integer"; std::string newElement_0_streamTypeCtorSignature = "(I)V"; jint jninewElement_0_streamType = static_cast(entry_0.streamType); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_streamTypeClassName.c_str(), newElement_0_streamTypeCtorSignature.c_str(), jninewElement_0_streamType, newElement_0_streamType); jobject newElement_0_videoStreamID; if (entry_0.videoStreamID.IsNull()) { newElement_0_videoStreamID = nullptr; } else { std::string newElement_0_videoStreamIDClassName = "java/lang/Integer"; std::string newElement_0_videoStreamIDCtorSignature = "(I)V"; jint jninewElement_0_videoStreamID = static_cast(entry_0.videoStreamID.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_videoStreamIDClassName.c_str(), newElement_0_videoStreamIDCtorSignature.c_str(), jninewElement_0_videoStreamID, newElement_0_videoStreamID); } jobject newElement_0_audioStreamID; if (entry_0.audioStreamID.IsNull()) { newElement_0_audioStreamID = nullptr; } else { std::string newElement_0_audioStreamIDClassName = "java/lang/Integer"; std::string newElement_0_audioStreamIDCtorSignature = "(I)V"; jint jninewElement_0_audioStreamID = static_cast(entry_0.audioStreamID.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_audioStreamIDClassName.c_str(), newElement_0_audioStreamIDCtorSignature.c_str(), jninewElement_0_audioStreamID, newElement_0_audioStreamID); } jobject newElement_0_metadataOptions; std::string newElement_0_metadataOptionsClassName = "java/lang/Integer"; std::string newElement_0_metadataOptionsCtorSignature = "(I)V"; jint jninewElement_0_metadataOptions = static_cast(entry_0.metadataOptions.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_metadataOptionsClassName.c_str(), newElement_0_metadataOptionsCtorSignature.c_str(), jninewElement_0_metadataOptions, newElement_0_metadataOptions); { jclass webRTCSessionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$WebRTCTransportProviderClusterWebRTCSessionStruct", webRTCSessionStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$WebRTCTransportProviderClusterWebRTCSessionStruct"); return nullptr; } jmethodID webRTCSessionStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, webRTCSessionStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" "Integer;Ljava/lang/Integer;)V", &webRTCSessionStructStructCtor_1); if (err != CHIP_NO_ERROR || webRTCSessionStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$WebRTCTransportProviderClusterWebRTCSessionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(webRTCSessionStructStructClass_1, webRTCSessionStructStructCtor_1, newElement_0_id, newElement_0_peerNodeID, newElement_0_peerFabricIndex, newElement_0_streamType, newElement_0_videoStreamID, newElement_0_audioStreamID, newElement_0_metadataOptions); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::WebRTCTransportRequestor::Id: { using namespace app::Clusters::WebRTCTransportRequestor; switch (aPath.mAttributeId) { case Attributes::CurrentSessions::Id: { using TypeInfo = Attributes::CurrentSessions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_id; std::string newElement_0_idClassName = "java/lang/Integer"; std::string newElement_0_idCtorSignature = "(I)V"; jint jninewElement_0_id = static_cast(entry_0.id); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_idClassName.c_str(), newElement_0_idCtorSignature.c_str(), jninewElement_0_id, newElement_0_id); jobject newElement_0_peerNodeID; std::string newElement_0_peerNodeIDClassName = "java/lang/Long"; std::string newElement_0_peerNodeIDCtorSignature = "(J)V"; jlong jninewElement_0_peerNodeID = static_cast(entry_0.peerNodeID); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_peerNodeIDClassName.c_str(), newElement_0_peerNodeIDCtorSignature.c_str(), jninewElement_0_peerNodeID, newElement_0_peerNodeID); jobject newElement_0_peerFabricIndex; std::string newElement_0_peerFabricIndexClassName = "java/lang/Integer"; std::string newElement_0_peerFabricIndexCtorSignature = "(I)V"; jint jninewElement_0_peerFabricIndex = static_cast(entry_0.peerFabricIndex); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_peerFabricIndexClassName.c_str(), newElement_0_peerFabricIndexCtorSignature.c_str(), jninewElement_0_peerFabricIndex, newElement_0_peerFabricIndex); jobject newElement_0_streamType; std::string newElement_0_streamTypeClassName = "java/lang/Integer"; std::string newElement_0_streamTypeCtorSignature = "(I)V"; jint jninewElement_0_streamType = static_cast(entry_0.streamType); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_streamTypeClassName.c_str(), newElement_0_streamTypeCtorSignature.c_str(), jninewElement_0_streamType, newElement_0_streamType); jobject newElement_0_videoStreamID; if (entry_0.videoStreamID.IsNull()) { newElement_0_videoStreamID = nullptr; } else { std::string newElement_0_videoStreamIDClassName = "java/lang/Integer"; std::string newElement_0_videoStreamIDCtorSignature = "(I)V"; jint jninewElement_0_videoStreamID = static_cast(entry_0.videoStreamID.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_videoStreamIDClassName.c_str(), newElement_0_videoStreamIDCtorSignature.c_str(), jninewElement_0_videoStreamID, newElement_0_videoStreamID); } jobject newElement_0_audioStreamID; if (entry_0.audioStreamID.IsNull()) { newElement_0_audioStreamID = nullptr; } else { std::string newElement_0_audioStreamIDClassName = "java/lang/Integer"; std::string newElement_0_audioStreamIDCtorSignature = "(I)V"; jint jninewElement_0_audioStreamID = static_cast(entry_0.audioStreamID.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_audioStreamIDClassName.c_str(), newElement_0_audioStreamIDCtorSignature.c_str(), jninewElement_0_audioStreamID, newElement_0_audioStreamID); } jobject newElement_0_metadataOptions; std::string newElement_0_metadataOptionsClassName = "java/lang/Integer"; std::string newElement_0_metadataOptionsCtorSignature = "(I)V"; jint jninewElement_0_metadataOptions = static_cast(entry_0.metadataOptions.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_metadataOptionsClassName.c_str(), newElement_0_metadataOptionsCtorSignature.c_str(), jninewElement_0_metadataOptions, newElement_0_metadataOptions); { jclass webRTCSessionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$WebRTCTransportRequestorClusterWebRTCSessionStruct", webRTCSessionStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$WebRTCTransportRequestorClusterWebRTCSessionStruct"); return nullptr; } jmethodID webRTCSessionStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, webRTCSessionStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" "Integer;Ljava/lang/Integer;)V", &webRTCSessionStructStructCtor_1); if (err != CHIP_NO_ERROR || webRTCSessionStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$WebRTCTransportRequestorClusterWebRTCSessionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(webRTCSessionStructStructClass_1, webRTCSessionStructStructCtor_1, newElement_0_id, newElement_0_peerNodeID, newElement_0_peerFabricIndex, newElement_0_streamType, newElement_0_videoStreamID, newElement_0_audioStreamID, newElement_0_metadataOptions); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::Chime::Id: { using namespace app::Clusters::Chime; switch (aPath.mAttributeId) { case Attributes::InstalledChimeSounds::Id: { using TypeInfo = Attributes::InstalledChimeSounds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_chimeID; std::string newElement_0_chimeIDClassName = "java/lang/Integer"; std::string newElement_0_chimeIDCtorSignature = "(I)V"; jint jninewElement_0_chimeID = static_cast(entry_0.chimeID); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_chimeIDClassName.c_str(), newElement_0_chimeIDCtorSignature.c_str(), jninewElement_0_chimeID, newElement_0_chimeID); jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); { jclass chimeSoundStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$ChimeClusterChimeSoundStruct", chimeSoundStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$ChimeClusterChimeSoundStruct"); return nullptr; } jmethodID chimeSoundStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, chimeSoundStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V", &chimeSoundStructStructCtor_1); if (err != CHIP_NO_ERROR || chimeSoundStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$ChimeClusterChimeSoundStruct constructor"); return nullptr; } newElement_0 = env->NewObject(chimeSoundStructStructClass_1, chimeSoundStructStructCtor_1, newElement_0_chimeID, newElement_0_name); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::ActiveChimeID::Id: { using TypeInfo = Attributes::ActiveChimeID::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Enabled::Id: { using TypeInfo = Attributes::Enabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::EcosystemInformation::Id: { using namespace app::Clusters::EcosystemInformation; switch (aPath.mAttributeId) { case Attributes::DeviceDirectory::Id: { using TypeInfo = Attributes::DeviceDirectory::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_deviceName; if (!entry_0.deviceName.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_deviceName); } else { jobject newElement_0_deviceNameInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.deviceName.Value(), newElement_0_deviceNameInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_0_deviceNameInsideOptional, newElement_0_deviceName); } jobject newElement_0_deviceNameLastEdit; if (!entry_0.deviceNameLastEdit.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_deviceNameLastEdit); } else { jobject newElement_0_deviceNameLastEditInsideOptional; std::string newElement_0_deviceNameLastEditInsideOptionalClassName = "java/lang/Long"; std::string newElement_0_deviceNameLastEditInsideOptionalCtorSignature = "(J)V"; jlong jninewElement_0_deviceNameLastEditInsideOptional = static_cast(entry_0.deviceNameLastEdit.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_deviceNameLastEditInsideOptionalClassName.c_str(), newElement_0_deviceNameLastEditInsideOptionalCtorSignature.c_str(), jninewElement_0_deviceNameLastEditInsideOptional, newElement_0_deviceNameLastEditInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_deviceNameLastEditInsideOptional, newElement_0_deviceNameLastEdit); } jobject newElement_0_bridgedEndpoint; std::string newElement_0_bridgedEndpointClassName = "java/lang/Integer"; std::string newElement_0_bridgedEndpointCtorSignature = "(I)V"; jint jninewElement_0_bridgedEndpoint = static_cast(entry_0.bridgedEndpoint); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_bridgedEndpointClassName.c_str(), newElement_0_bridgedEndpointCtorSignature.c_str(), jninewElement_0_bridgedEndpoint, newElement_0_bridgedEndpoint); jobject newElement_0_originalEndpoint; std::string newElement_0_originalEndpointClassName = "java/lang/Integer"; std::string newElement_0_originalEndpointCtorSignature = "(I)V"; jint jninewElement_0_originalEndpoint = static_cast(entry_0.originalEndpoint); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_originalEndpointClassName.c_str(), newElement_0_originalEndpointCtorSignature.c_str(), jninewElement_0_originalEndpoint, newElement_0_originalEndpoint); jobject newElement_0_deviceTypes; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_deviceTypes); auto iter_newElement_0_deviceTypes_2 = entry_0.deviceTypes.begin(); while (iter_newElement_0_deviceTypes_2.Next()) { auto & entry_2 = iter_newElement_0_deviceTypes_2.GetValue(); jobject newElement_2; jobject newElement_2_deviceType; std::string newElement_2_deviceTypeClassName = "java/lang/Long"; std::string newElement_2_deviceTypeCtorSignature = "(J)V"; jlong jninewElement_2_deviceType = static_cast(entry_2.deviceType); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2_deviceTypeClassName.c_str(), newElement_2_deviceTypeCtorSignature.c_str(), jninewElement_2_deviceType, newElement_2_deviceType); jobject newElement_2_revision; std::string newElement_2_revisionClassName = "java/lang/Integer"; std::string newElement_2_revisionCtorSignature = "(I)V"; jint jninewElement_2_revision = static_cast(entry_2.revision); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_revisionClassName.c_str(), newElement_2_revisionCtorSignature.c_str(), jninewElement_2_revision, newElement_2_revision); { jclass deviceTypeStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$EcosystemInformationClusterDeviceTypeStruct", deviceTypeStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$EcosystemInformationClusterDeviceTypeStruct"); return nullptr; } jmethodID deviceTypeStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod(env, deviceTypeStructStructClass_3, "", "(Ljava/lang/Long;Ljava/lang/Integer;)V", &deviceTypeStructStructCtor_3); if (err != CHIP_NO_ERROR || deviceTypeStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$EcosystemInformationClusterDeviceTypeStruct constructor"); return nullptr; } newElement_2 = env->NewObject(deviceTypeStructStructClass_3, deviceTypeStructStructCtor_3, newElement_2_deviceType, newElement_2_revision); } chip::JniReferences::GetInstance().AddToList(newElement_0_deviceTypes, newElement_2); } jobject newElement_0_uniqueLocationIDs; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_uniqueLocationIDs); auto iter_newElement_0_uniqueLocationIDs_2 = entry_0.uniqueLocationIDs.begin(); while (iter_newElement_0_uniqueLocationIDs_2.Next()) { auto & entry_2 = iter_newElement_0_uniqueLocationIDs_2.GetValue(); jobject newElement_2; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_2, newElement_2)); chip::JniReferences::GetInstance().AddToList(newElement_0_uniqueLocationIDs, newElement_2); } jobject newElement_0_uniqueLocationIDsLastEdit; std::string newElement_0_uniqueLocationIDsLastEditClassName = "java/lang/Long"; std::string newElement_0_uniqueLocationIDsLastEditCtorSignature = "(J)V"; jlong jninewElement_0_uniqueLocationIDsLastEdit = static_cast(entry_0.uniqueLocationIDsLastEdit); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_uniqueLocationIDsLastEditClassName.c_str(), newElement_0_uniqueLocationIDsLastEditCtorSignature.c_str(), jninewElement_0_uniqueLocationIDsLastEdit, newElement_0_uniqueLocationIDsLastEdit); jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); { jclass ecosystemDeviceStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$EcosystemInformationClusterEcosystemDeviceStruct", ecosystemDeviceStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$EcosystemInformationClusterEcosystemDeviceStruct"); return nullptr; } jmethodID ecosystemDeviceStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, ecosystemDeviceStructStructClass_1, "", "(Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/" "util/ArrayList;Ljava/lang/Long;Ljava/lang/Integer;)V", &ecosystemDeviceStructStructCtor_1); if (err != CHIP_NO_ERROR || ecosystemDeviceStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$EcosystemInformationClusterEcosystemDeviceStruct constructor"); return nullptr; } newElement_0 = env->NewObject(ecosystemDeviceStructStructClass_1, ecosystemDeviceStructStructCtor_1, newElement_0_deviceName, newElement_0_deviceNameLastEdit, newElement_0_bridgedEndpoint, newElement_0_originalEndpoint, newElement_0_deviceTypes, newElement_0_uniqueLocationIDs, newElement_0_uniqueLocationIDsLastEdit, newElement_0_fabricIndex); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::LocationDirectory::Id: { using TypeInfo = Attributes::LocationDirectory::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_uniqueLocationID; LogErrorOnFailure( chip::JniReferences::GetInstance().CharToStringUTF(entry_0.uniqueLocationID, newElement_0_uniqueLocationID)); jobject newElement_0_locationDescriptor; jobject newElement_0_locationDescriptor_locationName; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.locationDescriptor.locationName, newElement_0_locationDescriptor_locationName)); jobject newElement_0_locationDescriptor_floorNumber; if (entry_0.locationDescriptor.floorNumber.IsNull()) { newElement_0_locationDescriptor_floorNumber = nullptr; } else { std::string newElement_0_locationDescriptor_floorNumberClassName = "java/lang/Integer"; std::string newElement_0_locationDescriptor_floorNumberCtorSignature = "(I)V"; jint jninewElement_0_locationDescriptor_floorNumber = static_cast(entry_0.locationDescriptor.floorNumber.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_locationDescriptor_floorNumberClassName.c_str(), newElement_0_locationDescriptor_floorNumberCtorSignature.c_str(), jninewElement_0_locationDescriptor_floorNumber, newElement_0_locationDescriptor_floorNumber); } jobject newElement_0_locationDescriptor_areaType; if (entry_0.locationDescriptor.areaType.IsNull()) { newElement_0_locationDescriptor_areaType = nullptr; } else { std::string newElement_0_locationDescriptor_areaTypeClassName = "java/lang/Integer"; std::string newElement_0_locationDescriptor_areaTypeCtorSignature = "(I)V"; jint jninewElement_0_locationDescriptor_areaType = static_cast(entry_0.locationDescriptor.areaType.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_locationDescriptor_areaTypeClassName.c_str(), newElement_0_locationDescriptor_areaTypeCtorSignature.c_str(), jninewElement_0_locationDescriptor_areaType, newElement_0_locationDescriptor_areaType); } { jclass locationDescriptorStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$EcosystemInformationClusterLocationDescriptorStruct", locationDescriptorStructStructClass_2); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$EcosystemInformationClusterLocationDescriptorStruct"); return nullptr; } jmethodID locationDescriptorStructStructCtor_2; err = chip::JniReferences::GetInstance().FindMethod( env, locationDescriptorStructStructClass_2, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;)V", &locationDescriptorStructStructCtor_2); if (err != CHIP_NO_ERROR || locationDescriptorStructStructCtor_2 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$EcosystemInformationClusterLocationDescriptorStruct constructor"); return nullptr; } newElement_0_locationDescriptor = env->NewObject(locationDescriptorStructStructClass_2, locationDescriptorStructStructCtor_2, newElement_0_locationDescriptor_locationName, newElement_0_locationDescriptor_floorNumber, newElement_0_locationDescriptor_areaType); } jobject newElement_0_locationDescriptorLastEdit; std::string newElement_0_locationDescriptorLastEditClassName = "java/lang/Long"; std::string newElement_0_locationDescriptorLastEditCtorSignature = "(J)V"; jlong jninewElement_0_locationDescriptorLastEdit = static_cast(entry_0.locationDescriptorLastEdit); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_locationDescriptorLastEditClassName.c_str(), newElement_0_locationDescriptorLastEditCtorSignature.c_str(), jninewElement_0_locationDescriptorLastEdit, newElement_0_locationDescriptorLastEdit); jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); { jclass ecosystemLocationStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$EcosystemInformationClusterEcosystemLocationStruct", ecosystemLocationStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$EcosystemInformationClusterEcosystemLocationStruct"); return nullptr; } jmethodID ecosystemLocationStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, ecosystemLocationStructStructClass_1, "", "(Ljava/lang/String;Lchip/devicecontroller/" "ChipStructs$EcosystemInformationClusterLocationDescriptorStruct;Ljava/lang/Long;Ljava/lang/Integer;)V", &ecosystemLocationStructStructCtor_1); if (err != CHIP_NO_ERROR || ecosystemLocationStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$EcosystemInformationClusterEcosystemLocationStruct constructor"); return nullptr; } newElement_0 = env->NewObject(ecosystemLocationStructStructClass_1, ecosystemLocationStructStructCtor_1, newElement_0_uniqueLocationID, newElement_0_locationDescriptor, newElement_0_locationDescriptorLastEdit, newElement_0_fabricIndex); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::CommissionerControl::Id: { using namespace app::Clusters::CommissionerControl; switch (aPath.mAttributeId) { case Attributes::SupportedDeviceCategories::Id: { using TypeInfo = Attributes::SupportedDeviceCategories::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::UnitTesting::Id: { using namespace app::Clusters::UnitTesting; switch (aPath.mAttributeId) { case Attributes::Boolean::Id: { using TypeInfo = Attributes::Boolean::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Bitmap8::Id: { using TypeInfo = Attributes::Bitmap8::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Bitmap16::Id: { using TypeInfo = Attributes::Bitmap16::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Bitmap32::Id: { using TypeInfo = Attributes::Bitmap32::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Bitmap64::Id: { using TypeInfo = Attributes::Bitmap64::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Int8u::Id: { using TypeInfo = Attributes::Int8u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Int16u::Id: { using TypeInfo = Attributes::Int16u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Int24u::Id: { using TypeInfo = Attributes::Int24u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Int32u::Id: { using TypeInfo = Attributes::Int32u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Int40u::Id: { using TypeInfo = Attributes::Int40u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Int48u::Id: { using TypeInfo = Attributes::Int48u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Int56u::Id: { using TypeInfo = Attributes::Int56u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Int64u::Id: { using TypeInfo = Attributes::Int64u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Int8s::Id: { using TypeInfo = Attributes::Int8s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Int16s::Id: { using TypeInfo = Attributes::Int16s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Int24s::Id: { using TypeInfo = Attributes::Int24s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Int32s::Id: { using TypeInfo = Attributes::Int32s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Int40s::Id: { using TypeInfo = Attributes::Int40s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Int48s::Id: { using TypeInfo = Attributes::Int48s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Int56s::Id: { using TypeInfo = Attributes::Int56s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Int64s::Id: { using TypeInfo = Attributes::Int64s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Enum8::Id: { using TypeInfo = Attributes::Enum8::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::Enum16::Id: { using TypeInfo = Attributes::Enum16::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::FloatSingle::Id: { using TypeInfo = Attributes::FloatSingle::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::FloatDouble::Id: { using TypeInfo = Attributes::FloatDouble::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Double"; std::string valueCtorSignature = "(D)V"; jdouble jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::OctetString::Id: { using TypeInfo = Attributes::OctetString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.size())); env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.size()), reinterpret_cast(cppValue.data())); value = valueByteArray; return value; } case Attributes::ListInt8u::Id: { using TypeInfo = Attributes::ListInt8u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Integer"; std::string newElement_0CtorSignature = "(I)V"; jint jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::ListOctetString::Id: { using TypeInfo = Attributes::ListOctetString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), reinterpret_cast(entry_0.data())); newElement_0 = newElement_0ByteArray; chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::ListStructOctetString::Id: { using TypeInfo = Attributes::ListStructOctetString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_member1; std::string newElement_0_member1ClassName = "java/lang/Long"; std::string newElement_0_member1CtorSignature = "(J)V"; jlong jninewElement_0_member1 = static_cast(entry_0.member1); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_member1ClassName.c_str(), newElement_0_member1CtorSignature.c_str(), jninewElement_0_member1, newElement_0_member1); jobject newElement_0_member2; jbyteArray newElement_0_member2ByteArray = env->NewByteArray(static_cast(entry_0.member2.size())); env->SetByteArrayRegion(newElement_0_member2ByteArray, 0, static_cast(entry_0.member2.size()), reinterpret_cast(entry_0.member2.data())); newElement_0_member2 = newElement_0_member2ByteArray; { jclass testListStructOctetStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestListStructOctet", testListStructOctetStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestListStructOctet"); return nullptr; } jmethodID testListStructOctetStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, testListStructOctetStructClass_1, "", "(Ljava/lang/Long;[B)V", &testListStructOctetStructCtor_1); if (err != CHIP_NO_ERROR || testListStructOctetStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestListStructOctet constructor"); return nullptr; } newElement_0 = env->NewObject(testListStructOctetStructClass_1, testListStructOctetStructCtor_1, newElement_0_member1, newElement_0_member2); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::LongOctetString::Id: { using TypeInfo = Attributes::LongOctetString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.size())); env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.size()), reinterpret_cast(cppValue.data())); value = valueByteArray; return value; } case Attributes::CharString::Id: { using TypeInfo = Attributes::CharString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::LongCharString::Id: { using TypeInfo = Attributes::LongCharString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } case Attributes::EpochUs::Id: { using TypeInfo = Attributes::EpochUs::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::EpochS::Id: { using TypeInfo = Attributes::EpochS::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::VendorId::Id: { using TypeInfo = Attributes::VendorId::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ListNullablesAndOptionalsStruct::Id: { using TypeInfo = Attributes::ListNullablesAndOptionalsStruct::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_nullableInt; if (entry_0.nullableInt.IsNull()) { newElement_0_nullableInt = nullptr; } else { std::string newElement_0_nullableIntClassName = "java/lang/Integer"; std::string newElement_0_nullableIntCtorSignature = "(I)V"; jint jninewElement_0_nullableInt = static_cast(entry_0.nullableInt.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableIntClassName.c_str(), newElement_0_nullableIntCtorSignature.c_str(), jninewElement_0_nullableInt, newElement_0_nullableInt); } jobject newElement_0_optionalInt; if (!entry_0.optionalInt.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalInt); } else { jobject newElement_0_optionalIntInsideOptional; std::string newElement_0_optionalIntInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_optionalIntInsideOptionalCtorSignature = "(I)V"; jint jninewElement_0_optionalIntInsideOptional = static_cast(entry_0.optionalInt.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalIntInsideOptionalClassName.c_str(), newElement_0_optionalIntInsideOptionalCtorSignature.c_str(), jninewElement_0_optionalIntInsideOptional, newElement_0_optionalIntInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalIntInsideOptional, newElement_0_optionalInt); } jobject newElement_0_nullableOptionalInt; if (!entry_0.nullableOptionalInt.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalInt); } else { jobject newElement_0_nullableOptionalIntInsideOptional; if (entry_0.nullableOptionalInt.Value().IsNull()) { newElement_0_nullableOptionalIntInsideOptional = nullptr; } else { std::string newElement_0_nullableOptionalIntInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_nullableOptionalIntInsideOptionalCtorSignature = "(I)V"; jint jninewElement_0_nullableOptionalIntInsideOptional = static_cast(entry_0.nullableOptionalInt.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalIntInsideOptionalClassName.c_str(), newElement_0_nullableOptionalIntInsideOptionalCtorSignature.c_str(), jninewElement_0_nullableOptionalIntInsideOptional, newElement_0_nullableOptionalIntInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableOptionalIntInsideOptional, newElement_0_nullableOptionalInt); } jobject newElement_0_nullableString; if (entry_0.nullableString.IsNull()) { newElement_0_nullableString = nullptr; } else { LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.nullableString.Value(), newElement_0_nullableString)); } jobject newElement_0_optionalString; if (!entry_0.optionalString.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalString); } else { jobject newElement_0_optionalStringInsideOptional; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( entry_0.optionalString.Value(), newElement_0_optionalStringInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalStringInsideOptional, newElement_0_optionalString); } jobject newElement_0_nullableOptionalString; if (!entry_0.nullableOptionalString.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalString); } else { jobject newElement_0_nullableOptionalStringInsideOptional; if (entry_0.nullableOptionalString.Value().IsNull()) { newElement_0_nullableOptionalStringInsideOptional = nullptr; } else { LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( entry_0.nullableOptionalString.Value().Value(), newElement_0_nullableOptionalStringInsideOptional)); } chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableOptionalStringInsideOptional, newElement_0_nullableOptionalString); } jobject newElement_0_nullableStruct; if (entry_0.nullableStruct.IsNull()) { newElement_0_nullableStruct = nullptr; } else { jobject newElement_0_nullableStruct_a; std::string newElement_0_nullableStruct_aClassName = "java/lang/Integer"; std::string newElement_0_nullableStruct_aCtorSignature = "(I)V"; jint jninewElement_0_nullableStruct_a = static_cast(entry_0.nullableStruct.Value().a); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_aClassName.c_str(), newElement_0_nullableStruct_aCtorSignature.c_str(), jninewElement_0_nullableStruct_a, newElement_0_nullableStruct_a); jobject newElement_0_nullableStruct_b; std::string newElement_0_nullableStruct_bClassName = "java/lang/Boolean"; std::string newElement_0_nullableStruct_bCtorSignature = "(Z)V"; jboolean jninewElement_0_nullableStruct_b = static_cast(entry_0.nullableStruct.Value().b); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_bClassName.c_str(), newElement_0_nullableStruct_bCtorSignature.c_str(), jninewElement_0_nullableStruct_b, newElement_0_nullableStruct_b); jobject newElement_0_nullableStruct_c; std::string newElement_0_nullableStruct_cClassName = "java/lang/Integer"; std::string newElement_0_nullableStruct_cCtorSignature = "(I)V"; jint jninewElement_0_nullableStruct_c = static_cast(entry_0.nullableStruct.Value().c); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_cClassName.c_str(), newElement_0_nullableStruct_cCtorSignature.c_str(), jninewElement_0_nullableStruct_c, newElement_0_nullableStruct_c); jobject newElement_0_nullableStruct_d; jbyteArray newElement_0_nullableStruct_dByteArray = env->NewByteArray(static_cast(entry_0.nullableStruct.Value().d.size())); env->SetByteArrayRegion(newElement_0_nullableStruct_dByteArray, 0, static_cast(entry_0.nullableStruct.Value().d.size()), reinterpret_cast(entry_0.nullableStruct.Value().d.data())); newElement_0_nullableStruct_d = newElement_0_nullableStruct_dByteArray; jobject newElement_0_nullableStruct_e; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.nullableStruct.Value().e, newElement_0_nullableStruct_e)); jobject newElement_0_nullableStruct_f; std::string newElement_0_nullableStruct_fClassName = "java/lang/Integer"; std::string newElement_0_nullableStruct_fCtorSignature = "(I)V"; jint jninewElement_0_nullableStruct_f = static_cast(entry_0.nullableStruct.Value().f.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_fClassName.c_str(), newElement_0_nullableStruct_fCtorSignature.c_str(), jninewElement_0_nullableStruct_f, newElement_0_nullableStruct_f); jobject newElement_0_nullableStruct_g; std::string newElement_0_nullableStruct_gClassName = "java/lang/Float"; std::string newElement_0_nullableStruct_gCtorSignature = "(F)V"; jfloat jninewElement_0_nullableStruct_g = static_cast(entry_0.nullableStruct.Value().g); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_gClassName.c_str(), newElement_0_nullableStruct_gCtorSignature.c_str(), jninewElement_0_nullableStruct_g, newElement_0_nullableStruct_g); jobject newElement_0_nullableStruct_h; std::string newElement_0_nullableStruct_hClassName = "java/lang/Double"; std::string newElement_0_nullableStruct_hCtorSignature = "(D)V"; jdouble jninewElement_0_nullableStruct_h = static_cast(entry_0.nullableStruct.Value().h); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_hClassName.c_str(), newElement_0_nullableStruct_hCtorSignature.c_str(), jninewElement_0_nullableStruct_h, newElement_0_nullableStruct_h); jobject newElement_0_nullableStruct_i; if (!entry_0.nullableStruct.Value().i.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableStruct_i); } else { jobject newElement_0_nullableStruct_iInsideOptional; std::string newElement_0_nullableStruct_iInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_nullableStruct_iInsideOptionalCtorSignature = "(I)V"; jint jninewElement_0_nullableStruct_iInsideOptional = static_cast(entry_0.nullableStruct.Value().i.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableStruct_iInsideOptionalClassName.c_str(), newElement_0_nullableStruct_iInsideOptionalCtorSignature.c_str(), jninewElement_0_nullableStruct_iInsideOptional, newElement_0_nullableStruct_iInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableStruct_iInsideOptional, newElement_0_nullableStruct_i); } { jclass simpleStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); return nullptr; } jmethodID simpleStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod( env, simpleStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" "Integer;Ljava/lang/Float;Ljava/lang/Double;Ljava/util/Optional;)V", &simpleStructStructCtor_3); if (err != CHIP_NO_ERROR || simpleStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); return nullptr; } newElement_0_nullableStruct = env->NewObject( simpleStructStructClass_3, simpleStructStructCtor_3, newElement_0_nullableStruct_a, newElement_0_nullableStruct_b, newElement_0_nullableStruct_c, newElement_0_nullableStruct_d, newElement_0_nullableStruct_e, newElement_0_nullableStruct_f, newElement_0_nullableStruct_g, newElement_0_nullableStruct_h, newElement_0_nullableStruct_i); } } jobject newElement_0_optionalStruct; if (!entry_0.optionalStruct.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalStruct); } else { jobject newElement_0_optionalStructInsideOptional; jobject newElement_0_optionalStructInsideOptional_a; std::string newElement_0_optionalStructInsideOptional_aClassName = "java/lang/Integer"; std::string newElement_0_optionalStructInsideOptional_aCtorSignature = "(I)V"; jint jninewElement_0_optionalStructInsideOptional_a = static_cast(entry_0.optionalStruct.Value().a); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_aClassName.c_str(), newElement_0_optionalStructInsideOptional_aCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_a, newElement_0_optionalStructInsideOptional_a); jobject newElement_0_optionalStructInsideOptional_b; std::string newElement_0_optionalStructInsideOptional_bClassName = "java/lang/Boolean"; std::string newElement_0_optionalStructInsideOptional_bCtorSignature = "(Z)V"; jboolean jninewElement_0_optionalStructInsideOptional_b = static_cast(entry_0.optionalStruct.Value().b); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_bClassName.c_str(), newElement_0_optionalStructInsideOptional_bCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_b, newElement_0_optionalStructInsideOptional_b); jobject newElement_0_optionalStructInsideOptional_c; std::string newElement_0_optionalStructInsideOptional_cClassName = "java/lang/Integer"; std::string newElement_0_optionalStructInsideOptional_cCtorSignature = "(I)V"; jint jninewElement_0_optionalStructInsideOptional_c = static_cast(entry_0.optionalStruct.Value().c); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_cClassName.c_str(), newElement_0_optionalStructInsideOptional_cCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_c, newElement_0_optionalStructInsideOptional_c); jobject newElement_0_optionalStructInsideOptional_d; jbyteArray newElement_0_optionalStructInsideOptional_dByteArray = env->NewByteArray(static_cast(entry_0.optionalStruct.Value().d.size())); env->SetByteArrayRegion(newElement_0_optionalStructInsideOptional_dByteArray, 0, static_cast(entry_0.optionalStruct.Value().d.size()), reinterpret_cast(entry_0.optionalStruct.Value().d.data())); newElement_0_optionalStructInsideOptional_d = newElement_0_optionalStructInsideOptional_dByteArray; jobject newElement_0_optionalStructInsideOptional_e; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( entry_0.optionalStruct.Value().e, newElement_0_optionalStructInsideOptional_e)); jobject newElement_0_optionalStructInsideOptional_f; std::string newElement_0_optionalStructInsideOptional_fClassName = "java/lang/Integer"; std::string newElement_0_optionalStructInsideOptional_fCtorSignature = "(I)V"; jint jninewElement_0_optionalStructInsideOptional_f = static_cast(entry_0.optionalStruct.Value().f.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_fClassName.c_str(), newElement_0_optionalStructInsideOptional_fCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_f, newElement_0_optionalStructInsideOptional_f); jobject newElement_0_optionalStructInsideOptional_g; std::string newElement_0_optionalStructInsideOptional_gClassName = "java/lang/Float"; std::string newElement_0_optionalStructInsideOptional_gCtorSignature = "(F)V"; jfloat jninewElement_0_optionalStructInsideOptional_g = static_cast(entry_0.optionalStruct.Value().g); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_gClassName.c_str(), newElement_0_optionalStructInsideOptional_gCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_g, newElement_0_optionalStructInsideOptional_g); jobject newElement_0_optionalStructInsideOptional_h; std::string newElement_0_optionalStructInsideOptional_hClassName = "java/lang/Double"; std::string newElement_0_optionalStructInsideOptional_hCtorSignature = "(D)V"; jdouble jninewElement_0_optionalStructInsideOptional_h = static_cast(entry_0.optionalStruct.Value().h); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_hClassName.c_str(), newElement_0_optionalStructInsideOptional_hCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_h, newElement_0_optionalStructInsideOptional_h); jobject newElement_0_optionalStructInsideOptional_i; if (!entry_0.optionalStruct.Value().i.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalStructInsideOptional_i); } else { jobject newElement_0_optionalStructInsideOptional_iInsideOptional; std::string newElement_0_optionalStructInsideOptional_iInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_optionalStructInsideOptional_iInsideOptionalCtorSignature = "(I)V"; jint jninewElement_0_optionalStructInsideOptional_iInsideOptional = static_cast(entry_0.optionalStruct.Value().i.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalStructInsideOptional_iInsideOptionalClassName.c_str(), newElement_0_optionalStructInsideOptional_iInsideOptionalCtorSignature.c_str(), jninewElement_0_optionalStructInsideOptional_iInsideOptional, newElement_0_optionalStructInsideOptional_iInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalStructInsideOptional_iInsideOptional, newElement_0_optionalStructInsideOptional_i); } { jclass simpleStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_3); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); return nullptr; } jmethodID simpleStructStructCtor_3; err = chip::JniReferences::GetInstance().FindMethod( env, simpleStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" "Integer;Ljava/lang/Float;Ljava/lang/Double;Ljava/util/Optional;)V", &simpleStructStructCtor_3); if (err != CHIP_NO_ERROR || simpleStructStructCtor_3 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); return nullptr; } newElement_0_optionalStructInsideOptional = env->NewObject( simpleStructStructClass_3, simpleStructStructCtor_3, newElement_0_optionalStructInsideOptional_a, newElement_0_optionalStructInsideOptional_b, newElement_0_optionalStructInsideOptional_c, newElement_0_optionalStructInsideOptional_d, newElement_0_optionalStructInsideOptional_e, newElement_0_optionalStructInsideOptional_f, newElement_0_optionalStructInsideOptional_g, newElement_0_optionalStructInsideOptional_h, newElement_0_optionalStructInsideOptional_i); } chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalStructInsideOptional, newElement_0_optionalStruct); } jobject newElement_0_nullableOptionalStruct; if (!entry_0.nullableOptionalStruct.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalStruct); } else { jobject newElement_0_nullableOptionalStructInsideOptional; if (entry_0.nullableOptionalStruct.Value().IsNull()) { newElement_0_nullableOptionalStructInsideOptional = nullptr; } else { jobject newElement_0_nullableOptionalStructInsideOptional_a; std::string newElement_0_nullableOptionalStructInsideOptional_aClassName = "java/lang/Integer"; std::string newElement_0_nullableOptionalStructInsideOptional_aCtorSignature = "(I)V"; jint jninewElement_0_nullableOptionalStructInsideOptional_a = static_cast(entry_0.nullableOptionalStruct.Value().Value().a); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_aClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_aCtorSignature.c_str(), jninewElement_0_nullableOptionalStructInsideOptional_a, newElement_0_nullableOptionalStructInsideOptional_a); jobject newElement_0_nullableOptionalStructInsideOptional_b; std::string newElement_0_nullableOptionalStructInsideOptional_bClassName = "java/lang/Boolean"; std::string newElement_0_nullableOptionalStructInsideOptional_bCtorSignature = "(Z)V"; jboolean jninewElement_0_nullableOptionalStructInsideOptional_b = static_cast(entry_0.nullableOptionalStruct.Value().Value().b); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_bClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_bCtorSignature.c_str(), jninewElement_0_nullableOptionalStructInsideOptional_b, newElement_0_nullableOptionalStructInsideOptional_b); jobject newElement_0_nullableOptionalStructInsideOptional_c; std::string newElement_0_nullableOptionalStructInsideOptional_cClassName = "java/lang/Integer"; std::string newElement_0_nullableOptionalStructInsideOptional_cCtorSignature = "(I)V"; jint jninewElement_0_nullableOptionalStructInsideOptional_c = static_cast(entry_0.nullableOptionalStruct.Value().Value().c); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_cClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_cCtorSignature.c_str(), jninewElement_0_nullableOptionalStructInsideOptional_c, newElement_0_nullableOptionalStructInsideOptional_c); jobject newElement_0_nullableOptionalStructInsideOptional_d; jbyteArray newElement_0_nullableOptionalStructInsideOptional_dByteArray = env->NewByteArray(static_cast(entry_0.nullableOptionalStruct.Value().Value().d.size())); env->SetByteArrayRegion( newElement_0_nullableOptionalStructInsideOptional_dByteArray, 0, static_cast(entry_0.nullableOptionalStruct.Value().Value().d.size()), reinterpret_cast(entry_0.nullableOptionalStruct.Value().Value().d.data())); newElement_0_nullableOptionalStructInsideOptional_d = newElement_0_nullableOptionalStructInsideOptional_dByteArray; jobject newElement_0_nullableOptionalStructInsideOptional_e; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( entry_0.nullableOptionalStruct.Value().Value().e, newElement_0_nullableOptionalStructInsideOptional_e)); jobject newElement_0_nullableOptionalStructInsideOptional_f; std::string newElement_0_nullableOptionalStructInsideOptional_fClassName = "java/lang/Integer"; std::string newElement_0_nullableOptionalStructInsideOptional_fCtorSignature = "(I)V"; jint jninewElement_0_nullableOptionalStructInsideOptional_f = static_cast(entry_0.nullableOptionalStruct.Value().Value().f.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_fClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_fCtorSignature.c_str(), jninewElement_0_nullableOptionalStructInsideOptional_f, newElement_0_nullableOptionalStructInsideOptional_f); jobject newElement_0_nullableOptionalStructInsideOptional_g; std::string newElement_0_nullableOptionalStructInsideOptional_gClassName = "java/lang/Float"; std::string newElement_0_nullableOptionalStructInsideOptional_gCtorSignature = "(F)V"; jfloat jninewElement_0_nullableOptionalStructInsideOptional_g = static_cast(entry_0.nullableOptionalStruct.Value().Value().g); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_gClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_gCtorSignature.c_str(), jninewElement_0_nullableOptionalStructInsideOptional_g, newElement_0_nullableOptionalStructInsideOptional_g); jobject newElement_0_nullableOptionalStructInsideOptional_h; std::string newElement_0_nullableOptionalStructInsideOptional_hClassName = "java/lang/Double"; std::string newElement_0_nullableOptionalStructInsideOptional_hCtorSignature = "(D)V"; jdouble jninewElement_0_nullableOptionalStructInsideOptional_h = static_cast(entry_0.nullableOptionalStruct.Value().Value().h); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_hClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_hCtorSignature.c_str(), jninewElement_0_nullableOptionalStructInsideOptional_h, newElement_0_nullableOptionalStructInsideOptional_h); jobject newElement_0_nullableOptionalStructInsideOptional_i; if (!entry_0.nullableOptionalStruct.Value().Value().i.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalStructInsideOptional_i); } else { jobject newElement_0_nullableOptionalStructInsideOptional_iInsideOptional; std::string newElement_0_nullableOptionalStructInsideOptional_iInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_nullableOptionalStructInsideOptional_iInsideOptionalCtorSignature = "(I)V"; jint jninewElement_0_nullableOptionalStructInsideOptional_iInsideOptional = static_cast(entry_0.nullableOptionalStruct.Value().Value().i.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalStructInsideOptional_iInsideOptionalClassName.c_str(), newElement_0_nullableOptionalStructInsideOptional_iInsideOptionalCtorSignature.c_str(), jninewElement_0_nullableOptionalStructInsideOptional_iInsideOptional, newElement_0_nullableOptionalStructInsideOptional_iInsideOptional); chip::JniReferences::GetInstance().CreateOptional( newElement_0_nullableOptionalStructInsideOptional_iInsideOptional, newElement_0_nullableOptionalStructInsideOptional_i); } { jclass simpleStructStructClass_4; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_4); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); return nullptr; } jmethodID simpleStructStructCtor_4; err = chip::JniReferences::GetInstance().FindMethod( env, simpleStructStructClass_4, "", "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" "Integer;Ljava/lang/Float;Ljava/lang/Double;Ljava/util/Optional;)V", &simpleStructStructCtor_4); if (err != CHIP_NO_ERROR || simpleStructStructCtor_4 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); return nullptr; } newElement_0_nullableOptionalStructInsideOptional = env->NewObject(simpleStructStructClass_4, simpleStructStructCtor_4, newElement_0_nullableOptionalStructInsideOptional_a, newElement_0_nullableOptionalStructInsideOptional_b, newElement_0_nullableOptionalStructInsideOptional_c, newElement_0_nullableOptionalStructInsideOptional_d, newElement_0_nullableOptionalStructInsideOptional_e, newElement_0_nullableOptionalStructInsideOptional_f, newElement_0_nullableOptionalStructInsideOptional_g, newElement_0_nullableOptionalStructInsideOptional_h, newElement_0_nullableOptionalStructInsideOptional_i); } } chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableOptionalStructInsideOptional, newElement_0_nullableOptionalStruct); } jobject newElement_0_nullableList; if (entry_0.nullableList.IsNull()) { newElement_0_nullableList = nullptr; } else { chip::JniReferences::GetInstance().CreateArrayList(newElement_0_nullableList); auto iter_newElement_0_nullableList_3 = entry_0.nullableList.Value().begin(); while (iter_newElement_0_nullableList_3.Next()) { auto & entry_3 = iter_newElement_0_nullableList_3.GetValue(); jobject newElement_3; std::string newElement_3ClassName = "java/lang/Integer"; std::string newElement_3CtorSignature = "(I)V"; jint jninewElement_3 = static_cast(entry_3); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); chip::JniReferences::GetInstance().AddToList(newElement_0_nullableList, newElement_3); } } jobject newElement_0_optionalList; if (!entry_0.optionalList.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalList); } else { jobject newElement_0_optionalListInsideOptional; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_optionalListInsideOptional); auto iter_newElement_0_optionalListInsideOptional_3 = entry_0.optionalList.Value().begin(); while (iter_newElement_0_optionalListInsideOptional_3.Next()) { auto & entry_3 = iter_newElement_0_optionalListInsideOptional_3.GetValue(); jobject newElement_3; std::string newElement_3ClassName = "java/lang/Integer"; std::string newElement_3CtorSignature = "(I)V"; jint jninewElement_3 = static_cast(entry_3); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); chip::JniReferences::GetInstance().AddToList(newElement_0_optionalListInsideOptional, newElement_3); } chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalListInsideOptional, newElement_0_optionalList); } jobject newElement_0_nullableOptionalList; if (!entry_0.nullableOptionalList.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalList); } else { jobject newElement_0_nullableOptionalListInsideOptional; if (entry_0.nullableOptionalList.Value().IsNull()) { newElement_0_nullableOptionalListInsideOptional = nullptr; } else { chip::JniReferences::GetInstance().CreateArrayList(newElement_0_nullableOptionalListInsideOptional); auto iter_newElement_0_nullableOptionalListInsideOptional_4 = entry_0.nullableOptionalList.Value().Value().begin(); while (iter_newElement_0_nullableOptionalListInsideOptional_4.Next()) { auto & entry_4 = iter_newElement_0_nullableOptionalListInsideOptional_4.GetValue(); jobject newElement_4; std::string newElement_4ClassName = "java/lang/Integer"; std::string newElement_4CtorSignature = "(I)V"; jint jninewElement_4 = static_cast(entry_4); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_4ClassName.c_str(), newElement_4CtorSignature.c_str(), jninewElement_4, newElement_4); chip::JniReferences::GetInstance().AddToList(newElement_0_nullableOptionalListInsideOptional, newElement_4); } } chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableOptionalListInsideOptional, newElement_0_nullableOptionalList); } { jclass nullablesAndOptionalsStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct", nullablesAndOptionalsStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct"); return nullptr; } jmethodID nullablesAndOptionalsStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, nullablesAndOptionalsStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/String;Ljava/util/Optional;Ljava/" "util/Optional;Lchip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;Ljava/util/Optional;Ljava/" "util/Optional;Ljava/util/ArrayList;Ljava/util/Optional;Ljava/util/Optional;)V", &nullablesAndOptionalsStructStructCtor_1); if (err != CHIP_NO_ERROR || nullablesAndOptionalsStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct constructor"); return nullptr; } newElement_0 = env->NewObject( nullablesAndOptionalsStructStructClass_1, nullablesAndOptionalsStructStructCtor_1, newElement_0_nullableInt, newElement_0_optionalInt, newElement_0_nullableOptionalInt, newElement_0_nullableString, newElement_0_optionalString, newElement_0_nullableOptionalString, newElement_0_nullableStruct, newElement_0_optionalStruct, newElement_0_nullableOptionalStruct, newElement_0_nullableList, newElement_0_optionalList, newElement_0_nullableOptionalList); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EnumAttr::Id: { using TypeInfo = Attributes::EnumAttr::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::StructAttr::Id: { using TypeInfo = Attributes::StructAttr::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_a; std::string value_aClassName = "java/lang/Integer"; std::string value_aCtorSignature = "(I)V"; jint jnivalue_a = static_cast(cppValue.a); chip::JniReferences::GetInstance().CreateBoxedObject(value_aClassName.c_str(), value_aCtorSignature.c_str(), jnivalue_a, value_a); jobject value_b; std::string value_bClassName = "java/lang/Boolean"; std::string value_bCtorSignature = "(Z)V"; jboolean jnivalue_b = static_cast(cppValue.b); chip::JniReferences::GetInstance().CreateBoxedObject(value_bClassName.c_str(), value_bCtorSignature.c_str(), jnivalue_b, value_b); jobject value_c; std::string value_cClassName = "java/lang/Integer"; std::string value_cCtorSignature = "(I)V"; jint jnivalue_c = static_cast(cppValue.c); chip::JniReferences::GetInstance().CreateBoxedObject(value_cClassName.c_str(), value_cCtorSignature.c_str(), jnivalue_c, value_c); jobject value_d; jbyteArray value_dByteArray = env->NewByteArray(static_cast(cppValue.d.size())); env->SetByteArrayRegion(value_dByteArray, 0, static_cast(cppValue.d.size()), reinterpret_cast(cppValue.d.data())); value_d = value_dByteArray; jobject value_e; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.e, value_e)); jobject value_f; std::string value_fClassName = "java/lang/Integer"; std::string value_fCtorSignature = "(I)V"; jint jnivalue_f = static_cast(cppValue.f.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(value_fClassName.c_str(), value_fCtorSignature.c_str(), jnivalue_f, value_f); jobject value_g; std::string value_gClassName = "java/lang/Float"; std::string value_gCtorSignature = "(F)V"; jfloat jnivalue_g = static_cast(cppValue.g); chip::JniReferences::GetInstance().CreateBoxedObject(value_gClassName.c_str(), value_gCtorSignature.c_str(), jnivalue_g, value_g); jobject value_h; std::string value_hClassName = "java/lang/Double"; std::string value_hCtorSignature = "(D)V"; jdouble jnivalue_h = static_cast(cppValue.h); chip::JniReferences::GetInstance().CreateBoxedObject(value_hClassName.c_str(), value_hCtorSignature.c_str(), jnivalue_h, value_h); jobject value_i; if (!cppValue.i.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_i); } else { jobject value_iInsideOptional; std::string value_iInsideOptionalClassName = "java/lang/Integer"; std::string value_iInsideOptionalCtorSignature = "(I)V"; jint jnivalue_iInsideOptional = static_cast(cppValue.i.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(value_iInsideOptionalClassName.c_str(), value_iInsideOptionalCtorSignature.c_str(), jnivalue_iInsideOptional, value_iInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_iInsideOptional, value_i); } { jclass simpleStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); return nullptr; } jmethodID simpleStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod( env, simpleStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/" "Float;Ljava/lang/Double;Ljava/util/Optional;)V", &simpleStructStructCtor_0); if (err != CHIP_NO_ERROR || simpleStructStructCtor_0 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); return nullptr; } value = env->NewObject(simpleStructStructClass_0, simpleStructStructCtor_0, value_a, value_b, value_c, value_d, value_e, value_f, value_g, value_h, value_i); } return value; } case Attributes::RangeRestrictedInt8u::Id: { using TypeInfo = Attributes::RangeRestrictedInt8u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RangeRestrictedInt8s::Id: { using TypeInfo = Attributes::RangeRestrictedInt8s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RangeRestrictedInt16u::Id: { using TypeInfo = Attributes::RangeRestrictedInt16u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::RangeRestrictedInt16s::Id: { using TypeInfo = Attributes::RangeRestrictedInt16s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ListLongOctetString::Id: { using TypeInfo = Attributes::ListLongOctetString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), reinterpret_cast(entry_0.data())); newElement_0 = newElement_0ByteArray; chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::ListFabricScoped::Id: { using TypeInfo = Attributes::ListFabricScoped::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; jobject newElement_0_fabricSensitiveInt8u; std::string newElement_0_fabricSensitiveInt8uClassName = "java/lang/Integer"; std::string newElement_0_fabricSensitiveInt8uCtorSignature = "(I)V"; jint jninewElement_0_fabricSensitiveInt8u = static_cast(entry_0.fabricSensitiveInt8u); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveInt8uClassName.c_str(), newElement_0_fabricSensitiveInt8uCtorSignature.c_str(), jninewElement_0_fabricSensitiveInt8u, newElement_0_fabricSensitiveInt8u); jobject newElement_0_optionalFabricSensitiveInt8u; if (!entry_0.optionalFabricSensitiveInt8u.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalFabricSensitiveInt8u); } else { jobject newElement_0_optionalFabricSensitiveInt8uInsideOptional; std::string newElement_0_optionalFabricSensitiveInt8uInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_optionalFabricSensitiveInt8uInsideOptionalCtorSignature = "(I)V"; jint jninewElement_0_optionalFabricSensitiveInt8uInsideOptional = static_cast(entry_0.optionalFabricSensitiveInt8u.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_optionalFabricSensitiveInt8uInsideOptionalClassName.c_str(), newElement_0_optionalFabricSensitiveInt8uInsideOptionalCtorSignature.c_str(), jninewElement_0_optionalFabricSensitiveInt8uInsideOptional, newElement_0_optionalFabricSensitiveInt8uInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalFabricSensitiveInt8uInsideOptional, newElement_0_optionalFabricSensitiveInt8u); } jobject newElement_0_nullableFabricSensitiveInt8u; if (entry_0.nullableFabricSensitiveInt8u.IsNull()) { newElement_0_nullableFabricSensitiveInt8u = nullptr; } else { std::string newElement_0_nullableFabricSensitiveInt8uClassName = "java/lang/Integer"; std::string newElement_0_nullableFabricSensitiveInt8uCtorSignature = "(I)V"; jint jninewElement_0_nullableFabricSensitiveInt8u = static_cast(entry_0.nullableFabricSensitiveInt8u.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableFabricSensitiveInt8uClassName.c_str(), newElement_0_nullableFabricSensitiveInt8uCtorSignature.c_str(), jninewElement_0_nullableFabricSensitiveInt8u, newElement_0_nullableFabricSensitiveInt8u); } jobject newElement_0_nullableOptionalFabricSensitiveInt8u; if (!entry_0.nullableOptionalFabricSensitiveInt8u.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalFabricSensitiveInt8u); } else { jobject newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional; if (entry_0.nullableOptionalFabricSensitiveInt8u.Value().IsNull()) { newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional = nullptr; } else { std::string newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalCtorSignature = "(I)V"; jint jninewElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional = static_cast(entry_0.nullableOptionalFabricSensitiveInt8u.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalClassName.c_str(), newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalCtorSignature.c_str(), jninewElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional, newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional); } chip::JniReferences::GetInstance().CreateOptional( newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional, newElement_0_nullableOptionalFabricSensitiveInt8u); } jobject newElement_0_fabricSensitiveCharString; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.fabricSensitiveCharString, newElement_0_fabricSensitiveCharString)); jobject newElement_0_fabricSensitiveStruct; jobject newElement_0_fabricSensitiveStruct_a; std::string newElement_0_fabricSensitiveStruct_aClassName = "java/lang/Integer"; std::string newElement_0_fabricSensitiveStruct_aCtorSignature = "(I)V"; jint jninewElement_0_fabricSensitiveStruct_a = static_cast(entry_0.fabricSensitiveStruct.a); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_aClassName.c_str(), newElement_0_fabricSensitiveStruct_aCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_a, newElement_0_fabricSensitiveStruct_a); jobject newElement_0_fabricSensitiveStruct_b; std::string newElement_0_fabricSensitiveStruct_bClassName = "java/lang/Boolean"; std::string newElement_0_fabricSensitiveStruct_bCtorSignature = "(Z)V"; jboolean jninewElement_0_fabricSensitiveStruct_b = static_cast(entry_0.fabricSensitiveStruct.b); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_bClassName.c_str(), newElement_0_fabricSensitiveStruct_bCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_b, newElement_0_fabricSensitiveStruct_b); jobject newElement_0_fabricSensitiveStruct_c; std::string newElement_0_fabricSensitiveStruct_cClassName = "java/lang/Integer"; std::string newElement_0_fabricSensitiveStruct_cCtorSignature = "(I)V"; jint jninewElement_0_fabricSensitiveStruct_c = static_cast(entry_0.fabricSensitiveStruct.c); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_cClassName.c_str(), newElement_0_fabricSensitiveStruct_cCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_c, newElement_0_fabricSensitiveStruct_c); jobject newElement_0_fabricSensitiveStruct_d; jbyteArray newElement_0_fabricSensitiveStruct_dByteArray = env->NewByteArray(static_cast(entry_0.fabricSensitiveStruct.d.size())); env->SetByteArrayRegion(newElement_0_fabricSensitiveStruct_dByteArray, 0, static_cast(entry_0.fabricSensitiveStruct.d.size()), reinterpret_cast(entry_0.fabricSensitiveStruct.d.data())); newElement_0_fabricSensitiveStruct_d = newElement_0_fabricSensitiveStruct_dByteArray; jobject newElement_0_fabricSensitiveStruct_e; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.fabricSensitiveStruct.e, newElement_0_fabricSensitiveStruct_e)); jobject newElement_0_fabricSensitiveStruct_f; std::string newElement_0_fabricSensitiveStruct_fClassName = "java/lang/Integer"; std::string newElement_0_fabricSensitiveStruct_fCtorSignature = "(I)V"; jint jninewElement_0_fabricSensitiveStruct_f = static_cast(entry_0.fabricSensitiveStruct.f.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_fClassName.c_str(), newElement_0_fabricSensitiveStruct_fCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_f, newElement_0_fabricSensitiveStruct_f); jobject newElement_0_fabricSensitiveStruct_g; std::string newElement_0_fabricSensitiveStruct_gClassName = "java/lang/Float"; std::string newElement_0_fabricSensitiveStruct_gCtorSignature = "(F)V"; jfloat jninewElement_0_fabricSensitiveStruct_g = static_cast(entry_0.fabricSensitiveStruct.g); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_gClassName.c_str(), newElement_0_fabricSensitiveStruct_gCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_g, newElement_0_fabricSensitiveStruct_g); jobject newElement_0_fabricSensitiveStruct_h; std::string newElement_0_fabricSensitiveStruct_hClassName = "java/lang/Double"; std::string newElement_0_fabricSensitiveStruct_hCtorSignature = "(D)V"; jdouble jninewElement_0_fabricSensitiveStruct_h = static_cast(entry_0.fabricSensitiveStruct.h); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_hClassName.c_str(), newElement_0_fabricSensitiveStruct_hCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_h, newElement_0_fabricSensitiveStruct_h); jobject newElement_0_fabricSensitiveStruct_i; if (!entry_0.fabricSensitiveStruct.i.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_fabricSensitiveStruct_i); } else { jobject newElement_0_fabricSensitiveStruct_iInsideOptional; std::string newElement_0_fabricSensitiveStruct_iInsideOptionalClassName = "java/lang/Integer"; std::string newElement_0_fabricSensitiveStruct_iInsideOptionalCtorSignature = "(I)V"; jint jninewElement_0_fabricSensitiveStruct_iInsideOptional = static_cast(entry_0.fabricSensitiveStruct.i.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_fabricSensitiveStruct_iInsideOptionalClassName.c_str(), newElement_0_fabricSensitiveStruct_iInsideOptionalCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_iInsideOptional, newElement_0_fabricSensitiveStruct_iInsideOptional); chip::JniReferences::GetInstance().CreateOptional(newElement_0_fabricSensitiveStruct_iInsideOptional, newElement_0_fabricSensitiveStruct_i); } { jclass simpleStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_2); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); return nullptr; } jmethodID simpleStructStructCtor_2; err = chip::JniReferences::GetInstance().FindMethod( env, simpleStructStructClass_2, "", "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/" "lang/Float;Ljava/lang/Double;Ljava/util/Optional;)V", &simpleStructStructCtor_2); if (err != CHIP_NO_ERROR || simpleStructStructCtor_2 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); return nullptr; } newElement_0_fabricSensitiveStruct = env->NewObject(simpleStructStructClass_2, simpleStructStructCtor_2, newElement_0_fabricSensitiveStruct_a, newElement_0_fabricSensitiveStruct_b, newElement_0_fabricSensitiveStruct_c, newElement_0_fabricSensitiveStruct_d, newElement_0_fabricSensitiveStruct_e, newElement_0_fabricSensitiveStruct_f, newElement_0_fabricSensitiveStruct_g, newElement_0_fabricSensitiveStruct_h, newElement_0_fabricSensitiveStruct_i); } jobject newElement_0_fabricSensitiveInt8uList; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_fabricSensitiveInt8uList); auto iter_newElement_0_fabricSensitiveInt8uList_2 = entry_0.fabricSensitiveInt8uList.begin(); while (iter_newElement_0_fabricSensitiveInt8uList_2.Next()) { auto & entry_2 = iter_newElement_0_fabricSensitiveInt8uList_2.GetValue(); jobject newElement_2; std::string newElement_2ClassName = "java/lang/Integer"; std::string newElement_2CtorSignature = "(I)V"; jint jninewElement_2 = static_cast(entry_2); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); chip::JniReferences::GetInstance().AddToList(newElement_0_fabricSensitiveInt8uList, newElement_2); } jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); { jclass testFabricScopedStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestFabricScoped", testFabricScopedStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestFabricScoped"); return nullptr; } jmethodID testFabricScopedStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, testFabricScopedStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;Ljava/lang/String;Lchip/" "devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;Ljava/util/ArrayList;Ljava/lang/Integer;)V", &testFabricScopedStructCtor_1); if (err != CHIP_NO_ERROR || testFabricScopedStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestFabricScoped constructor"); return nullptr; } newElement_0 = env->NewObject( testFabricScopedStructClass_1, testFabricScopedStructCtor_1, newElement_0_fabricSensitiveInt8u, newElement_0_optionalFabricSensitiveInt8u, newElement_0_nullableFabricSensitiveInt8u, newElement_0_nullableOptionalFabricSensitiveInt8u, newElement_0_fabricSensitiveCharString, newElement_0_fabricSensitiveStruct, newElement_0_fabricSensitiveInt8uList, newElement_0_fabricIndex); } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::TimedWriteBoolean::Id: { using TypeInfo = Attributes::TimedWriteBoolean::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneralErrorBoolean::Id: { using TypeInfo = Attributes::GeneralErrorBoolean::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterErrorBoolean::Id: { using TypeInfo = Attributes::ClusterErrorBoolean::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GlobalEnum::Id: { using TypeInfo = Attributes::GlobalEnum::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GlobalStruct::Id: { using TypeInfo = Attributes::GlobalStruct::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; jobject value_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.name, value_name)); jobject value_myBitmap; if (cppValue.myBitmap.IsNull()) { value_myBitmap = nullptr; } else { std::string value_myBitmapClassName = "java/lang/Long"; std::string value_myBitmapCtorSignature = "(J)V"; jlong jnivalue_myBitmap = static_cast(cppValue.myBitmap.Value().Raw()); chip::JniReferences::GetInstance().CreateBoxedObject( value_myBitmapClassName.c_str(), value_myBitmapCtorSignature.c_str(), jnivalue_myBitmap, value_myBitmap); } jobject value_myEnum; if (!cppValue.myEnum.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_myEnum); } else { jobject value_myEnumInsideOptional; if (cppValue.myEnum.Value().IsNull()) { value_myEnumInsideOptional = nullptr; } else { std::string value_myEnumInsideOptionalClassName = "java/lang/Integer"; std::string value_myEnumInsideOptionalCtorSignature = "(I)V"; jint jnivalue_myEnumInsideOptional = static_cast(cppValue.myEnum.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_myEnumInsideOptionalClassName.c_str(), value_myEnumInsideOptionalCtorSignature.c_str(), jnivalue_myEnumInsideOptional, value_myEnumInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(value_myEnumInsideOptional, value_myEnum); } { jclass testGlobalStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestGlobalStruct", testGlobalStructStructClass_0); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestGlobalStruct"); return nullptr; } jmethodID testGlobalStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod(env, testGlobalStructStructClass_0, "", "(Ljava/lang/String;Ljava/lang/Long;Ljava/util/Optional;)V", &testGlobalStructStructCtor_0); if (err != CHIP_NO_ERROR || testGlobalStructStructCtor_0 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestGlobalStruct constructor"); return nullptr; } value = env->NewObject(testGlobalStructStructClass_0, testGlobalStructStructCtor_0, value_name, value_myBitmap, value_myEnum); } return value; } case Attributes::Unsupported::Id: { using TypeInfo = Attributes::Unsupported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ReadFailureCode::Id: { using TypeInfo = Attributes::ReadFailureCode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::FailureInt32U::Id: { using TypeInfo = Attributes::FailureInt32U::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NullableBoolean::Id: { using TypeInfo = Attributes::NullableBoolean::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableBitmap8::Id: { using TypeInfo = Attributes::NullableBitmap8::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value().Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableBitmap16::Id: { using TypeInfo = Attributes::NullableBitmap16::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value().Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableBitmap32::Id: { using TypeInfo = Attributes::NullableBitmap32::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value().Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableBitmap64::Id: { using TypeInfo = Attributes::NullableBitmap64::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value().Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableInt8u::Id: { using TypeInfo = Attributes::NullableInt8u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableInt16u::Id: { using TypeInfo = Attributes::NullableInt16u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableInt24u::Id: { using TypeInfo = Attributes::NullableInt24u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableInt32u::Id: { using TypeInfo = Attributes::NullableInt32u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableInt40u::Id: { using TypeInfo = Attributes::NullableInt40u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableInt48u::Id: { using TypeInfo = Attributes::NullableInt48u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableInt56u::Id: { using TypeInfo = Attributes::NullableInt56u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableInt64u::Id: { using TypeInfo = Attributes::NullableInt64u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableInt8s::Id: { using TypeInfo = Attributes::NullableInt8s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableInt16s::Id: { using TypeInfo = Attributes::NullableInt16s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableInt24s::Id: { using TypeInfo = Attributes::NullableInt24s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableInt32s::Id: { using TypeInfo = Attributes::NullableInt32s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableInt40s::Id: { using TypeInfo = Attributes::NullableInt40s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableInt48s::Id: { using TypeInfo = Attributes::NullableInt48s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableInt56s::Id: { using TypeInfo = Attributes::NullableInt56s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableInt64s::Id: { using TypeInfo = Attributes::NullableInt64s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableEnum8::Id: { using TypeInfo = Attributes::NullableEnum8::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableEnum16::Id: { using TypeInfo = Attributes::NullableEnum16::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableFloatSingle::Id: { using TypeInfo = Attributes::NullableFloatSingle::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Float"; std::string valueCtorSignature = "(F)V"; jfloat jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableFloatDouble::Id: { using TypeInfo = Attributes::NullableFloatDouble::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Double"; std::string valueCtorSignature = "(D)V"; jdouble jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableOctetString::Id: { using TypeInfo = Attributes::NullableOctetString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.Value().size())); env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.Value().size()), reinterpret_cast(cppValue.Value().data())); value = valueByteArray; } return value; } case Attributes::NullableCharString::Id: { using TypeInfo = Attributes::NullableCharString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value(), value)); } return value; } case Attributes::NullableEnumAttr::Id: { using TypeInfo = Attributes::NullableEnumAttr::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableStruct::Id: { using TypeInfo = Attributes::NullableStruct::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_a; std::string value_aClassName = "java/lang/Integer"; std::string value_aCtorSignature = "(I)V"; jint jnivalue_a = static_cast(cppValue.Value().a); chip::JniReferences::GetInstance().CreateBoxedObject(value_aClassName.c_str(), value_aCtorSignature.c_str(), jnivalue_a, value_a); jobject value_b; std::string value_bClassName = "java/lang/Boolean"; std::string value_bCtorSignature = "(Z)V"; jboolean jnivalue_b = static_cast(cppValue.Value().b); chip::JniReferences::GetInstance().CreateBoxedObject(value_bClassName.c_str(), value_bCtorSignature.c_str(), jnivalue_b, value_b); jobject value_c; std::string value_cClassName = "java/lang/Integer"; std::string value_cCtorSignature = "(I)V"; jint jnivalue_c = static_cast(cppValue.Value().c); chip::JniReferences::GetInstance().CreateBoxedObject(value_cClassName.c_str(), value_cCtorSignature.c_str(), jnivalue_c, value_c); jobject value_d; jbyteArray value_dByteArray = env->NewByteArray(static_cast(cppValue.Value().d.size())); env->SetByteArrayRegion(value_dByteArray, 0, static_cast(cppValue.Value().d.size()), reinterpret_cast(cppValue.Value().d.data())); value_d = value_dByteArray; jobject value_e; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().e, value_e)); jobject value_f; std::string value_fClassName = "java/lang/Integer"; std::string value_fCtorSignature = "(I)V"; jint jnivalue_f = static_cast(cppValue.Value().f.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(value_fClassName.c_str(), value_fCtorSignature.c_str(), jnivalue_f, value_f); jobject value_g; std::string value_gClassName = "java/lang/Float"; std::string value_gCtorSignature = "(F)V"; jfloat jnivalue_g = static_cast(cppValue.Value().g); chip::JniReferences::GetInstance().CreateBoxedObject(value_gClassName.c_str(), value_gCtorSignature.c_str(), jnivalue_g, value_g); jobject value_h; std::string value_hClassName = "java/lang/Double"; std::string value_hCtorSignature = "(D)V"; jdouble jnivalue_h = static_cast(cppValue.Value().h); chip::JniReferences::GetInstance().CreateBoxedObject(value_hClassName.c_str(), value_hCtorSignature.c_str(), jnivalue_h, value_h); jobject value_i; if (!cppValue.Value().i.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_i); } else { jobject value_iInsideOptional; std::string value_iInsideOptionalClassName = "java/lang/Integer"; std::string value_iInsideOptionalCtorSignature = "(I)V"; jint jnivalue_iInsideOptional = static_cast(cppValue.Value().i.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(value_iInsideOptionalClassName.c_str(), value_iInsideOptionalCtorSignature.c_str(), jnivalue_iInsideOptional, value_iInsideOptional); chip::JniReferences::GetInstance().CreateOptional(value_iInsideOptional, value_i); } { jclass simpleStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); return nullptr; } jmethodID simpleStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( env, simpleStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/" "lang/Float;Ljava/lang/Double;Ljava/util/Optional;)V", &simpleStructStructCtor_1); if (err != CHIP_NO_ERROR || simpleStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); return nullptr; } value = env->NewObject(simpleStructStructClass_1, simpleStructStructCtor_1, value_a, value_b, value_c, value_d, value_e, value_f, value_g, value_h, value_i); } } return value; } case Attributes::NullableRangeRestrictedInt8u::Id: { using TypeInfo = Attributes::NullableRangeRestrictedInt8u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableRangeRestrictedInt8s::Id: { using TypeInfo = Attributes::NullableRangeRestrictedInt8s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableRangeRestrictedInt16u::Id: { using TypeInfo = Attributes::NullableRangeRestrictedInt16u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableRangeRestrictedInt16s::Id: { using TypeInfo = Attributes::NullableRangeRestrictedInt16s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::WriteOnlyInt8u::Id: { using TypeInfo = Attributes::WriteOnlyInt8u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::NullableGlobalEnum::Id: { using TypeInfo = Attributes::NullableGlobalEnum::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue.Value()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); } return value; } case Attributes::NullableGlobalStruct::Id: { using TypeInfo = Attributes::NullableGlobalStruct::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; if (cppValue.IsNull()) { value = nullptr; } else { jobject value_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().name, value_name)); jobject value_myBitmap; if (cppValue.Value().myBitmap.IsNull()) { value_myBitmap = nullptr; } else { std::string value_myBitmapClassName = "java/lang/Long"; std::string value_myBitmapCtorSignature = "(J)V"; jlong jnivalue_myBitmap = static_cast(cppValue.Value().myBitmap.Value().Raw()); chip::JniReferences::GetInstance().CreateBoxedObject( value_myBitmapClassName.c_str(), value_myBitmapCtorSignature.c_str(), jnivalue_myBitmap, value_myBitmap); } jobject value_myEnum; if (!cppValue.Value().myEnum.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, value_myEnum); } else { jobject value_myEnumInsideOptional; if (cppValue.Value().myEnum.Value().IsNull()) { value_myEnumInsideOptional = nullptr; } else { std::string value_myEnumInsideOptionalClassName = "java/lang/Integer"; std::string value_myEnumInsideOptionalCtorSignature = "(I)V"; jint jnivalue_myEnumInsideOptional = static_cast(cppValue.Value().myEnum.Value().Value()); chip::JniReferences::GetInstance().CreateBoxedObject( value_myEnumInsideOptionalClassName.c_str(), value_myEnumInsideOptionalCtorSignature.c_str(), jnivalue_myEnumInsideOptional, value_myEnumInsideOptional); } chip::JniReferences::GetInstance().CreateOptional(value_myEnumInsideOptional, value_myEnum); } { jclass testGlobalStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestGlobalStruct", testGlobalStructStructClass_1); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestGlobalStruct"); return nullptr; } jmethodID testGlobalStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod(env, testGlobalStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Long;Ljava/util/Optional;)V", &testGlobalStructStructCtor_1); if (err != CHIP_NO_ERROR || testGlobalStructStructCtor_1 == nullptr) { ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestGlobalStruct constructor"); return nullptr; } value = env->NewObject(testGlobalStructStructClass_1, testGlobalStructStructCtor_1, value_name, value_myBitmap, value_myEnum); } } return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::MeiInt8u::Id: { using TypeInfo = Attributes::MeiInt8u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::FaultInjection::Id: { using namespace app::Clusters::FaultInjection; switch (aPath.mAttributeId) { case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } case app::Clusters::SampleMei::Id: { using namespace app::Clusters::SampleMei; switch (aPath.mAttributeId) { case Attributes::FlipFlop::Id: { using TypeInfo = Attributes::FlipFlop::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; jboolean jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AcceptedCommandList::Id: { using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::EventList::Id: { using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; chip::JniReferences::GetInstance().CreateArrayList(value); auto iter_value_0 = cppValue.begin(); while (iter_value_0.Next()) { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; std::string newElement_0ClassName = "java/lang/Long"; std::string newElement_0CtorSignature = "(J)V"; jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } case Attributes::FeatureMap::Id: { using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; jlong jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } return nullptr; } } // namespace chip