{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "properties": {
        "pool": {
            "type": "object",
            "required": ["config_file_path", "tag"],
            "additionalProperties": false,
            "properties": {
                "expiry": {
                    "description": "Number of days after which the pooled scratch org will expire",
                    "type": "number"
                },
                "config_file_path": {
                    "description": "(Required) Path to the scratch org definition file",
                    "type": "string"
                },
                "script_file_path": {
                    "description": "Path to the Script file",
                    "type": "string"
                },
                "tag": {
                    "description": "(Required) Identifier for the pool created",
                    "type": "string"
                },
                "relax_all_ip_ranges": {
                    "description": "Relax all IP ranges",
                    "type": "boolean"
                },
                "alias_prefix": {
                    "description": "Identifier for the pool of scratch orgs created",
                    "type": "string"
                },
                "relax_ip_ranges": {
                    "type": "array",
                    "items": [
                        {
                            "type": "object",
                            "properties": {
                                "start": {
                                    "type": "string"
                                },
                                "end": {
                                    "type": "string"
                                }
                            }
                        }
                    ]
                },
                "max_allocation": {
                    "description": "(Required) Size of the pool, ignored if pool users are specified",
                    "type": "number"
                }
            }
        },
        "poolUsers": {
            "type": "array",
            "items": [
                {
                    "type": "object",
                    "required": ["max_allocation", "min_allocation", "username", "expiry", "priority"],
                    "additionalProperties": false,
                    "properties": {
                        "max_allocation": {
                            "type": "number"
                        },
                        "min_allocation": {
                            "type": "number"
                        },
                        "username": {
                            "type": "string"
                        },
                        "expiry": {
                            "type": "number"
                        },
                        "priority": {
                            "type": "number"
                        }
                    }
                }
            ]
        }
    }
}
