{ "$id": "instance-group-common", "description": "Type definitions for all Resource Instance Group document formats.", "definitions": { "commonFieldNames": { "enum": [ "name", "description", "modelId", "type", "lastAction", "instances", "filter" ] }, "commonFields": { "allOf": [ { "type": "object", "properties": { "name": { "$ref": "common#/definitions/name" }, "description": { "$ref": "common#/definitions/description" }, "modelId": { "$ref": "common#/definitions/ObjectIdLikeString" } } }, { "oneOf": [ { "$ref": "#/definitions/manualFields" }, { "$ref": "#/definitions/dynamicFields" } ] } ] }, "commonFieldsRequired": { "allOf": [ { "type": "object", "required": [ "name", "description", "modelId", "type", "lastAction" ] }, { "oneOf": [ { "type": "object", "required": [ "instances" ] }, { "type": "object", "required": [ "filter" ] } ] } ] }, "type": { "enum": [ "manual", "dynamic" ] }, "instances": { "type": "array", "items": { "$ref": "common#/definitions/ObjectIdLikeString" } }, "filter": {}, "manualFields": { "type": "object", "not": { "required": [ "filter" ] }, "properties": { "type": { "const": "manual" }, "instances": { "$ref": "#/definitions/instances" } } }, "dynamicFields": { "type": "object", "not": { "required": [ "instances" ] }, "properties": { "type": { "const": "dynamic" }, "filter": { "$ref": "#/definitions/filter" } } } } }