{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://imde.io/schema/azlon/1.0/foodnutrients/foodnutrients.json",
  "title": "DataTopic_FoodNutrients",
  "$comment": "Source XSD: https://imde.io/schema/azlon/1.0/foodnutrients/foodnutrients.xsd",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "Regulation": {
      "$ref": "https://imde.io/schema/azlon/1.0/codelists/regulationType.json"
    },
    "Reference": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "Translation": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "Value": {
                "type": "string"
              },
              "Culture": {
                "$ref": "https://imde.io/schema/azlon/1.0/codelists/culture.json"
              }
            },
            "required": [
              "Value",
              "Culture"
            ]
          },
          "minItems": 1
        }
      },
      "required": [
        "Translation"
      ]
    },
    "NutrientLists": {
      "$ref": "#/$defs/NutrientListsType"
    },
    "Components": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "Component": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "ItemIdentifiers": {
                "$ref": "#/$defs/IdentifiersType"
              },
              "Reference": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "Translation": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "Value": {
                          "type": "string"
                        },
                        "Culture": {
                          "$ref": "https://imde.io/schema/azlon/1.0/codelists/culture.json"
                        }
                      },
                      "required": [
                        "Value",
                        "Culture"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "Translation"
                ]
              },
              "NutrientLists": {
                "$ref": "#/$defs/NutrientListsType"
              }
            },
            "required": [
              "Reference"
            ]
          },
          "minItems": 1
        }
      },
      "required": [
        "Component"
      ]
    },
    "DietaryReferenceStatements": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "DietaryReferenceStatement": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "Codes": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "Code": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "Value": {
                          "type": "string"
                        },
                        "Type": {
                          "$ref": "https://imde.io/schema/azlon/1.0/codelists/dietaryReferenceStatementCodeType.json"
                        }
                      },
                      "required": [
                        "Value",
                        "Type"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "Code"
                ]
              },
              "Translations": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "Translation": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "Value": {
                          "type": "string"
                        },
                        "Culture": {
                          "$ref": "https://imde.io/schema/azlon/1.0/codelists/culture.json"
                        }
                      },
                      "required": [
                        "Value",
                        "Culture"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "Translation"
                ]
              },
              "Sequence": {
                "type": "string"
              }
            },
            "required": [
              "Codes",
              "Translations",
              "Sequence"
            ]
          },
          "minItems": 1
        }
      },
      "required": [
        "DietaryReferenceStatement"
      ]
    }
  },
  "required": [
    "Regulation"
  ],
  "$defs": {
    "IdentifiersType": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "Identifier": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IdentifierType"
          },
          "minItems": 1
        }
      },
      "required": [
        "Identifier"
      ]
    },
    "IdentifierType": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "Value": {
          "type": "string"
        },
        "Type": {
          "$ref": "https://imde.io/schema/azlon/1.0/codelists/identifierType.json"
        }
      },
      "required": [
        "Value",
        "Type"
      ]
    },
    "NutrientListsType": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "NutrientList": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "Quantity": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "Value": {
                    "type": "number"
                  },
                  "Units": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "Unit": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "Value": {
                              "type": "string"
                            },
                            "Type": {
                              "$ref": "https://imde.io/schema/azlon/1.0/codelists/unitType.json"
                            }
                          },
                          "required": [
                            "Value",
                            "Type"
                          ]
                        },
                        "minItems": 1
                      }
                    },
                    "required": [
                      "Unit"
                    ]
                  }
                },
                "required": [
                  "Value",
                  "Units"
                ]
              },
              "QuantityDescription": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "Value": {
                    "type": "string"
                  },
                  "Culture": {
                    "$ref": "https://imde.io/schema/azlon/1.0/codelists/culture.json"
                  }
                },
                "required": [
                  "Value",
                  "Culture"
                ]
              },
              "Nutrients": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "Nutrient": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "Codes": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "Code": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "Value": {
                                    "type": "string"
                                  },
                                  "Type": {
                                    "$ref": "https://imde.io/schema/azlon/1.0/codelists/nutrientCodeType.json"
                                  }
                                },
                                "required": [
                                  "Value",
                                  "Type"
                                ]
                              },
                              "minItems": 1
                            }
                          },
                          "required": [
                            "Code"
                          ]
                        },
                        "Quantities": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "Quantity": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "Value": {
                                    "type": "number"
                                  },
                                  "Units": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "Unit": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "Value": {
                                              "type": "string"
                                            },
                                            "Type": {
                                              "$ref": "https://imde.io/schema/azlon/1.0/codelists/unitType.json"
                                            }
                                          },
                                          "required": [
                                            "Value",
                                            "Type"
                                          ]
                                        },
                                        "minItems": 1
                                      }
                                    },
                                    "required": [
                                      "Unit"
                                    ]
                                  }
                                },
                                "required": [
                                  "Value",
                                  "Units"
                                ]
                              },
                              "minItems": 1
                            }
                          },
                          "required": [
                            "Quantity"
                          ]
                        },
                        "Precision": {
                          "$ref": "https://imde.io/schema/azlon/1.0/codelists/nutrientPrecision.json"
                        },
                        "Method": {
                          "$ref": "https://imde.io/schema/azlon/1.0/codelists/nutrientMethod.json"
                        },
                        "DietaryReferenceStatementSequence": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "Codes",
                        "Quantities",
                        "Precision"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "Nutrient"
                ]
              },
              "Source": {
                "$ref": "https://imde.io/schema/azlon/1.0/codelists/labelInfoSource.json"
              },
              "Level": {
                "$ref": "https://imde.io/schema/azlon/1.0/codelists/nutrientLevel.json"
              },
              "StateOfPreparation": {
                "$ref": "https://imde.io/schema/azlon/1.0/codelists/nutrientStateOfPreparation.json"
              }
            },
            "required": [
              "Quantity",
              "Nutrients",
              "Source",
              "Level",
              "StateOfPreparation"
            ]
          },
          "minItems": 1
        }
      },
      "required": [
        "NutrientList"
      ]
    }
  }
}
