{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/red-hat-enterprise-linux-8/json-schema/red-hat-enterprise-linux-8-staleness-output-schema.json",
  "title": "Account Staleness Out",
  "description": "Data of a account staleness.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/red-hat-enterprise-linux-8-inventory-api-openapi.yml#/components/schemas/StalenessOutput",
  "allOf": [
    {
      "$ref": "#/$defs/StalenessIn"
    },
    {
      "required": [
        "conventional_time_to_stale",
        "conventional_time_to_stale_warning",
        "conventional_time_to_delete",
        "immutable_time_to_stale",
        "immutable_time_to_stale_warning",
        "immutable_time_to_delete"
      ]
    },
    {
      "properties": {
        "created": {
          "description": "A timestamp when the entry was created.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "$ref": "#/$defs/StalenessId"
        },
        "org_id": {
          "$ref": "#/$defs/OrgId"
        },
        "updated": {
          "description": "A timestamp when the entry was last updated.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "org_id",
        "created",
        "updated"
      ]
    }
  ],
  "type": "object",
  "$defs": {
    "NonStrictUUID": {
      "format": "uuid",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$|^[0-9a-fA-F]{8}[0-9a-fA-F]{4}[0-9a-fA-F]{4}[0-9a-fA-F]{4}[0-9a-fA-F]{12}$",
      "type": "string"
    },
    "OrgId": {
      "description": "The Org ID of the tenant that owns the host.",
      "type": "string"
    },
    "StalenessId": {
      "description": "Account Staleness UID",
      "oneOf": [
        {
          "$ref": "#/$defs/NonStrictUUID"
        },
        {
          "$ref": "#/$defs/SystemDefaultId"
        }
      ]
    },
    "StalenessIn": {
      "description": "Data of a single account staleness.",
      "properties": {
        "conventional_time_to_delete": {
          "$ref": "#/$defs/StalenessTimeout"
        },
        "conventional_time_to_stale": {
          "$ref": "#/$defs/StalenessTimeout"
        },
        "conventional_time_to_stale_warning": {
          "$ref": "#/$defs/StalenessTimeout"
        },
        "immutable_time_to_delete": {
          "$ref": "#/$defs/StalenessTimeout"
        },
        "immutable_time_to_stale": {
          "$ref": "#/$defs/StalenessTimeout"
        },
        "immutable_time_to_stale_warning": {
          "$ref": "#/$defs/StalenessTimeout"
        }
      },
      "title": "Account Staleness In",
      "type": "object"
    },
    "StalenessTimeout": {
      "minimum": 1,
      "type": "integer"
    },
    "SystemDefaultId": {
      "enum": [
        "system_default"
      ],
      "type": "string"
    }
  }
}