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

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

namespace chip {
namespace app {
namespace Clusters {
namespace Thermostat {
namespace Attributes {
CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader &reader,
                                           const ConcreteAttributePath &path) {
  switch (path.mAttributeId) {
  case Attributes::LocalTemperature::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, localTemperature);
  case Attributes::OutdoorTemperature::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, outdoorTemperature);
  case Attributes::Occupancy::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, occupancy);
  case Attributes::AbsMinHeatSetpointLimit::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, absMinHeatSetpointLimit);
  case Attributes::AbsMaxHeatSetpointLimit::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, absMaxHeatSetpointLimit);
  case Attributes::AbsMinCoolSetpointLimit::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, absMinCoolSetpointLimit);
  case Attributes::AbsMaxCoolSetpointLimit::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, absMaxCoolSetpointLimit);
  case Attributes::PICoolingDemand::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, PICoolingDemand);
  case Attributes::PIHeatingDemand::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, PIHeatingDemand);
  case Attributes::HVACSystemTypeConfiguration::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, HVACSystemTypeConfiguration);
  case Attributes::LocalTemperatureCalibration::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, localTemperatureCalibration);
  case Attributes::OccupiedCoolingSetpoint::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, occupiedCoolingSetpoint);
  case Attributes::OccupiedHeatingSetpoint::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, occupiedHeatingSetpoint);
  case Attributes::UnoccupiedCoolingSetpoint::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, unoccupiedCoolingSetpoint);
  case Attributes::UnoccupiedHeatingSetpoint::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, unoccupiedHeatingSetpoint);
  case Attributes::MinHeatSetpointLimit::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, minHeatSetpointLimit);
  case Attributes::MaxHeatSetpointLimit::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, maxHeatSetpointLimit);
  case Attributes::MinCoolSetpointLimit::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, minCoolSetpointLimit);
  case Attributes::MaxCoolSetpointLimit::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, maxCoolSetpointLimit);
  case Attributes::MinSetpointDeadBand::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, minSetpointDeadBand);
  case Attributes::RemoteSensing::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, remoteSensing);
  case Attributes::ControlSequenceOfOperation::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, controlSequenceOfOperation);
  case Attributes::SystemMode::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, systemMode);
  case Attributes::ThermostatRunningMode::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, thermostatRunningMode);
  case Attributes::StartOfWeek::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, startOfWeek);
  case Attributes::NumberOfWeeklyTransitions::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, numberOfWeeklyTransitions);
  case Attributes::NumberOfDailyTransitions::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, numberOfDailyTransitions);
  case Attributes::TemperatureSetpointHold::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, temperatureSetpointHold);
  case Attributes::TemperatureSetpointHoldDuration::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, temperatureSetpointHoldDuration);
  case Attributes::ThermostatProgrammingOperationMode::TypeInfo::
      GetAttributeId():
    return DataModel::Decode(reader, thermostatProgrammingOperationMode);
  case Attributes::ThermostatRunningState::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, thermostatRunningState);
  case Attributes::SetpointChangeSource::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, setpointChangeSource);
  case Attributes::SetpointChangeAmount::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, setpointChangeAmount);
  case Attributes::SetpointChangeSourceTimestamp::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, setpointChangeSourceTimestamp);
  case Attributes::OccupiedSetback::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, occupiedSetback);
  case Attributes::OccupiedSetbackMin::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, occupiedSetbackMin);
  case Attributes::OccupiedSetbackMax::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, occupiedSetbackMax);
  case Attributes::UnoccupiedSetback::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, unoccupiedSetback);
  case Attributes::UnoccupiedSetbackMin::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, unoccupiedSetbackMin);
  case Attributes::UnoccupiedSetbackMax::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, unoccupiedSetbackMax);
  case Attributes::EmergencyHeatDelta::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, emergencyHeatDelta);
  case Attributes::ACType::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, ACType);
  case Attributes::ACCapacity::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, ACCapacity);
  case Attributes::ACRefrigerantType::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, ACRefrigerantType);
  case Attributes::ACCompressorType::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, ACCompressorType);
  case Attributes::ACErrorCode::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, ACErrorCode);
  case Attributes::ACLouverPosition::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, ACLouverPosition);
  case Attributes::ACCoilTemperature::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, ACCoilTemperature);
  case Attributes::ACCapacityformat::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, ACCapacityformat);
  case Attributes::PresetTypes::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, presetTypes);
  case Attributes::ScheduleTypes::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, scheduleTypes);
  case Attributes::NumberOfPresets::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, numberOfPresets);
  case Attributes::NumberOfSchedules::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, numberOfSchedules);
  case Attributes::NumberOfScheduleTransitions::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, numberOfScheduleTransitions);
  case Attributes::NumberOfScheduleTransitionPerDay::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, numberOfScheduleTransitionPerDay);
  case Attributes::ActivePresetHandle::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, activePresetHandle);
  case Attributes::ActiveScheduleHandle::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, activeScheduleHandle);
  case Attributes::Presets::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, presets);
  case Attributes::Schedules::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, schedules);
  case Attributes::SetpointHoldExpiryTimestamp::TypeInfo::GetAttributeId():
    return DataModel::Decode(reader, setpointHoldExpiryTimestamp);
  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 Thermostat
} // namespace Clusters
} // namespace app
} // namespace chip
