{
    "oneOf": [
        {
            "title": "MobilityProcedureSubscription",
            "required": [
                "filterCriteria",
                "subscriptionType"
            ],
            "type": "object",
            "properties": {
                "_links": {
                    "title": "MobilityProcedureSubscription.links",
                    "required": [
                        "self"
                    ],
                    "type": "object",
                    "properties": {
                        "self": {
                            "title": "LinkType",
                            "required": [
                                "href"
                            ],
                            "type": "object",
                            "properties": {
                                "href": {
                                    "type": "string",
                                    "description": "The URI referring to the subscription."
                                }
                            },
                            "description": "'This data type represents a type of link'"
                        }
                    }
                },
                "callbackReference": {
                    "type": "string",
                    "format": "uri",
                    "description": "URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service. This shall be included both in the request and in response."
                },
                "requestTestNotification": {
                    "type": "boolean",
                    "description": "Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, specified in ETSI GS MEC 009, as described in clause 6.12a."
                },
                "websockNotifConfig": {
                    "description": "Provides details to negotiate and signal the use of a Websocket connection between AMS and the service consumer for notifications.",
                    "type": "object",
                    "properties": {
                        "websocketUri": {
                            "description": "Set by AMS to indicate to the service consumer the Websocket URI to be used for delivering notifications.",
                            "type": "string",
                            "format": "uri"
                        },
                        "requestWebsocketUri": {
                            "type": "boolean",
                            "description": "Set to true by the service consumer to indicate that Websocket delivery is requested."
                        }
                    }
                },
                "expiryDeadline": {
                    "description": "Identifies a boundary after which the subscription will expire.",
                    "title": "TimeStamp",
                    "required": [
                        "seconds",
                        "nanoSeconds"
                    ],
                    "type": "object",
                    "properties": {
                        "seconds": {
                            "type": "integer",
                            "description": "'The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.'",
                            "contentEncoding": "int32"
                        },
                        "nanoSeconds": {
                            "type": "integer",
                            "description": "'The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.'",
                            "contentEncoding": "int32"
                        }
                    }
                },
                "filterCriteria": {
                    "title": "MobilityProcedureSubscription.filterCriteria",
                    "type": "object",
                    "properties": {
                        "appInstanceId": {
                            "type": "string",
                            "description": "Identifier of the application instance that registers the Application Mobility Service."
                        },
                        "associateId": {
                            "type": "array",
                            "items": {
                                "title": "AssociateId",
                                "required": [
                                    "type",
                                    "value"
                                ],
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "title": "Type",
                                        "enum": [
                                            "UE_IPv4_ADDRESS",
                                            "UE_IPV6_ADDRESS",
                                            "NATED_IP_ADDRESS",
                                            "GTP_TEID"
                                        ],
                                        "type": "string",
                                        "description": "Numeric value (0-255) corresponding to specified type of identifier",
                                        "examples": [
                                            "UE_IPv4_ADDRESS"
                                        ]
                                    },
                                    "value": {
                                        "type": "string",
                                        "description": "Value for the identifier."
                                    }
                                }
                            },
                            "description": "0 to N identifiers to associate the information for specific UE(s) and flow(s)."
                        },
                        "mobilityStatus": {
                            "type": "array",
                            "items": {
                                "title": "MobilityStatus",
                                "enum": [
                                    "INTERHOST_MOVEOUT_TRIGGERED",
                                    "INTERHOST_MOVEOUT_COMPLETED",
                                    "INTERHOST_MOVEOUT_FAILED"
                                ],
                                "type": "string",
                                "description": "Indicate the status of the UE mobility",
                                "examples": [
                                    "INTERHOST_MOVEOUT_TRIGGERED"
                                ]
                            },
                            "description": "In case mobilityStatus is not included in the subscription request, the default value 1 = INTER_HOST_MOBILITY_TRIGGERED shall be used and included in the response."
                        }
                    },
                    "description": "List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response."
                },
                "subscriptionType": {
                    "const": "MobilityProcedureSubscription",
                    "type": "string",
                    "description": "Shall be set to \"MobilityProcedureSubscription\".",
                    "examples": [
                        "MobilityProcedureSubscription"
                    ]
                }
            }
        },
        {
            "title": "AdjacentAppInfoSubscription",
            "required": [
                "callbackReference",
                "filterCriteria",
                "subscriptionType"
            ],
            "type": "object",
            "properties": {
                "_links": {
                    "title": "AdjacentAppInfoSubscription.links",
                    "required": [
                        "self"
                    ],
                    "type": "object",
                    "properties": {
                        "self": {
                            "title": "LinkType",
                            "required": [
                                "href"
                            ],
                            "type": "object",
                            "properties": {
                                "href": {
                                    "type": "string",
                                    "description": "The URI referring to the subscription."
                                }
                            },
                            "description": "'This data type represents a type of link'"
                        }
                    },
                    "description": "Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests."
                },
                "callbackReference": {
                    "type": "string",
                    "format": "uri",
                    "description": "URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service. This shall be included both in the request and in response."
                },
                "requestTestNotification": {
                    "type": "boolean",
                    "description": "Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, specified in ETSI GS MEC 009, as described in clause 6.12a."
                },
                "websockNotifConfig": {
                    "type": "object",
                    "properties": {
                        "websocketUri": {
                            "description": "Set by AMS to indicate to the service consumer the Websocket URI to be used for delivering notifications.",
                            "type": "string",
                            "format": "uri"
                        },
                        "requestWebsocketUri": {
                            "type": "boolean",
                            "description": "Set to true by the service consumer to indicate that Websocket delivery is requested."
                        }
                    }
                },
                "expiryDeadline": {
                    "description": "Identifies a boundary after which the subscription will expire.",
                    "title": "TimeStamp",
                    "required": [
                        "seconds",
                        "nanoSeconds"
                    ],
                    "type": "object",
                    "properties": {
                        "seconds": {
                            "type": "integer",
                            "description": "'The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.'",
                            "contentEncoding": "int32"
                        },
                        "nanoSeconds": {
                            "type": "integer",
                            "description": "'The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.'",
                            "contentEncoding": "int32"
                        }
                    }
                },
                "filterCriteria": {
                    "title": "AdjacentAppInfoSubscription.filterCriteria",
                    "type": "object",
                    "properties": {
                        "appInstanceId": {
                            "type": "string"
                        }
                    },
                    "description": "List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response."
                },
                "subscriptionType": {
                    "const": "AdjacentAppInfoSubscription",
                    "type": "string",
                    "description": "Shall be set to \"AdjacentAppInfoSubscription\".",
                    "examples": [
                        "AdjacentAppInfoSubscription"
                    ]
                }
            }
        }
    ],
    "contentMediaType": "application/json"
}