/* autogenerated file */
#ifndef OCI_IMAGE_INDEX_SCHEMA_H
# define OCI_IMAGE_INDEX_SCHEMA_H

# include <sys/types.h>
# include <stdint.h>
# include "json_common.h"

typedef struct {
    char *architecture;

    char *os;

    char *os_version;

    char **os_features;
    size_t os_features_len;

    char *variant;

}
oci_image_index_manifests_platform;

void free_oci_image_index_manifests_platform (oci_image_index_manifests_platform *ptr);

oci_image_index_manifests_platform *make_oci_image_index_manifests_platform (yajl_val tree, struct parser_context *ctx, parser_error *err);

bool gen_oci_image_index_manifests_platform (yajl_gen g, oci_image_index_manifests_platform *ptr, struct parser_context *ctx, parser_error *err);

typedef string_cells oci_image_index_manifests_annotations;

typedef struct {
    char *media_type;
    int64_t size;
    char *digest;
    char **urls;
    size_t urls_len;

    oci_image_index_manifests_platform *platform;
    oci_image_index_manifests_annotations *annotations;
    unsigned int size_present : 1;
}
oci_image_index_manifests_element;

void free_oci_image_index_manifests_element (oci_image_index_manifests_element *ptr);

oci_image_index_manifests_element *make_oci_image_index_manifests_element (yajl_val tree, struct parser_context *ctx, parser_error *err);

typedef string_cells oci_image_index_annotations;

typedef struct {
    int schema_version;

    oci_image_index_manifests_element **manifests;
    size_t manifests_len;

    oci_image_index_annotations *annotations;

    unsigned int schema_version_present : 1;
}
oci_image_index;

void free_oci_image_index (oci_image_index *ptr);

oci_image_index *make_oci_image_index (yajl_val tree, struct parser_context *ctx, parser_error *err);

bool gen_oci_image_index (yajl_gen g, oci_image_index *ptr, struct parser_context *ctx, parser_error *err);

oci_image_index *oci_image_index_parse_file (const char *filename, struct parser_context *ctx, parser_error *err);

oci_image_index *oci_image_index_parse_file_stream (FILE *stream, struct parser_context *ctx, parser_error *err);

oci_image_index *oci_image_index_parse_data (const char *jsondata, struct parser_context *ctx, parser_error *err);

char *oci_image_index_generate_json (oci_image_index *ptr, struct parser_context *ctx, parser_error *err);

#endif
