You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
888 B

#ifndef ARCHIVE_DEPENDENCY_H
#define ARCHIVE_DEPENDENCY_H
#include <string>
#include <optional>
#include <nlohmann/json.hpp>
class launchpad;
class archive_dependency {
public:
archive_dependency();
~archive_dependency();
static std::optional<archive_dependency> parse(const std::string& json_data);
void parse_json(const std::string& json_data);
void set_lp(launchpad* lp_ptr);
std::string archive_link;
std::string component_name;
std::string date_created;
std::string dependency_link;
std::string http_etag;
std::string pocket;
std::string resource_type_link;
std::string self_link;
std::string snap_base_link;
std::string title;
std::optional<archive_dependency> get() const;
bool patch(const nlohmann::json& data) const;
bool put(const nlohmann::json& data) const;
private:
launchpad* lp;
};
#endif