/*
 *
 *    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/NitrogenDioxideConcentrationMeasurement/AttributeIds.h>
#include <clusters/NitrogenDioxideConcentrationMeasurement/ClusterId.h>
#include <clusters/NitrogenDioxideConcentrationMeasurement/Enums.h>
#include <clusters/NitrogenDioxideConcentrationMeasurement/Structs.h>

namespace chip {
namespace app {
namespace Clusters {
namespace NitrogenDioxideConcentrationMeasurement {
namespace Attributes {

namespace MeasuredValue {
struct TypeInfo {
  using Type = chip::app::DataModel::Nullable<float>;
  using DecodableType = chip::app::DataModel::Nullable<float>;
  using DecodableArgType = const chip::app::DataModel::Nullable<float> &;

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

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

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

  static constexpr ClusterId GetClusterId() {
    return Clusters::NitrogenDioxideConcentrationMeasurement::Id;
  }
  static constexpr AttributeId GetAttributeId() {
    return Attributes::PeakMeasuredValue::Id;
  }
  static constexpr bool MustUseTimedWrite() { return false; }
};
} // namespace PeakMeasuredValue
namespace PeakMeasuredValueWindow {
struct TypeInfo {
  using Type = uint32_t;
  using DecodableType = uint32_t;
  using DecodableArgType = uint32_t;

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

  static constexpr ClusterId GetClusterId() {
    return Clusters::NitrogenDioxideConcentrationMeasurement::Id;
  }
  static constexpr AttributeId GetAttributeId() {
    return Attributes::AverageMeasuredValue::Id;
  }
  static constexpr bool MustUseTimedWrite() { return false; }
};
} // namespace AverageMeasuredValue
namespace AverageMeasuredValueWindow {
struct TypeInfo {
  using Type = uint32_t;
  using DecodableType = uint32_t;
  using DecodableArgType = uint32_t;

  static constexpr ClusterId GetClusterId() {
    return Clusters::NitrogenDioxideConcentrationMeasurement::Id;
  }
  static constexpr AttributeId GetAttributeId() {
    return Attributes::AverageMeasuredValueWindow::Id;
  }
  static constexpr bool MustUseTimedWrite() { return false; }
};
} // namespace AverageMeasuredValueWindow
namespace Uncertainty {
struct TypeInfo {
  using Type = float;
  using DecodableType = float;
  using DecodableArgType = float;

  static constexpr ClusterId GetClusterId() {
    return Clusters::NitrogenDioxideConcentrationMeasurement::Id;
  }
  static constexpr AttributeId GetAttributeId() {
    return Attributes::Uncertainty::Id;
  }
  static constexpr bool MustUseTimedWrite() { return false; }
};
} // namespace Uncertainty
namespace MeasurementUnit {
struct TypeInfo {
  using Type = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::
      MeasurementUnitEnum;
  using DecodableType = chip::app::Clusters::
      NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum;
  using DecodableArgType = chip::app::Clusters::
      NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum;

  static constexpr ClusterId GetClusterId() {
    return Clusters::NitrogenDioxideConcentrationMeasurement::Id;
  }
  static constexpr AttributeId GetAttributeId() {
    return Attributes::MeasurementUnit::Id;
  }
  static constexpr bool MustUseTimedWrite() { return false; }
};
} // namespace MeasurementUnit
namespace MeasurementMedium {
struct TypeInfo {
  using Type = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::
      MeasurementMediumEnum;
  using DecodableType = chip::app::Clusters::
      NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum;
  using DecodableArgType = chip::app::Clusters::
      NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum;

  static constexpr ClusterId GetClusterId() {
    return Clusters::NitrogenDioxideConcentrationMeasurement::Id;
  }
  static constexpr AttributeId GetAttributeId() {
    return Attributes::MeasurementMedium::Id;
  }
  static constexpr bool MustUseTimedWrite() { return false; }
};
} // namespace MeasurementMedium
namespace LevelValue {
struct TypeInfo {
  using Type = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::
      LevelValueEnum;
  using DecodableType = chip::app::Clusters::
      NitrogenDioxideConcentrationMeasurement::LevelValueEnum;
  using DecodableArgType = chip::app::Clusters::
      NitrogenDioxideConcentrationMeasurement::LevelValueEnum;

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

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

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

    Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue;
    Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue;
    Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue;
    Attributes::PeakMeasuredValue::TypeInfo::DecodableType peakMeasuredValue;
    Attributes::PeakMeasuredValueWindow::TypeInfo::DecodableType
        peakMeasuredValueWindow = static_cast<uint32_t>(0);
    Attributes::AverageMeasuredValue::TypeInfo::DecodableType
        averageMeasuredValue;
    Attributes::AverageMeasuredValueWindow::TypeInfo::DecodableType
        averageMeasuredValueWindow = static_cast<uint32_t>(0);
    Attributes::Uncertainty::TypeInfo::DecodableType uncertainty =
        static_cast<float>(0);
    Attributes::MeasurementUnit::TypeInfo::DecodableType measurementUnit =
        static_cast<
            chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::
                MeasurementUnitEnum>(0);
    Attributes::MeasurementMedium::TypeInfo::DecodableType measurementMedium =
        static_cast<
            chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::
                MeasurementMediumEnum>(0);
    Attributes::LevelValue::TypeInfo::DecodableType levelValue = static_cast<
        chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::
            LevelValueEnum>(0);
    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 NitrogenDioxideConcentrationMeasurement
} // namespace Clusters
} // namespace app
} // namespace chip
