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

namespace chip {
namespace app {
namespace Clusters {
namespace NetworkCommissioning {
namespace Attributes {

namespace MaxNetworks {
struct TypeInfo {
  using Type = uint8_t;
  using DecodableType = uint8_t;
  using DecodableArgType = uint8_t;

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

  static constexpr ClusterId GetClusterId() {
    return Clusters::NetworkCommissioning::Id;
  }
  static constexpr AttributeId GetAttributeId() {
    return Attributes::Networks::Id;
  }
  static constexpr bool MustUseTimedWrite() { return false; }
};
} // namespace Networks
namespace ScanMaxTimeSeconds {
struct TypeInfo {
  using Type = uint8_t;
  using DecodableType = uint8_t;
  using DecodableArgType = uint8_t;

  static constexpr ClusterId GetClusterId() {
    return Clusters::NetworkCommissioning::Id;
  }
  static constexpr AttributeId GetAttributeId() {
    return Attributes::ScanMaxTimeSeconds::Id;
  }
  static constexpr bool MustUseTimedWrite() { return false; }
};
} // namespace ScanMaxTimeSeconds
namespace ConnectMaxTimeSeconds {
struct TypeInfo {
  using Type = uint8_t;
  using DecodableType = uint8_t;
  using DecodableArgType = uint8_t;

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

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

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

  static constexpr ClusterId GetClusterId() {
    return Clusters::NetworkCommissioning::Id;
  }
  static constexpr AttributeId GetAttributeId() {
    return Attributes::LastNetworkID::Id;
  }
  static constexpr bool MustUseTimedWrite() { return false; }
  static constexpr size_t MaxLength() { return 32; }
};
} // namespace LastNetworkID
namespace LastConnectErrorValue {
struct TypeInfo {
  using Type = chip::app::DataModel::Nullable<int32_t>;
  using DecodableType = chip::app::DataModel::Nullable<int32_t>;
  using DecodableArgType = const chip::app::DataModel::Nullable<int32_t> &;

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

  static constexpr ClusterId GetClusterId() {
    return Clusters::NetworkCommissioning::Id;
  }
  static constexpr AttributeId GetAttributeId() {
    return Attributes::SupportedWiFiBands::Id;
  }
  static constexpr bool MustUseTimedWrite() { return false; }
};
} // namespace SupportedWiFiBands
namespace SupportedThreadFeatures {
struct TypeInfo {
  using Type = chip::BitMask<
      chip::app::Clusters::NetworkCommissioning::ThreadCapabilitiesBitmap>;
  using DecodableType = chip::BitMask<
      chip::app::Clusters::NetworkCommissioning::ThreadCapabilitiesBitmap>;
  using DecodableArgType = chip::BitMask<
      chip::app::Clusters::NetworkCommissioning::ThreadCapabilitiesBitmap>;

  static constexpr ClusterId GetClusterId() {
    return Clusters::NetworkCommissioning::Id;
  }
  static constexpr AttributeId GetAttributeId() {
    return Attributes::SupportedThreadFeatures::Id;
  }
  static constexpr bool MustUseTimedWrite() { return false; }
};
} // namespace SupportedThreadFeatures
namespace ThreadVersion {
struct TypeInfo {
  using Type = uint16_t;
  using DecodableType = uint16_t;
  using DecodableArgType = uint16_t;

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

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

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

    Attributes::MaxNetworks::TypeInfo::DecodableType maxNetworks =
        static_cast<uint8_t>(0);
    Attributes::Networks::TypeInfo::DecodableType networks;
    Attributes::ScanMaxTimeSeconds::TypeInfo::DecodableType scanMaxTimeSeconds =
        static_cast<uint8_t>(0);
    Attributes::ConnectMaxTimeSeconds::TypeInfo::DecodableType
        connectMaxTimeSeconds = static_cast<uint8_t>(0);
    Attributes::InterfaceEnabled::TypeInfo::DecodableType interfaceEnabled =
        static_cast<bool>(0);
    Attributes::LastNetworkingStatus::TypeInfo::DecodableType
        lastNetworkingStatus;
    Attributes::LastNetworkID::TypeInfo::DecodableType lastNetworkID;
    Attributes::LastConnectErrorValue::TypeInfo::DecodableType
        lastConnectErrorValue;
    Attributes::SupportedWiFiBands::TypeInfo::DecodableType supportedWiFiBands;
    Attributes::SupportedThreadFeatures::TypeInfo::DecodableType
        supportedThreadFeatures = static_cast<
            chip::BitMask<chip::app::Clusters::NetworkCommissioning::
                              ThreadCapabilitiesBitmap>>(0);
    Attributes::ThreadVersion::TypeInfo::DecodableType threadVersion =
        static_cast<uint16_t>(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 NetworkCommissioning
} // namespace Clusters
} // namespace app
} // namespace chip
