{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://imde.io/schema/azlon/1.2/packaging/packaging.json",
  "title": "DataTopic_Packaging",
  "$comment": "Source XSD: https://imde.io/schema/azlon/1.2/packaging/packaging.xsd",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "PackagingElements": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "PackagingElement": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "PackagingType": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "Code": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "Value": {
                          "type": "string"
                        },
                        "Type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "Value",
                        "Type"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "Code"
                ]
              },
              "PackagingSubType": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "Code": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "Value": {
                          "type": "string"
                        },
                        "Type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "Value",
                        "Type"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "Code"
                ]
              },
              "ContactSensitivityClass": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "Code": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "Value": {
                          "type": "string"
                        },
                        "Type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "Value",
                        "Type"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "Code"
                ]
              },
              "RecyclingCodes": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "Code": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "Value": {
                          "type": "string"
                        },
                        "Type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "Value",
                        "Type"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "Code"
                ]
              },
              "Returnable": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "Code": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "Value": {
                          "type": "string"
                        },
                        "Type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "Value",
                        "Type"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "Code"
                ]
              },
              "Materials": {
                "$ref": "#/$defs/MaterialsType"
              },
              "IsMainElement": {
                "type": "boolean"
              },
              "IsReturnable": {
                "type": "boolean"
              }
            },
            "required": [
              "PackagingType",
              "IsMainElement",
              "IsReturnable"
            ]
          }
        }
      }
    }
  },
  "required": [
    "PackagingElements"
  ],
  "$defs": {
    "MaterialsType": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "Material": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "Class": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "Code": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "Value": {
                          "type": "string"
                        },
                        "Type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "Value",
                        "Type"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "Code"
                ]
              },
              "Definition": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "Code": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "Value": {
                          "type": "string"
                        },
                        "Type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "Value",
                        "Type"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "Code"
                ]
              },
              "QuantityUnits": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "QuantityUnit": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "Value": {
                          "type": "string"
                        },
                        "Type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "Value",
                        "Type"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "QuantityUnit"
                ]
              },
              "Attributes": {
                "$ref": "#/$defs/AttributesType"
              },
              "Materials": {
                "$ref": "#/$defs/MaterialsType"
              },
              "Quantity": {
                "type": "number"
              }
            },
            "required": [
              "Class",
              "Definition",
              "QuantityUnits",
              "Quantity"
            ]
          }
        }
      }
    },
    "AttributesType": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "Attribute": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "Key": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "Code": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "Value": {
                          "type": "string"
                        },
                        "Type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "Value",
                        "Type"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "Code"
                ]
              },
              "ValueUnits": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "ValueUnit": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "Value": {
                          "type": "string"
                        },
                        "Type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "Value",
                        "Type"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "ValueUnit"
                ]
              },
              "CodeList": {
                "type": "string"
              },
              "Values": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "Value": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "required": [
              "Key",
              "Values"
            ]
          }
        }
      }
    }
  }
}
