{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/webex/main/json-schema/webex-address-book-with-entries-dto-schema.json",
  "title": "AddressBookWithEntriesDTO",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/webex-address-book-api-openapi.yml#/components/schemas/AddressBookWithEntriesDTO",
  "required": [
    "name",
    "parentType"
  ],
  "type": "object",
  "properties": {
    "organizationId": {
      "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}$",
      "type": "string",
      "description": "ID of the contact center organization. It is required to define for the following operations - All bulk save operations",
      "format": "uuid"
    },
    "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."
    },
    "version": {
      "type": "integer",
      "description": "The version of this resource. For a newly created resource, it will be 0 unless specified otherwise.",
      "format": "int32"
    },
    "name": {
      "maxLength": 80,
      "minLength": 0,
      "pattern": "^[a-zA-Z0-9._\\-\\s]*$",
      "type": "string",
      "description": "A name for the address book."
    },
    "description": {
      "maxLength": 255,
      "minLength": 0,
      "pattern": "^[a-zA-Z0-9._\\-\\s]*$",
      "type": "string",
      "description": "A short description indicating the context of the address book."
    },
    "parentType": {
      "type": "string",
      "description": "A parent type which indicates whether the address book is accessible for all sites or a specific site.\n Once created, parentType cannot be modified.",
      "enum": [
        "ORGANIZATION",
        "SITE"
      ]
    },
    "siteId": {
      "type": "string",
      "description": "The specific site id where the address book is accessible."
    },
    "addressBookEntries": {
      "uniqueItems": true,
      "type": "array",
      "items": {
        "$ref": "#/$defs/AddressBookEntryDTO"
      }
    },
    "createdTime": {
      "type": "integer",
      "description": "Creation time(in epoch millis) of this resource.",
      "format": "int64",
      "readOnly": true
    },
    "lastUpdatedTime": {
      "type": "integer",
      "description": "Time(in epoch millis) when this resource was last updated.",
      "format": "int64",
      "readOnly": true
    }
  },
  "$defs": {
    "AddressBookEntryDTO": {
      "required": [
        "name",
        "number"
      ],
      "type": "object",
      "properties": {
        "organizationId": {
          "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}$",
          "type": "string",
          "description": "ID of the contact center organization. It is required to define for the following operations - All bulk save operations",
          "format": "uuid"
        },
        "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."
        },
        "version": {
          "type": "integer",
          "description": "The version of this resource. For a newly created resource, it will be 0 unless specified otherwise.",
          "format": "int32"
        },
        "name": {
          "maxLength": 80,
          "minLength": 0,
          "pattern": "^[a-zA-Z0-9._\\-\\s]*$",
          "type": "string",
          "description": "A name for the address book entry."
        },
        "number": {
          "pattern": "^[0-9()+-]+$",
          "type": "string",
          "description": "The phone number for the entry."
        },
        "createdTime": {
          "type": "integer",
          "description": "Creation time(in epoch millis) of this resource.",
          "format": "int64",
          "readOnly": true
        },
        "lastUpdatedTime": {
          "type": "integer",
          "description": "Time(in epoch millis) when this resource was last updated.",
          "format": "int64",
          "readOnly": true
        }
      }
    }
  }
}