Skip to content

Commit 1102730

Browse files
committed
Regenerate the c client to merge OpenAPITools/openapi-generator#13884
1 parent 92aaa7f commit 1102730

39 files changed

+104
-104
lines changed

kubernetes/model/core_v1_event.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){
344344
// core_v1_event->event_time
345345
cJSON *event_time = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "eventTime");
346346
if (event_time) {
347-
if(!cJSON_IsString(event_time))
347+
if(!cJSON_IsString(event_time) && !cJSON_IsNull(event_time))
348348
{
349349
goto end; //DateTime
350350
}
@@ -353,7 +353,7 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){
353353
// core_v1_event->first_timestamp
354354
cJSON *first_timestamp = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "firstTimestamp");
355355
if (first_timestamp) {
356-
if(!cJSON_IsString(first_timestamp))
356+
if(!cJSON_IsString(first_timestamp) && !cJSON_IsNull(first_timestamp))
357357
{
358358
goto end; //DateTime
359359
}
@@ -380,7 +380,7 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){
380380
// core_v1_event->last_timestamp
381381
cJSON *last_timestamp = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "lastTimestamp");
382382
if (last_timestamp) {
383-
if(!cJSON_IsString(last_timestamp))
383+
if(!cJSON_IsString(last_timestamp) && !cJSON_IsNull(last_timestamp))
384384
{
385385
goto end; //DateTime
386386
}
@@ -463,11 +463,11 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){
463463
action ? strdup(action->valuestring) : NULL,
464464
api_version ? strdup(api_version->valuestring) : NULL,
465465
count ? count->valuedouble : 0,
466-
event_time ? strdup(event_time->valuestring) : NULL,
467-
first_timestamp ? strdup(first_timestamp->valuestring) : NULL,
466+
event_time && !cJSON_IsNull(event_time) ? strdup(event_time->valuestring) : NULL,
467+
first_timestamp && !cJSON_IsNull(first_timestamp) ? strdup(first_timestamp->valuestring) : NULL,
468468
involved_object_local_nonprim,
469469
kind ? strdup(kind->valuestring) : NULL,
470-
last_timestamp ? strdup(last_timestamp->valuestring) : NULL,
470+
last_timestamp && !cJSON_IsNull(last_timestamp) ? strdup(last_timestamp->valuestring) : NULL,
471471
message ? strdup(message->valuestring) : NULL,
472472
metadata_local_nonprim,
473473
reason ? strdup(reason->valuestring) : NULL,

kubernetes/model/core_v1_event_series.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ core_v1_event_series_t *core_v1_event_series_parseFromJSON(cJSON *core_v1_event_
7474
// core_v1_event_series->last_observed_time
7575
cJSON *last_observed_time = cJSON_GetObjectItemCaseSensitive(core_v1_event_seriesJSON, "lastObservedTime");
7676
if (last_observed_time) {
77-
if(!cJSON_IsString(last_observed_time))
77+
if(!cJSON_IsString(last_observed_time) && !cJSON_IsNull(last_observed_time))
7878
{
7979
goto end; //DateTime
8080
}
@@ -83,7 +83,7 @@ core_v1_event_series_t *core_v1_event_series_parseFromJSON(cJSON *core_v1_event_
8383

8484
core_v1_event_series_local_var = core_v1_event_series_create (
8585
count ? count->valuedouble : 0,
86-
last_observed_time ? strdup(last_observed_time->valuestring) : NULL
86+
last_observed_time && !cJSON_IsNull(last_observed_time) ? strdup(last_observed_time->valuestring) : NULL
8787
);
8888

8989
return core_v1_event_series_local_var;

kubernetes/model/events_v1_event.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ events_v1_event_t *events_v1_event_parseFromJSON(cJSON *events_v1_eventJSON){
343343
// events_v1_event->deprecated_first_timestamp
344344
cJSON *deprecated_first_timestamp = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "deprecatedFirstTimestamp");
345345
if (deprecated_first_timestamp) {
346-
if(!cJSON_IsString(deprecated_first_timestamp))
346+
if(!cJSON_IsString(deprecated_first_timestamp) && !cJSON_IsNull(deprecated_first_timestamp))
347347
{
348348
goto end; //DateTime
349349
}
@@ -352,7 +352,7 @@ events_v1_event_t *events_v1_event_parseFromJSON(cJSON *events_v1_eventJSON){
352352
// events_v1_event->deprecated_last_timestamp
353353
cJSON *deprecated_last_timestamp = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "deprecatedLastTimestamp");
354354
if (deprecated_last_timestamp) {
355-
if(!cJSON_IsString(deprecated_last_timestamp))
355+
if(!cJSON_IsString(deprecated_last_timestamp) && !cJSON_IsNull(deprecated_last_timestamp))
356356
{
357357
goto end; //DateTime
358358
}
@@ -371,7 +371,7 @@ events_v1_event_t *events_v1_event_parseFromJSON(cJSON *events_v1_eventJSON){
371371
}
372372

373373

374-
if(!cJSON_IsString(event_time))
374+
if(!cJSON_IsString(event_time) && !cJSON_IsNull(event_time))
375375
{
376376
goto end; //DateTime
377377
}
@@ -459,8 +459,8 @@ events_v1_event_t *events_v1_event_parseFromJSON(cJSON *events_v1_eventJSON){
459459
action ? strdup(action->valuestring) : NULL,
460460
api_version ? strdup(api_version->valuestring) : NULL,
461461
deprecated_count ? deprecated_count->valuedouble : 0,
462-
deprecated_first_timestamp ? strdup(deprecated_first_timestamp->valuestring) : NULL,
463-
deprecated_last_timestamp ? strdup(deprecated_last_timestamp->valuestring) : NULL,
462+
deprecated_first_timestamp && !cJSON_IsNull(deprecated_first_timestamp) ? strdup(deprecated_first_timestamp->valuestring) : NULL,
463+
deprecated_last_timestamp && !cJSON_IsNull(deprecated_last_timestamp) ? strdup(deprecated_last_timestamp->valuestring) : NULL,
464464
deprecated_source ? deprecated_source_local_nonprim : NULL,
465465
strdup(event_time->valuestring),
466466
kind ? strdup(kind->valuestring) : NULL,

kubernetes/model/events_v1_event_series.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ events_v1_event_series_t *events_v1_event_series_parseFromJSON(cJSON *events_v1_
8383
}
8484

8585

86-
if(!cJSON_IsString(last_observed_time))
86+
if(!cJSON_IsString(last_observed_time) && !cJSON_IsNull(last_observed_time))
8787
{
8888
goto end; //DateTime
8989
}

kubernetes/model/v1_api_service_condition.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ v1_api_service_condition_t *v1_api_service_condition_parseFromJSON(cJSON *v1_api
113113
// v1_api_service_condition->last_transition_time
114114
cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_api_service_conditionJSON, "lastTransitionTime");
115115
if (last_transition_time) {
116-
if(!cJSON_IsString(last_transition_time))
116+
if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time))
117117
{
118118
goto end; //DateTime
119119
}
@@ -163,7 +163,7 @@ v1_api_service_condition_t *v1_api_service_condition_parseFromJSON(cJSON *v1_api
163163

164164

165165
v1_api_service_condition_local_var = v1_api_service_condition_create (
166-
last_transition_time ? strdup(last_transition_time->valuestring) : NULL,
166+
last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL,
167167
message ? strdup(message->valuestring) : NULL,
168168
reason ? strdup(reason->valuestring) : NULL,
169169
strdup(status->valuestring),

kubernetes/model/v1_certificate_signing_request_condition.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ v1_certificate_signing_request_condition_t *v1_certificate_signing_request_condi
127127
// v1_certificate_signing_request_condition->last_transition_time
128128
cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_conditionJSON, "lastTransitionTime");
129129
if (last_transition_time) {
130-
if(!cJSON_IsString(last_transition_time))
130+
if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time))
131131
{
132132
goto end; //DateTime
133133
}
@@ -136,7 +136,7 @@ v1_certificate_signing_request_condition_t *v1_certificate_signing_request_condi
136136
// v1_certificate_signing_request_condition->last_update_time
137137
cJSON *last_update_time = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_conditionJSON, "lastUpdateTime");
138138
if (last_update_time) {
139-
if(!cJSON_IsString(last_update_time))
139+
if(!cJSON_IsString(last_update_time) && !cJSON_IsNull(last_update_time))
140140
{
141141
goto end; //DateTime
142142
}
@@ -186,8 +186,8 @@ v1_certificate_signing_request_condition_t *v1_certificate_signing_request_condi
186186

187187

188188
v1_certificate_signing_request_condition_local_var = v1_certificate_signing_request_condition_create (
189-
last_transition_time ? strdup(last_transition_time->valuestring) : NULL,
190-
last_update_time ? strdup(last_update_time->valuestring) : NULL,
189+
last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL,
190+
last_update_time && !cJSON_IsNull(last_update_time) ? strdup(last_update_time->valuestring) : NULL,
191191
message ? strdup(message->valuestring) : NULL,
192192
reason ? strdup(reason->valuestring) : NULL,
193193
strdup(status->valuestring),

kubernetes/model/v1_condition.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ v1_condition_t *v1_condition_parseFromJSON(cJSON *v1_conditionJSON){
130130
}
131131

132132

133-
if(!cJSON_IsString(last_transition_time))
133+
if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time))
134134
{
135135
goto end; //DateTime
136136
}

kubernetes/model/v1_container_state_running.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ v1_container_state_running_t *v1_container_state_running_parseFromJSON(cJSON *v1
5555
// v1_container_state_running->started_at
5656
cJSON *started_at = cJSON_GetObjectItemCaseSensitive(v1_container_state_runningJSON, "startedAt");
5757
if (started_at) {
58-
if(!cJSON_IsString(started_at))
58+
if(!cJSON_IsString(started_at) && !cJSON_IsNull(started_at))
5959
{
6060
goto end; //DateTime
6161
}
6262
}
6363

6464

6565
v1_container_state_running_local_var = v1_container_state_running_create (
66-
started_at ? strdup(started_at->valuestring) : NULL
66+
started_at && !cJSON_IsNull(started_at) ? strdup(started_at->valuestring) : NULL
6767
);
6868

6969
return v1_container_state_running_local_var;

kubernetes/model/v1_container_state_terminated.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ v1_container_state_terminated_t *v1_container_state_terminated_parseFromJSON(cJS
153153
// v1_container_state_terminated->finished_at
154154
cJSON *finished_at = cJSON_GetObjectItemCaseSensitive(v1_container_state_terminatedJSON, "finishedAt");
155155
if (finished_at) {
156-
if(!cJSON_IsString(finished_at))
156+
if(!cJSON_IsString(finished_at) && !cJSON_IsNull(finished_at))
157157
{
158158
goto end; //DateTime
159159
}
@@ -189,7 +189,7 @@ v1_container_state_terminated_t *v1_container_state_terminated_parseFromJSON(cJS
189189
// v1_container_state_terminated->started_at
190190
cJSON *started_at = cJSON_GetObjectItemCaseSensitive(v1_container_state_terminatedJSON, "startedAt");
191191
if (started_at) {
192-
if(!cJSON_IsString(started_at))
192+
if(!cJSON_IsString(started_at) && !cJSON_IsNull(started_at))
193193
{
194194
goto end; //DateTime
195195
}
@@ -199,11 +199,11 @@ v1_container_state_terminated_t *v1_container_state_terminated_parseFromJSON(cJS
199199
v1_container_state_terminated_local_var = v1_container_state_terminated_create (
200200
container_id ? strdup(container_id->valuestring) : NULL,
201201
exit_code->valuedouble,
202-
finished_at ? strdup(finished_at->valuestring) : NULL,
202+
finished_at && !cJSON_IsNull(finished_at) ? strdup(finished_at->valuestring) : NULL,
203203
message ? strdup(message->valuestring) : NULL,
204204
reason ? strdup(reason->valuestring) : NULL,
205205
signal ? signal->valuedouble : 0,
206-
started_at ? strdup(started_at->valuestring) : NULL
206+
started_at && !cJSON_IsNull(started_at) ? strdup(started_at->valuestring) : NULL
207207
);
208208

209209
return v1_container_state_terminated_local_var;

kubernetes/model/v1_cron_job_status.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ v1_cron_job_status_t *v1_cron_job_status_parseFromJSON(cJSON *v1_cron_job_status
122122
// v1_cron_job_status->last_schedule_time
123123
cJSON *last_schedule_time = cJSON_GetObjectItemCaseSensitive(v1_cron_job_statusJSON, "lastScheduleTime");
124124
if (last_schedule_time) {
125-
if(!cJSON_IsString(last_schedule_time))
125+
if(!cJSON_IsString(last_schedule_time) && !cJSON_IsNull(last_schedule_time))
126126
{
127127
goto end; //DateTime
128128
}
@@ -131,7 +131,7 @@ v1_cron_job_status_t *v1_cron_job_status_parseFromJSON(cJSON *v1_cron_job_status
131131
// v1_cron_job_status->last_successful_time
132132
cJSON *last_successful_time = cJSON_GetObjectItemCaseSensitive(v1_cron_job_statusJSON, "lastSuccessfulTime");
133133
if (last_successful_time) {
134-
if(!cJSON_IsString(last_successful_time))
134+
if(!cJSON_IsString(last_successful_time) && !cJSON_IsNull(last_successful_time))
135135
{
136136
goto end; //DateTime
137137
}
@@ -140,8 +140,8 @@ v1_cron_job_status_t *v1_cron_job_status_parseFromJSON(cJSON *v1_cron_job_status
140140

141141
v1_cron_job_status_local_var = v1_cron_job_status_create (
142142
active ? activeList : NULL,
143-
last_schedule_time ? strdup(last_schedule_time->valuestring) : NULL,
144-
last_successful_time ? strdup(last_successful_time->valuestring) : NULL
143+
last_schedule_time && !cJSON_IsNull(last_schedule_time) ? strdup(last_schedule_time->valuestring) : NULL,
144+
last_successful_time && !cJSON_IsNull(last_successful_time) ? strdup(last_successful_time->valuestring) : NULL
145145
);
146146

147147
return v1_cron_job_status_local_var;

0 commit comments

Comments
 (0)