{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/ResourceCollectionDTO",
  "title": "ResourceCollectionDTO",
  "type": "object",
  "description": "A collection of resources with their types and access levels.",
  "example": {
    "id": "80f49a6e-11d7-4651-b730-99ed2f726f61",
    "name": "Department1",
    "description": "Department1 description.",
    "resources": [
      {
        "name": "team",
        "accessLevel": "SPECIFIC",
        "ids": [
          "00734874-4732-43bb-bfff-d1e75d309eb1",
          "00734874-4732-43bb-bfff-d1e75d309eb2"
        ]
      },
      {
        "name": "desktop-profile",
        "accessLevel": "ALL"
      },
      {
        "name": "desktop-layout",
        "accessLevel": "NONE"
      }
    ],
    "resourceCount": 2
  },
  "properties": {
    "organizationId": {
      "type": "string",
      "format": "uuid",
      "description": "ID of the contact center organization. This field is required for all bulk save operations.",
      "example": "f53c8b54-46ca-43f6-ba05-08426a46e23d",
      "maxLength": 36,
      "minLength": 32,
      "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}$"
    },
    "id": {
      "type": "string",
      "description": "ID of this contact center resource. It should not be specified when creating a new resource. However, it is mandatory when updating a resource.",
      "example": "93912f11-6017-404b-bf14-5331890b1797"
    },
    "version": {
      "type": "integer",
      "format": "int32",
      "description": "The version of this resource. For a newly created resource, it will be 0 unless specified otherwise.",
      "example": 1
    },
    "name": {
      "type": "string",
      "description": "The name of the resource collection.",
      "example": "Department1",
      "maxLength": 80,
      "minLength": 1,
      "pattern": "^[a-zA-Z\\d-_\\s]+$"
    },
    "description": {
      "type": "string",
      "description": "An optional description of the resource collection.",
      "example": "Department1 description.",
      "maxLength": 255,
      "minLength": 0
    },
    "resources": {
      "type": "array",
      "description": "The name of the resource and Type of resource list.",
      "items": {
        "$ref": "#/components/schemas/ResourceTypesDTO"
      },
      "uniqueItems": true
    },
    "resourceCount": {
      "type": "integer",
      "format": "int64",
      "description": "The total count of resources in this collection",
      "example": 2
    },
    "createdTime": {
      "type": "integer",
      "format": "int64",
      "description": "This is the created time of the entity."
    },
    "lastUpdatedTime": {
      "type": "integer",
      "format": "int64",
      "description": "This is the updated time of the entity."
    }
  },
  "required": [
    "name"
  ]
}