{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/safetyculture/json-schema/safetyculture-s12-assets-v1-status-groups-service-update-status-group-body-schema.json",
  "title": "UpdateStatusGroupRequest",
  "description": "The parameters for `UpdateStatusGroup`",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/safetyculture-assets-api-openapi.yml#/components/schemas/s12.assets.v1.StatusGroupsService.UpdateStatusGroupBody",
  "type": "object",
  "properties": {
    "status_group": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the status group."
        },
        "description": {
          "type": "string",
          "description": "The description of the status group."
        },
        "options": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/$defs/s12.assets.v1.StatusOption"
          },
          "description": "The status options belonging to this group, ordered by position ascending.\nMaximum 10 options per group."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "Time when the status group was created.",
          "readOnly": true
        },
        "modified_at": {
          "type": "string",
          "format": "date-time",
          "description": "Time when the status group was last modified.",
          "readOnly": true
        },
        "types": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/$defs/s12.assets.v1.Type"
          },
          "description": "The asset types assigned to this status group.",
          "readOnly": true
        }
      },
      "description": "The status group to update.",
      "title": "The status group to update."
    },
    "update_mask": {
      "type": "string",
      "description": "REQUIRED. The fields to update."
    },
    "reassign_to_option_id": {
      "type": "string",
      "description": "The identifier of the status option to reassign assets to when options are removed.\nIf omitted, assets assigned to removed options are cleared."
    }
  },
  "required": [
    "update_mask"
  ],
  "$defs": {
    "s12.assets.v1.StatusOption": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The identifier of the status option."
        },
        "name": {
          "type": "string",
          "description": "The name of the status option."
        },
        "color": {
          "description": "The color of the status option.",
          "allOf": [
            {
              "$ref": "#/$defs/s12.common.v1.StatusBadgeColor"
            }
          ]
        },
        "position": {
          "type": "integer",
          "format": "int32",
          "description": "The display position of the status option within the group."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "Time when the status option was created.",
          "readOnly": true
        },
        "modified_at": {
          "type": "string",
          "format": "date-time",
          "description": "Time when the status option was last modified.",
          "readOnly": true
        }
      },
      "description": "A status option within a status group."
    },
    "s12.assets.v1.Type": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The global unique identifier of the type."
        },
        "name": {
          "type": "string",
          "description": "Name of the type."
        },
        "type": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/$defs/s12.assets.v1.TypeCategory"
            }
          ],
          "description": "The categery of type, either predefined or custom"
        }
      }
    },
    "s12.assets.v1.TypeCategory": {
      "type": "string",
      "enum": [
        "TYPE_CATEGORY_UNSPECIFIED",
        "TYPE_CATEGORY_PREDEFINED",
        "TYPE_CATEGORY_CUSTOM"
      ],
      "default": "TYPE_CATEGORY_UNSPECIFIED",
      "description": "Category of Type.\n\n - TYPE_CATEGORY_UNSPECIFIED: Type Category Unspecified.\n - TYPE_CATEGORY_PREDEFINED: Predefined Type defined by system.\n - TYPE_CATEGORY_CUSTOM: Custom type defined by organisation."
    },
    "s12.common.v1.StatusBadgeColor": {
      "type": "string",
      "enum": [
        "STATUS_BADGE_COLOR_ACCENT",
        "STATUS_BADGE_COLOR_INFO",
        "STATUS_BADGE_COLOR_NEGATIVE",
        "STATUS_BADGE_COLOR_POSITIVE",
        "STATUS_BADGE_COLOR_WARNING",
        "STATUS_BADGE_COLOR_SURFACE"
      ],
      "description": "StatusBadgeColor defines the semantic color palette for status badges.\n\n - STATUS_BADGE_COLOR_ACCENT: Color is accent\n - STATUS_BADGE_COLOR_INFO: Color is info\n - STATUS_BADGE_COLOR_NEGATIVE: Color is negative\n - STATUS_BADGE_COLOR_POSITIVE: Color is positive\n - STATUS_BADGE_COLOR_WARNING: Color is warning\n - STATUS_BADGE_COLOR_SURFACE: Color is surface"
    }
  }
}