/*
 *
 *    Copyright (c) 2022 Project CHIP Authors
 *
 *    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.
 */

// THIS FILE IS GENERATED BY ZAP
// This file is generated from clusters-Attributes.ipp.zapt

#include <clusters/UnitTesting/Attributes.h>

#include <app/data-model/Decode.h>
#include <app/data-model/WrappedStructEncoder.h>

namespace chip {
namespace app {
namespace Clusters {
namespace UnitTesting {
namespace Attributes {
CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader &reader,
                                           const ConcreteAttributePath &path) {
  switch (path.mAttributeId) {
  case Attributes::Boolean::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, boolean);
  case Attributes::Bitmap8::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, bitmap8);
  case Attributes::Bitmap16::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, bitmap16);
  case Attributes::Bitmap32::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, bitmap32);
  case Attributes::Bitmap64::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, bitmap64);
  case Attributes::Int8u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, int8u);
  case Attributes::Int16u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, int16u);
  case Attributes::Int24u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, int24u);
  case Attributes::Int32u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, int32u);
  case Attributes::Int40u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, int40u);
  case Attributes::Int48u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, int48u);
  case Attributes::Int56u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, int56u);
  case Attributes::Int64u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, int64u);
  case Attributes::Int8s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, int8s);
  case Attributes::Int16s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, int16s);
  case Attributes::Int24s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, int24s);
  case Attributes::Int32s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, int32s);
  case Attributes::Int40s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, int40s);
  case Attributes::Int48s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, int48s);
  case Attributes::Int56s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, int56s);
  case Attributes::Int64s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, int64s);
  case Attributes::Enum8::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, enum8);
  case Attributes::Enum16::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, enum16);
  case Attributes::FloatSingle::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, floatSingle);
  case Attributes::FloatDouble::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, floatDouble);
  case Attributes::OctetString::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, octetString);
  case Attributes::ListInt8u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, listInt8u);
  case Attributes::ListOctetString::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, listOctetString);
  case Attributes::ListStructOctetString::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, listStructOctetString);
  case Attributes::LongOctetString::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, longOctetString);
  case Attributes::CharString::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, charString);
  case Attributes::LongCharString::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, longCharString);
  case Attributes::EpochUs::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, epochUs);
  case Attributes::EpochS::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, epochS);
  case Attributes::VendorId::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, vendorId);
  case Attributes::ListNullablesAndOptionalsStruct::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, listNullablesAndOptionalsStruct);
  case Attributes::EnumAttr::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, enumAttr);
  case Attributes::StructAttr::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, structAttr);
  case Attributes::RangeRestrictedInt8u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, rangeRestrictedInt8u);
  case Attributes::RangeRestrictedInt8s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, rangeRestrictedInt8s);
  case Attributes::RangeRestrictedInt16u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, rangeRestrictedInt16u);
  case Attributes::RangeRestrictedInt16s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, rangeRestrictedInt16s);
  case Attributes::ListLongOctetString::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, listLongOctetString);
  case Attributes::ListFabricScoped::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, listFabricScoped);
  case Attributes::TimedWriteBoolean::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, timedWriteBoolean);
  case Attributes::GeneralErrorBoolean::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, generalErrorBoolean);
  case Attributes::ClusterErrorBoolean::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, clusterErrorBoolean);
  case Attributes::GlobalEnum::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, globalEnum);
  case Attributes::GlobalStruct::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, globalStruct);
  case Attributes::Unsupported::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, unsupported);
  case Attributes::ReadFailureCode::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, readFailureCode);
  case Attributes::FailureInt32U::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, failureInt32U);
  case Attributes::NullableBoolean::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableBoolean);
  case Attributes::NullableBitmap8::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableBitmap8);
  case Attributes::NullableBitmap16::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableBitmap16);
  case Attributes::NullableBitmap32::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableBitmap32);
  case Attributes::NullableBitmap64::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableBitmap64);
  case Attributes::NullableInt8u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableInt8u);
  case Attributes::NullableInt16u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableInt16u);
  case Attributes::NullableInt24u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableInt24u);
  case Attributes::NullableInt32u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableInt32u);
  case Attributes::NullableInt40u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableInt40u);
  case Attributes::NullableInt48u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableInt48u);
  case Attributes::NullableInt56u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableInt56u);
  case Attributes::NullableInt64u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableInt64u);
  case Attributes::NullableInt8s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableInt8s);
  case Attributes::NullableInt16s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableInt16s);
  case Attributes::NullableInt24s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableInt24s);
  case Attributes::NullableInt32s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableInt32s);
  case Attributes::NullableInt40s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableInt40s);
  case Attributes::NullableInt48s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableInt48s);
  case Attributes::NullableInt56s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableInt56s);
  case Attributes::NullableInt64s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableInt64s);
  case Attributes::NullableEnum8::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableEnum8);
  case Attributes::NullableEnum16::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableEnum16);
  case Attributes::NullableFloatSingle::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableFloatSingle);
  case Attributes::NullableFloatDouble::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableFloatDouble);
  case Attributes::NullableOctetString::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableOctetString);
  case Attributes::NullableCharString::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableCharString);
  case Attributes::NullableEnumAttr::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableEnumAttr);
  case Attributes::NullableStruct::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableStruct);
  case Attributes::NullableRangeRestrictedInt8u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableRangeRestrictedInt8u);
  case Attributes::NullableRangeRestrictedInt8s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableRangeRestrictedInt8s);
  case Attributes::NullableRangeRestrictedInt16u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableRangeRestrictedInt16u);
  case Attributes::NullableRangeRestrictedInt16s::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableRangeRestrictedInt16s);
  case Attributes::WriteOnlyInt8u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, writeOnlyInt8u);
  case Attributes::NullableGlobalEnum::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableGlobalEnum);
  case Attributes::NullableGlobalStruct::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, nullableGlobalStruct);
  case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, generatedCommandList);
  case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, acceptedCommandList);
  case Attributes::AttributeList::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, attributeList);
  case Attributes::FeatureMap::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, featureMap);
  case Attributes::ClusterRevision::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, clusterRevision);
  case Attributes::MeiInt8u::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, meiInt8u);
  default:
    return CHIP_NO_ERROR;
  }
}
} // namespace Attributes
} // namespace UnitTesting
} // namespace Clusters
} // namespace app
} // namespace chip
