{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/noderings-com/json-schema/noderings-com-v1-virtual-machine-schema.json",
  "title": "v1VirtualMachine",
  "description": "VirtualMachine represents a managed virtual machine resource.",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/noderings-com-openapi.json#/components/schemas/v1VirtualMachine",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique identifier for the virtual machine. This is a read-only field.",
      "readOnly": true
    },
    "hostname": {
      "type": "string",
      "description": "The name of the virtual machine."
    },
    "operationStatus": {
      "$ref": "#/$defs/v1OperationStatus"
    },
    "cpu": {
      "type": "integer",
      "format": "int32",
      "description": "The number of CPU cores allocated to the virtual machine."
    },
    "memory": {
      "type": "integer",
      "format": "int32",
      "description": "The amount of memory in MB allocated to the virtual machine."
    },
    "storage": {
      "type": "integer",
      "format": "int32",
      "description": "Target storage for full clone."
    },
    "providerOrganizationId": {
      "type": "string",
      "description": "The ID of the service provider organization for the virtual machine."
    },
    "ipv4": {
      "type": "string",
      "description": "Primary IPv4 from active IPAM allocations (when available).",
      "readOnly": true
    },
    "ipv6": {
      "type": "string",
      "description": "Primary IPv6 from active IPAM allocations (when available).",
      "readOnly": true
    },
    "distro": {
      "$ref": "#/$defs/v1Distro"
    },
    "createTime": {
      "type": "string",
      "format": "date-time",
      "description": "The creation timestamp of the virtual machine.",
      "readOnly": true
    },
    "updateTime": {
      "type": "string",
      "format": "date-time",
      "description": "The last update timestamp of the virtual machine.",
      "readOnly": true
    },
    "regionCountry": {
      "type": "string",
      "description": "The country of the region where the virtual machine is located.",
      "readOnly": true
    },
    "regionCity": {
      "type": "string",
      "description": "The city of the region where the virtual machine is located.",
      "readOnly": true
    },
    "providerName": {
      "type": "string",
      "description": "The name of the provider organization that owns the node where the virtual machine is located.",
      "readOnly": true
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "title": "Tags for categorizing the virtual machine (e.g., \"database\", \"webserver\")"
    },
    "firewallRulesetId": {
      "type": "string",
      "description": "Firewall ruleset attached to this VM (contains both ingress and egress rules).\nManaged via attach/detach firewall endpoints.",
      "readOnly": true
    },
    "addonSubscriptions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/v1AddonSubscription"
      },
      "title": "Active addon subscriptions for this VM (backup, etc.)",
      "readOnly": true
    },
    "hasActiveBackupSubscription": {
      "type": "boolean",
      "description": "True when this VM has an active backup-class addon subscription (derived from subscription add-ons).",
      "readOnly": true
    },
    "activeBackupSubscriptionName": {
      "type": "string",
      "description": "Display name of the active backup addon (empty when has_active_backup_subscription is false).",
      "readOnly": true
    },
    "planBillingType": {
      "$ref": "#/$defs/v1BillingType"
    },
    "additionalIpv4": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/v1AdditionalIPAddress"
      },
      "description": "Extra IPv4 addresses purchased via the ADDITIONAL-IP addon (same prefix as primary).",
      "readOnly": true
    },
    "bandwidthEgress": {
      "$ref": "#/$defs/v1VirtualMachineBandwidthQuota"
    },
    "bandwidthIngress": {
      "$ref": "#/$defs/v1VirtualMachineBandwidthQuota"
    },
    "reinstallStatus": {
      "$ref": "#/$defs/v1ReinstallStatus"
    },
    "reinstalledAt": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "instantAppId": {
      "type": "string",
      "description": "Platform Instant App used when this VM was created/reinstalled (empty when OS-only).",
      "readOnly": true
    },
    "instantAppSlug": {
      "type": "string",
      "readOnly": true
    },
    "instantAppName": {
      "type": "string",
      "readOnly": true
    },
    "instantAppVersion": {
      "type": "string",
      "readOnly": true
    },
    "instantAppFamily": {
      "type": "string",
      "description": "Family key used for icons under /icons/instant-apps/{family}.svg (e.g. portainer).",
      "readOnly": true
    },
    "instantAppIconUrl": {
      "type": "string",
      "description": "Optional override; when empty, clients fall back to the family icon path.",
      "readOnly": true
    },
    "planCode": {
      "type": "string",
      "description": "Marketplace plan code for this VM's subscription (e.g. \"DC-CPU-4C-4G-160\").",
      "readOnly": true
    },
    "platformDriver": {
      "$ref": "#/$defs/v1PlatformDriver"
    },
    "capabilities": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Features that hypervisor supports (same strings as marketplace ProviderInfo).",
      "readOnly": true
    },
    "complianceHeld": {
      "type": "boolean",
      "description": "True when the VM is seized for fraud, abuse, copyright, or related reasons.",
      "readOnly": true
    },
    "complianceReason": {
      "$ref": "#/$defs/v1ComplianceReason"
    },
    "complianceMessage": {
      "type": "string",
      "readOnly": true
    },
    "complianceHeldAt": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "complianceActor": {
      "$ref": "#/$defs/v1ComplianceActor"
    }
  },
  "$defs": {
    "protov1Status": {
      "type": "string",
      "enum": [
        "STATUS_UNSPECIFIED",
        "STATUS_ACTIVE",
        "STATUS_INACTIVE",
        "STATUS_BANNED",
        "STATUS_SOFT_DELETED"
      ],
      "default": "STATUS_UNSPECIFIED",
      "title": "Status of the object"
    },
    "v1AdditionalIPAddress": {
      "type": "object",
      "properties": {
        "ipAddress": {
          "type": "string",
          "readOnly": true
        },
        "gateway": {
          "type": "string",
          "readOnly": true
        },
        "prefixLength": {
          "type": "string",
          "readOnly": true
        }
      },
      "description": "AdditionalIPAddress is an extra IPv4 allocated from the VM's primary prefix."
    },
    "v1AddonStatus": {
      "type": "string",
      "enum": [
        "ADDON_STATUS_UNSPECIFIED",
        "ADDON_STATUS_ACTIVE",
        "ADDON_STATUS_CANCELED",
        "ADDON_STATUS_PAUSED",
        "ADDON_STATUS_PENDING_ACTIVATION"
      ],
      "default": "ADDON_STATUS_UNSPECIFIED"
    },
    "v1AddonSubscription": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "title": "Fields"
        },
        "quantity": {
          "type": "integer",
          "format": "int32",
          "title": "Quantity"
        },
        "startDate": {
          "type": "string",
          "format": "date-time",
          "title": "Lifecycle dates"
        },
        "endDate": {
          "type": "string",
          "format": "date-time"
        },
        "addonStatus": {
          "$ref": "#/$defs/v1AddonStatus"
        },
        "cancelAtPeriodEnd": {
          "type": "boolean"
        },
        "canceledAt": {
          "type": "string",
          "format": "date-time"
        },
        "externalId": {
          "type": "string",
          "title": "External integration"
        },
        "subscriptionId": {
          "type": "string",
          "title": "Relations"
        },
        "addonId": {
          "type": "string"
        },
        "addonPriceId": {
          "type": "string"
        },
        "subscriptionName": {
          "type": "string",
          "title": "Relation details (populated in responses)"
        },
        "addonName": {
          "type": "string"
        },
        "addonCode": {
          "type": "string"
        },
        "unitAmount": {
          "type": "string",
          "description": "Catalog unit amount for the bound addon price (decimal string). Empty when unknown."
        },
        "currency": {
          "type": "string"
        },
        "pricingModel": {
          "$ref": "#/$defs/v1PricingModel"
        },
        "addonType": {
          "$ref": "#/$defs/v1AddonType"
        },
        "metadata": {
          "type": "object",
          "title": "Metadata"
        },
        "status": {
          "$ref": "#/$defs/protov1Status"
        },
        "timestamps": {
          "$ref": "#/$defs/v1Timestamps"
        }
      }
    },
    "v1AddonType": {
      "type": "string",
      "enum": [
        "ADDON_TYPE_UNSPECIFIED",
        "ADDON_TYPE_BACKUP",
        "ADDON_TYPE_SNAPSHOT",
        "ADDON_TYPE_ADDITIONAL_IP"
      ],
      "default": "ADDON_TYPE_UNSPECIFIED"
    },
    "v1BillingType": {
      "type": "string",
      "enum": [
        "BILLING_TYPE_UNSPECIFIED",
        "BILLING_TYPE_SUBSCRIPTION",
        "BILLING_TYPE_USAGE",
        "BILLING_TYPE_FREE",
        "BILLING_TYPE_PERCENTAGE"
      ],
      "default": "BILLING_TYPE_UNSPECIFIED",
      "title": "- BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan)"
    },
    "v1ComplianceActor": {
      "type": "string",
      "enum": [
        "COMPLIANCE_ACTOR_UNSPECIFIED",
        "COMPLIANCE_ACTOR_PROVIDER",
        "COMPLIANCE_ACTOR_PLATFORM"
      ],
      "default": "COMPLIANCE_ACTOR_UNSPECIFIED",
      "description": "Who placed a compliance hold or purchase block."
    },
    "v1ComplianceReason": {
      "type": "string",
      "enum": [
        "COMPLIANCE_REASON_UNSPECIFIED",
        "COMPLIANCE_REASON_FRAUD",
        "COMPLIANCE_REASON_ABUSE",
        "COMPLIANCE_REASON_COPYRIGHT",
        "COMPLIANCE_REASON_OTHER"
      ],
      "default": "COMPLIANCE_REASON_UNSPECIFIED",
      "description": "Why a VM or purchase was seized/blocked."
    },
    "v1Distro": {
      "type": "string",
      "enum": [
        "DISTRO_UNSPECIFIED",
        "DISTRO_UBUNTU_22_04",
        "DISTRO_UBUNTU_24_04",
        "DISTRO_UBUNTU_26_04",
        "DISTRO_FEDORA_43",
        "DISTRO_FEDORA_44",
        "DISTRO_DEBIAN_12",
        "DISTRO_DEBIAN_13",
        "DISTRO_CENTOS_9",
        "DISTRO_CENTOS_10",
        "DISTRO_ROCKY_9",
        "DISTRO_ROCKY_10",
        "DISTRO_ALMALINUX_9",
        "DISTRO_ALMALINUX_10"
      ],
      "default": "DISTRO_UNSPECIFIED",
      "description": "- DISTRO_UBUNTU_22_04: Ubuntu distributions\n - DISTRO_FEDORA_43: Fedora distributions\n - DISTRO_DEBIAN_12: Debian distributions\n - DISTRO_CENTOS_9: CentOS distributions\n - DISTRO_ROCKY_9: Rocky Linux distributions\n - DISTRO_ALMALINUX_9: AlmaLinux distributions",
      "title": "Distribution enum for VM templates"
    },
    "v1OperationStatus": {
      "type": "string",
      "enum": [
        "OPERATION_STATUS_UNSPECIFIED",
        "OPERATION_STATUS_CREATED",
        "OPERATION_STATUS_STARTED",
        "OPERATION_STATUS_STOPPED",
        "OPERATION_STATUS_DELETED",
        "OPERATION_STATUS_RESTARTED",
        "OPERATION_STATUS_REINSTALLING"
      ],
      "default": "OPERATION_STATUS_UNSPECIFIED"
    },
    "v1PlatformDriver": {
      "type": "string",
      "enum": [
        "PLATFORM_DRIVER_UNSPECIFIED",
        "PLATFORM_DRIVER_PROXMOX",
        "PLATFORM_DRIVER_VIRTFUSION",
        "PLATFORM_DRIVER_SOLUSVM",
        "PLATFORM_DRIVER_PTERODACTYL"
      ],
      "default": "PLATFORM_DRIVER_UNSPECIFIED",
      "description": " - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver."
    },
    "v1PricingModel": {
      "type": "string",
      "enum": [
        "PRICING_MODEL_UNSPECIFIED",
        "PRICING_MODEL_FIXED",
        "PRICING_MODEL_USAGE_BASED",
        "PRICING_MODEL_TIERED",
        "PRICING_MODEL_VOLUME",
        "PRICING_MODEL_GRADUATED",
        "PRICING_MODEL_PACKAGE",
        "PRICING_MODEL_HYBRID"
      ],
      "default": "PRICING_MODEL_UNSPECIFIED"
    },
    "v1ReinstallStatus": {
      "type": "string",
      "enum": [
        "REINSTALL_STATUS_UNSPECIFIED",
        "REINSTALL_STATUS_NONE",
        "REINSTALL_STATUS_REQUESTED",
        "REINSTALL_STATUS_DELETING",
        "REINSTALL_STATUS_PROVISIONING",
        "REINSTALL_STATUS_COMPLETED",
        "REINSTALL_STATUS_FAILED"
      ],
      "default": "REINSTALL_STATUS_UNSPECIFIED"
    },
    "v1Timestamps": {
      "type": "object",
      "properties": {
        "createTime": {
          "type": "string",
          "format": "date-time"
        },
        "updateTime": {
          "type": "string",
          "format": "date-time"
        }
      },
      "title": "Object details"
    },
    "v1VirtualMachineBandwidthQuota": {
      "type": "object",
      "properties": {
        "usedGb": {
          "type": "number",
          "format": "double",
          "description": "Total bandwidth used this billing period (decimal GB, 1000^3 bytes).",
          "readOnly": true
        },
        "freeUnitsGb": {
          "type": "integer",
          "format": "int32",
          "description": "Included free bandwidth per period (GB). Zero when unlimited or not configured.",
          "readOnly": true
        },
        "blockSizeGb": {
          "type": "integer",
          "format": "int32",
          "description": "Overage block size (GB). Zero when unlimited or linear pricing.",
          "readOnly": true
        },
        "blockPrice": {
          "type": "string",
          "description": "Price per overage block (decimal string, e.g. \"2.00\").",
          "readOnly": true
        },
        "currency": {
          "type": "string",
          "readOnly": true
        },
        "unlimited": {
          "type": "boolean",
          "description": "True when bandwidth is effectively unlimited ($0 overage) for this direction.",
          "readOnly": true
        },
        "periodStart": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "periodEnd": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "overageGb": {
          "type": "number",
          "format": "double",
          "description": "GB above the free allowance (0 when within free tier).",
          "readOnly": true
        },
        "billableBlocks": {
          "type": "integer",
          "format": "int32",
          "description": "Whole overage blocks currently billable (ceil(overage_gb / block_size_gb)).",
          "readOnly": true
        },
        "nextBlockGb": {
          "type": "number",
          "format": "double",
          "description": "Total usage GB at which the next overage block would begin (0 when unlimited).",
          "readOnly": true
        },
        "estimatedOverageAmount": {
          "type": "string",
          "description": "Estimated overage charge for the current period (decimal string).",
          "readOnly": true
        },
        "billingEnabled": {
          "type": "boolean",
          "description": "False when usage is shown for visibility only (e.g. ingress not billed on this plan).",
          "readOnly": true
        }
      },
      "description": "VirtualMachineBandwidthQuota summarizes plan bandwidth allowance and metered usage for graphs/billing UX.\nShared by both bandwidth_egress and bandwidth_ingress on VirtualMachine."
    }
  }
}