{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Patch request schema for updating an existing endpoint.",
    "properties": {
        "attached_network_device": {
            "description": "Peer network device (switch) details. This cannot be an endpoint.",
            "properties": {
                "chassis_id": {
                    "anyOf": [
                        {
                            "description": "When the Chassis ID is a MAC address, use this format.",
                            "pattern": "^([0-9a-f]{2}-){5}([0-9a-f]{2})$",
                            "type": "string"
                        },
                        {
                            "description": "When the Chassis ID is anything other than a MAC address, a freeform string may be used.",
                            "pattern": "^.+$",
                            "type": "string"
                        }
                    ],
                    "description": "Matches the chassis_id of the peer network device. Where LLDP is implemented on the network device interfaces, the LLDP Chassis ID should match this value."
                },
                "port_id": {
                    "anyOf": [
                        {
                            "description": "When the Chassis ID is a MAC address, use this format.",
                            "pattern": "^([0-9a-f]{2}-){5}([0-9a-f]{2})$",
                            "type": "string"
                        },
                        {
                            "description": "When the Chassis ID is anything other than a MAC address, a freeform string may be used.",
                            "pattern": "^.+$",
                            "type": "string"
                        }
                    ],
                    "description": "Matches the port_id of the interface on the peer network device to which the endpoint is connected. Where LLDP is implemented on the network device interfaces, the LLDP Port ID should match this value."
                }
            },
            "required": [
                "chassis_id",
                "port_id"
            ],
            "type": "object"
        },
        "ip_address": {
            "anyOf": [
                {
                    "format": "ipv4"
                },
                {
                    "format": "ipv6"
                }
            ],
            "description": "IP address on which the endpoint sends/receives flows. IP address must be unique in the network.",
            "type": "string"
        },
        "label": {
            "description": "Freeform string label for the endpoint",
            "type": "string"
        },
        "max_bandwidth": {
            "description": "Maximum bandwidth that the sender is allowed to send, formatted as a number followed by kbit/s, Mbit/s, Gbit/s. NB: Values should be formatted with no fraction component if possible, using the largest unit that allows that.",
            "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]+)?[kMG]bit\\/s$",
            "type": "string"
        },
        "role": {
            "description": "The role of the endpoint as a sender or receiver.",
            "enum": [
                "sender",
                "receiver",
                "both"
            ],
            "type": "string"
        }
    },
    "title": "Schema to modify an endpoint with new values.",
    "type": "object"
}
