Fawkes API Fawkes Development Version
DomainEffect.h
1
2/****************************************************************************
3 * ClipsExecutive -- Schema DomainEffect
4 * (auto-generated, do not modify directly)
5 *
6 * CLIPS Executive REST API.
7 * Enables access to goals, plans, and all items in the domain model.
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
18#include <rapidjson/fwd.h>
19
20#include <cstdint>
21#include <memory>
22#include <optional>
23#include <string>
24#include <vector>
25
26/** DomainEffect representation for JSON transfer. */
28{
29public:
30 /** Constructor. */
32 /** Constructor from JSON.
33 * @param json JSON string to initialize from
34 */
35 DomainEffect(const std::string &json);
36 /** Constructor from JSON.
37 * @param v RapidJSON value object to initialize from.
38 */
39 DomainEffect(const rapidjson::Value &v);
40
41 /** Destructor. */
42 virtual ~DomainEffect();
43
44 /** Get version of implemented API.
45 * @return string representation of version
46 */
47 static std::string
49 {
50 return "v1beta1";
51 }
52
53 /** Render object to JSON.
54 * @param pretty true to enable pretty printing (readable spacing)
55 * @return JSON string
56 */
57 virtual std::string to_json(bool pretty = false) const;
58 /** Render object to JSON.
59 * @param d RapidJSON document to retrieve allocator from
60 * @param v RapidJSON value to add data to
61 */
62 virtual void to_json_value(rapidjson::Document &d, rapidjson::Value &v) const;
63 /** Retrieve data from JSON string.
64 * @param json JSON representation suitable for this object.
65 * Will allow partial assignment and not validate automaticaly.
66 * @see validate()
67 */
68 virtual void from_json(const std::string &json);
69 /** Retrieve data from JSON string.
70 * @param v RapidJSON value suitable for this object.
71 * Will allow partial assignment and not validate automaticaly.
72 * @see validate()
73 */
74 virtual void from_json_value(const rapidjson::Value &v);
75
76 /** Validate if all required fields have been set.
77 * @param subcall true if this is called from another class, e.g.,
78 * a sub-class or array holder. Will modify the kind of exception thrown.
79 * @exception std::vector<std::string> thrown if required information is
80 * missing and @p subcall is set to true. Contains a list of missing fields.
81 * @exception std::runtime_error informative message describing the missing
82 * fields
83 */
84 virtual void validate(bool subcall = false) const;
85
86 // Schema: DomainEffect
87public:
88 /** Get kind value.
89 * @return kind value
90 */
91 std::optional<std::string>
92 kind() const
93 {
94 return kind_;
95 }
96
97 /** Set kind value.
98 * @param kind new value
99 */
100 void
101 set_kind(const std::string &kind)
102 {
103 kind_ = kind;
104 }
105 /** Get apiVersion value.
106 * @return apiVersion value
107 */
108 std::optional<std::string>
110 {
111 return apiVersion_;
112 }
113
114 /** Set apiVersion value.
115 * @param apiVersion new value
116 */
117 void
118 set_apiVersion(const std::string &apiVersion)
119 {
120 apiVersion_ = apiVersion;
121 }
122 /** Get name value.
123 * @return name value
124 */
125 std::optional<std::string>
126 name() const
127 {
128 return name_;
129 }
130
131 /** Set name value.
132 * @param name new value
133 */
134 void
135 set_name(const std::string &name)
136 {
137 name_ = name;
138 }
139 /** Get type value.
140 * @return type value
141 */
142 std::optional<std::string>
143 type() const
144 {
145 return type_;
146 }
147
148 /** Set type value.
149 * @param type new value
150 */
151 void
152 set_type(const std::string &type)
153 {
154 type_ = type;
155 }
156 /** Get predicate value.
157 * @return predicate value
158 */
159 std::optional<std::string>
160 predicate() const
161 {
162 return predicate_;
163 }
164
165 /** Set predicate value.
166 * @param predicate new value
167 */
168 void
169 set_predicate(const std::string &predicate)
170 {
171 predicate_ = predicate;
172 }
173 /** Get param-names value.
174 * @return param-names value
175 */
176 std::vector<std::string>
178 {
179 return param_names_;
180 }
181
182 /** Set param-names value.
183 * @param param_names new value
184 */
185 void
186 set_param_names(const std::vector<std::string> &param_names)
187 {
188 param_names_ = param_names;
189 }
190 /** Add element to param-names array.
191 * @param param_names new value
192 */
193 void
194 addto_param_names(const std::string &&param_names)
195 {
196 param_names_.push_back(std::move(param_names));
197 }
198
199 /** Add element to param-names array.
200 * The move-semantics version (std::move) should be preferred.
201 * @param param_names new value
202 */
203 void
204 addto_param_names(const std::string &param_names)
205 {
206 param_names_.push_back(param_names);
207 }
208 /** Get param-values value.
209 * @return param-values value
210 */
211 std::vector<std::string>
213 {
214 return param_values_;
215 }
216
217 /** Set param-values value.
218 * @param param_values new value
219 */
220 void
221 set_param_values(const std::vector<std::string> &param_values)
222 {
223 param_values_ = param_values;
224 }
225 /** Add element to param-values array.
226 * @param param_values new value
227 */
228 void
229 addto_param_values(const std::string &&param_values)
230 {
231 param_values_.push_back(std::move(param_values));
232 }
233
234 /** Add element to param-values array.
235 * The move-semantics version (std::move) should be preferred.
236 * @param param_values new value
237 */
238 void
240 {
241 param_values_.push_back(param_values);
242 }
243 /** Get param-constants value.
244 * @return param-constants value
245 */
246 std::vector<std::string>
248 {
249 return param_constants_;
250 }
251
252 /** Set param-constants value.
253 * @param param_constants new value
254 */
255 void
256 set_param_constants(const std::vector<std::string> &param_constants)
257 {
258 param_constants_ = param_constants;
259 }
260 /** Add element to param-constants array.
261 * @param param_constants new value
262 */
263 void
265 {
266 param_constants_.push_back(std::move(param_constants));
267 }
268
269 /** Add element to param-constants array.
270 * The move-semantics version (std::move) should be preferred.
271 * @param param_constants new value
272 */
273 void
275 {
276 param_constants_.push_back(param_constants);
277 }
278
279private:
280 std::optional<std::string> kind_;
281 std::optional<std::string> apiVersion_;
282 std::optional<std::string> name_;
283 std::optional<std::string> type_;
284 std::optional<std::string> predicate_;
285 std::vector<std::string> param_names_;
286 std::vector<std::string> param_values_;
287 std::vector<std::string> param_constants_;
288};
DomainEffect representation for JSON transfer.
Definition: DomainEffect.h:28
void set_name(const std::string &name)
Set name value.
Definition: DomainEffect.h:135
std::vector< std::string > param_names() const
Get param-names value.
Definition: DomainEffect.h:177
std::optional< std::string > name() const
Get name value.
Definition: DomainEffect.h:126
void set_param_values(const std::vector< std::string > &param_values)
Set param-values value.
Definition: DomainEffect.h:221
virtual void validate(bool subcall=false) const
Validate if all required fields have been set.
void set_param_constants(const std::vector< std::string > &param_constants)
Set param-constants value.
Definition: DomainEffect.h:256
std::optional< std::string > kind() const
Get kind value.
Definition: DomainEffect.h:92
static std::string api_version()
Get version of implemented API.
Definition: DomainEffect.h:48
void addto_param_values(const std::string &&param_values)
Add element to param-values array.
Definition: DomainEffect.h:229
virtual void to_json_value(rapidjson::Document &d, rapidjson::Value &v) const
Render object to JSON.
void set_apiVersion(const std::string &apiVersion)
Set apiVersion value.
Definition: DomainEffect.h:118
void addto_param_names(const std::string &&param_names)
Add element to param-names array.
Definition: DomainEffect.h:194
void addto_param_values(const std::string &param_values)
Add element to param-values array.
Definition: DomainEffect.h:239
void set_predicate(const std::string &predicate)
Set predicate value.
Definition: DomainEffect.h:169
void set_type(const std::string &type)
Set type value.
Definition: DomainEffect.h:152
DomainEffect()
Constructor.
std::vector< std::string > param_constants() const
Get param-constants value.
Definition: DomainEffect.h:247
virtual void from_json_value(const rapidjson::Value &v)
Retrieve data from JSON string.
std::optional< std::string > type() const
Get type value.
Definition: DomainEffect.h:143
void addto_param_names(const std::string &param_names)
Add element to param-names array.
Definition: DomainEffect.h:204
void set_kind(const std::string &kind)
Set kind value.
Definition: DomainEffect.h:101
virtual void from_json(const std::string &json)
Retrieve data from JSON string.
void addto_param_constants(const std::string &&param_constants)
Add element to param-constants array.
Definition: DomainEffect.h:264
virtual std::string to_json(bool pretty=false) const
Render object to JSON.
virtual ~DomainEffect()
Destructor.
void set_param_names(const std::vector< std::string > &param_names)
Set param-names value.
Definition: DomainEffect.h:186
std::optional< std::string > apiVersion() const
Get apiVersion value.
Definition: DomainEffect.h:109
std::vector< std::string > param_values() const
Get param-values value.
Definition: DomainEffect.h:212
void addto_param_constants(const std::string &param_constants)
Add element to param-constants array.
Definition: DomainEffect.h:274
std::optional< std::string > predicate() const
Get predicate value.
Definition: DomainEffect.h:160