{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "targets": {
            "type": "array",
            "minItems": 1,
            "_uniqueItems": true,
            "items": {
                "$ref": "#/definitions/target"
            },
            "additionalItems": true
        }
    },
    "required": [
        "targets"
    ],
    "additionalProperties": false,
    "definitions": {
        "target": {
            "type": "object",
            "properties": {
                "type": {
                    "type": "string",
                    "enum": [
                        "aws"
                    ]
                },
                "options": {
                    "$ref": "#/definitions/optionsAws"
                },
                "strategy": {
                    "oneOf": [
                        {
                            "$ref": "#/definitions/strategyString"
                        },
                        {
                            "$ref": "#/definitions/strategyArray"
                        }
                    ]
                }
            },
            "required": [
                "type",
                "options",
                "strategy"
            ],
            "additionalProperties": false
        },
        "strategyString": {
            "type": "string",
            "enum": [
                "clone",
                "gzip",
                "gzip-suffix"
            ]
        },
        "strategyArray": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/strategyString"
            },
            "_uniqueItems": true,
            "minItems": 1
        },
        "optionsAws": {
            "type": "object",
            "properties": {
                "accessKeyId": {
                    "type": "string"
                },
                "secretAccessKey": {
                    "type": "string"
                },
                "region": {
                    "type": "string"
                },
                "sslEnabled": {
                    "type": "boolean"
                },
                "Bucket": {
                    "type": "string"
                }
            },
            "required": [
                "accessKeyId",
                "secretAccessKey",
                "region",
                "Bucket"
            ],
            "additionalProperties": true
        }
    }
}