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

#pragma once

#include <app/data-model/DecodableList.h>
#include <app/data-model/Encode.h>
#include <app/data-model/List.h>
#include <app/data-model/NullObject.h>
#include <app/data-model/Nullable.h>
#include <lib/core/DataModelTypes.h>
#include <lib/core/Optional.h>
#include <lib/core/TLV.h>
#include <lib/support/BitMask.h>

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

#include <clusters/WaterValveData/ClusterId.h>
#include <clusters/WaterValveData/CommandIds.h>
#include <clusters/WaterValveData/Enums.h>
#include <clusters/WaterValveData/Structs.h>

#include <cstdint>

namespace chip {
namespace app {
namespace Clusters {
namespace WaterValveData {
namespace Commands {
// Forward-declarations so we can reference these later.

namespace GetValveSessionLogs {
struct Type;
struct DecodableType;
} // namespace GetValveSessionLogs

namespace GetValveSessionLogsResponse {
struct Type;
struct DecodableType;
} // namespace GetValveSessionLogsResponse

namespace SetValveSession {
struct Type;
struct DecodableType;
} // namespace SetValveSession

namespace SetValveSessionResponse {
struct Type;
struct DecodableType;
} // namespace SetValveSessionResponse

namespace GetAllValveSession {
struct Type;
struct DecodableType;
} // namespace GetAllValveSession

namespace GetAllValveSessionResponse {
struct Type;
struct DecodableType;
} // namespace GetAllValveSessionResponse

namespace GetWaterUsage {
struct Type;
struct DecodableType;
} // namespace GetWaterUsage

namespace GetWaterUsageResponse {
struct Type;
struct DecodableType;
} // namespace GetWaterUsageResponse

namespace GetWaterStats {
struct Type;
struct DecodableType;
} // namespace GetWaterStats

namespace GetWaterStatsResponse {
struct Type;
struct DecodableType;
} // namespace GetWaterStatsResponse

namespace GetValveFreezeRecord {
struct Type;
struct DecodableType;
} // namespace GetValveFreezeRecord

namespace GetValveFreezeRecordResponse {
struct Type;
struct DecodableType;
} // namespace GetValveFreezeRecordResponse

namespace GetValveTemperatureRecord {
struct Type;
struct DecodableType;
} // namespace GetValveTemperatureRecord

namespace GetValveTemperatureRecordResponse {
struct Type;
struct DecodableType;
} // namespace GetValveTemperatureRecordResponse

namespace OpenValveWithVolume {
struct Type;
struct DecodableType;
} // namespace OpenValveWithVolume

} // namespace Commands

namespace Commands {
namespace GetValveSessionLogs {
enum class Fields : uint8_t {
  kPage = 0,
};

struct Type {
public:
  // Use GetCommandId instead of commandId directly to avoid naming conflict
  // with CommandIdentification in ExecutionOfACommand
  static constexpr CommandId GetCommandId() {
    return Commands::GetValveSessionLogs::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  uint8_t page = static_cast<uint8_t>(0);

  CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

  using ResponseType = Clusters::WaterValveData::Commands::
      GetValveSessionLogsResponse::DecodableType;

  static constexpr bool MustUseTimedInvoke() { return false; }
};

struct DecodableType {
public:
  static constexpr CommandId GetCommandId() {
    return Commands::GetValveSessionLogs::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }
  static constexpr bool kIsFabricScoped = false;

  uint8_t page = static_cast<uint8_t>(0);

  CHIP_ERROR Decode(TLV::TLVReader &reader);
};
}; // namespace GetValveSessionLogs
namespace GetValveSessionLogsResponse {
enum class Fields : uint8_t {
  kTotal = 0,
  kLogs = 1,
};

struct Type {
public:
  // Use GetCommandId instead of commandId directly to avoid naming conflict
  // with CommandIdentification in ExecutionOfACommand
  static constexpr CommandId GetCommandId() {
    return Commands::GetValveSessionLogsResponse::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  uint16_t total = static_cast<uint16_t>(0);
  DataModel::List<const Structs::ValveSessionLogStruct::Type> logs;

  CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter &aWriter,
                    TLV::Tag aTag) const;

  using ResponseType = DataModel::NullObjectType;

