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

#pragma once

#include <app/ConcreteAttributePath.h>
#include <app/data-model/DecodableList.h>
#include <app/data-model/List.h>
#include <app/data-model/Nullable.h>
#include <app/util/basic-types.h>
#include <lib/core/TLV.h>
#include <lib/support/BitMask.h>

#include <clusters/shared/Attributes.h>
#include <clusters/shared/Enums.h>
#include <clusters/shared/Structs.h>

#include <clusters/CommodityPrice/AttributeIds.h>
#include <clusters/CommodityPrice/ClusterId.h>
#include <clusters/CommodityPrice/Enums.h>
#include <clusters/CommodityPrice/Structs.h>

namespace chip {
namespace app {
namespace Clusters {
namespace CommodityPrice {
namespace Attributes {

namespace TariffUnit {
struct TypeInfo {
  using Type = chip::app::Clusters::Globals::TariffUnitEnum;
  using DecodableType = chip::app::Clusters::Globals::TariffUnitEnum;
  using DecodableArgType = chip::app::Clusters::Globals::TariffUnitEnum;

  static constexpr ClusterId GetClusterId() {
    return Clusters::CommodityPrice::Id;
  }
  static constexpr AttributeId GetAttributeId() {
    return Attributes::TariffUnit::Id;
  }
  static constexpr bool MustUseTimedWrite() { return false; }
};
} // namespace TariffUnit
namespace Currency {
struct TypeInfo {
  using Type = chip::app::DataModel::Nullable<
      chip::app::Clusters::Globals::Structs::CurrencyStruct::Type>;
  using DecodableType = chip::app::DataModel::Nullable<
      chip::app::Clusters::Globals::Structs::CurrencyStruct::DecodableType>;
  using DecodableArgType = const chip::app::DataModel::Nullable<
      chip::app::Clusters::Globals::Structs::CurrencyStruct::DecodableType> &;

  static constexpr ClusterId GetClusterId() {
    return Clusters::CommodityPrice::Id;
  }
  static constexpr AttributeId GetAttributeId() {
    return Attributes::Currency::Id;
  }
  static constexpr bool MustUseTimedWrite() { return false; }
};
} // namespace Currency
namespace CurrentPrice {
struct TypeInfo {
  using Type = chip::app::DataModel::Nullable<
      chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::Type>;
  using DecodableType = chip::app::DataModel::Nullable<
      chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::
          DecodableType>;
  using DecodableArgType = const chip::app::DataModel::Nullable<
      chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::
          DecodableType> &;

  static constexpr ClusterId GetClusterId() {
    return Clusters::CommodityPrice::Id;
  }
  static constexpr AttributeId GetAttributeId() {
    return Attributes::CurrentPrice::Id;
  }
  static constexpr bool MustUseTimedWrite() { return false; }
};
} // namespace CurrentPrice
namespace PriceForecast {
struct TypeInfo {
  using Type =
      chip::app::DataModel::List<const chip::app::Clusters::CommodityPrice::
                                     Structs::CommodityPriceStruct::Type>;
  using DecodableType = chip::app::DataModel::DecodableList<
      chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::
          DecodableType>;
  using DecodableArgType = const chip::app::DataModel::DecodableList<
      chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::
          DecodableType> &;

  static constexpr ClusterId GetClusterId() {
    return Clusters::CommodityPrice::Id;
  }
  static constexpr AttributeId GetAttributeId() {
    return Attributes::PriceForecast::Id;
  }
  static constexpr bool MustUseTimedWrite() { return false; }
};
} // namespace PriceForecast
namespace GeneratedCommandList {
struct TypeInfo
    : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo {
  static constexpr ClusterId GetClusterId() {
    return Clusters::CommodityPrice::Id;
  }
};
} // namespace GeneratedCommandList
namespace AcceptedCommandList {
struct TypeInfo
    : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo {
  static constexpr ClusterId GetClusterId() {
    return Clusters::CommodityPrice::Id;
  }
};
} // namespace AcceptedCommandList
namespace AttributeList {
struct TypeInfo
    : public Clusters::Globals::Attributes::AttributeList::TypeInfo {
  static constexpr ClusterId GetClusterId() {
    return Clusters::CommodityPrice::Id;
  }
};
} // namespace AttributeList
namespace FeatureMap {
struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo {
  static constexpr ClusterId GetClusterId() {
    return Clusters::CommodityPrice::Id;
  }
};
} // namespace FeatureMap
namespace ClusterRevision {
struct TypeInfo
    : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo {
  static constexpr ClusterId GetClusterId() {
    return Clusters::CommodityPrice::Id;
  }
};
} // namespace ClusterRevision

struct TypeInfo {
  struct DecodableType {
    static constexpr ClusterId GetClusterId() {
      return Clusters::CommodityPrice::Id;
    }

    CHIP_ERROR Decode(TLV::TLVReader &reader,
                      const ConcreteAttributePath &path);

    Attributes::TariffUnit::TypeInfo::DecodableType tariffUnit =
        static_cast<chip::app::Clusters::Globals::TariffUnitEnum>(0);
    Attributes::Currency::TypeInfo::DecodableType currency;
    Attributes::CurrentPrice::TypeInfo::DecodableType currentPrice;
    Attributes::PriceForecast::TypeInfo::DecodableType priceForecast;
    Attributes::GeneratedCommandList::TypeInfo::DecodableType
        generatedCommandList;
    Attributes::AcceptedCommandList::TypeInfo::DecodableType
        acceptedCommandList;
    Attributes::AttributeList::TypeInfo::DecodableType attributeList;
    Attributes::FeatureMap::TypeInfo::DecodableType featureMap =
        static_cast<uint32_t>(0);
    Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision =
        static_cast<uint16_t>(0);
  };
};
} // namespace Attributes
} // namespace CommodityPrice
} // namespace Clusters
} // namespace app
} // namespace chip
