{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contract": {
      "type": "string",
      "const": "AggregateCommitRequest"
    },
    "aggregate_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "request_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "expected_head_commit_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "message": {
      "type": "string",
      "maxLength": 500
    },
    "assets": {
      "maxItems": 500,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ontology_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "asset": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "asset_type": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "primary_content": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "$ref": "#/$defs/__schema0"
                }
              },
              "status": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "creator_user_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "properties": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "$ref": "#/$defs/__schema0"
                }
              },
              "files": {
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "$ref": "#/$defs/__schema0"
                  }
                }
              },
              "media": {
                "type": "string",
                "maxLength": 4096
              },
              "thumbnail": {
                "type": "string",
                "maxLength": 4096
              },
              "media_ref": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "$ref": "#/$defs/__schema0"
                }
              },
              "keywords": {
                "type": "string",
                "maxLength": 2000
              },
              "extra": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "$ref": "#/$defs/__schema0"
                }
              },
              "sort": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "id",
              "name",
              "asset_type",
              "primary_content"
            ],
            "additionalProperties": false
          },
          "tag_ids": {
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        },
        "required": [
          "ontology_id",
          "asset"
        ],
        "additionalProperties": false
      }
    },
    "asset_deletes": {
      "maxItems": 500,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ontology_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "asset_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "required": [
          "ontology_id",
          "asset_id"
        ],
        "additionalProperties": false
      }
    },
    "feature_values": {
      "maxItems": 500,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ontology_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "asset_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "column_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "value_text": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "ontology_id",
          "asset_id",
          "column_id",
          "value_text"
        ],
        "additionalProperties": false
      }
    },
    "feature_relations": {
      "maxItems": 500,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ontology_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "asset_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "column_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "targets": {
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ontology_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "asset_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                }
              },
              "required": [
                "ontology_id",
                "asset_id"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "ontology_id",
          "asset_id",
          "column_id",
          "targets"
        ],
        "additionalProperties": false
      }
    },
    "asset_relations": {
      "maxItems": 500,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ontology_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "asset_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "relation_kind": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "objects": {
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object_kind": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "object_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                "properties": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "$ref": "#/$defs/__schema0"
                  }
                }
              },
              "required": [
                "object_kind",
                "object_id"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "ontology_id",
          "asset_id",
          "relation_kind",
          "objects"
        ],
        "additionalProperties": false
      }
    },
    "container_memberships": {
      "maxItems": 500,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ontology_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "container_view_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "asset_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "present": {
            "type": "boolean"
          }
        },
        "required": [
          "ontology_id",
          "container_view_id",
          "asset_id",
          "present"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "contract",
    "aggregate_id",
    "request_id",
    "idempotency_key"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  },
  "$id": "https://schemas.infmonkeys.com/contracts/aggregate-commit-request.schema.json",
  "title": "aggregate-commit-request"
}
