{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scale-ai/json-schema/scale-ai-role-restriction-schema.json",
  "title": "RoleRestriction",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scale-ai-account-groups-api-openapi.yml#/components/schemas/RoleRestriction",
  "properties": {
    "restriction_type": {
      "$ref": "#/$defs/RoleRestrictionType",
      "description": "The type of restriction"
    },
    "restriction": {
      "$ref": "#/$defs/UserGroupRoleRestriction",
      "description": "The restriction (currently only user group restrictions)"
    }
  },
  "type": "object",
  "required": [
    "restriction_type",
    "restriction"
  ],
  "$defs": {
    "RoleRestrictionType": {
      "type": "string",
      "enum": [
        "user_group"
      ],
      "title": "RoleRestrictionType"
    },
    "UserGroupRoleRestriction": {
      "properties": {
        "group_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Group Ids",
          "description": "A list of groups for which users must be in at least one of"
        }
      },
      "type": "object",
      "required": [
        "group_ids"
      ],
      "title": "UserGroupRoleRestriction"
    }
  }
}