  static constexpr bool MustUseTimedInvoke() { return false; }
};

struct DecodableType {
public:
  static constexpr CommandId GetCommandId() {
    return Commands::GetValveSessionLogsResponse::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  uint16_t total = static_cast<uint16_t>(0);
  DataModel::DecodableList<Structs::ValveSessionLogStruct::DecodableType> logs;

  CHIP_ERROR Decode(TLV::TLVReader &reader);
};
}; // namespace GetValveSessionLogsResponse
namespace SetValveSession {
enum class Fields : uint8_t {
  kSession = 0,
  kOperation = 1,
};

struct Type {
public:
  // Use GetCommandId instead of commandId directly to avoid naming conflict
  // with CommandIdentification in ExecutionOfACommand
  static constexpr CommandId GetCommandId() {
    return Commands::SetValveSession::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  Structs::ValveSessionStruct::Type session;
  ValveSessionOperationEnum operation =
      static_cast<ValveSessionOperationEnum>(0);

  CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

  using ResponseType = Clusters::WaterValveData::Commands::
      SetValveSessionResponse::DecodableType;

  static constexpr bool MustUseTimedInvoke() { return false; }
};

struct DecodableType {
public:
  static constexpr CommandId GetCommandId() {
    return Commands::SetValveSession::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }
  static constexpr bool kIsFabricScoped = false;

  Structs::ValveSessionStruct::DecodableType session;
  ValveSessionOperationEnum operation =
      static_cast<ValveSessionOperationEnum>(0);

  CHIP_ERROR Decode(TLV::TLVReader &reader);
};
}; // namespace SetValveSession
namespace SetValveSessionResponse {
enum class Fields : uint8_t {
  kTotal = 0,
  kSessions = 1,
};

struct Type {
public:
  // Use GetCommandId instead of commandId directly to avoid naming conflict
  // with CommandIdentification in ExecutionOfACommand
  static constexpr CommandId GetCommandId() {
    return Commands::SetValveSessionResponse::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  uint8_t total = static_cast<uint8_t>(0);
  DataModel::List<const Structs::ValveSessionStateStruct::Type> sessions;

  CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter &aWriter,
                    TLV::Tag aTag) const;

  using ResponseType = DataModel::NullObjectType;

  static constexpr bool MustUseTimedInvoke() { return false; }
};

struct DecodableType {
public:
  static constexpr CommandId GetCommandId() {
    return Commands::SetValveSessionResponse::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  uint8_t total = static_cast<uint8_t>(0);
  DataModel::DecodableList<Structs::ValveSessionStateStruct::DecodableType>
      sessions;

  CHIP_ERROR Decode(TLV::TLVReader &reader);
};
}; // namespace SetValveSessionResponse
namespace GetAllValveSession {
enum class Fields : uint8_t {};

struct Type {
public:
  // Use GetCommandId instead of commandId directly to avoid naming conflict
  // with CommandIdentification in ExecutionOfACommand
  static constexpr CommandId GetCommandId() {
    return Commands::GetAllValveSession::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

  using ResponseType = Clusters::WaterValveData::Commands::
      GetAllValveSessionResponse::DecodableType;

  static constexpr bool MustUseTimedInvoke() { return false; }
};

struct DecodableType {
public:
  static constexpr CommandId GetCommandId() {
    return Commands::GetAllValveSession::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }
  static constexpr bool kIsFabricScoped = false;

  CHIP_ERROR Decode(TLV::TLVReader &reader);
};
}; // namespace GetAllValveSession
namespace GetAllValveSessionResponse {
enum class Fields : uint8_t {
  kTotal = 0,
  kSessions = 1,
};

struct Type {
public:
  // Use GetCommandId instead of commandId directly to avoid naming conflict
  // with CommandIdentification in ExecutionOfACommand
  static constexpr CommandId GetCommandId() {
    return Commands::GetAllValveSessionResponse::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  uint8_t total = static_cast<uint8_t>(0);
  DataModel::List<const Structs::ValveSessionStateStruct::Type> sessions;

  CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter &aWriter,
                    TLV::Tag aTag) const;

  using ResponseType = DataModel::NullObjectType;

  static constexpr bool MustUseTimedInvoke() { return false; }
};

struct DecodableType {
public:
  static constexpr CommandId GetCommandId() {
    return Commands::GetAllValveSessionResponse::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  uint8_t total = static_cast<uint8_t>(0);
  DataModel::DecodableList<Structs::ValveSessionStateStruct::DecodableType>
      sessions;

  CHIP_ERROR Decode(TLV::TLVReader &reader);
};
}; // namespace GetAllValveSessionResponse
namespace GetWaterUsage {
enum class Fields : uint8_t {};

struct Type {
public:
  // Use GetCommandId instead of commandId directly to avoid naming conflict
  // with CommandIdentification in ExecutionOfACommand
  static constexpr CommandId GetCommandId() {
    return Commands::GetWaterUsage::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

  using ResponseType =
      Clusters::WaterValveData::Commands::GetWaterUsageResponse::DecodableType;

  static constexpr bool MustUseTimedInvoke() { return false; }
};

struct DecodableType {
public:
  static constexpr CommandId GetCommandId() {
    return Commands::GetWaterUsage::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }
  static constexpr bool kIsFabricScoped = false;

