/*
 *
 *    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-Enums-Check.h.zapt

#pragma once

#include <clusters/DeviceEnergyManagement/Enums.h>

namespace chip {
namespace app {
namespace Clusters {
static auto __attribute__((unused))
EnsureKnownEnumValue(DeviceEnergyManagement::AdjustmentCauseEnum val) {
  using EnumType = DeviceEnergyManagement::AdjustmentCauseEnum;
  switch (val) {
  case EnumType::kLocalOptimization:
  case EnumType::kGridOptimization:
    return val;
  default:
    return EnumType::kUnknownEnumValue;
  }
}
static auto __attribute__((unused))
EnsureKnownEnumValue(DeviceEnergyManagement::CauseEnum val) {
  using EnumType = DeviceEnergyManagement::CauseEnum;
  switch (val) {
  case EnumType::kNormalCompletion:
  case EnumType::kOffline:
  case EnumType::kFault:
  case EnumType::kUserOptOut:
  case EnumType::kCancelled:
    return val;
  default:
    return EnumType::kUnknownEnumValue;
  }
}
static auto __attribute__((unused))
EnsureKnownEnumValue(DeviceEnergyManagement::CostTypeEnum val) {
  using EnumType = DeviceEnergyManagement::CostTypeEnum;
  switch (val) {
  case EnumType::kFinancial:
  case EnumType::kGHGEmissions:
  case EnumType::kComfort:
  case EnumType::kTemperature:
    return val;
  default:
    return EnumType::kUnknownEnumValue;
  }
}
static auto __attribute__((unused))
EnsureKnownEnumValue(DeviceEnergyManagement::ESAStateEnum val) {
  using EnumType = DeviceEnergyManagement::ESAStateEnum;
  switch (val) {
  case EnumType::kOffline:
  case EnumType::kOnline:
  case EnumType::kFault:
  case EnumType::kPowerAdjustActive:
  case EnumType::kPaused:
    return val;
  default:
    return EnumType::kUnknownEnumValue;
  }
}
static auto __attribute__((unused))
EnsureKnownEnumValue(DeviceEnergyManagement::ESATypeEnum val) {
  using EnumType = DeviceEnergyManagement::ESATypeEnum;
  switch (val) {
  case EnumType::kEvse:
  case EnumType::kSpaceHeating:
  case EnumType::kWaterHeating:
  case EnumType::kSpaceCooling:
  case EnumType::kSpaceHeatingCooling:
  case EnumType::kBatteryStorage:
  case EnumType::kSolarPV:
  case EnumType::kFridgeFreezer:
  case EnumType::kWashingMachine:
  case EnumType::kDishwasher:
  case EnumType::kCooking:
  case EnumType::kHomeWaterPump:
  case EnumType::kIrrigationWaterPump:
  case EnumType::kPoolPump:
  case EnumType::kOther:
    return val;
  default:
    return EnumType::kUnknownEnumValue;
  }
}
static auto __attribute__((unused))
EnsureKnownEnumValue(DeviceEnergyManagement::ForecastUpdateReasonEnum val) {
  using EnumType = DeviceEnergyManagement::ForecastUpdateReasonEnum;
  switch (val) {
  case EnumType::kInternalOptimization:
  case EnumType::kLocalOptimization:
  case EnumType::kGridOptimization:
    return val;
  default:
    return EnumType::kUnknownEnumValue;
  }
}
static auto __attribute__((unused))
EnsureKnownEnumValue(DeviceEnergyManagement::OptOutStateEnum val) {
  using EnumType = DeviceEnergyManagement::OptOutStateEnum;
  switch (val) {
  case EnumType::kNoOptOut:
  case EnumType::kLocalOptOut:
  case EnumType::kGridOptOut:
  case EnumType::kOptOut:
    return val;
  default:
    return EnumType::kUnknownEnumValue;
  }
}
static auto __attribute__((unused))
EnsureKnownEnumValue(DeviceEnergyManagement::PowerAdjustReasonEnum val) {
  using EnumType = DeviceEnergyManagement::PowerAdjustReasonEnum;
  switch (val) {
  case EnumType::kNoAdjustment:
  case EnumType::kLocalOptimizationAdjustment:
  case EnumType::kGridOptimizationAdjustment:
    return val;
  default:
    return EnumType::kUnknownEnumValue;
  }
}
} // namespace Clusters
} // namespace app
} // namespace chip
