{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-communication-services/json-schema/microsoft-azure-communication-services-paged-message-template-item-schema.json",
  "title": "PagedMessageTemplateItem",
  "description": "Paged collection of MessageTemplateItem items",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-communication-services-messages-api-openapi.yml#/components/schemas/PagedMessageTemplateItem",
  "type": "object",
  "properties": {
    "value": {
      "type": "array",
      "description": "The MessageTemplateItem items on this page",
      "items": {
        "$ref": "#/$defs/MessageTemplateItem"
      }
    },
    "nextLink": {
      "type": "string",
      "format": "uri",
      "description": "The link to the next page of items"
    }
  },
  "required": [
    "value"
  ],
  "$defs": {
    "CommunicationMessagesChannel": {
      "type": "string",
      "description": "The type of the communication messages channel.",
      "enum": [
        "whatsApp"
      ],
      "x-ms-enum": {
        "name": "CommunicationMessagesChannel",
        "modelAsString": true,
        "values": [
          {
            "name": "whatsApp",
            "value": "whatsApp",
            "description": "The WhatsApp communication messages channel type."
          }
        ]
      }
    },
    "MessageTemplateItem": {
      "type": "object",
      "description": "The message template as returned from the service.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The template's name.",
          "readOnly": true
        },
        "language": {
          "type": "string",
          "description": "The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'."
        },
        "status": {
          "$ref": "#/$defs/MessageTemplateStatus",
          "description": "The aggregated template status."
        },
        "kind": {
          "$ref": "#/$defs/CommunicationMessagesChannel",
          "description": "The type discriminator describing a template type."
        }
      },
      "required": [
        "name",
        "language",
        "status",
        "kind"
      ]
    },
    "MessageTemplateStatus": {
      "type": "string",
      "description": "The aggregated template status.",
      "enum": [
        "approved",
        "rejected",
        "pending",
        "paused"
      ],
      "x-ms-enum": {
        "name": "MessageTemplateStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "approved",
            "value": "approved",
            "description": "Message template is approved."
          },
          {
            "name": "rejected",
            "value": "rejected",
            "description": "Message template is rejected."
          },
          {
            "name": "pending",
            "value": "pending",
            "description": "Message template is pending."
          },
          {
            "name": "paused",
            "value": "paused",
            "description": "Message template is paused."
          }
        ]
      }
    }
  }
}