{
  "$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"
    },
    "user" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "The user who performed the file event"
    },
    "user_domain" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "The domain of a user who performed the file event"
    },
    "account" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "The account in the format domain/accountName"
    },
    "asset" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "The name of the asset"
    },
    "asset_address" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The network address or hostname of the asset",
      "oneOf" : [ {
        "format" : "ipv4"
      }, {
        "format" : "ipv6"
      }, {
        "format" : "hostname"
      } ]
    },
    "asset_os_family" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The operating system family of the asset"
    },
    "file_event" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The type of file event (for example, create, delete, modify)"
    },
    "file_path" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The full file path of the affected file"
    },
    "file_name" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The name of the accessed file"
    },
    "file_extension" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The extension of the accessed file"
    },
    "process" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The executable name of the process that triggered the event"
    },
    "process_id" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The ID of the process that triggered the event",
      "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"
    },
    "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
        }
      },
      "x-isAttributed" : true,
      "description" : "R7_context includes attributed information related to the entry, with references to Rapid7-specific RRNs"
    },
    "entry_id" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Unique Entry ID assigned to each document or log entry"
    },
    "custom_data" : {
      "type" : "object",
      "x-isAttributed" : false,
      "description" : "JSON string produced by applying one or more user-defined custom parsers to the original data"
    },
    "source_data" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The unparsed, original log line as received from the collector"
    }
  },
  "required" : [ "timestamp", "asset_address", "asset_os_family", "file_event", "file_path" ],
  "description" : "File modification"
}