{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "timestamp" : {
      "type" : "string",
      "format" : "date-time",
      "x-isAttributed" : false,
      "description" : "The timestamp when the event originally occurred"
    },
    "asset" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "Name of the asset associated with the hostname to IP action"
    },
    "user" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "Username, if available"
    },
    "account" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The account that was involved with the VPN session"
    },
    "account_domain" : {
      "type" : "string",
      "x-isAttributed" : false,
      "format" : "hostname",
      "description" : "The domain the account belongs to"
    },
    "action" : {
      "type" : "string",
      "enum" : [ "OBTAIN", "RELEASE", "INITIATE", "TERMINATE" ],
      "x-isAttributed" : false,
      "description" : "Indicates the action of the IP binding (whether the binding is being obtained or released)"
    },
    "host" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The binding's hostname. May be a short hostname or fully qualified domain name"
    },
    "client_mac" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The MAC address of the client"
    },
    "ip" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The binding's IP address value",
      "oneOf" : [ {
        "format" : "ipv4"
      }, {
        "format" : "ipv6"
      } ]
    },
    "observation_status" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "Indicates the result of processing the HostNameToIp observation"
    },
    "dhcp_server_address" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The hostname or IP address of the DHCP server",
      "oneOf" : [ {
        "format" : "ipv4"
      }, {
        "format" : "ipv6"
      }, {
        "format" : "hostname"
      } ]
    },
    "windows_event_code" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The event code which created the event if the event was parsed from a windows event log",
      "pattern" : "\\d+"
    },
    "source_json" : {
      "type" : "object",
      "x-isAttributed" : false,
      "description" : "The data that was received or collected by our collector or endpoint agent, formatted as JSON"
    },
    "source_data" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The unparsed, original log line as received from the collector"
    },
    "custom_data" : {
      "type" : "object",
      "x-isAttributed" : false,
      "description" : "JSON string produced by applying one or more user-defined custom parsers to the original data"
    },
    "entry_id" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Unique Entry ID assigned to each document or log entry"
    },
    "r7_context" : {
      "type" : "object",
      "properties" : {
        "user" : {
          "type" : "object",
          "properties" : {
            "domain" : {
              "type" : "string",
              "x-isAttributed" : false,
              "format" : "hostname",
              "description" : "The domain of the user"
            },
            "name" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The name of the r7context resource"
            },
            "rrn" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The RRN (Rapid7 Resource Name) of the r7context resource",
              "pattern" : "rrn(_[^\\s:]+)?:[^\\s:]+:[^\\s:]*:[^\\s:]*(:[^\\s:]+)+"
            },
            "type" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The type of r7context field",
              "const" : "user"
            }
          },
          "required" : [ "name", "rrn", "type" ],
          "x-isAttributed" : true
        },
        "account" : {
          "type" : "object",
          "properties" : {
            "name" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The name of the r7context resource"
            },
            "rrn" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The RRN (Rapid7 Resource Name) of the r7context resource",
              "pattern" : "rrn(_[^\\s:]+)?:[^\\s:]+:[^\\s:]*:[^\\s:]*(:[^\\s:]+)+"
            },
            "type" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The type of r7context field",
              "enum" : [ "account", "asset:account" ]
            }
          },
          "required" : [ "name", "rrn", "type" ],
          "x-isAttributed" : true
        },
        "asset" : {
          "type" : "object",
          "properties" : {
            "name" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The name of the r7context resource"
            },
            "rrn" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The RRN (Rapid7 Resource Name) of the r7context resource",
              "pattern" : "rrn(_[^\\s:]+)?:[^\\s:]+:[^\\s:]*:[^\\s:]*(:[^\\s:]+)+"
            },
            "type" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The type of r7context field",
              "const" : "asset"
            }
          },
          "required" : [ "name", "rrn", "type" ],
          "x-isAttributed" : true
        },
        "host" : {
          "type" : "object",
          "properties" : {
            "name" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The name of the r7context resource"
            },
            "rrn" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The RRN (Rapid7 Resource Name) of the r7context resource",
              "pattern" : "rrn(_[^\\s:]+)?:[^\\s:]+:[^\\s:]*:[^\\s:]*(:[^\\s:]+)+"
            },
            "type" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The type of r7context field",
              "const" : "asset"
            }
          },
          "required" : [ "name", "rrn", "type" ],
          "x-isAttributed" : true
        }
      },
      "x-isAttributed" : true,
      "description" : "R7_context includes attributed information related to the entry, with references to Rapid7-specific RRNs"
    }
  },
  "required" : [ "timestamp", "action", "host" ],
  "description" : "Represents a binding of hostname to an IP address at a moment in time.\nThis message can be produced by any event source that has this information,\nincluding DHCP, ActiveDirectory event logs, Nexpose, and the Endpoint monitor.\nThe hostname value may be a short name or a fully qualified domain name.\nSome, but not all event sources can also produce a release action\nto declare when the hostname is no longer bound to the IP address"
}