  CHIP_ERROR Decode(TLV::TLVReader &reader);
};
}; // namespace GetWaterUsage
namespace GetWaterUsageResponse {
enum class Fields : uint8_t {
  kUsage = 0,
};

struct Type {
public:
  // Use GetCommandId instead of commandId directly to avoid naming conflict
  // with CommandIdentification in ExecutionOfACommand
  static constexpr CommandId GetCommandId() {
    return Commands::GetWaterUsageResponse::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  Structs::WaterUsageStruct::Type usage;

  CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter &aWriter,
                    TLV::Tag aTag) const;

  using ResponseType = DataModel::NullObjectType;

  static constexpr bool MustUseTimedInvoke() { return false; }
};

struct DecodableType {
public:
  static constexpr CommandId GetCommandId() {
    return Commands::GetWaterUsageResponse::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  Structs::WaterUsageStruct::DecodableType usage;

  CHIP_ERROR Decode(TLV::TLVReader &reader);
};
}; // namespace GetWaterUsageResponse
namespace GetWaterStats {
enum class Fields : uint8_t {
  kLast = 0,
  kStats = 1,
};

struct Type {
public:
  // Use GetCommandId instead of commandId directly to avoid naming conflict
  // with CommandIdentification in ExecutionOfACommand
  static constexpr CommandId GetCommandId() {
    return Commands::GetWaterStats::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  bool last = static_cast<bool>(0);
  WaterStatsEnum stats = static_cast<WaterStatsEnum>(0);

  CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

  using ResponseType =
      Clusters::WaterValveData::Commands::GetWaterStatsResponse::DecodableType;

  static constexpr bool MustUseTimedInvoke() { return false; }
};

struct DecodableType {
public:
  static constexpr CommandId GetCommandId() {
    return Commands::GetWaterStats::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }
  static constexpr bool kIsFabricScoped = false;

  bool last = static_cast<bool>(0);
  WaterStatsEnum stats = static_cast<WaterStatsEnum>(0);

  CHIP_ERROR Decode(TLV::TLVReader &reader);
};
}; // namespace GetWaterStats
namespace GetWaterStatsResponse {
enum class Fields : uint8_t {
  kTotal = 0,
  kStats = 1,
};

struct Type {
public:
  // Use GetCommandId instead of commandId directly to avoid naming conflict
  // with CommandIdentification in ExecutionOfACommand
  static constexpr CommandId GetCommandId() {
    return Commands::GetWaterStatsResponse::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  uint32_t total = static_cast<uint32_t>(0);
  DataModel::List<const uint32_t> stats;

  CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter &aWriter,
                    TLV::Tag aTag) const;

  using ResponseType = DataModel::NullObjectType;

  static constexpr bool MustUseTimedInvoke() { return false; }
};

struct DecodableType {
public:
  static constexpr CommandId GetCommandId() {
    return Commands::GetWaterStatsResponse::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  uint32_t total = static_cast<uint32_t>(0);
  DataModel::DecodableList<uint32_t> stats;

  CHIP_ERROR Decode(TLV::TLVReader &reader);
};
}; // namespace GetWaterStatsResponse
namespace GetValveFreezeRecord {
enum class Fields : uint8_t {
  kPage = 0,
};

struct Type {
public:
  // Use GetCommandId instead of commandId directly to avoid naming conflict
  // with CommandIdentification in ExecutionOfACommand
  static constexpr CommandId GetCommandId() {
    return Commands::GetValveFreezeRecord::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  uint8_t page = static_cast<uint8_t>(0);

  CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

  using ResponseType = Clusters::WaterValveData::Commands::
      GetValveFreezeRecordResponse::DecodableType;

  static constexpr bool MustUseTimedInvoke() { return false; }
};

struct DecodableType {
public:
  static constexpr CommandId GetCommandId() {
    return Commands::GetValveFreezeRecord::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }
  static constexpr bool kIsFabricScoped = false;

  uint8_t page = static_cast<uint8_t>(0);

