{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$ref": "#/definitions/api.v2010.account.message",
  "definitions": {"api.v2010.account.message": {
    "additionalProperties": true,
    "type": "object",
    "properties": {
      "error_message": {"anyOf": [
        {
          "description": "The description of the error_code",
          "type": "string"
        },
        {"type": "null"}
      ]},
      "subresource_uris": {"anyOf": [
        {
          "description": "A list of related resources identified by their relative URIs",
          "additionalProperties": true,
          "type": "object"
        },
        {"type": "null"}
      ]},
      "date_sent": {"anyOf": [
        {
          "format": "date-time-rfc-2822",
          "description": "The RFC 2822 date and time in GMT when the message was sent",
          "type": "string"
        },
        {"type": "null"}
      ]},
      "date_updated": {"anyOf": [
        {
          "format": "date-time-rfc-2822",
          "description": "The RFC 2822 date and time in GMT that the resource was last updated",
          "type": "string"
        },
        {"type": "null"}
      ]},
      "date_created": {"anyOf": [
        {
          "format": "date-time-rfc-2822",
          "description": "The RFC 2822 date and time in GMT that the resource was created",
          "type": "string"
        },
        {"type": "null"}
      ]},
      "api_version": {"anyOf": [
        {
          "description": "The API version used to process the message",
          "type": "string"
        },
        {"type": "null"}
      ]},
      "body": {"anyOf": [
        {
          "description": "The message text",
          "type": "string"
        },
        {"type": "null"}
      ]},
      "num_segments": {"anyOf": [
        {
          "description": "The number of messages used to deliver the message body",
          "type": "string"
        },
        {"type": "null"}
      ]},
      "uri": {"anyOf": [
        {
          "description": "The URI of the resource, relative to `https://api.twilio.com`",
          "type": "string"
        },
        {"type": "null"}
      ]},
      "num_media": {"anyOf": [
        {
          "description": "The number of media files associated with the message",
          "type": "string"
        },
        {"type": "null"}
      ]},
      "sid": {"anyOf": [
        {
          "minLength": 34,
          "pattern": "^(SM|MM)[0-9a-fA-F]{32}$",
          "description": "The unique string that identifies the resource",
          "type": "string",
          "maxLength": 34
        },
        {"type": "null"}
      ]},
      "price_unit": {"anyOf": [
        {
          "description": "The currency in which price is measured",
          "type": "string"
        },
        {"type": "null"}
      ]},
      "messaging_service_sid": {"anyOf": [
        {
          "minLength": 34,
          "pattern": "^MG[0-9a-fA-F]{32}$",
          "description": "The SID of the Messaging Service used with the message.",
          "type": "string",
          "maxLength": 34
        },
        {"type": "null"}
      ]},
      "price": {"anyOf": [
        {
          "description": "The amount billed for the message",
          "type": "string"
        },
        {"type": "null"}
      ]},
      "account_sid": {"anyOf": [
        {
          "minLength": 34,
          "pattern": "^AC[0-9a-fA-F]{32}$",
          "description": "The SID of the Account that created the resource",
          "type": "string",
          "maxLength": 34
        },
        {"type": "null"}
      ]},
      "error_code": {"anyOf": [
        {
          "description": "The error code associated with the message",
          "type": "integer"
        },
        {"type": "null"}
      ]},
      "from": {"anyOf": [
        {
          "description": "The phone number that initiated the message",
          "type": "string"
        },
        {"type": "null"}
      ]},
      "to": {"anyOf": [
        {
          "description": "The phone number that received the message",
          "type": "string"
        },
        {"type": "null"}
      ]},
      "direction": {"anyOf": [
        {
          "description": "The direction of the message",
          "type": "string",
          "enum": [
            "inbound",
            "outbound-api",
            "outbound-call",
            "outbound-reply"
          ]
        },
        {"type": "null"}
      ]},
      "status": {"anyOf": [
        {
          "description": "The status of the message",
          "type": "string",
          "enum": [
            "queued",
            "sending",
            "sent",
            "failed",
            "delivered",
            "undelivered",
            "receiving",
            "received",
            "accepted",
            "scheduled",
            "read",
            "partially_delivered",
            "canceled"
          ]
        },
        {"type": "null"}
      ]}
    }
  }}
}
