/*
 *
 *    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/PumpConfigurationAndControl/Attributes.h>

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

namespace chip {
namespace app {
namespace Clusters {
namespace PumpConfigurationAndControl {
namespace Attributes {
CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader &reader,
                                           const ConcreteAttributePath &path) {
  switch (path.mAttributeId) {
  case Attributes::MaxPressure::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, maxPressure);
  case Attributes::MaxSpeed::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, maxSpeed);
  case Attributes::MaxFlow::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, maxFlow);
  case Attributes::MinConstPressure::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, minConstPressure);
  case Attributes::MaxConstPressure::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, maxConstPressure);
  case Attributes::MinCompPressure::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, minCompPressure);
  case Attributes::MaxCompPressure::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, maxCompPressure);
  case Attributes::MinConstSpeed::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, minConstSpeed);
  case Attributes::MaxConstSpeed::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, maxConstSpeed);
  case Attributes::MinConstFlow::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, minConstFlow);
  case Attributes::MaxConstFlow::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, maxConstFlow);
  case Attributes::MinConstTemp::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, minConstTemp);
  case Attributes::MaxConstTemp::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, maxConstTemp);
  case Attributes::PumpStatus::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, pumpStatus);
  case Attributes::EffectiveOperationMode::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, effectiveOperationMode);
  case Attributes::EffectiveControlMode::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, effectiveControlMode);
  case Attributes::Capacity::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, capacity);
  case Attributes::Speed::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, speed);
  case Attributes::LifetimeRunningHours::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, lifetimeRunningHours);
  case Attributes::Power::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, power);
  case Attributes::LifetimeEnergyConsumed::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, lifetimeEnergyConsumed);
  case Attributes::OperationMode::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, operationMode);
  case Attributes::ControlMode::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, controlMode);
  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);
  default:
    return CHIP_NO_ERROR;
  }
}
} // namespace Attributes
} // namespace PumpConfigurationAndControl
} // namespace Clusters
} // namespace app
} // namespace chip
