{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://objectsgrid.com/.well-known/objects-catalog/TypeAndQuantityNode/v1/schema.json",
  "title": "TypeAndQuantityNode",
  "description": "Objects Grid TypeAndQuantityNode. One content of a bundle: a good and how many of it. Stored inside a ProductCollection's includesObject. Modeled in compliance with https://schema.org/TypeAndQuantityNode.",
  "type": "object",
  "properties": {
    "at_type": {
      "description": "The object type",
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "TypeAndQuantityNode"
      ]
    },
    "typeOfGood": {
      "description": "The good: a Product, ProductModel or Service",
      "x-objectsgrid-rangeIncludes": [
        "Product",
        "ProductModel",
        "Service"
      ],
      "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
    },
    "amountOfThisGood": {
      "description": "How many of the good; 1 when not given",
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "unitCode": {
      "description": "The unit of the amount, a UN/CEFACT Common Code (3 characters) or a URL, e.g. C62 for pieces",
      "type": [
        "string",
        "null"
      ]
    },
    "unitText": {
      "description": "The unit of the amount as text",
      "type": [
        "string",
        "null"
      ]
    },
    "businessFunction": {
      "description": "What is done with the good; Sell when not given",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/BusinessFunction/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "typeOfGood"
  ],
  "unevaluatedProperties": false
}
