{
  "allOf": [
    {
      "$ref": "definitions.json#/rootOption"
    },
    {
      "$ref": "definitions.json#/option"
    },
    {
      "$ref": "definitions.json#/host"
    },
    {
      "$ref": "definitions.json#/sftp"
    },
    {
      "type": "object",
      "properties": {
        "protocol": {
          "enum": ["sftp"],
          "description": "sftp connection protocol."
        },
        "hop": {
          "oneOf": [
            {
              "$ref": "#/definitions/hop"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/definitions/hop"
              }
            }
          ],
          "default": {
            "host": "bridgeHost",
            "port": "bridgePort"
          }
        },
        "profiles": {
          "description": "A collection of profiles. Using key as name. The profile will be merge to top level config.",
          "patternProperties": {
            "^.*$": {
              "allOf": [
                {
                  "$ref": "definitions.json#/option"
                },
                {
                  "$ref": "definitions.json#/host"
                },
                {
                  "$ref": "definitions.json#/sftp"
                }
              ]
            }
          },
          "default": {
            "profileName": {}
          }
        }
      }
    }
  ],
  "definitions": {
    "hop": {
      "allOf": [
        {
          "$ref": "definitions.json#/host"
        },
        {
          "$ref": "definitions.json#/sftp"
        }
      ]
    }
  }
}
