{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/arcnm-io/json-schema/arcnm-io-library-usage-row-schema.json",
  "title": "LibraryUsageRow",
  "description": "Fleet usage of one machine-library entry (your organization's fleets).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/arcnm-io-machine-library-api-openapi.yml#/components/schemas/LibraryUsageRow",
  "properties": {
    "entry_id": {
      "type": "string",
      "title": "Entry Id",
      "description": "Identifier of the machine-library entry."
    },
    "environments": {
      "items": {
        "$ref": "#/$defs/LibraryUsageEnv"
      },
      "type": "array",
      "title": "Environments",
      "description": "Environments whose fleet uses a machine derived from the entry."
    }
  },
  "type": "object",
  "required": [
    "entry_id",
    "environments"
  ],
  "$defs": {
    "LibraryUsageEnv": {
      "properties": {
        "env_id": {
          "type": "string",
          "title": "Env Id",
          "description": "Identifier of the environment."
        },
        "env_name": {
          "type": "string",
          "title": "Env Name",
          "description": "Human-readable environment name."
        },
        "machine_id": {
          "type": "string",
          "title": "Machine Id",
          "description": "Identifier of the machine instance derived from the entry."
        },
        "is_enabled": {
          "type": "boolean",
          "title": "Is Enabled",
          "description": "Whether that machine is active in the environment's fleet. Only enabled machines take part in calculations."
        }
      },
      "type": "object",
      "required": [
        "env_id",
        "env_name",
        "machine_id",
        "is_enabled"
      ],
      "title": "LibraryUsageEnv",
      "description": "One environment whose fleet contains a machine derived from an entry."
    }
  }
}