{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "BasicComponents",
  "description": "Copyright (C) UN/CEFACT (2022). All Rights Reserved.\n\nThis document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to UN/CEFACT, except as needed for the purpose of developing UN/CEFACT specifications, in which case the procedures for copyrights defined in the UN/CEFACT Intellectual Property Rights document must be followed, or as required to translate it into languages other than English.\n\nThe limited permissions granted above are perpetual and will not be revoked by UN/CEFACT or its successors or assigns.\n\nThis document and the information contained herein is provided on an \"AS IS\" basis and UN/CEFACT DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.",
  "$defs": {
    "pdt": {
      "binaryType": {
        "title": "Binary",
        "description": "",
        "type": "string",
        "format": "byte"
      },
      "booleanType": {
        "title": "Boolean",
        "description": "",
        "type": "boolean"
      },
      "decimalType": {
        "title": "Decimal",
        "description": "",
        "type": "string",
        "format": "^([+-]?(0?|[1-9][0-9]*)(\\.?\\d+))$"
      },
      "integerType": {
        "title": "Integer",
        "description": "",
        "type": "integer"
      },
      "stringType": {
        "title": "String",
        "description": "",
        "type": "string"
      }
    },
    "udt": {
      "amountType": {
        "title": "Amount. Type",
        "description": "A number of monetary units specified in a currency where the unit of the currency is explicit or implied.",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/decimalType"
          },
          "currencyId": {
            "$ref": "codelists/ISO_ISO3AlphaCurrencyCode.json#/$defs/codeList/ISO3AlphaCurrencyCodeType"
          },
          "currencyCodeListVersionId": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      },
      "binaryObjectType": {
        "title": "Binary Object. Type",
        "description": "A set of finite-length sequences of binary octets.",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/binaryType"
          },
          "format": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "mimeCode": {
            "$ref": "codelists/IANA_MIMEMediaType.json#/$defs/codeList/MIMEMediaTypeType"
          },
          "encodingCode": {
            "$ref": "codelists/UNECE_CharacterSetEncodingCode.json#/$defs/codeList/CharacterSetEncodingCodeType"
          },
          "characterSetCode": {
            "$ref": "codelists/IANA_CharacterSetCode.json#/$defs/codeList/CharacterSetCodeType"
          },
          "uri": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "filename": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      },
      "codeType": {
        "title": "Code. Type",
        "description": "A character string (letters, figures or symbols) that for brevity and/or language independence may be used to represent or replace a definitive value or text of an Attribute together with relevant supplementary information.",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "listId": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "listAgencyId": {
            "$ref": "codelists/UNECE_AgencyIdentificationCode.json#/$defs/codeList/AgencyIdentificationCodeType"
          },
          "listAgencyName": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "listName": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "listVersionId": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "name": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "languageId": {
            "$ref": "codelists/ISO_ISOAlpha2LanguageCode.json#/$defs/codeList/ISOAlpha2LanguageCodeType"
          },
          "listUri": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "listSchemeUri": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      },
      "dateTimeType": {
        "title": "Date Time. Type",
        "description": "A particular point in the progression of time together with the relevant supplementary information.",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "format": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      },
      "dateType": {
        "title": "Date. Type",
        "description": "A particular point in the progression of time together with the relevant supplementary information.",
        "$ref": "#/$defs/udt/dateTimeType"
      },
      "graphicType": {
        "title": "Graphic. Type",
        "description": "A set of finite-length sequences of binary octets.",
        "$ref": "#/$defs/udt/binaryObjectType"
      },
      "idType": {
        "title": "Identifier. Type",
        "description": "A character string to identify and distinguish uniquely, one instance of an object in an identification scheme from all other objects in the same scheme together with relevant supplementary information.",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "schemeId": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "schemeName": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "schemeAgencyId": {
            "$ref": "codelists/UNECE_AgencyIdentificationCode.json#/$defs/codeList/AgencyIdentificationCodeType"
          },
          "schemeAgencyName": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "schemeVersionId": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "schemeDataUri": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "schemeUri": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      },
      "indicatorType": {
        "title": "Indicator. Type",
        "description": "A list of two mutually exclusive Boolean values that express the only possible states of a Property.",
        "type": "boolean"
      },
      "measureType": {
        "title": "Measure. Type",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/decimalType"
          },
          "unitCode": {
            "$ref": "codelists/UNECE_MeasurementUnitCommonCode.json#/$defs/codeList/MeasurementUnitCommonCodeType"
          },
          "unitCodeListVersionId": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      },
      "nameType": {
        "title": "Name. Type",
        "$ref": "#/$defs/udt/textType"
      },
      "numericType": {
        "title": "Numeric. Type",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/decimalType"
          },
          "format": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      },
      "percentType": {
        "title": "Percent. Type",
        "$ref": "#/$defs/udt/numericType"
      },
      "pictureType": {
        "title": "Picture. Type",
        "$ref": "#/$defs/udt/binaryObjectType"
      },
      "quantityType": {
        "title": "Quantity. Type",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/decimalType"
          },
          "unitCode": {
            "$ref": "codelists/UNECE_MeasurementUnitCommonCode.json#/$defs/codeList/MeasurementUnitCommonCodeType"
          },
          "unitCodeListId": {
            "$ref": "codelists/UNECE_MeasurementUnitCommonCode.json#/$defs/codeList/MeasurementUnitCommonCodeType"
          },
          "unitCodeListAgencyId": {
            "$ref": "codelists/UNECE_AgencyIdentificationCode.json#/$defs/codeList/AgencyIdentificationCodeType"
          },
          "unitCodeListAgencyName": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      },
      "rateType": {
        "title": "Rate. Type",
        "$ref": "#/$defs/udt/numericType"
      },
      "soundType": {
        "title": "Sound. Type",
        "$ref": "#/$defs/udt/binaryObjectType"
      },
      "textType": {
        "title": "Text. Type",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "languageId": {
            "$ref": "codelists/ISO_ISOAlpha2LanguageCode.json#/$defs/codeList/ISOAlpha2LanguageCodeType"
          },
          "languageLocaleId": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      },
      "timeType": {
        "title": "Time. Type",
        "$ref": "#/$defs/udt/dateTimeType"
      },
      "valueType": {
        "title": "Value. Type",
        "$ref": "#/$defs/udt/numericType"
      },
      "videoType": {
        "title": "Video. Type",
        "$ref": "#/$defs/udt/binaryObjectType"
      }
    },
    "qdt": {
      "formattedDateTimeType": {
        "title": "Formatted_ Date Time. Type",
        "description": "A formatted point in the progression of time.",
        "oneOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "string",
            "format": "time"
          },
          {
            "type": "string",
            "format": "date"
          },
          {
            "type": "string",
            "format": "duration"
          },
          {
            "type": "object",
            "properties": {
              "content": {
                "type": "string"
              },
              "format": {
                "$ref": "UNECE_UNTDID2379-JSON.json#/$defs/codeList/untdid2379JsonType"
              }
            },
            "required": [
              "content",
              "format"
            ]
          }
        ]
      },
      "airFlowUnitMeasureType": {
        "title": "Air Flow_ Unit_ Measure. Type",
        "description": "The numeric value determined by a measurement of air flow.",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/decimalType"
          },
          "unitCode": {
            "$ref": "codelists/UNECE_MeasurementUnitCommonCode_Airflow.json#/$defs/codeList/MeasurementUnitCommonCode_AirflowType"
          },
          "unitCodeListVersionId": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      },
      "durationUnitMeasureType": {
        "title": "Duration_ Unit_ Measure. Type",
        "description": "A numeric value determined by measuring a duration of time.",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/decimalType"
          },
          "unitCode": {
            "$ref": "codelists/UNECE_MeasurementUnitCommonCodeDuration.json#/$defs/codeList/MeasurementUnitCommonCodeDurationType"
          },
          "unitCodeListVersionId": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      },
      "fileSizeUnitMeasureType": {
        "title": "File Size_ Unit_ Measure. Type",
        "description": "A numeric value determined by measuring a file size.",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/decimalType"
          },
          "unitCode": {
            "$ref": "codelists/UNECE_MeasurementUnitCommonCode_FileSize.json#/$defs/codeList/MeasurementUnitCommonCode_FileSizeType"
          },
          "unitCodeListVersionId": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      },
      "linearUnitMeasureType": {
        "title": "Linear_ Unit_ Measure. Type",
        "description": "The numeric value determined by linear measuring.",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/decimalType"
          },
          "unitCode": {
            "$ref": "codelists/UNECE_MeasurementUnitCommonCodeLinear.json#/$defs/codeList/MeasurementUnitCommonCodeLinearType"
          },
          "unitCodeListVersionId": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      },
      "temperatureUnitMeasureType": {
        "title": "Temperature_ Unit_ Measure. Type",
        "description": "The numeric value determined by temperature measuring.",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/decimalType"
          },
          "unitCode": {
            "$ref": "codelists/UNECE_MeasurementUnitCommonCodeTemperature.json#/$defs/codeList/MeasurementUnitCommonCodeTemperatureType"
          },
          "unitCodeListVersionId": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      },
      "unitMeasureType": {
        "title": "Unit_ Measure. Type",
        "description": "A numeric value determined by measuring an object along with the specified unit of measure.",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/decimalType"
          },
          "unitCode": {
            "$ref": "codelists/UNECE_MeasurementUnitCommonCode.json#/$defs/codeList/MeasurementUnitCommonCodeType"
          },
          "unitCodeListVersionId": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      },
      "volumeUnitMeasureType": {
        "title": "Volume_ Unit_ Measure. Type",
        "description": "The numeric value determined by volume measuring.",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/decimalType"
          },
          "unitCode": {
            "$ref": "codelists/UNECE_MeasurementUnitCommonCodeVolume.json#/$defs/codeList/MeasurementUnitCommonCodeVolumeType"
          },
          "unitCodeListVersionId": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      },
      "weightUnitMeasureType": {
        "title": "Weight_ Unit_ Measure. Type",
        "description": "The numeric value determined by weight measuring.",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/decimalType"
          },
          "unitCode": {
            "$ref": "codelists/UNECE_MeasurementUnitCommonCodeWeight.json#/$defs/codeList/MeasurementUnitCommonCodeWeightType"
          },
          "unitCodeListVersionId": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      },
      "ibanIdType": {
        "title": "IBAN_ Identifier. Type",
        "description": "A character string used to represent the International Bank Account Number Type.",
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "schemeId": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "schemeAgencyId": {
            "$ref": "#/$defs/pdt/stringType"
          },
          "schemeVersionId": {
            "$ref": "#/$defs/pdt/stringType"
          }
        },
        "required": [
          "content"
        ]
      }
    },
    "extensibleType": {
      "patternProperties": {
        "^x-": true
      }
    },
    "resourceType": {
      "type": "string",
      "format": "uri"
    }
  }
}