{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "#Network",
    "description": "A network, such as an aws-vpc, aws-subnet, cisco-meraki-vlan.",
    "type": "object",
    "allOf": [
        {
            "$ref": "#Entity"
        },
        {
            "properties": {
                "environment": {
                    "description": "The environment of network",
                    "type": "string",
                    "examples": [
                        "development",
                        "test",
                        "staging",
                        "production",
                        "private",
                        "wireless",
                        "guest",
                        "remote-access",
                        "administrative",
                        "other"
                    ]
                },
                "CIDR": {
                    "description": "The IPv4 network CIDR block (e.g. 0.0.0.0/0)",
                    "type": ["string", "null"],
                    "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}(/([0-9]|[1-2][0-9]|3[0-2]))?$"
                },
                "CIDRv6": {
                    "description": "The IPv6 network CIDR block (e.g. ::/0)",
                    "type": "string",
                    "format": "ipv6"
                },
                "public": {
                    "description": "Indicates if the network is publicly accessible.",
                    "type": ["boolean", "null"]
                },
                "internal": {
                    "description": "Indicates if this is an internal/private network.",
                    "type": ["boolean", "null"]
                },
                "wireless": {
                    "description": "Indicates if this is a wireless network.",
                    "type": "boolean"
                }
            },
            "required": ["CIDR", "public", "internal"]
        }
    ]
}
