Skip to content

Commit 649daed

Browse files
authored
Export valid and set status of properties (#6020)
1 parent 6ad5e5f commit 649daed

File tree

28 files changed

+560
-0
lines changed

28 files changed

+560
-0
lines changed

modules/openapi-generator/src/main/resources/cpp-qt5-client/model-body.mustache

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ void {{classname}}::{{setter}}(const {{{dataType}}} &{{name}}) {
120120
this->m_{{name}}_isSet = true;
121121
}
122122

123+
bool {{classname}}::is_{{name}}_Set() const{
124+
return m_{{name}}_isSet;
125+
}
126+
127+
bool {{classname}}::is_{{name}}_Valid() const{
128+
return m_{{name}}_isValid;
129+
}
130+
123131
{{/vars}}{{/isEnum}}{{#isEnum}}
124132
{{classname}}::e{{classname}} {{classname}}::getValue() const {
125133
return m_value;

modules/openapi-generator/src/main/resources/cpp-qt5-client/model-header.mustache

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public:
3535
{{^isEnum}}{{#vars}}
3636
{{{dataType}}} {{getter}}() const;
3737
void {{setter}}(const {{{dataType}}} &{{name}});
38+
bool is_{{name}}_Set() const;
39+
bool is_{{name}}_Valid() const;
3840
{{/vars}}{{/isEnum}}{{#isEnum}}
3941
{{#allowableValues}}
4042
enum class e{{classname}} {{#enumVars}}{{#-first}}{{^isString}}: int {{/isString}}{{/-first}}{{/enumVars}}{

modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/model-body.mustache

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ void {{classname}}::{{setter}}(const {{{dataType}}} &{{name}}) {
120120
this->m_{{name}}_isSet = true;
121121
}
122122

123+
bool {{classname}}::is_{{name}}_Set() const{
124+
return m_{{name}}_isSet;
125+
}
126+
127+
bool {{classname}}::is_{{name}}_Valid() const{
128+
return m_{{name}}_isValid;
129+
}
130+
123131
{{/vars}}{{/isEnum}}{{#isEnum}}
124132
{{classname}}::e{{classname}} {{classname}}::getValue() const {
125133
return m_value;

modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/model-header.mustache

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public:
3535
{{^isEnum}}{{#vars}}
3636
{{{dataType}}} {{getter}}() const;
3737
void {{setter}}(const {{{dataType}}} &{{name}});
38+
bool is_{{name}}_Set() const;
39+
bool is_{{name}}_Valid() const;
3840
{{/vars}}{{/isEnum}}{{#isEnum}}
3941
{{#allowableValues}}
4042
enum class e{{classname}} {{#enumVars}}{{#-first}}{{^isString}}: int {{/isString}}{{/-first}}{{/enumVars}}{

samples/client/petstore/cpp-qt5/client/PFXApiResponse.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ void PFXApiResponse::setCode(const qint32 &code) {
9191
this->m_code_isSet = true;
9292
}
9393

94+
bool PFXApiResponse::is_code_Set() const{
95+
return m_code_isSet;
96+
}
97+
98+
bool PFXApiResponse::is_code_Valid() const{
99+
return m_code_isValid;
100+
}
101+
94102
QString PFXApiResponse::getType() const {
95103
return type;
96104
}
@@ -99,6 +107,14 @@ void PFXApiResponse::setType(const QString &type) {
99107
this->m_type_isSet = true;
100108
}
101109

110+
bool PFXApiResponse::is_type_Set() const{
111+
return m_type_isSet;
112+
}
113+
114+
bool PFXApiResponse::is_type_Valid() const{
115+
return m_type_isValid;
116+
}
117+
102118
QString PFXApiResponse::getMessage() const {
103119
return message;
104120
}
@@ -107,6 +123,14 @@ void PFXApiResponse::setMessage(const QString &message) {
107123
this->m_message_isSet = true;
108124
}
109125

126+
bool PFXApiResponse::is_message_Set() const{
127+
return m_message_isSet;
128+
}
129+
130+
bool PFXApiResponse::is_message_Valid() const{
131+
return m_message_isValid;
132+
}
133+
110134
bool PFXApiResponse::isSet() const {
111135
bool isObjectUpdated = false;
112136
do {

samples/client/petstore/cpp-qt5/client/PFXApiResponse.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,18 @@ class PFXApiResponse : public PFXObject {
4040

4141
qint32 getCode() const;
4242
void setCode(const qint32 &code);
43+
bool is_code_Set() const;
44+
bool is_code_Valid() const;
4345

4446
QString getType() const;
4547
void setType(const QString &type);
48+
bool is_type_Set() const;
49+
bool is_type_Valid() const;
4650

4751
QString getMessage() const;
4852
void setMessage(const QString &message);
53+
bool is_message_Set() const;
54+
bool is_message_Valid() const;
4955

5056
virtual bool isSet() const override;
5157
virtual bool isValid() const override;

samples/client/petstore/cpp-qt5/client/PFXCategory.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ void PFXCategory::setId(const qint64 &id) {
8282
this->m_id_isSet = true;
8383
}
8484

85+
bool PFXCategory::is_id_Set() const{
86+
return m_id_isSet;
87+
}
88+
89+
bool PFXCategory::is_id_Valid() const{
90+
return m_id_isValid;
91+
}
92+
8593
QString PFXCategory::getName() const {
8694
return name;
8795
}
@@ -90,6 +98,14 @@ void PFXCategory::setName(const QString &name) {
9098
this->m_name_isSet = true;
9199
}
92100

101+
bool PFXCategory::is_name_Set() const{
102+
return m_name_isSet;
103+
}
104+
105+
bool PFXCategory::is_name_Valid() const{
106+
return m_name_isValid;
107+
}
108+
93109
bool PFXCategory::isSet() const {
94110
bool isObjectUpdated = false;
95111
do {

samples/client/petstore/cpp-qt5/client/PFXCategory.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ class PFXCategory : public PFXObject {
4040

4141
qint64 getId() const;
4242
void setId(const qint64 &id);
43+
bool is_id_Set() const;
44+
bool is_id_Valid() const;
4345

4446
QString getName() const;
4547
void setName(const QString &name);
48+
bool is_name_Set() const;
49+
bool is_name_Valid() const;
4650

4751
virtual bool isSet() const override;
4852
virtual bool isValid() const override;

samples/client/petstore/cpp-qt5/client/PFXOrder.cpp

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@ void PFXOrder::setId(const qint64 &id) {
118118
this->m_id_isSet = true;
119119
}
120120

121+
bool PFXOrder::is_id_Set() const{
122+
return m_id_isSet;
123+
}
124+
125+
bool PFXOrder::is_id_Valid() const{
126+
return m_id_isValid;
127+
}
128+
121129
qint64 PFXOrder::getPetId() const {
122130
return pet_id;
123131
}
@@ -126,6 +134,14 @@ void PFXOrder::setPetId(const qint64 &pet_id) {
126134
this->m_pet_id_isSet = true;
127135
}
128136

137+
bool PFXOrder::is_pet_id_Set() const{
138+
return m_pet_id_isSet;
139+
}
140+
141+
bool PFXOrder::is_pet_id_Valid() const{
142+
return m_pet_id_isValid;
143+
}
144+
129145
qint32 PFXOrder::getQuantity() const {
130146
return quantity;
131147
}
@@ -134,6 +150,14 @@ void PFXOrder::setQuantity(const qint32 &quantity) {
134150
this->m_quantity_isSet = true;
135151
}
136152

153+
bool PFXOrder::is_quantity_Set() const{
154+
return m_quantity_isSet;
155+
}
156+
157+
bool PFXOrder::is_quantity_Valid() const{
158+
return m_quantity_isValid;
159+
}
160+
137161
QDateTime PFXOrder::getShipDate() const {
138162
return ship_date;
139163
}
@@ -142,6 +166,14 @@ void PFXOrder::setShipDate(const QDateTime &ship_date) {
142166
this->m_ship_date_isSet = true;
143167
}
144168

169+
bool PFXOrder::is_ship_date_Set() const{
170+
return m_ship_date_isSet;
171+
}
172+
173+
bool PFXOrder::is_ship_date_Valid() const{
174+
return m_ship_date_isValid;
175+
}
176+
145177
QString PFXOrder::getStatus() const {
146178
return status;
147179
}
@@ -150,6 +182,14 @@ void PFXOrder::setStatus(const QString &status) {
150182
this->m_status_isSet = true;
151183
}
152184

185+
bool PFXOrder::is_status_Set() const{
186+
return m_status_isSet;
187+
}
188+
189+
bool PFXOrder::is_status_Valid() const{
190+
return m_status_isValid;
191+
}
192+
153193
bool PFXOrder::isComplete() const {
154194
return complete;
155195
}
@@ -158,6 +198,14 @@ void PFXOrder::setComplete(const bool &complete) {
158198
this->m_complete_isSet = true;
159199
}
160200

201+
bool PFXOrder::is_complete_Set() const{
202+
return m_complete_isSet;
203+
}
204+
205+
bool PFXOrder::is_complete_Valid() const{
206+
return m_complete_isValid;
207+
}
208+
161209
bool PFXOrder::isSet() const {
162210
bool isObjectUpdated = false;
163211
do {

samples/client/petstore/cpp-qt5/client/PFXOrder.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,33 @@ class PFXOrder : public PFXObject {
4141

4242
qint64 getId() const;
4343
void setId(const qint64 &id);
44+
bool is_id_Set() const;
45+
bool is_id_Valid() const;
4446

4547
qint64 getPetId() const;
4648
void setPetId(const qint64 &pet_id);
49+
bool is_pet_id_Set() const;
50+
bool is_pet_id_Valid() const;
4751

4852
qint32 getQuantity() const;
4953
void setQuantity(const qint32 &quantity);
54+
bool is_quantity_Set() const;
55+
bool is_quantity_Valid() const;
5056

5157
QDateTime getShipDate() const;
5258
void setShipDate(const QDateTime &ship_date);
59+
bool is_ship_date_Set() const;
60+
bool is_ship_date_Valid() const;
5361

5462
QString getStatus() const;
5563
void setStatus(const QString &status);
64+
bool is_status_Set() const;
65+
bool is_status_Valid() const;
5666

5767
bool isComplete() const;
5868
void setComplete(const bool &complete);
69+
bool is_complete_Set() const;
70+
bool is_complete_Valid() const;
5971

6072
virtual bool isSet() const override;
6173
virtual bool isValid() const override;

samples/client/petstore/cpp-qt5/client/PFXPet.cpp

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@ void PFXPet::setId(const qint64 &id) {
118118
this->m_id_isSet = true;
119119
}
120120

121+
bool PFXPet::is_id_Set() const{
122+
return m_id_isSet;
123+
}
124+
125+
bool PFXPet::is_id_Valid() const{
126+
return m_id_isValid;
127+
}
128+
121129
PFXCategory PFXPet::getCategory() const {
122130
return category;
123131
}
@@ -126,6 +134,14 @@ void PFXPet::setCategory(const PFXCategory &category) {
126134
this->m_category_isSet = true;
127135
}
128136

137+
bool PFXPet::is_category_Set() const{
138+
return m_category_isSet;
139+
}
140+
141+
bool PFXPet::is_category_Valid() const{
142+
return m_category_isValid;
143+
}
144+
129145
QString PFXPet::getName() const {
130146
return name;
131147
}
@@ -134,6 +150,14 @@ void PFXPet::setName(const QString &name) {
134150
this->m_name_isSet = true;
135151
}
136152

153+
bool PFXPet::is_name_Set() const{
154+
return m_name_isSet;
155+
}
156+
157+
bool PFXPet::is_name_Valid() const{
158+
return m_name_isValid;
159+
}
160+
137161
QList<QString> PFXPet::getPhotoUrls() const {
138162
return photo_urls;
139163
}
@@ -142,6 +166,14 @@ void PFXPet::setPhotoUrls(const QList<QString> &photo_urls) {
142166
this->m_photo_urls_isSet = true;
143167
}
144168

169+
bool PFXPet::is_photo_urls_Set() const{
170+
return m_photo_urls_isSet;
171+
}
172+
173+
bool PFXPet::is_photo_urls_Valid() const{
174+
return m_photo_urls_isValid;
175+
}
176+
145177
QList<PFXTag> PFXPet::getTags() const {
146178
return tags;
147179
}
@@ -150,6 +182,14 @@ void PFXPet::setTags(const QList<PFXTag> &tags) {
150182
this->m_tags_isSet = true;
151183
}
152184

185+
bool PFXPet::is_tags_Set() const{
186+
return m_tags_isSet;
187+
}
188+
189+
bool PFXPet::is_tags_Valid() const{
190+
return m_tags_isValid;
191+
}
192+
153193
QString PFXPet::getStatus() const {
154194
return status;
155195
}
@@ -158,6 +198,14 @@ void PFXPet::setStatus(const QString &status) {
158198
this->m_status_isSet = true;
159199
}
160200

201+
bool PFXPet::is_status_Set() const{
202+
return m_status_isSet;
203+
}
204+
205+
bool PFXPet::is_status_Valid() const{
206+
return m_status_isValid;
207+
}
208+
161209
bool PFXPet::isSet() const {
162210
bool isObjectUpdated = false;
163211
do {

0 commit comments

Comments
 (0)