| /* |
| * |
| * 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/CommodityTariff/Enums.h> |
| |
| namespace chip { |
| namespace app { |
| namespace Clusters { |
| static auto __attribute__((unused)) EnsureKnownEnumValue(CommodityTariff::AuxiliaryLoadSettingEnum val) |
| { |
| using EnumType = CommodityTariff::AuxiliaryLoadSettingEnum; |
| switch (val) |
| { |
| case EnumType::kOff: |
| case EnumType::kOn: |
| case EnumType::kNone: |
| return val; |
| default: |
| return EnumType::kUnknownEnumValue; |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(CommodityTariff::BlockModeEnum val) |
| { |
| using EnumType = CommodityTariff::BlockModeEnum; |
| switch (val) |
| { |
| case EnumType::kNoBlock: |
| case EnumType::kCombined: |
| case EnumType::kIndividual: |
| return val; |
| default: |
| return EnumType::kUnknownEnumValue; |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(CommodityTariff::DayEntryRandomizationTypeEnum val) |
| { |
| using EnumType = CommodityTariff::DayEntryRandomizationTypeEnum; |
| switch (val) |
| { |
| case EnumType::kNone: |
| case EnumType::kFixed: |
| case EnumType::kRandom: |
| case EnumType::kRandomPositive: |
| case EnumType::kRandomNegative: |
| return val; |
| default: |
| return EnumType::kUnknownEnumValue; |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(CommodityTariff::DayTypeEnum val) |
| { |
| using EnumType = CommodityTariff::DayTypeEnum; |
| switch (val) |
| { |
| case EnumType::kStandard: |
| case EnumType::kHoliday: |
| case EnumType::kDynamic: |
| case EnumType::kEvent: |
| return val; |
| default: |
| return EnumType::kUnknownEnumValue; |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(CommodityTariff::PeakPeriodSeverityEnum val) |
| { |
| using EnumType = CommodityTariff::PeakPeriodSeverityEnum; |
| switch (val) |
| { |
| case EnumType::kUnused: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| return val; |
| default: |
| return EnumType::kUnknownEnumValue; |
| } |
| } |
| } // namespace Clusters |
| } // namespace app |
| } // namespace chip |