{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-automation/json-schema/microsoft-azure-automation-hybrid-runbook-worker-schema.json",
  "title": "HybridRunbookWorker",
  "description": "Definition of hybrid runbook worker.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-automation-hybridrunbookworker-api-openapi.yml#/components/schemas/HybridRunbookWorker",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/HybridRunbookWorkerProperties",
      "description": "Gets or sets the hybrid worker group properties.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/TrackedResource"
    }
  ],
  "$defs": {
    "HybridRunbookWorkerProperties": {
      "type": "object",
      "description": "Definition of hybrid runbook worker property.",
      "properties": {
        "ip": {
          "type": "string",
          "description": "Gets or sets the assigned machine IP address."
        },
        "registeredDateTime": {
          "type": "string",
          "format": "date-time",
          "description": "Gets or sets the registration time of the worker machine."
        },
        "lastSeenDateTime": {
          "type": "string",
          "format": "date-time",
          "description": "Last Heartbeat from the Worker"
        },
        "vmResourceId": {
          "type": "string",
          "description": "Azure Resource Manager Id for a virtual machine."
        },
        "workerType": {
          "$ref": "#/$defs/WorkerType",
          "description": "Type of the HybridWorker."
        },
        "workerName": {
          "type": "string",
          "description": "Name of the HybridWorker."
        }
      }
    },
    "TrackedResource": {
      "type": "object",
      "title": "Tracked Resource",
      "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'",
      "properties": {
        "tags": {
          "type": "object",
          "description": "Resource tags.",
          "additionalProperties": {
            "type": "string"
          },
          "x-ms-mutability": [
            "read",
            "create",
            "update"
          ]
        },
        "location": {
          "type": "string",
          "description": "The geo-location where the resource lives",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        }
      },
      "required": [
        "location"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "WorkerType": {
      "type": "string",
      "description": "Type of the HybridWorker.",
      "enum": [
        "HybridV1",
        "HybridV2"
      ],
      "x-ms-enum": {
        "name": "WorkerType",
        "modelAsString": true,
        "values": [
          {
            "name": "HybridV1",
            "value": "HybridV1",
            "description": "HybridV1"
          },
          {
            "name": "HybridV2",
            "value": "HybridV2",
            "description": "HybridV2"
          }
        ]
      }
    }
  }
}