{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/graphiant/main/json-schema/graphiant-v1-software-rollouts-put-request-schema.json",
  "title": "v1SoftwareRolloutsPutRequest",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/graphiant-software-api-openapi.yml#/components/schemas/v1SoftwareRolloutsPutRequest",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "description": "Rollout identifier to update. (required)"
    },
    "rolloutConfig": {
      "$ref": "#/$defs/upgradeRolloutConfig"
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "rolloutConfig"
  ],
  "$defs": {
    "googleProtobufTimestamp": {
      "type": "object",
      "properties": {
        "nanos": {
          "type": "integer",
          "format": "int32"
        },
        "seconds": {
          "type": "integer",
          "format": "int64"
        }
      },
      "additionalProperties": false
    },
    "upgradeMonthlyRecurrence": {
      "type": "object",
      "properties": {
        "date": {
          "type": "integer",
          "format": "int32",
          "minimum": 0,
          "description": "Calendar day of month (1–31) for fixed-date monthly recurrence; optional if ordinal and weekday are set."
        },
        "ordinal": {
          "type": "string",
          "description": "For nth-weekday-of-month style recurrence; use together with weekday, or use date instead."
        },
        "weekday": {
          "type": "string",
          "description": "Weekday paired with ordinal for monthly nth-weekday recurrence; optional if date is set."
        }
      },
      "additionalProperties": false
    },
    "upgradeRecurringSchedule": {
      "type": "object",
      "properties": {
        "monthly": {
          "$ref": "#/$defs/upgradeMonthlyRecurrence"
        },
        "startsAtTs": {
          "$ref": "#/$defs/googleProtobufTimestamp"
        },
        "weekly": {
          "$ref": "#/$defs/upgradeWeeklyRecurrence"
        },
        "yearly": {
          "$ref": "#/$defs/upgradeYearlyRecurrence"
        }
      },
      "additionalProperties": false,
      "required": [
        "startsAtTs"
      ]
    },
    "upgradeRolloutConfig": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "description": "Upgrade action to perform (e.g. install+activate, install only, activate, auto-upgrade). (required)"
        },
        "description": {
          "type": "string",
          "description": "Optional longer description of the rollout."
        },
        "deviceIds": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int64",
            "description": "Device IDs included in the rollout (field name retained for API compatibility)."
          }
        },
        "name": {
          "type": "string",
          "description": "Human-readable rollout name unique within the enterprise. (required)"
        },
        "release": {
          "type": "string",
          "description": "Target software release for devices in this rollout. (required)"
        },
        "schedule": {
          "$ref": "#/$defs/upgradeRecurringSchedule"
        }
      },
      "additionalProperties": false,
      "required": [
        "action",
        "name",
        "release"
      ]
    },
    "upgradeWeeklyRecurrence": {
      "type": "object",
      "properties": {
        "interval": {
          "type": "integer",
          "format": "int32",
          "minimum": 0,
          "description": "Which occurrence of the weekday in the month applies for weekly-style recurrence (1–52, aligned with schedule validation). (required)"
        },
        "weekday": {
          "type": "string",
          "description": "Day of week for the weekly recurrence. (required)"
        }
      },
      "additionalProperties": false,
      "required": [
        "interval",
        "weekday"
      ]
    },
    "upgradeYearlyRecurrence": {
      "type": "object",
      "properties": {
        "date": {
          "type": "integer",
          "format": "int32",
          "minimum": 0,
          "description": "Calendar day (1–31) for fixed month+date yearly recurrence."
        },
        "month": {
          "type": "integer",
          "format": "int32",
          "minimum": 0,
          "description": "Month of year (1–12) for yearly recurrence. (required)"
        },
        "ordinal": {
          "type": "string",
          "description": "For nth-weekday-in-month yearly recurrence; use with weekday, or use month + date."
        },
        "weekday": {
          "type": "string",
          "description": "Weekday paired with ordinal for yearly recurrence."
        }
      },
      "additionalProperties": false,
      "required": [
        "month"
      ]
    }
  }
}