{
  "$id": "http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/observables/ipv4-addr.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "ipv4-addr",
  "description": "The IPv4 Address Object represents one or more IPv4 addresses expressed using CIDR notation.",
  "type": "object",
  "allOf": [
    {
      "$ref": "../common/cyber-observable-core.json"
    },
    {
      "properties": {
        "type": {
          "type": "string",
          "description": "The value of this property MUST be `ipv4-addr`.",
          "enum": [
            "ipv4-addr"
          ]
        },
        "id": {
          "title": "id",
          "pattern": "^ipv4-addr--"
        },
        "value": {
          "type": "string",
          "description": "Specifies one or more IPv4 addresses expressed using CIDR notation.",
          "pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(3[0-2]|[1-2][0-9]|[0-9]))?$"
        },
        "resolves_to_refs": {
          "type": "array",
          "description": "Specifies a list of references to one or more Layer 2 Media Access Control (MAC) addresses that the IPv4 address resolves to.",
          "items": {
            "type": "string"
          },
          "minItems": 1
        },
        "belongs_to_refs": {
          "type": "array",
          "description": "Specifies a reference to one or more autonomous systems (AS) that the IPv4 address belongs to.",
          "items": {
            "type": "string"
          },
          "minItems": 1
        }
      },
      "required": [
        "value"
      ]
    }
  ]
}