  CHIP_ERROR Decode(TLV::TLVReader &reader);
};
}; // namespace GetValveFreezeRecord
namespace GetValveFreezeRecordResponse {
enum class Fields : uint8_t {
  kTotal = 0,
  kFreeze = 1,
};

struct Type {
public:
  // Use GetCommandId instead of commandId directly to avoid naming conflict
  // with CommandIdentification in ExecutionOfACommand
  static constexpr CommandId GetCommandId() {
    return Commands::GetValveFreezeRecordResponse::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  uint32_t total = static_cast<uint32_t>(0);
  DataModel::List<const Structs::ValveFreezeStateStruct::Type> freeze;

  CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter &aWriter,
                    TLV::Tag aTag) const;

  using ResponseType = DataModel::NullObjectType;

  static constexpr bool MustUseTimedInvoke() { return false; }
};

struct DecodableType {
public:
  static constexpr CommandId GetCommandId() {
    return Commands::GetValveFreezeRecordResponse::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  uint32_t total = static_cast<uint32_t>(0);
  DataModel::DecodableList<Structs::ValveFreezeStateStruct::DecodableType>
      freeze;

  CHIP_ERROR Decode(TLV::TLVReader &reader);
};
}; // namespace GetValveFreezeRecordResponse
namespace GetValveTemperatureRecord {
enum class Fields : uint8_t {
  kPage = 0,
};

struct Type {
public:
  // Use GetCommandId instead of commandId directly to avoid naming conflict
  // with CommandIdentification in ExecutionOfACommand
  static constexpr CommandId GetCommandId() {
    return Commands::GetValveTemperatureRecord::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  uint8_t page = static_cast<uint8_t>(0);

  CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

  using ResponseType = Clusters::WaterValveData::Commands::
      GetValveTemperatureRecordResponse::DecodableType;

  static constexpr bool MustUseTimedInvoke() { return false; }
};

struct DecodableType {
public:
  static constexpr CommandId GetCommandId() {
    return Commands::GetValveTemperatureRecord::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }
  static constexpr bool kIsFabricScoped = false;

  uint8_t page = static_cast<uint8_t>(0);

  CHIP_ERROR Decode(TLV::TLVReader &reader);
};
}; // namespace GetValveTemperatureRecord
namespace GetValveTemperatureRecordResponse {
enum class Fields : uint8_t {
  kTotal = 0,
  kTemperature = 1,
};

struct Type {
public:
  // Use GetCommandId instead of commandId directly to avoid naming conflict
  // with CommandIdentification in ExecutionOfACommand
  static constexpr CommandId GetCommandId() {
    return Commands::GetValveTemperatureRecordResponse::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  uint32_t total = static_cast<uint32_t>(0);
  DataModel::List<const Structs::ValveTemperatureStateStruct::Type> temperature;

  CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter &aWriter,
                    TLV::Tag aTag) const;

  using ResponseType = DataModel::NullObjectType;

  static constexpr bool MustUseTimedInvoke() { return false; }
};

struct DecodableType {
public:
  static constexpr CommandId GetCommandId() {
    return Commands::GetValveTemperatureRecordResponse::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  uint32_t total = static_cast<uint32_t>(0);
  DataModel::DecodableList<Structs::ValveTemperatureStateStruct::DecodableType>
      temperature;

  CHIP_ERROR Decode(TLV::TLVReader &reader);
};
}; // namespace GetValveTemperatureRecordResponse
namespace OpenValveWithVolume {
enum class Fields : uint8_t {
  kVolume = 0,
};

struct Type {
public:
  // Use GetCommandId instead of commandId directly to avoid naming conflict
  // with CommandIdentification in ExecutionOfACommand
  static constexpr CommandId GetCommandId() {
    return Commands::OpenValveWithVolume::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }

  uint16_t volume = static_cast<uint16_t>(0);

  CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

  using ResponseType = DataModel::NullObjectType;

  static constexpr bool MustUseTimedInvoke() { return false; }
};

struct DecodableType {
public:
  static constexpr CommandId GetCommandId() {
    return Commands::OpenValveWithVolume::Id;
  }
  static constexpr ClusterId GetClusterId() {
    return Clusters::WaterValveData::Id;
  }
  static constexpr bool kIsFabricScoped = false;

  uint16_t volume = static_cast<uint16_t>(0);

  CHIP_ERROR Decode(TLV::TLVReader &reader);
};
}; // namespace OpenValveWithVolume
} // namespace Commands
} // namespace WaterValveData
} // namespace Clusters
} // namespace app
} // namespace chip
