2020-03-18 17:24:33 +08:00
|
|
|
/*
|
|
|
|
|
* v1_status.h
|
|
|
|
|
*
|
|
|
|
|
* Status is a return value for calls that don't return other objects.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _v1_status_H_
|
|
|
|
|
#define _v1_status_H_
|
|
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include "../external/cJSON.h"
|
|
|
|
|
#include "../include/list.h"
|
|
|
|
|
#include "../include/keyValuePair.h"
|
2020-06-20 09:41:15 +08:00
|
|
|
#include "../include/binary.h"
|
|
|
|
|
|
|
|
|
|
typedef struct v1_status_t v1_status_t;
|
|
|
|
|
|
2020-03-18 17:24:33 +08:00
|
|
|
#include "v1_list_meta.h"
|
|
|
|
|
#include "v1_status_details.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct v1_status_t {
|
|
|
|
|
char *api_version; // string
|
|
|
|
|
int code; //numeric
|
|
|
|
|
struct v1_status_details_t *details; //model
|
|
|
|
|
char *kind; // string
|
|
|
|
|
char *message; // string
|
|
|
|
|
struct v1_list_meta_t *metadata; //model
|
|
|
|
|
char *reason; // string
|
|
|
|
|
char *status; // string
|
|
|
|
|
|
2025-02-11 19:36:46 +00:00
|
|
|
int _library_owned; // Is the library responsible for freeing this object?
|
2020-03-18 17:24:33 +08:00
|
|
|
} v1_status_t;
|
|
|
|
|
|
2025-02-11 19:36:46 +00:00
|
|
|
__attribute__((deprecated)) v1_status_t *v1_status_create(
|
2020-03-18 17:24:33 +08:00
|
|
|
char *api_version,
|
|
|
|
|
int code,
|
|
|
|
|
v1_status_details_t *details,
|
|
|
|
|
char *kind,
|
|
|
|
|
char *message,
|
|
|
|
|
v1_list_meta_t *metadata,
|
|
|
|
|
char *reason,
|
|
|
|
|
char *status
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
void v1_status_free(v1_status_t *v1_status);
|
|
|
|
|
|
|
|
|
|
v1_status_t *v1_status_parseFromJSON(cJSON *v1_statusJSON);
|
|
|
|
|
|
|
|
|
|
cJSON *v1_status_convertToJSON(v1_status_t *v1_status);
|
|
|
|
|
|
|
|
|
|
#endif /* _v1_status_H_ */
|
|
|
|
|
|