{
  "type" : "object",
  "$schema" : "http://json-schema.org/draft-07/schema#",
  "id" : "urn:jsonschema:io:gravitee:policy:metricsreporter:configuration:MetricsReporterPolicyConfiguration",
  "properties" : {
    "method" : {
      "title" : "HTTP Method",
      "description" : "HTTP method to invoke the endpoint.",
      "type" : "string",
      "default" : "POST",
      "enum" : [ "POST", "PUT", "PATCH" ]
    },
    "url" : {
      "title" : "URL",
      "type" : "string"
    },
    "useSystemProxy" : {
      "title" : "Use system proxy",
      "description" : "Use the configured system proxy.",
      "type" : "boolean"
    },
    "headers" : {
      "type" : "array",
      "title" : "Request Headers",
      "items" : {
        "type" : "object",
        "id" : "urn:jsonschema:io:gravitee:policy:metricsreporter:configuration:HttpHeader",
        "title" : "Header",
        "properties" : {
          "name" : {
            "title" : "Name",
            "type" : "string"
          },
          "value" : {
            "title" : "Value",
            "type" : "string"
          }
        }
      },
      "required" : [ "name", "value" ]
    },
    "body" : {
      "title" : "Request body",
      "type" : "string",
      "x-schema-form" : {
        "type" : "codemirror",
        "codemirrorOptions" : {
          "placeholder" : "Put request body here",
          "lineWrapping" : true,
          "lineNumbers" : true,
          "allowDropFileTypes" : true,
          "autoCloseTags" : true
        }
      }
    },
    "http" : {
      "$ref" : "#/gioExternalDefinitions/httpClientOptions"
    },
    "proxy" : {
      "$ref" : "#/gioExternalDefinitions/httpProxyOptions"
    },
    "ssl" : {
      "$ref" : "#/gioExternalDefinitions/sslOptions"
    }
  },
  "required" : [ "url", "method", "body" ],
  "gioExternalDefinitions" : {
    "clearTextUpgrade" : {
      "title" : "Allow h2c Clear Text Upgrade",
      "type" : "boolean",
      "default" : true,
      "gioConfig" : {
        "banner" : {
          "title" : "HTTP/2 Cleartext (H2C)",
          "text" : "If enabled, an h2c connection is established using an HTTP/1.1 upgrade request. If disabled, h2c connection is established directly (with prior knowledge)."
        }
      }
    },
    "connectTimeout" : {
      "type" : "integer",
      "minimum" : 0,
      "default" : 3000,
      "title" : "Connection timeout",
      "description" : "Timeout in ms to connect to the target"
    },
    "followRedirects" : {
      "title" : "Follow HTTP redirects",
      "type" : "boolean",
      "default" : false,
      "gioConfig" : {
        "banner" : {
          "title" : "Follow HTTP redirects",
          "text" : "When the connector receives a status code in the range 3xx from the backend, it follows the redirection provided by the Location response header."
        }
      }
    },
    "http2ConnectionWindowSize" : {
      "type" : "integer",
      "title" : "Connection Window Size for an HTTP/2 connection",
      "default" : -1,
      "gioConfig" : {
        "banner" : {
          "title" : "Connection Window Size for an HTTP/2 connection",
          "text" : "Connection Window Size in bytes can be increased to a larger value such as 1MB (1048576 bytes) to improve throughput. If set to -1, the default HTTP/2 spec value is use (e.g., 65535 bytes). -1 is the default."
        }
      }
    },
    "http2MaxFrameSize" : {
      "type" : "integer",
      "title" : "Max frame size for HTTP/2 stream data frame",
      "default" : 16384,
      "maximum" : 16777215,
      "gioConfig" : {
        "banner" : {
          "title" : "Max frame size for HTTP/2 stream data frame",
          "text" : "Max frame size in bytes (initial settings). Default is the HTTP/2 spec default value (16384 bytes). Max value is 16777215."
        }
      }
    },
    "http2MultiplexingLimit" : {
      "type" : "integer",
      "title" : "Max concurrent stream for an HTTP/2 connection",
      "default" : -1,
      "gioConfig" : {
        "banner" : {
          "title" : "Max concurrent stream for an HTTP/2 connection",
          "text" : "The maximum number of concurrent streams allowed for each HTTP/2 connection. The actual number of streams per connection is the minimum of this value and the server's initial settings. For example, if set to 10 and the server's initial setting is 1000, the max number of streams will be 10. If set to -1, the server's initial settings will be used. -1 is the default."
        }
      }
    },
    "http2StreamWindowSize" : {
      "type" : "integer",
      "title" : "Stream initial window size for each HTTP/2 stream",
      "default" : -1,
      "gioConfig" : {
        "banner" : {
          "title" : "Stream initial window size for each HTTP/2 stream",
          "text" : "Stream Window Size in bytes can be increased to a larger value such as 256KB (262144 bytes) to improve throughput (initial settings). If set to -1, the default HTTP/2 spec value is used (65535 bytes). -1 is the default."
        }
      }
    },
    "httpClientOptions" : {
      "type" : "object",
      "javaType" : "io.gravitee.plugin.configurations.http.HttpClientOptions",
      "title" : "Security configuration",
      "oneOf" : [ {
        "title" : "HTTP 1.1",
        "properties" : {
          "version" : {
            "const" : "HTTP_1_1"
          },
          "keepAlive" : {
            "$ref" : "#/gioExternalDefinitions/keepAlive"
          },
          "keepAliveTimeout" : {
            "$ref" : "#/gioExternalDefinitions/keepAliveTimeout"
          },
          "connectTimeout" : {
            "$ref" : "#/gioExternalDefinitions/connectTimeout"
          },
          "pipelining" : {
            "$ref" : "#/gioExternalDefinitions/pipelining"
          },
          "readTimeout" : {
            "$ref" : "#/gioExternalDefinitions/readTimeout"
          },
          "useCompression" : {
            "$ref" : "#/gioExternalDefinitions/useCompression"
          },
          "propagateClientAcceptEncoding" : {
            "$ref" : "#/gioExternalDefinitions/propagateClientAcceptEncoding"
          },
          "propagateClientHost" : {
            "$ref" : "#/gioExternalDefinitions/propagateClientHost"
          },
          "idleTimeout" : {
            "$ref" : "#/gioExternalDefinitions/idleTimeout"
          },
          "followRedirects" : {
            "$ref" : "#/gioExternalDefinitions/followRedirects"
          },
          "maxConcurrentConnections" : {
            "$ref" : "#/gioExternalDefinitions/maxConcurrentConnections"
          }
        },
        "required" : [ "connectTimeout", "readTimeout", "idleTimeout", "maxConcurrentConnections" ],
        "additionalProperties" : false
      }, {
        "title" : "HTTP 2",
        "properties" : {
          "version" : {
            "const" : "HTTP_2"
          },
          "clearTextUpgrade" : {
            "$ref" : "#/gioExternalDefinitions/clearTextUpgrade"
          },
          "keepAlive" : {
            "$ref" : "#/gioExternalDefinitions/keepAlive"
          },
          "keepAliveTimeout" : {
            "$ref" : "#/gioExternalDefinitions/keepAliveTimeout"
          },
          "connectTimeout" : {
            "$ref" : "#/gioExternalDefinitions/connectTimeout"
          },
          "pipelining" : {
            "$ref" : "#/gioExternalDefinitions/pipelining"
          },
          "readTimeout" : {
            "$ref" : "#/gioExternalDefinitions/readTimeout"
          },
          "useCompression" : {
            "$ref" : "#/gioExternalDefinitions/useCompression"
          },
          "propagateClientAcceptEncoding" : {
            "$ref" : "#/gioExternalDefinitions/propagateClientAcceptEncoding"
          },
          "propagateClientHost" : {
            "$ref" : "#/gioExternalDefinitions/propagateClientHost"
          },
          "idleTimeout" : {
            "$ref" : "#/gioExternalDefinitions/idleTimeout"
          },
          "followRedirects" : {
            "$ref" : "#/gioExternalDefinitions/followRedirects"
          },
          "maxConcurrentConnections" : {
            "$ref" : "#/gioExternalDefinitions/maxConcurrentConnections"
          },
          "http2MultiplexingLimit" : {
            "$ref" : "#/gioExternalDefinitions/http2MultiplexingLimit"
          },
          "http2ConnectionWindowSize" : {
            "$ref" : "#/gioExternalDefinitions/http2ConnectionWindowSize"
          },
          "http2StreamWindowSize" : {
            "$ref" : "#/gioExternalDefinitions/http2StreamWindowSize"
          },
          "http2MaxFrameSize" : {
            "$ref" : "#/gioExternalDefinitions/http2MaxFrameSize"
          }
        },
        "required" : [ "connectTimeout", "readTimeout", "idleTimeout", "maxConcurrentConnections" ],
        "additionalProperties" : false
      } ]
    },
    "httpProxyOptions" : {
      "type" : "object",
      "title" : "Proxy Options",
      "oneOf" : [ {
        "title" : "No proxy",
        "properties" : {
          "enabled" : {
            "const" : false
          },
          "useSystemProxy" : {
            "const" : false
          }
        },
        "additionalProperties" : false
      }, {
        "title" : "Use proxy configured at system level",
        "properties" : {
          "enabled" : {
            "const" : true
          },
          "useSystemProxy" : {
            "const" : true
          }
        },
        "additionalProperties" : false
      }, {
        "title" : "Use proxy for client connections",
        "properties" : {
          "enabled" : {
            "const" : true
          },
          "useSystemProxy" : {
            "const" : false
          },
          "type" : {
            "type" : "string",
            "title" : "Proxy Type",
            "description" : "The type of the proxy",
            "default" : "HTTP",
            "enum" : [ "HTTP", "SOCKS4", "SOCKS5" ]
          },
          "host" : {
            "type" : "string",
            "title" : "Proxy host",
            "description" : "Proxy host to connect to.",
            "gioConfig" : {
              "el" : true
            }
          },
          "port" : {
            "type" : "integer",
            "title" : "Proxy port",
            "description" : "Proxy port to connect to"
          },
          "username" : {
            "type" : "string",
            "title" : "Proxy username",
            "description" : "Optional proxy username.",
            "gioConfig" : {
              "el" : true
            }
          },
          "password" : {
            "type" : "string",
            "title" : "Proxy password",
            "description" : "Optional proxy password.",
            "format" : "password",
            "gioConfig" : {
              "el" : true
            }
          }
        },
        "required" : [ "host", "port" ],
        "additionalProperties" : false
      } ]
    },
    "idleTimeout" : {
      "type" : "integer",
      "default" : 0,
      "minimum" : 0,
      "title" : "Idle timeout (ms)",
      "gioConfig" : {
        "banner" : {
          "title" : "Idle timeout",
          "text" : "Maximum time a TCP connection will stay active if no data is received or sent in milliseconds. Once the timeout has elapsed, the unused connection will be closed, allowing to free the associated resources. Zero means no timeout."
        }
      }
    },
    "keepAlive" : {
      "title" : "Enable keep-alive",
      "type" : "boolean",
      "default" : true,
      "gioConfig" : {
        "banner" : {
          "title" : "Enable keep-alive",
          "text" : "Use an HTTP persistent connection to send and receive multiple HTTP requests / responses."
        }
      }
    },
    "keepAliveTimeout" : {
      "type" : "integer",
      "title" : "Keep-alive timeout (ms)",
      "description" : "Maximum time a connection will remain unused in the pool in milliseconds. Once the timeout has elapsed, the unused connection will be evicted.",
      "default" : 30000
    },
    "maxConcurrentConnections" : {
      "type" : "integer",
      "title" : "Max Concurrent Connections",
      "description" : "Maximum pool size for connections.",
      "default" : 20
    },
    "pipelining" : {
      "title" : "Enable HTTP pipelining",
      "type" : "boolean",
      "default" : false,
      "gioConfig" : {
        "banner" : {
          "title" : "Enable HTTP pipelining",
          "text" : "When pipe-lining is enabled requests will be written to connections without waiting for previous responses to return"
        }
      }
    },
    "propagateClientAcceptEncoding" : {
      "title" : "Propagate client Accept-Encoding header",
      "description" : "Accept-Encoding can only be propagated if \"Enable compression\" is disabled.",
      "type" : "boolean",
      "default" : false,
      "gioConfig" : {
        "banner" : {
          "title" : "Propagate client Accept-Encoding header (no decompression if any)",
          "text" : "If the client request header includes a value for Accept-Encoding, the gateway will propagate it to the backend. The gateway will NEVER attempt to decompress the body content if the backend response is compressed (gzip, deflate). Therefore, transformation policies cannot be applied if the content body is compressed. If logging is enabled for the API, the compressed content body will be logged as is without any transformation applied. DO NOT activate this option if you plan to interact with body responses."
        },
        "disableIf" : {
          "$eq" : {
            "value.http.useCompression" : true
          }
        }
      }
    },
    "propagateClientHost" : {
      "title" : "Propagate client Host header",
      "type" : "boolean",
      "default" : false,
      "gioConfig" : {
        "banner" : {
          "title" : "Propagate client Host header",
          "text" : "<ul><li>If not activated (default), the Gateway uses the endpoint target host if the host header value of the original request is unchanged after policy execution else use changed value.</li><li>If activated, the host header propagated by the gateway to the backend is the value specified by the client request, possibly changed by the policies execution.</li></ul> <i>If the host header is null, the Gateway uses the endpoint target host.</i>"
        }
      }
    },
    "readIdleTimeout" : {
      "type" : "integer",
      "default" : 0,
      "minimum" : 0,
      "title" : "Read idle timeout (ms)",
      "description" : "This determines if a connection will timeout and be closed if no data is received within the timeout."
    },
    "readTimeout" : {
      "type" : "integer",
      "title" : "Read timeout (ms)",
      "description" : "Maximum time given to the backend to complete the request (including response) in milliseconds.",
      "default" : 10000
    },
    "reconnectAttempts" : {
      "type" : "integer",
      "default" : 3,
      "minimum" : 0,
      "title" : "Reconnect attempts",
      "description" : "How much we try connecting to the target, 0 means: no retry"
    },
    "reconnectInterval" : {
      "type" : "integer",
      "default" : 1000,
      "minimum" : 0,
      "title" : "Reconnect interval",
      "description" : "Interval in ms between retries connecting to the target"
    },
    "sslKeyStoreAlias" : {
      "type" : "string",
      "title" : "Alias for the key",
      "description" : "Alias of the key to use in case the key store contains more than one key",
      "gioConfig" : {
        "el" : true
      }
    },
    "sslKeyStoreCertContent" : {
      "type" : "string",
      "title" : "Certificate",
      "format" : "text",
      "gioConfig" : {
        "el" : true
      }
    },
    "sslKeyStoreCertPath" : {
      "type" : "string",
      "title" : "Path to cert file",
      "description" : "Path to cert file (.PEM)",
      "gioConfig" : {
        "el" : true
      }
    },
    "sslKeyStoreContent" : {
      "type" : "string",
      "title" : "Content",
      "description" : "Binary content as Base64",
      "format" : "text",
      "gioConfig" : {
        "el" : true
      }
    },
    "sslKeyStoreKeyContent" : {
      "type" : "string",
      "title" : "Private key",
      "format" : "text",
      "gioConfig" : {
        "el" : true
      }
    },
    "sslKeyStoreKeyPassword" : {
      "type" : "string",
      "title" : "Key Password",
      "description" : "Password to use to access the key when protected by password",
      "format" : "password",
      "gioConfig" : {
        "el" : true
      }
    },
    "sslKeyStoreKeyPath" : {
      "type" : "string",
      "title" : "Path to private key file",
      "description" : "Path to private key file (.PEM)",
      "gioConfig" : {
        "el" : true
      }
    },
    "sslKeyStorePassword" : {
      "type" : "string",
      "title" : "Password",
      "description" : "Password to use to open the key store",
      "format" : "password",
      "gioConfig" : {
        "el" : true
      }
    },
    "sslKeyStorePath" : {
      "type" : "string",
      "title" : "Path to key store",
      "description" : "Path to the key store file",
      "gioConfig" : {
        "el" : true
      }
    },
    "sslOptions" : {
      "type" : "object",
      "title" : "SSL Options",
      "properties" : {
        "hostnameVerifier" : {
          "$ref" : "#/gioExternalDefinitions/sslTrustStoreHostnameVerifier"
        },
        "trustAll" : {
          "$ref" : "#/gioExternalDefinitions/sslTrustStoreTrustAll"
        },
        "trustStore" : {
          "type" : "object",
          "title" : "Truststore",
          "oneOf" : [ {
            "type" : "object",
            "title" : "None",
            "properties" : {
              "type" : {
                "const" : ""
              }
            }
          }, {
            "type" : "object",
            "title" : "JKS with path",
            "properties" : {
              "type" : {
                "const" : "JKS"
              },
              "password" : {
                "$ref" : "#/gioExternalDefinitions/sslTrustStorePassword"
              },
              "path" : {
                "$ref" : "#/gioExternalDefinitions/sslTrustStorePath"
              }
            },
            "required" : [ "password", "path" ]
          }, {
            "type" : "object",
            "title" : "JKS with content",
            "properties" : {
              "type" : {
                "const" : "JKS"
              },
              "password" : {
                "$ref" : "#/gioExternalDefinitions/sslTrustStorePassword"
              },
              "content" : {
                "$ref" : "#/gioExternalDefinitions/sslTrustStoreContent"
              }
            },
            "required" : [ "password", "content" ]
          }, {
            "type" : "object",
            "title" : "PKCS#12 / PFX with path",
            "properties" : {
              "type" : {
                "const" : "PKCS12"
              },
              "password" : {
                "$ref" : "#/gioExternalDefinitions/sslTrustStorePassword"
              },
              "path" : {
                "$ref" : "#/gioExternalDefinitions/sslTrustStorePath"
              }
            },
            "required" : [ "password", "path" ]
          }, {
            "type" : "object",
            "title" : "PKCS#12 / PFX with content",
            "properties" : {
              "type" : {
                "const" : "PKCS12"
              },
              "password" : {
                "$ref" : "#/gioExternalDefinitions/sslTrustStorePassword"
              },
              "content" : {
                "$ref" : "#/gioExternalDefinitions/sslTrustStoreContent"
              }
            },
            "required" : [ "password", "content" ]
          }, {
            "type" : "object",
            "title" : "PEM with path",
            "properties" : {
              "type" : {
                "const" : "PEM"
              },
              "path" : {
                "$ref" : "#/gioExternalDefinitions/sslTrustStorePath"
              }
            },
            "required" : [ "path" ]
          }, {
            "type" : "object",
            "title" : "PEM with content",
            "properties" : {
              "type" : {
                "const" : "PEM"
              },
              "content" : {
                "$ref" : "#/gioExternalDefinitions/sslTrustStoreContent"
              }
            },
            "required" : [ "content" ]
          } ]
        },
        "keyStore" : {
          "type" : "object",
          "title" : "Key store",
          "oneOf" : [ {
            "type" : "object",
            "title" : "None",
            "properties" : {
              "type" : {
                "const" : ""
              }
            }
          }, {
            "type" : "object",
            "title" : "JKS with path",
            "properties" : {
              "type" : {
                "const" : "JKS"
              },
              "password" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStorePassword"
              },
              "alias" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStoreAlias"
              },
              "keyPassword" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStoreKeyPassword"
              },
              "path" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStorePath"
              }
            },
            "required" : [ "password", "path" ]
          }, {
            "type" : "object",
            "title" : "JKS with content",
            "properties" : {
              "type" : {
                "const" : "JKS"
              },
              "password" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStorePassword"
              },
              "alias" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStoreAlias"
              },
              "keyPassword" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStoreKeyPassword"
              },
              "content" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStoreContent"
              }
            },
            "required" : [ "password", "content" ]
          }, {
            "type" : "object",
            "title" : "PKCS#12 / PFX with path",
            "properties" : {
              "type" : {
                "const" : "PKCS12"
              },
              "password" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStorePassword"
              },
              "alias" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStoreAlias"
              },
              "keyPassword" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStoreKeyPassword"
              },
              "path" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStorePath"
              }
            },
            "required" : [ "password", "path" ]
          }, {
            "type" : "object",
            "title" : "PKCS#12 / PFX with content",
            "properties" : {
              "type" : {
                "const" : "PKCS12"
              },
              "password" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStorePassword"
              },
              "alias" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStoreAlias"
              },
              "keyPassword" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStoreKeyPassword"
              },
              "content" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStoreContent"
              }
            },
            "required" : [ "password", "content" ]
          }, {
            "type" : "object",
            "title" : "PEM with path",
            "properties" : {
              "type" : {
                "const" : "PEM"
              },
              "certPath" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStoreCertPath"
              },
              "keyPath" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStoreKeyPath"
              }
            },
            "required" : [ "certPath", "keyPath" ]
          }, {
            "type" : "object",
            "title" : "PEM with content",
            "properties" : {
              "type" : {
                "const" : "PEM"
              },
              "certContent" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStoreCertContent"
              },
              "keyContent" : {
                "$ref" : "#/gioExternalDefinitions/sslKeyStoreKeyContent"
              }
            },
            "required" : [ "certContent", "keyContent" ]
          } ]
        }
      }
    },
    "sslTrustStoreContent" : {
      "type" : "string",
      "title" : "Content",
      "description" : "Binary content as Base64",
      "format" : "text",
      "gioConfig" : {
        "el" : true
      }
    },
    "sslTrustStoreHostnameVerifier" : {
      "title" : "Verify Host",
      "description" : "Use to enable host name verification",
      "type" : "boolean",
      "default" : true
    },
    "sslTrustStorePassword" : {
      "type" : "string",
      "title" : "Password",
      "description" : "Truststore password",
      "format" : "password",
      "gioConfig" : {
        "banner" : {
          "title" : "SSL truststore password",
          "text" : "The password for the truststore file. If a password is not set, truststore file configured will still be used, but integrity checking is disabled. Truststore password is not supported for PEM format."
        }
      }
    },
    "sslTrustStorePath" : {
      "type" : "string",
      "title" : "Path to truststore",
      "description" : "Path to the truststore file",
      "gioConfig" : {
        "el" : true
      }
    },
    "sslTrustStoreTrustAll" : {
      "title" : "Trust all",
      "description" : "Use this with caution (if over Internet). The gateway must trust any origin certificates. The connection will still be encrypted but this mode is vulnerable to 'man in the middle' attacks.",
      "type" : "boolean",
      "default" : false
    },
    "tcpClientOptions" : {
      "title" : "TCP Client Options",
      "type" : "object",
      "javaType" : "io.gravitee.plugin.configurations.tcp.TcpClientOptions",
      "properties" : {
        "connectTimeout" : {
          "$ref" : "#/gioExternalDefinitions/connectTimeout"
        },
        "reconnectAttempts" : {
          "$ref" : "#/gioExternalDefinitions/reconnectAttempts"
        },
        "reconnectInterval" : {
          "$ref" : "#/gioExternalDefinitions/reconnectInterval"
        },
        "idleTimeout" : {
          "$ref" : "#/gioExternalDefinitions/idleTimeout"
        },
        "readIdleTimeout" : {
          "$ref" : "#/gioExternalDefinitions/readIdleTimeout"
        },
        "writeIdleTimeout" : {
          "$ref" : "#/gioExternalDefinitions/writeIdleTimeout"
        }
      }
    },
    "tcpProxyOptions" : {
      "type" : "object",
      "title" : "Proxy Options",
      "oneOf" : [ {
        "title" : "No proxy",
        "properties" : {
          "enabled" : {
            "const" : false
          },
          "useSystemProxy" : {
            "const" : false
          }
        },
        "additionalProperties" : false
      }, {
        "title" : "Use proxy configured at system level",
        "properties" : {
          "enabled" : {
            "const" : true
          },
          "useSystemProxy" : {
            "const" : true
          }
        },
        "additionalProperties" : false
      }, {
        "title" : "Use proxy for client connections",
        "properties" : {
          "enabled" : {
            "const" : true
          },
          "useSystemProxy" : {
            "const" : false
          },
          "type" : {
            "type" : "string",
            "title" : "Proxy Type",
            "description" : "The type of the proxy",
            "default" : "SOCKS5",
            "enum" : [ "SOCKS4", "SOCKS5" ]
          },
          "host" : {
            "type" : "string",
            "title" : "Proxy host",
            "description" : "Proxy host to connect to"
          },
          "port" : {
            "type" : "integer",
            "title" : "Proxy port",
            "description" : "Proxy port to connect to"
          },
          "username" : {
            "type" : "string",
            "title" : "Proxy username",
            "description" : "Optional proxy username"
          },
          "password" : {
            "type" : "string",
            "title" : "Proxy password",
            "description" : "Optional proxy password",
            "format" : "password"
          }
        },
        "required" : [ "host", "port" ],
        "additionalProperties" : false
      } ]
    },
    "tcpTarget" : {
      "title" : "Target server",
      "description" : "The target properties to use to contact the backend",
      "type" : "object",
      "properties" : {
        "host" : {
          "type" : "string",
          "title" : "Host",
          "description" : "Backend host to connect to, name or IP"
        },
        "port" : {
          "type" : "integer",
          "title" : "Port",
          "description" : "Backend port",
          "minimum" : 1,
          "maximum" : 65535
        },
        "secured" : {
          "type" : "boolean",
          "title" : "Is target secured",
          "description" : "Enable SSL to connect to target",
          "default" : false
        },
        "additionalProperties" : false
      },
      "required" : [ "host", "port", "secured" ]
    },
    "useCompression" : {
      "title" : "Enable compression (gzip, deflate)",
      "type" : "boolean",
      "default" : true,
      "gioConfig" : {
        "banner" : {
          "title" : "Enable compression (gzip, deflate)",
          "text" : "The gateway can let the remote http server know that it supports compression. In case the remote http server returns a compressed response, the gateway will decompress it. Leave that option off if you don't want compression between the gateway and the remote server."
        }
      }
    },
    "writeIdleTimeout" : {
      "type" : "integer",
      "default" : 0,
      "minimum" : 0,
      "title" : "Write idle timeout (ms)",
      "description" : "This determines if a connection will timeout and be closed if no data is sent within the timeout."
    }
  }
}