{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$id" : "https://voltdb.com/voltsp/schemas/source/network",
  "title" : "Network Source Configuration",
  "description" : "The `network` source opens server socket and receives data from network using UDP or TCP protocol.\n",
  "type" : "object",
  "properties" : {
    "network" : {
      "type" : "object",
      "properties" : {
        "address" : {
          "type" : "string",
          "description" : "The address to bind server socket to. If the IP/host is omitted then `0.0.0.0` is assumed.\nThe IP is useful if the host has multiple network interfaces.",
          "default" : "0.0.0.0",
          "anyOf" : [ {
            "type" : "string",
            "format" : "hostname"
          }, {
            "type" : "string",
            "format" : "ipv4"
          }, {
            "type" : "string",
            "format" : "ipv6"
          } ]
        },
        "type" : {
          "type" : "string",
          "description" : "Specifies the network protocol type.",
          "enum" : [ "tcp", "udp", "TCP", "UDP" ]
        },
        "decoder" : {
          "type" : "string",
          "description" : "Decoder to be applied to received data.\nExamples are decoders that convert incoming data to string or to byte arrays.\nFor ready-to-use decoders check `org.voltdb.stream.api.network.Decoders` defined in\n`volt-stream-connectors-api`.\n",
          "enum" : [ "none", "identity", "lines", "bytes", "chars" ]
        },
        "socketOptions" : {
          "type" : "object",
          "description" : "Configures operating system options to be applied to the server socket.\nSupported values are: `SO_SNDBUF`, `SO_RCVBUF`, `SO_TIMEOUT`, `SO_KEEPALIVE`, `SO_LINGER`, `SO_BACKLOG`, `TCP_NODELAY`.\n",
          "additionalProperties" : {
            "type" : "string"
          }
        },
        "exceptionHandler" : {
          "type" : "string",
          "description" : "Custom exception handler enabling interception of all errors related to this source.\n"
        }
      },
      "required" : [ "address", "type", "decoder" ],
      "additionalProperties" : false
    }
  },
  "required" : [ "network" ],
  "additionalProperties" : false
}
