22#include <nlohmann/json_fwd.hpp>
24#include "iceberg/catalog/rest/iceberg_rest_export.h"
26#include "iceberg/result.h"
31namespace iceberg::rest {
33template <
typename Model>
34Result<Model> FromJson(
const nlohmann::json& json);
36#define ICEBERG_DECLARE_JSON_SERDE(Model) \
37 ICEBERG_REST_EXPORT Result<Model> Model##FromJson(const nlohmann::json& json); \
40 ICEBERG_REST_EXPORT Result<Model> FromJson(const nlohmann::json& json); \
42 ICEBERG_REST_EXPORT nlohmann::json ToJson(const Model& model);
46ICEBERG_DECLARE_JSON_SERDE(CatalogConfig)
47ICEBERG_DECLARE_JSON_SERDE(ErrorResponse)
48ICEBERG_DECLARE_JSON_SERDE(ListNamespacesResponse)
49ICEBERG_DECLARE_JSON_SERDE(CreateNamespaceRequest)
50ICEBERG_DECLARE_JSON_SERDE(CreateNamespaceResponse)
51ICEBERG_DECLARE_JSON_SERDE(GetNamespaceResponse)
52ICEBERG_DECLARE_JSON_SERDE(UpdateNamespacePropertiesRequest)
53ICEBERG_DECLARE_JSON_SERDE(UpdateNamespacePropertiesResponse)
54ICEBERG_DECLARE_JSON_SERDE(ListTablesResponse)
55ICEBERG_DECLARE_JSON_SERDE(LoadTableResult)
56ICEBERG_DECLARE_JSON_SERDE(RegisterTableRequest)
57ICEBERG_DECLARE_JSON_SERDE(RenameTableRequest)
58ICEBERG_DECLARE_JSON_SERDE(CreateTableRequest)
59ICEBERG_DECLARE_JSON_SERDE(CommitTableRequest)
60ICEBERG_DECLARE_JSON_SERDE(CommitTableResponse)
61ICEBERG_DECLARE_JSON_SERDE(OAuthTokenResponse)
63#undef ICEBERG_DECLARE_JSON_SERDE