Fawkes API Fawkes Development Version
TransformsGraph.h
1
2/****************************************************************************
3 * Transforms -- Schema TransformsGraph
4 * (auto-generated, do not modify directly)
5 *
6 * Fawkes Transforms REST API.
7 * Transforms information and some calculations.
8 *
9 * API Contact: Tim Niemueller <niemueller@kbsg.rwth-aachen.de>
10 * API Version: v1beta1
11 * API License: Apache 2.0
12 ****************************************************************************/
13
14#pragma once
15
16#define RAPIDJSON_HAS_STDSTRING 1
17#include <rapidjson/fwd.h>
18
19#include <cstdint>
20#include <memory>
21#include <optional>
22#include <string>
23#include <vector>
24
25/** TransformsGraph representation for JSON transfer. */
27
28{
29public:
30 /** Constructor. */
32 /** Constructor from JSON.
33 * @param json JSON string to initialize from
34 */
35 TransformsGraph(const std::string &json);
36 /** Constructor from JSON.
37 * @param v RapidJSON value object to initialize from.
38 */
39 TransformsGraph(const rapidjson::Value &v);
40
41 /** Get version of implemented API.
42 * @return string representation of version
43 */
44 static std::string
46 {
47 return "v1beta1";
48 }
49
50 /** Render object to JSON.
51 * @param pretty true to enable pretty printing (readable spacing)
52 * @return JSON string
53 */
54 virtual std::string to_json(bool pretty = false) const;
55 /** Render object to JSON.
56 * @param d RapidJSON document to retrieve allocator from
57 * @param v RapidJSON value to add data to
58 */
59 virtual void to_json_value(rapidjson::Document &d, rapidjson::Value &v) const;
60 /** Retrieve data from JSON string.
61 * @param json JSON representation suitable for this object.
62 * Will allow partial assignment and not validate automaticaly.
63 * @see validate()
64 */
65 virtual void from_json(const std::string &json);
66 /** Retrieve data from JSON string.
67 * @param v RapidJSON value suitable for this object.
68 * Will allow partial assignment and not validate automaticaly.
69 * @see validate()
70 */
71 virtual void from_json_value(const rapidjson::Value &v);
72
73 /** Validate if all required fields have been set.
74 * @param subcall true if this is called from another class, e.g.,
75 * a sub-class or array holder. Will modify the kind of exception thrown.
76 * @exception std::vector<std::string> thrown if required information is
77 * missing and @p subcall is set to true. Contains a list of missing fields.
78 * @exception std::runtime_error informative message describing the missing
79 * fields
80 */
81 virtual void validate(bool subcall = false) const;
82
83 // Schema: TransformsGraph
84public:
85 /** Get kind value.
86 * @return kind value
87 */
88 std::optional<std::string>
89 kind() const
90 {
91 return kind_;
92 }
93
94 /** Set kind value.
95 * @param kind new value
96 */
97 void
98 set_kind(const std::string &kind)
99 {
100 kind_ = kind;
101 }
102 /** Get apiVersion value.
103 * @return apiVersion value
104 */
105 std::optional<std::string>
107 {
108 return apiVersion_;
109 }
110
111 /** Set apiVersion value.
112 * @param apiVersion new value
113 */
114 void
115 set_apiVersion(const std::string &apiVersion)
116 {
117 apiVersion_ = apiVersion;
118 }
119 /** Get dotgraph value.
120 * @return dotgraph value
121 */
122 std::optional<std::string>
123 dotgraph() const
124 {
125 return dotgraph_;
126 }
127
128 /** Set dotgraph value.
129 * @param dotgraph new value
130 */
131 void
132 set_dotgraph(const std::string &dotgraph)
133 {
134 dotgraph_ = dotgraph;
135 }
136
137private:
138 std::optional<std::string> kind_;
139 std::optional<std::string> apiVersion_;
140 std::optional<std::string> dotgraph_;
141};
TransformsGraph representation for JSON transfer.
TransformsGraph()
Constructor.
std::optional< std::string > kind() const
Get kind value.
std::optional< std::string > apiVersion() const
Get apiVersion value.
void set_kind(const std::string &kind)
Set kind value.
virtual void from_json_value(const rapidjson::Value &v)
Retrieve data from JSON string.
virtual void validate(bool subcall=false) const
Validate if all required fields have been set.
void set_dotgraph(const std::string &dotgraph)
Set dotgraph value.
void set_apiVersion(const std::string &apiVersion)
Set apiVersion value.
std::optional< std::string > dotgraph() const
Get dotgraph value.
virtual void from_json(const std::string &json)
Retrieve data from JSON string.
static std::string api_version()
Get version of implemented API.
virtual std::string to_json(bool pretty=false) const
Render object to JSON.
virtual void to_json_value(rapidjson::Document &d, rapidjson::Value &v) const
Render object to JSON.