Fawkes API Fawkes Development Version
PDDLGrounding.h
1
2/****************************************************************************
3 * ClipsExecutive -- Schema PDDLGrounding
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/** PDDLGrounding representation for JSON transfer. */
28{
29public:
30 /** Constructor. */
32 /** Constructor from JSON.
33 * @param json JSON string to initialize from
34 */
35 PDDLGrounding(const std::string &json);
36 /** Constructor from JSON.
37 * @param v RapidJSON value object to initialize from.
38 */
39 PDDLGrounding(const rapidjson::Value &v);
40
41 /** Destructor. */
42 virtual ~PDDLGrounding();
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: PDDLGrounding
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 id value.
123 * @return id value
124 */
125 std::optional<std::string>
126 id() const
127 {
128 return id_;
129 }
130
131 /** Set id value.
132 * @param id new value
133 */
134 void
135 set_id(const std::string &id)
136 {
137 id_ = id;
138 }
139 /** Get param-names value.
140 * @return param-names value
141 */
142 std::vector<std::string>
144 {
145 return param_names_;
146 }
147
148 /** Set param-names value.
149 * @param param_names new value
150 */
151 void
152 set_param_names(const std::vector<std::string> &param_names)
153 {
154 param_names_ = param_names;
155 }
156 /** Add element to param-names array.
157 * @param param_names new value
158 */
159 void
160 addto_param_names(const std::string &&param_names)
161 {
162 param_names_.push_back(std::move(param_names));
163 }
164
165 /** Add element to param-names array.
166 * The move-semantics version (std::move) should be preferred.
167 * @param param_names new value
168 */
169 void
170 addto_param_names(const std::string &param_names)
171 {
172 param_names_.push_back(param_names);
173 }
174 /** Get param-values value.
175 * @return param-values value
176 */
177 std::vector<std::string>
179 {
180 return param_values_;
181 }
182
183 /** Set param-values value.
184 * @param param_values new value
185 */
186 void
187 set_param_values(const std::vector<std::string> &param_values)
188 {
189 param_values_ = param_values;
190 }
191 /** Add element to param-values array.
192 * @param param_values new value
193 */
194 void
195 addto_param_values(const std::string &&param_values)
196 {
197 param_values_.push_back(std::move(param_values));
198 }
199
200 /** Add element to param-values array.
201 * The move-semantics version (std::move) should be preferred.
202 * @param param_values new value
203 */
204 void
206 {
207 param_values_.push_back(param_values);
208 }
209
210private:
211 std::optional<std::string> kind_;
212 std::optional<std::string> apiVersion_;
213 std::optional<std::string> id_;
214 std::vector<std::string> param_names_;
215 std::vector<std::string> param_values_;
216};
PDDLGrounding representation for JSON transfer.
Definition: PDDLGrounding.h:28
std::optional< std::string > id() const
Get id value.
std::optional< std::string > kind() const
Get kind value.
Definition: PDDLGrounding.h:92
virtual void to_json_value(rapidjson::Document &d, rapidjson::Value &v) const
Render object to JSON.
virtual void from_json(const std::string &json)
Retrieve data from JSON string.
void set_kind(const std::string &kind)
Set kind value.
void set_param_values(const std::vector< std::string > &param_values)
Set param-values value.
void addto_param_names(const std::string &&param_names)
Add element to param-names array.
void set_apiVersion(const std::string &apiVersion)
Set apiVersion value.
virtual std::string to_json(bool pretty=false) const
Render object to JSON.
virtual void from_json_value(const rapidjson::Value &v)
Retrieve data from JSON string.
virtual ~PDDLGrounding()
Destructor.
static std::string api_version()
Get version of implemented API.
Definition: PDDLGrounding.h:48
std::optional< std::string > apiVersion() const
Get apiVersion value.
std::vector< std::string > param_values() const
Get param-values value.
PDDLGrounding()
Constructor.
void set_id(const std::string &id)
Set id value.
void addto_param_values(const std::string &&param_values)
Add element to param-values array.
std::vector< std::string > param_names() const
Get param-names value.
void addto_param_values(const std::string &param_values)
Add element to param-values array.
virtual void validate(bool subcall=false) const
Validate if all required fields have been set.
void addto_param_names(const std::string &param_names)
Add element to param-names array.
void set_param_names(const std::vector< std::string > &param_names)
Set param-names value.