{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/power-bi/json-schema/power-bi-information-protection-change-label-details-schema.json",
  "title": "InformationProtectionChangeLabelDetails",
  "description": "A composite of label information required to update an information protection label",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/power-bi-admin-api-openapi.yml#/components/schemas/InformationProtectionChangeLabelDetails",
  "required": [
    "artifacts",
    "labelId"
  ],
  "properties": {
    "artifacts": {
      "description": "A composite of Power BI item IDs for each item type",
      "$ref": "#/$defs/InformationProtectionArtifactsChangeLabel"
    },
    "labelId": {
      "type": "string",
      "format": "uuid",
      "description": "The label ID, which must be in the user's label policy."
    },
    "delegatedUser": {
      "description": "Delegated user details. A delegated user is a user within an organization whose admin sets a label on behalf of the user. Although the admin sets the label, the delegated user is marked as the label issuer.",
      "$ref": "#/$defs/DelegatedUser"
    },
    "assignmentMethod": {
      "type": "string",
      "enum": [
        "Standard",
        "Priviledged"
      ],
      "x-ms-enum": {
        "name": "assignmentMethod",
        "modelAsExtensible": true,
        "values": [
          {
            "value": "Standard",
            "description": "The label was set by an automated process (default value)"
          },
          {
            "value": "Priviledged",
            "description": "The label was set manually"
          }
        ]
      },
      "description": "Specifies whether the assigned label was set by an automated process or manually."
    }
  },
  "$defs": {
    "ArtifactId": {
      "description": "The unique ID of a Power BI item in UUID format. Dashboard, report, and dataflow IDs are in UUID format, and dataset IDs can be in UUID or string format.",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "An ID in UUID format"
        }
      }
    },
    "ArtifactStringId": {
      "description": "The unique ID of a Power BI item in string or UUID format. Dashboard, report, and dataflow IDs are in UUID format, and dataset IDs can be in UUID or string format.",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "An ID in string or UUID format"
        }
      }
    },
    "DelegatedUser": {
      "description": "Delegated user details. The user must be an existing user in Power BI and Azure AAD, and must have signed in to Power BI during the last three months.",
      "required": [
        "emailAddress"
      ],
      "properties": {
        "emailAddress": {
          "description": "The email address of the delegated user",
          "type": "string"
        }
      }
    },
    "InformationProtectionArtifactsChangeLabel": {
      "description": "A composite of Power BI item IDs for each item type. The IDs specify which Power BI items require an information protection label update.",
      "properties": {
        "dashboards": {
          "type": "array",
          "description": "A list of unique dashboard IDs",
          "items": {
            "$ref": "#/$defs/ArtifactId"
          }
        },
        "reports": {
          "type": "array",
          "description": "A list of unique report IDs",
          "items": {
            "$ref": "#/$defs/ArtifactId"
          }
        },
        "datasets": {
          "type": "array",
          "description": "A list of unique dataset IDs",
          "items": {
            "$ref": "#/$defs/ArtifactStringId"
          }
        },
        "dataflows": {
          "type": "array",
          "description": "A list of unique dataflow IDs",
          "items": {
            "$ref": "#/$defs/ArtifactId"
          }
        }
      }
    }
  }
}