{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/talend/json-schema/talend-bulk-sharing-set-request-schema.json",
  "title": "BulkSharingSetRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/talend-sharingset-api-openapi.yml#/components/schemas/BulkSharingSetRequest",
  "type": "object",
  "required": [
    "bulk"
  ],
  "properties": {
    "bulk": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "entityId",
          "entityType"
        ],
        "properties": {
          "entityId": {
            "type": "string",
            "description": "UUID"
          },
          "entityType": {
            "type": "string"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/PatchUserSharingRequest"
            }
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/PatchGroupSharingRequest"
            }
          }
        }
      }
    }
  },
  "$defs": {
    "ForeignEntity": {
      "type": "object",
      "required": [
        "entityId",
        "entityType"
      ],
      "properties": {
        "entityId": {
          "type": "string",
          "description": "UUID"
        },
        "entityType": {
          "type": "string"
        }
      }
    },
    "LevelRequest": {
      "type": "object",
      "required": [
        "code"
      ],
      "properties": {
        "code": {
          "type": "string"
        }
      }
    },
    "PatchGroupSharingRequest": {
      "type": "object",
      "required": [
        "groupId"
      ],
      "properties": {
        "groupId": {
          "type": "string",
          "description": "UUID"
        },
        "level": {
          "$ref": "#/$defs/LevelRequest"
        },
        "groupName": {
          "type": "string"
        },
        "foreignEntity": {
          "$ref": "#/$defs/ForeignEntity"
        }
      }
    },
    "PatchUserSharingRequest": {
      "type": "object",
      "required": [
        "userId"
      ],
      "properties": {
        "userId": {
          "type": "string",
          "description": "UUID"
        },
        "level": {
          "$ref": "#/$defs/LevelRequest"
        },
        "firstName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        },
        "foreignEntity": {
          "$ref": "#/$defs/ForeignEntity"
        }
      }
    }
  }
}