{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "fit-tmf622.schema.json",
    "title": "Product Order Object",
    "$ref": "#/$defs/oneOf",
    "$defs": {
        "oneOf": {
            "oneOf": [
                {
                    "$ref": "#/$defs/ProductOrder_FVO"
                },
                {
                    "$ref": "#/$defs/Event"
                },
                {
                    "$ref": "#/$defs/TaskResource_FVO"
                },
                {
                    "$ref": "#/$defs/TaskResource"
                }
            ]
        },
        "ProductOrder_FVO": {
            "allOf": [
                {
                    "$ref": "fit-core.schema.json#/$defs/Extensible_FVO"
                },
                {
                    "type": "object",
                    "required": [
                        "productOrderItem",
                        "category",
                        "orderPostedDate"
                    ],
                    "properties": {
                        "category": {
                            "type": "string",
                            "enum": [
                                "new",
                                "productChange",
                                "technologyChange",
                                "productModification",
                                "terminationByBuyer",
                                "terminationBySeller",
                                "providerChange",
                                "providerTechnologyChange",
                                "terminationProviderChange",
                                "portChange",
                                "connectivityWithActivation",
                                "connectivityNoActivation",
                                "notConnected"
                            ],
                            "description": "Used to categorize the order from a business perspective",
                            "example": "new"
                        },
                        "description": {
                            "type": "string",
                            "description": "Description of the product order",
                            "minLength": 1,
                            "maxLength": 255
                        },
                        "orderPostedDate": {
                            "type": "string",
                            "description": "Date when the order request was created/posted",
                            "format": "date-time",
                            "example": "2024-05-11T10:31:00+02:00"
                        },
                        "priority": {
                            "type": "string",
                            "description": "A way that can be used by consumers to prioritize orders in OM system (from 0 to 4 : 0 is the highest priority, and 4 the lowest)",
                            "minLength": 1,
                            "maxLength": 10
                        },
                        "requestedCompletionDate": {
                            "description": "Expected completion date amended by the provider",
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-05-11T10:31:00+02:00"
                        },
                        "externalId": {
                            "type": "array",
                            "description": "A reference to an externally defined object in the context of the product order",
                            "minItems": 1,
                            "items": {
                                "$ref": "fit-common.schema.json#/$defs/ExternalIdentifier"
                            }
                        },
                        "billingAccount": {
                            "$ref": "#/$defs/BillingAccountRef"
                        },
                        "note": {
                            "type": "array",
                            "items": {
                                "$ref": "fit-common.schema.json#/$defs/Note"
                            }
                        },
                        "productOfferingQualification": {
                            "type": "array",
                            "items": {
                                "$ref": "#/$defs/ProductOfferingQualificationRef"
                            }
                        },
                        "relatedParty": {
                            "type": "array",
                            "items": {
                                "$ref": "fit-common.schema.json#/$defs/RelatedPartyOrPartyRole"
                            }
                        },
                        "attachment": {
                            "type": "array",
                            "items": {
                                "$ref": "fit-common.schema.json#/$defs/AttachmentRefOrValue"
                            }
                        },
                        "productOrderRelationship": {
                            "type": "array",
                            "items": {
                                "$ref": "#/$defs/ProductOrderRelationship"
                            }
                        },
                        "additionalOrderInformation": {
                            "$ref": "#/$defs/AdditionalOrderInformation"
                        }
                    },
                    "allOf": [
                        {
                            "properties": {
                                "relatedParty": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "partyOrPartyRole": {
                                                "type": "object",
                                                "properties": {
                                                    "contactMedium": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "oneOf": [
                                                                {
                                                                    "properties": {
                                                                        "@type": {
                                                                            "type": "string",
                                                                            "const": "PhoneContactMedium"
                                                                        },
                                                                        "contactType": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                                "fixed",
                                                                                "mobile"
                                                                            ]
                                                                        },
                                                                        "phoneNumber": {
                                                                            "type": "string",
                                                                            "minLength": 1,
                                                                            "maxLength": 30
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "contactType",
                                                                        "phoneNumber"
                                                                    ]
                                                                },
                                                                {
                                                                    "properties": {
                                                                        "@type": {
                                                                            "type": "string",
                                                                            "const": "EmailContactMedium"
                                                                        },
                                                                        "contactType": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                                "email"
                                                                            ]
                                                                        },
                                                                        "emailAddress": {
                                                                            "type": "string",
                                                                            "minLength": 1,
                                                                            "maxLength": 255
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "contactType",
                                                                        "emailAddress"
                                                                    ]
                                                                },
                                                                {
                                                                    "properties": {
                                                                        "@type": {
                                                                            "type": "string",
                                                                            "const": "PostalAddressContactMedium"
                                                                        },
                                                                        "contactType": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                                "postal"
                                                                            ]
                                                                        },
                                                                        "city": {
                                                                            "type": "string",
                                                                            "minLength": 1,
                                                                            "maxLength": 40
                                                                        },
                                                                        "country": {
                                                                            "type": "string",
                                                                            "minLength": 1,
                                                                            "maxLength": 2
                                                                        },
                                                                        "locality": {
                                                                            "type": "string",
                                                                            "minLength": 1,
                                                                            "maxLength": 40
                                                                        },
                                                                        "postcode": {
                                                                            "type": "string",
                                                                            "minLength": 1,
                                                                            "maxLength": 6
                                                                        },
                                                                        "streetName": {
                                                                            "type": "string",
                                                                            "minLength": 1,
                                                                            "maxLength": 40
                                                                        },
                                                                        "streetNr": {
                                                                            "type": "string",
                                                                            "minLength": 1,
                                                                            "maxLength": 4
                                                                        },
                                                                        "streetNrSuffix": {
                                                                            "type": "string",
                                                                            "minLength": 1,
                                                                            "maxLength": 6
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "contactType",
                                                                        "city",
                                                                        "postcode",
                                                                        "streetName",
                                                                        "streetNr"
                                                                    ]
                                                                }
                                                            ]
                                                        }
                                                    }
                                                },
                                                "oneOf": [
                                                    {
                                                        "properties": {
                                                            "@type": {
                                                                "type": "string",
                                                                "const": "Individual"
                                                            },
                                                            "familyName": {
                                                                "type": "string",
                                                                "minLength": 1,
                                                                "maxLength": 30
                                                            },
                                                            "givenName": {
                                                                "type": "string",
                                                                "minLength": 1,
                                                                "maxLength": 30
                                                            },
                                                            "salutation": {
                                                                "type": "string",
                                                                "minLength": 1,
                                                                "maxLength": 30,
                                                                "description": "Recommendation: use Herr, Frau or keine Anrede"
                                                            }
                                                        },
                                                        "required": [
                                                            "familyName",
                                                            "salutation"
                                                        ]
                                                    },
                                                    {
                                                        "properties": {
                                                            "@type": {
                                                                "type": "string",
                                                                "const": "Organization"
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "minLength": 1,
                                                                "maxLength": 60
                                                            }
                                                        },
                                                        "required": [
                                                            "name"
                                                        ]
                                                    }
                                                ]
                                            }
                                        },
                                        "oneOf": [
                                            {
                                                "properties": {
                                                    "role": {
                                                        "enum": [
                                                            "installationContact",
                                                            "technicalContact",
                                                            "ownerInstallationContact",
                                                            "orderManagementSellerContact",
                                                            "orderManagementBuyerContact"
                                                        ]
                                                    },
                                                    "partyOrPartyRole": {
                                                        "type": "object",
                                                        "properties": {
                                                            "contactMedium": {
                                                                "type": "array",
                                                                "contains": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "@type": {
                                                                            "type": "string",
                                                                            "const": "PhoneContactMedium"
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        },
                                                        "required": [
                                                            "contactMedium"
                                                        ]
                                                    }
                                                }
                                            },
                                            {
                                                "properties": {
                                                    "role": {
                                                        "const": "ownerAdministrationContact"
                                                    },
                                                    "partyOrPartyRole": {
                                                        "type": "object",
                                                        "properties": {
                                                            "contactMedium": {
                                                                "type": "array",
                                                                "allOf": [
                                                                    {
                                                                        "contains": {
                                                                            "type": "object",
                                                                            "properties": {
                                                                                "@type": {
                                                                                    "type": "string",
                                                                                    "const": "EmailContactMedium"
                                                                                }
                                                                            },
                                                                            "required": [
                                                                                "@type"
                                                                            ]
                                                                        }
                                                                    },
                                                                    {
                                                                        "contains": {
                                                                            "type": "object",
                                                                            "properties": {
                                                                                "@type": {
                                                                                    "type": "string",
                                                                                    "const": "PostalAddressContactMedium"
                                                                                }
                                                                            },
                                                                            "required": [
                                                                                "@type"
                                                                            ]
                                                                        }
                                                                    }
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "contactMedium"
                                                        ]
                                                    }
                                                }
                                            },
                                            {
                                                "properties": {
                                                    "role": {
                                                        "enum": [
                                                            "deliveryContact"
                                                        ]
                                                    },
                                                    "partyOrPartyRole": {
                                                        "type": "object",
                                                        "properties": {
                                                            "contactMedium": {
                                                                "type": "array",
                                                                "contains": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "@type": {
                                                                            "type": "string",
                                                                            "const": "PostalAddressContactMedium"
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        },
                                                        "required": [
                                                            "contactMedium"
                                                        ]
                                                    }
                                                }
                                            },
                                            {
                                                "properties": {
                                                    "role": {
                                                        "enum": [
                                                            "locationAContact",
                                                            "handingOverProvider",
                                                            "receivingProvider",
                                                            "subcontractor"
                                                        ]
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                },
                                "productOrderItem": {
                                    "allOf": [
                                        {
                                            "minItems": 1,
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/$defs/ProductOrderItem"
                                            }
                                        },
                                        {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "product": {
                                                        "properties": {
                                                            "relatedPlace": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "role": {
                                                                            "enum": [
                                                                                "locationA",
                                                                                "locationB",
                                                                                "alternateAddress"
                                                                            ]
                                                                        }
                                                                    },
                                                                    "oneOf": [
                                                                        {
                                                                            "properties": {
                                                                                "place": {
                                                                                    "type": "object",
                                                                                    "properties": {
                                                                                        "@type": {
                                                                                            "const": "GeographicAddress"
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "properties": {
                                                                                "place": {
                                                                                    "type": "object",
                                                                                    "properties": {
                                                                                        "@type": {
                                                                                            "const": "GeographicSite"
                                                                                        },
                                                                                        "geographicSiteCharacteristic": {
                                                                                            "type": "array",
                                                                                            "items": {
                                                                                                "type": "object",
                                                                                                "required": [
                                                                                                    "name",
                                                                                                    "value"
                                                                                                ]
                                                                                            }
                                                                                        }
                                                                                    },
                                                                                    "required": [
                                                                                        "geographicSiteCharacteristic",
                                                                                        "place"
                                                                                    ]
                                                                                }
                                                                            }
                                                                        },
                                                                        {
                                                                            "properties": {
                                                                                "place": {
                                                                                    "type": "object",
                                                                                    "properties": {
                                                                                        "@type": {
                                                                                            "const": "PlaceRef"
                                                                                        },
                                                                                        "@referredType": {
                                                                                            "const": "GeographicAddress"
                                                                                        }
                                                                                    },
                                                                                    "required": [
                                                                                        "id",
                                                                                        "@referredType"
                                                                                    ]
                                                                                }
                                                                            }
                                                                        }
                                                                    ]
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    ]
                                },
                                "agreement": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "engagedParty": {
                                                "type": "array",
                                                "minItems": 0,
                                                "maxItems": 1,
                                                "items": {
                                                    "type": "object",
                                                    "properties": {
                                                        "@type": {
                                                            "type": "string",
                                                            "const": "Organization"
                                                        },
                                                        "businessId": {
                                                            "description": "A business relevant identifier when different from the technical identifier documented with the .id property",
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "maxLength": 40,
                                                            "example": "1234"
                                                        }
                                                    },
                                                    "required": [
                                                        "businessId"
                                                    ]
                                                }
                                            }
                                        }
                                    }
                                },
                                "externalId": {
                                    "type": "array",
                                    "contains": {
                                        "type": "object",
                                        "properties": {
                                            "externalIdentifierType": {
                                                "type": "string",
                                                "const": "externalOrderId"
                                            }
                                        }
                                    },
                                    "maxContains": 1
                                }
                            }
                        },
                        {
                            "if": {
                                "properties": {
                                    "category": {
                                        "enum": [
                                            "new",
                                            "connectivityWithActivation",
                                            "connectivityNoActivation",
                                            "notConnected"
                                        ]
                                    }
                                }
                            },
                            "then": {
                                "properties": {
                                    "productOfferingQualification": {
                                        "maxItems": 1,
                                        "type": "array",
                                        "items": {
                                            "$ref": "#/$defs/ProductOfferingQualificationRef"
                                        }
                                    },
                                    "productOrderItem": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "action": {
                                                    "const": "add"
                                                },
                                                "product": {
                                                    "type": "object",
                                                    "required": [
                                                        "relatedPlace"
                                                    ]
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        {
                            "if": {
                                "properties": {
                                    "category": {
                                        "not": {
                                            "enum": [
                                                "connectivityWithActivation",
                                                "connectivityNoActivation",
                                                "notConnected"
                                            ]
                                        }
                                    }
                                }
                            },
                            "then": {
                                "required": [
                                    "requestedCompletionDate"
                                ]
                            }
                        },
                        {
                            "if": {
                                "properties": {
                                    "category": {
                                        "const": "new"
                                    },
                                    "productOrderItem": {
                                        "type": "array",
                                        "contains": {
                                            "type": "object",
                                            "properties": {
                                                "product": {
                                                    "properties": {
                                                        "@type": {
                                                            "enum": [
                                                                "HvtLocalLoopProduct",
                                                                "KvzLocalLoopProduct"
                                                            ]
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            },
                            "then": {
                                "properties": {
                                    "productOrderItem": {
                                        "type": "array",
                                        "contains": {
                                            "type": "object",
                                            "properties": {
                                                "product": {
                                                    "properties": {
                                                        "@type": {
                                                            "enum": [
                                                                "HvtLocalLoopProduct",
                                                                "KvzLocalLoopProduct"
                                                            ]
                                                        },
                                                        "relatedPlace": {
                                                            "type": "array",
                                                            "minItems": 2,
                                                            "maxItems": 2,
                                                            "allOf": [
                                                                {
                                                                    "contains": {
                                                                        "type": "object",
                                                                        "properties": {
                                                                            "role": {
                                                                                "const": "locationA"
                                                                            }
                                                                        }
                                                                    }
                                                                },
                                                                {
                                                                    "contains": {
                                                                        "type": "object",
                                                                        "properties": {
                                                                            "role": {
                                                                                "const": "locationB"
                                                                            },
                                                                            "place": {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                    "@type": {
                                                                                        "const": "GeographicSite"
                                                                                    },
                                                                                    "geographicSiteCharacteristic": {
                                                                                        "type": "array",
                                                                                        "allOf": [
                                                                                            {
                                                                                                "contains": {
                                                                                                    "type": "object",
                                                                                                    "properties": {
                                                                                                        "name": {
                                                                                                            "type": "string",
                                                                                                            "const": "national_destination_code"
                                                                                                        },
                                                                                                        "value": {
                                                                                                            "type": "string",
                                                                                                            "pattern": "^[1-9][0-9]{1,4}$"
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            },
                                                                                            {
                                                                                                "contains": {
                                                                                                    "type": "object",
                                                                                                    "properties": {
                                                                                                        "name": {
                                                                                                            "type": "string",
                                                                                                            "const": "local_exchange_area"
                                                                                                        },
                                                                                                        "value": {
                                                                                                            "type": "string",
                                                                                                            "pattern": "^[1-9][0-9]{0,3}$"
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        ]
                                                                                    },
                                                                                    "place": {
                                                                                        "type": "array",
                                                                                        "minItems": 1,
                                                                                        "maxItems": 1
                                                                                    }
                                                                                },
                                                                                "required": [
                                                                                    "geographicSiteCharacteristic",
                                                                                    "place"
                                                                                ]
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            ]
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        {
                            "if": {
                                "properties": {
                                    "category": {
                                        "const": "new"
                                    },
                                    "productOrderItem": {
                                        "type": "array",
                                        "contains": {
                                            "type": "object",
                                            "properties": {
                                                "product": {
                                                    "properties": {
                                                        "@type": {
                                                            "enum": [
                                                                "BitstreamAccessProduct"
                                                            ]
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            },
                            "then": {
                                "properties": {
                                    "productOrderItem": {
                                        "type": "array",
                                        "contains": {
                                            "type": "object",
                                            "properties": {
                                                "product": {
                                                    "properties": {
                                                        "@type": {
                                                            "enum": [
                                                                "BitstreamAccessProduct"
                                                            ]
                                                        },
                                                        "relatedPlace": {
                                                            "type": "array",
                                                            "minItems": 1,
                                                            "maxItems": 1,
                                                            "contains": {
                                                                "allOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "properties": {
                                                                            "role": {
                                                                                "const": "locationA"
                                                                            }
                                                                        }
                                                                    }
                                                                ]
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        {
                            "if": {
                                "properties": {
                                    "category": {
                                        "const": "new"
                                    },
                                    "productOrderItem": {
                                        "type": "array",
                                        "contains": {
                                            "type": "object",
                                            "properties": {
                                                "product": {
                                                    "properties": {
                                                        "@type": {
                                                            "enum": [
                                                                "OpticalAccessLineProduct"
                                                            ]
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            },
                            "then": {
                                "properties": {
                                    "productOrderItem": {
                                        "type": "array",
                                        "contains": {
                                            "type": "object",
                                            "properties": {
                                                "product": {
                                                    "properties": {
                                                        "@type": {
                                                            "enum": [
                                                                "OpticalAccessLineProduct"
                                                            ]
                                                        },
                                                        "relatedPlace": {
                                                            "type": "array",
                                                            "minItems": 1,
                                                            "maxItems": 2,
                                                            "contains": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "role": {
                                                                        "const": "locationA"
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        {
                            "if": {
                                "properties": {
                                    "category": {
                                        "type": "string",
                                        "enum": [
                                            "terminationByBuyer",
                                            "terminationBySeller",
                                            "terminationProviderChange"
                                        ]
                                    }
                                }
                            },
                            "then": {
                                "properties": {
                                    "productOrderItem": {
                                        "allOf": [
                                            {
                                                "type": "array",
                                                "items": {
                                                    "type": "object",
                                                    "properties": {
                                                        "action": {
                                                            "const": "delete"
                                                        }
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                }
                            }
                        },
                        {
                            "if": {
                                "properties": {
                                    "category": {
                                        "const": "productModification"
                                    }
                                }
                            },
                            "then": {
                                "properties": {
                                    "productOrderItem": {
                                        "oneOf": [
                                            {
                                                "allOf": [
                                                    {
                                                        "minItems": 1,
                                                        "maxItems": 1,
                                                        "type": "array",
                                                        "items": {
                                                            "$ref": "#/$defs/ProductOrderItem"
                                                        }
                                                    },
                                                    {
                                                        "type": "array",
                                                        "contains": {
                                                            "type": "object",
                                                            "properties": {
                                                                "action": {
                                                                    "const": "modify"
                                                                }
                                                            }
                                                        }
                                                    }
                                                ]
                                            },
                                            {
                                                "allOf": [
                                                    {
                                                        "minItems": 2,
                                                        "type": "array",
                                                        "items": {
                                                            "$ref": "#/$defs/ProductOrderItem"
                                                        }
                                                    },
                                                    {
                                                        "type": "array",
                                                        "contains": {
                                                            "type": "object",
                                                            "properties": {
                                                                "action": {
                                                                    "const": "nochange"
                                                                }
                                                            }
                                                        }
                                                    },
                                                    {
                                                        "type": "array",
                                                        "contains": {
                                                            "type": "object",
                                                            "properties": {
                                                                "action": {
                                                                    "enum": [
                                                                        "add",
                                                                        "delete"
                                                                    ]
                                                                }
                                                            }
                                                        }
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                }
                            }
                        },
                        {
                            "if": {
                                "properties": {
                                    "category": {
                                        "const": "productModification"
                                    },
                                    "productOrderItem": {
                                        "type": "array",
                                        "contains": {
                                            "type": "object",
                                            "properties": {
                                                "product": {
                                                    "properties": {
                                                        "@type": {
                                                            "enum": [
                                                                "HvtLocalLoopProduct",
                                                                "KvzLocalLoopProduct"
                                                            ]
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            },
                            "then": {
                                "properties": {
                                    "productOrderItem": {
                                        "type": "array",
                                        "contains": {
                                            "type": "object",
                                            "properties": {
                                                "product": {
                                                    "properties": {
                                                        "@type": {
                                                            "enum": [
                                                                "HvtLocalLoopProduct",
                                                                "KvzLocalLoopProduct"
                                                            ]
                                                        },
                                                        "relatedPlace": {
                                                            "type": "array",
                                                            "contains": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "role": {
                                                                        "const": "locationB"
                                                                    },
                                                                    "place": {
                                                                        "type": "object",
                                                                        "properties": {
                                                                            "@type": {
                                                                                "const": "GeographicSite"
                                                                            },
                                                                            "geographicSiteCharacteristic": {
                                                                                "type": "array",
                                                                                "allOf": [
                                                                                    {
                                                                                        "contains": {
                                                                                            "type": "object",
                                                                                            "properties": {
                                                                                                "name": {
                                                                                                    "type": "string",
                                                                                                    "const": "national_destination_code"
                                                                                                },
                                                                                                "value": {
                                                                                                    "type": "string",
                                                                                                    "pattern": "^[1-9][0-9]{1,4}$"
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    },
                                                                                    {
                                                                                        "contains": {
                                                                                            "type": "object",
                                                                                            "properties": {
                                                                                                "name": {
                                                                                                    "type": "string",
                                                                                                    "const": "local_exchange_area"
                                                                                                },
                                                                                                "value": {
                                                                                                    "type": "string",
                                                                                                    "pattern": "^[1-9][0-9]{0,3}$"
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                ]
                                                                            },
                                                                            "place": {
                                                                                "type": "array",
                                                                                "minItems": 1,
                                                                                "maxItems": 1
                                                                            }
                                                                        },
                                                                        "required": [
                                                                            "geographicSiteCharacteristic",
                                                                            "place"
                                                                        ]
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "relatedPlace"
                                                    ]
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        {
                            "if": {
                                "properties": {
                                    "category": {
                                        "const": "portChange"
                                    }
                                }
                            },
                            "then": {
                                "properties": {
                                    "productOrderItem": {
                                        "allOf": [
                                            {
                                                "minItems": 1,
                                                "maxItems": 1,
                                                "type": "array",
                                                "items": {
                                                    "$ref": "#/$defs/ProductOrderItem"
                                                }
                                            },
                                            {
                                                "type": "array",
                                                "contains": {
                                                    "type": "object",
                                                    "properties": {
                                                        "action": {
                                                            "const": "modify"
                                                        },
                                                        "product": {
                                                            "properties": {
                                                                "relatedPlace": {
                                                                    "type": "array",
                                                                    "contains": {
                                                                        "type": "object",
                                                                        "properties": {
                                                                            "role": {
                                                                                "const": "locationB"
                                                                            },
                                                                            "place": {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                    "@type": {
                                                                                        "const": "GeographicSite"
                                                                                    },
                                                                                    "geographicSiteCharacteristic": {
                                                                                        "type": "array",
                                                                                        "allOf": [
                                                                                            {
                                                                                                "contains": {
                                                                                                    "type": "object",
                                                                                                    "properties": {
                                                                                                        "name": {
                                                                                                            "type": "string",
                                                                                                            "const": "national_destination_code"
                                                                                                        },
                                                                                                        "value": {
                                                                                                            "type": "string",
                                                                                                            "pattern": "^[1-9][0-9]{1,4}$"
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            },
                                                                                            {
                                                                                                "contains": {
                                                                                                    "type": "object",
                                                                                                    "properties": {
                                                                                                        "name": {
                                                                                                            "type": "string",
                                                                                                            "const": "local_exchange_area"
                                                                                                        },
                                                                                                        "value": {
                                                                                                            "type": "string",
                                                                                                            "pattern": "^[1-9][0-9]{0,3}$"
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        ]
                                                                                    },
                                                                                    "place": {
                                                                                        "type": "array",
                                                                                        "minItems": 1,
                                                                                        "maxItems": 1
                                                                                    }
                                                                                },
                                                                                "required": [
                                                                                    "geographicSiteCharacteristic",
                                                                                    "place"
                                                                                ]
                                                                            }
                                                                        },
                                                                        "required": [
                                                                            "role"
                                                                        ]
                                                                    }
                                                                }
                                                            },
                                                            "required": [
                                                                "relatedPlace"
                                                            ]
                                                        }
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                }
                            }
                        },
                        {
                            "if": {
                                "properties": {
                                    "category": {
                                        "type": "string",
                                        "enum": [
                                            "productChange",
                                            "technologyChange"
                                        ]
                                    }
                                }
                            },
                            "then": {
                                "properties": {
                                    "productOfferingQualification": {
                                        "maxItems": 1,
                                        "type": "array",
                                        "items": {
                                            "$ref": "#/$defs/ProductOfferingQualificationRef"
                                        }
                                    },
                                    "productOrderItem": {
                                        "allOf": [
                                            {
                                                "minItems": 2,
                                                "type": "array",
                                                "items": {
                                                    "$ref": "#/$defs/ProductOrderItem"
                                                }
                                            },
                                            {
                                                "type": "array",
                                                "contains": {
                                                    "type": "object",
                                                    "properties": {
                                                        "action": {
                                                            "const": "add"
                                                        }
                                                    }
                                                }
                                            },
                                            {
                                                "type": "array",
                                                "contains": {
                                                    "type": "object",
                                                    "properties": {
                                                        "action": {
                                                            "const": "delete"
                                                        }
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                }
                            }
                        },
                        {
                            "if": {
                                "properties": {
                                    "category": {
                                        "type": "string",
                                        "enum": [
                                            "providerChange",
                                            "providerTechnologyChange"
                                        ]
                                    }
                                }
                            },
                            "then": {
                                "properties": {
                                    "productOfferingQualification": {
                                        "maxItems": 1,
                                        "type": "array",
                                        "items": {
                                            "$ref": "#/$defs/ProductOfferingQualificationRef"
                                        }
                                    },
                                    "productOrderItem": {
                                        "allOf": [
                                            {
                                                "minItems": 2,
                                                "type": "array",
                                                "items": {
                                                    "$ref": "#/$defs/ProductOrderItem"
                                                }
                                            },
                                            {
                                                "type": "array",
                                                "contains": {
                                                    "type": "object",
                                                    "properties": {
                                                        "action": {
                                                            "const": "add"
                                                        }
                                                    }
                                                }
                                            },
                                            {
                                                "type": "array",
                                                "contains": {
                                                    "type": "object",
                                                    "properties": {
                                                        "action": {
                                                            "const": "transfer"
                                                        }
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                }
                            }
                        },
                        {
                            "if": {
                                "properties": {
                                    "category": {
                                        "type": "string",
                                        "enum": [
                                            "new",
                                            "terminationByBuyer",
                                            "productModification",
                                            "productChange",
                                            "technologyChange",
                                            "providerChange",
                                            "providerTechnologyChange",
                                            "portChange",
                                            "connectivityWithActivation",
                                            "connectivityNoActivation",
                                            "notConnected"
                                        ]
                                    }
                                }
                            },
                            "then": {
                                "properties": {
                                    "agreement": {
                                        "allOf": [
                                            {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "$ref": "fit-common.schema.json#/$defs/AgreementRefOrValue"
                                                },
                                                "contains": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "const": "buyerServiceContract"
                                                        }
                                                    }
                                                }
                                            }
                                        ]
                                    },
                                    "relatedParty": {
                                        "type": "array",
                                        "contains": {
                                            "type": "object",
                                            "properties": {
                                                "role": {
                                                    "const": "orderManagementBuyerContact"
                                                }
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "agreement",
                                    "externalId",
                                    "relatedParty"
                                ]
                            }
                        },
                        {
                            "if": {
                                "properties": {
                                    "category": {
                                        "type": "string",
                                        "enum": [
                                            "providerChange",
                                            "providerTechnologyChange",
                                            "terminationProviderChange"
                                        ]
                                    }
                                }
                            },
                            "then": {
                                "properties": {
                                    "agreement": {
                                        "allOf": [
                                            {
                                                "type": "array",
                                                "minItems": 1,
                                                "items": {
                                                    "$ref": "fit-common.schema.json#/$defs/AgreementRefOrValue"
                                                },
                                                "contains": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "const": "providerChangeAgreement"
                                                        }
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                },
                                "required": [
                                    "agreement"
                                ]
                            }
                        },
                        {
                            "if": {
                                "properties": {
                                    "category": {
                                        "type": "string",
                                        "enum": [
                                            "new",
                                            "providerChange",
                                            "providerTechnologyChange"
                                        ]
                                    }
                                }
                            },
                            "then": {
                                "properties": {
                                    "relatedParty": {
                                        "type": "array",
                                        "contains": {
                                            "type": "object",
                                            "properties": {
                                                "role": {
                                                    "const": "locationAContact"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        {
                            "if": {
                                "properties": {
                                    "category": {
                                        "type": "string",
                                        "enum": [
                                            "terminationProviderChange"
                                        ]
                                    }
                                }
                            },
                            "then": {
                                "properties": {
                                    "relatedParty": {
                                        "allOf": [
                                            {
                                                "type": "array",
                                                "contains": {
                                                    "type": "object",
                                                    "properties": {
                                                        "role": {
                                                            "const": "receivingProvider"
                                                        }
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                },
                                "required": [
                                    "relatedParty"
                                ]
                            }
                        }
                    ],
                    "discriminator": {
                        "propertyName": "@type",
                        "mapping": {
                            "ProductOrder": "#/$defs/ProductOrder_FVO"
                        }
                    }
                }
            ]
        },
        "Event": {
            "$ref": "fit-common.schema.json#/$defs/Event",
            "oneOf": [
                {
                    "properties": {
                        "eventType": {
                            "enum": [
                                "ProductOrderCreateEvent",
                                "ProductOrderAttributeValueChangeEvent",
                                "ProductOrderInformationRequiredEvent",
                                "ProductOrderJeopardyAlertEvent",
                                "ProductOrderMilestoneEvent"
                            ]
                        },
                        "event": {
                            "properties": {
                                "productOrder": {
                                    "$ref": "#/$defs/ProductOrder"
                                }
                            },
                            "required": [
                                "productOrder"
                            ]
                        }
                    }
                },
                {
                    "properties": {
                        "eventType": {
                            "const": "ProductOrderStateChangeEvent"
                        },
                        "event": {
                            "properties": {
                                "productOrder": {
                                    "allOf": [
                                        {
                                            "$ref": "#/$defs/ProductOrder"
                                        },
                                        {
                                            "$ref": "#/$defs/ProductOrderStateChangeEvent"
                                        }
                                    ]
                                }
                            },
                            "required": [
                                "productOrder"
                            ]
                        }
                    }
                },
                {
                    "properties": {
                        "eventType": {
                            "const": "InflightChangeProductOrderStateChangeEvent"
                        },
                        "event": {
                            "properties": {
                                "inflightChangeProductOrder": {
                                    "$ref": "#/$defs/TaskResource"
                                }
                            },
                            "required": [
                                "inflightChangeProductOrder"
                            ]
                        }
                    }
                },
                {
                    "properties": {
                        "eventType": {
                            "const": "CancelProductOrderStateChangeEvent"
                        },
                        "event": {
                            "properties": {
                                "cancelProductOrder": {
                                    "$ref": "#/$defs/TaskResource"
                                }
                            },
                            "required": [
                                "cancelProductOrder"
                            ]
                        }
                    }
                }
            ],
            "discriminator": {
                "propertyName": "eventType"
            }
        },
        "ProductOrderStateChangeEvent": {
            "allOf": [
                {
                    "if": {
                        "properties": {
                            "state": {
                                "const": "accepted"
                            }
                        }
                    },
                    "then": {
                        "properties": {
                            "relatedParty": {
                                "type": "array",
                                "items": {
                                    "$ref": "fit-common.schema.json#/$defs/RelatedPartyOrPartyRole"
                                },
                                "contains": {
                                    "type": "object",
                                    "properties": {
                                        "role": {
                                            "const": "orderManagementSellerContact"
                                        }
                                    }
                                }
                            }
                        },
                        "required": [
                            "creationDate"
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "state": {
                                "const": "inProgress"
                            }
                        }
                    },
                    "then": {
                        "allOf": [
                            {
                                "required": [
                                    "agreement"
                                ]
                            },
                            {
                                "if": {
                                    "properties": {
                                        "category": {
                                            "not": {
                                                "enum": [
                                                    "connectivityWithActivation",
                                                    "connectivityNoActivation",
                                                    "notConnected"
                                                ]
                                            }
                                        }
                                    }
                                },
                                "then": {
                                    "required": [
                                        "expectedCompletionDate"
                                    ]
                                }
                            },
                            {
                                "if": {
                                    "properties": {
                                        "category": {
                                            "enum": [
                                                "providerChange",
                                                "providerTechnologyChange"
                                            ]
                                        }
                                    }
                                },
                                "then": {
                                    "properties": {
                                        "relatedParty": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "fit-common.schema.json#/$defs/RelatedPartyOrPartyRole"
                                            },
                                            "contains": {
                                                "type": "object",
                                                "properties": {
                                                    "role": {
                                                        "const": "handingOverProvider"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        ]
                    }
                },
                {
                    "if": {
                        "properties": {
                            "state": {
                                "const": "closed"
                            }
                        }
                    },
                    "then": {
                        "allOf": [
                            {
                                "if": {
                                    "properties": {
                                        "category": {
                                            "enum": [
                                                "new",
                                                "productChange",
                                                "technologyChange",
                                                "productModification",
                                                "providerChange",
                                                "providerTechnologyChange",
                                                "connectivityWithActivation",
                                                "connectivityNoActivation"
                                            ]
                                        },
                                        "productOrderItem": {
                                            "items": {
                                                "properties": {
                                                    "action": {
                                                        "enum": [
                                                            "add",
                                                            "modify"
                                                        ]
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "then": {
                                    "properties": {
                                        "productOrderItem": {
                                            "items": {
                                                "properties": {
                                                    "product": {
                                                        "required": [
                                                            "startDate"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "product"
                                                ]
                                            }
                                        }
                                    }
                                }
                            },
                            {
                                "if": {
                                    "properties": {
                                        "category": {
                                            "enum": [
                                                "terminationByBuyer",
                                                "terminationBySeller"
                                            ]
                                        }
                                    }
                                },
                                "then": {
                                    "properties": {
                                        "productOrderItem": {
                                            "items": {
                                                "properties": {
                                                    "product": {
                                                        "required": [
                                                            "terminationDate"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "product"
                                                ]
                                            }
                                        }
                                    }
                                }
                            }
                        ]
                    }
                }
            ]
        },
        "TaskResource": {
            "allOf": [
                {
                    "$ref": "fit-common.schema.json#/$defs/TaskEntity",
                    "properties": {
                        "entity": {
                            "properties": {
                                "@type": {
                                    "const": "ProductOrderRef"
                                }
                            }
                        }
                    }
                },
                {
                    "oneOf": [
                        {
                            "properties": {
                                "@type": {
                                    "type": "string",
                                    "const": "CancelProductOrder"
                                },
                                "stateChangeDate": {
                                    "description": "The date and time the state changed.",
                                    "type": "string",
                                    "format": "date-time",
                                    "example": "2024-01-01T12:00:00+01:00"
                                },
                                "stateChangeMessage": {
                                    "description": "Message for the state change described as a combination of a text and a code.",
                                    "type": "array",
                                    "items": {
                                        "$ref": "fit-common.schema.json#/$defs/Message"
                                    },
                                    "example": []
                                },
                                "stateChangeHistory": {
                                    "description": "The state change history that is associated to the Entity. Populated by the server",
                                    "type": "array",
                                    "items": {
                                        "$ref": "fit-common.schema.json#/$defs/StateChange"
                                    },
                                    "example": []
                                },
                                "externalId": {
                                    "description": "A reference to an externally defined object in the context of the product order",
                                    "type": "array",
                                    "items": {
                                        "$ref": "fit-common.schema.json#/$defs/ExternalIdentifier"
                                    },
                                    "example": []
                                }
                            },
                            "required": [
                                "@type"
                            ]
                        },
                        {
                            "properties": {
                                "@type": {
                                    "type": "string",
                                    "const": "InflightChangeProductOrder"
                                },
                                "category": {
                                    "type": "array",
                                    "description": "Category of the task resource",
                                    "items": {
                                        "type": "string",
                                        "enum": [
                                            "add",
                                            "activate",
                                            "amend",
                                            "close",
                                            "respondProviderChange",
                                            "reschedule"
                                        ]
                                    },
                                    "minItems": 1,
                                    "maxItems": 3
                                },
                                "requestedCompletionDate": {
                                    "description": "Requested delivery date from the requestors perspective",
                                    "type": "string",
                                    "format": "date-time",
                                    "example": "2025-12-24T19:30:00+01:00"
                                },
                                "closeMessage": {
                                    "$ref": "fit-common.schema.json#/$defs/Message"
                                },
                                "stateChangeDate": {
                                    "description": "The date and time the state changed.",
                                    "type": "string",
                                    "format": "date-time",
                                    "example": "2024-01-01T12:00:00+01:00"
                                },
                                "stateChangeMessage": {
                                    "description": "Message for the state change described as a combination of a text and a code.",
                                    "type": "array",
                                    "items": {
                                        "$ref": "fit-common.schema.json#/$defs/Message"
                                    },
                                    "example": []
                                },
                                "stateChangeHistory": {
                                    "description": "The state change history that is associated to the Entity. Populated by the server",
                                    "type": "array",
                                    "items": {
                                        "$ref": "fit-common.schema.json#/$defs/StateChange"
                                    },
                                    "example": []
                                },
                                "providerChangeInfo": {
                                    "$ref": "#/$defs/ProviderChangeInfo"
                                },
                                "externalId": {
                                    "description": "A reference to an externally defined object in the context of the product order",
                                    "type": "array",
                                    "items": {
                                        "$ref": "fit-common.schema.json#/$defs/ExternalIdentifier"
                                    },
                                    "example": []
                                },
                                "agreement": {
                                    "description": "A reference to an agreement defined in the context of the product order",
                                    "type": "array",
                                    "items": {
                                        "$ref": "fit-common.schema.json#/$defs/AgreementRefOrValue"
                                    },
                                    "example": []
                                },
                                "note": {
                                    "description": "Note",
                                    "type": "array",
                                    "items": {
                                        "$ref": "fit-common.schema.json#/$defs/Note"
                                    },
                                    "example": []
                                },
                                "relatedParty": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "fit-common.schema.json#/$defs/RelatedPartyOrPartyRole"
                                    },
                                    "example": []
                                },
                                "additionalOrderInformation": {
                                    "$ref": "#/$defs/AdditionalOrderInformation"
                                },
                                "productOrderItem": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/$defs/ProductOrderItem"
                                    },
                                    "example": []
                                }
                            },
                            "required": [
                                "category",
                                "@type"
                            ]
                        }
                    ]
                }
            ]
        },
        "TaskResource_FVO": {
            "allOf": [
                {
                    "$ref": "fit-common.schema.json#/$defs/TaskEntity_FVO",
                    "properties": {
                        "entity": {
                            "properties": {
                                "@type": {
                                    "const": "ProductOrderRef"
                                }
                            }
                        }
                    }
                },
                {
                    "oneOf": [
                        {
                            "properties": {
                                "@type": {
                                    "type": "string",
                                    "const": "CancelProductOrder_FVO"
                                },
                                "externalId": {
                                    "description": "A reference to an externally defined object in the context of the product order",
                                    "type": "array",
                                    "items": {
                                        "$ref": "fit-common.schema.json#/$defs/ExternalIdentifier"
                                    },
                                    "example": []
                                }
                            },
                            "required": [
                                "@type"
                            ]
                        },
                        {
                            "properties": {
                                "@type": {
                                    "type": "string",
                                    "const": "InflightChangeProductOrder_FVO"
                                },
                                "category": {
                                    "type": "array",
                                    "description": "Category of the task resource",
                                    "items": {
                                        "type": "string",
                                        "enum": [
                                            "add",
                                            "activate",
                                            "amend",
                                            "close",
                                            "respondProviderChange",
                                            "reschedule"
                                        ]
                                    },
                                    "minItems": 1,
                                    "maxItems": 3
                                },
                                "requestedCompletionDate": {
                                    "description": "Requested delivery date from the requestors perspective",
                                    "type": "string",
                                    "format": "date-time",
                                    "example": "2025-12-24T19:30:00+01:00"
                                },
                                "closeMessage": {
                                    "$ref": "fit-common.schema.json#/$defs/Message"
                                },
                                "providerChangeInfo": {
                                    "$ref": "#/$defs/ProviderChangeInfo"
                                },
                                "externalId": {
                                    "description": "A reference to an externally defined object in the context of the product order",
                                    "type": "array",
                                    "items": {
                                        "$ref": "fit-common.schema.json#/$defs/ExternalIdentifier"
                                    },
                                    "example": []
                                },
                                "agreement": {
                                    "description": "A reference to an agreement defined in the context of the product order",
                                    "type": "array",
                                    "items": {
                                        "$ref": "fit-common.schema.json#/$defs/AgreementRefOrValue"
                                    },
                                    "example": []
                                },
                                "note": {
                                    "description": "Note",
                                    "type": "array",
                                    "items": {
                                        "$ref": "fit-common.schema.json#/$defs/Note"
                                    },
                                    "example": []
                                },
                                "relatedParty": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "fit-common.schema.json#/$defs/RelatedPartyOrPartyRole"
                                    },
                                    "example": []
                                },
                                "additionalOrderInformation": {
                                    "$ref": "#/$defs/AdditionalOrderInformation"
                                },
                                "productOrderItem": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/$defs/ProductOrderItem"
                                    },
                                    "example": []
                                }
                            },
                            "required": [
                                "category",
                                "@type"
                            ],
                            "allOf": [
                                {
                                    "if": {
                                        "properties": {
                                            "category": {
                                                "contains": {
                                                    "const": "activate"
                                                }
                                            }
                                        }
                                    },
                                    "then": {
                                        "required": [
                                            "requestedCompletionDate"
                                        ]
                                    }
                                },
                                {
                                    "if": {
                                        "properties": {
                                            "category": {
                                                "contains": {
                                                    "const": "amend"
                                                }
                                            }
                                        }
                                    },
                                    "then": {
                                        "properties": {
                                            "productOrderItem": {
                                                "contains": {
                                                    "properties": {
                                                        "productOrderItemRelationship": {
                                                            "contains": {
                                                                "properties": {
                                                                    "relationshipType": {
                                                                        "const": "dependsOn"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "relationshipType",
                                                                    "id"
                                                                ]
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "productOrderItemRelationship"
                                                    ]
                                                }
                                            }
                                        },
                                        "required": [
                                            "productOrderItem"
                                        ]
                                    }
                                },
                                {
                                    "if": {
                                        "properties": {
                                            "category": {
                                                "contains": {
                                                    "const": "close"
                                                }
                                            }
                                        }
                                    },
                                    "then": {
                                        "required": [
                                            "closeMessage"
                                        ]
                                    }
                                },
                                {
                                    "if": {
                                        "properties": {
                                            "category": {
                                                "contains": {
                                                    "const": "reschedule"
                                                }
                                            }
                                        }
                                    },
                                    "then": {
                                        "required": [
                                            "requestedCompletionDate"
                                        ],
                                        "if": {
                                            "required": [
                                                "productOrderItem"
                                            ]
                                        },
                                        "then": {
                                            "properties": {
                                                "productOrderItem": {
                                                    "contains": {
                                                        "properties": {
                                                            "action": {
                                                                "const": "modify"
                                                            }
                                                        },
                                                        "oneOf": [
                                                            {
                                                                "required": [
                                                                    "requestedTimeSlot"
                                                                ]
                                                            },
                                                            {
                                                                "required": [
                                                                    "appointment"
                                                                ]
                                                            }
                                                        ]
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                {
                                    "if": {
                                        "properties": {
                                            "category": {
                                                "contains": {
                                                    "const": "respondProviderChange"
                                                }
                                            }
                                        }
                                    },
                                    "then": {
                                        "properties": {
                                            "providerChangeInfo": {
                                                "required": [
                                                    "approval"
                                                ]
                                            }
                                        },
                                        "required": [
                                            "providerChangeInfo"
                                        ]
                                    }
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        "BillingAccountRef": {
            "description": "BillingAccount reference. A BillingAccount is a detailed description of a bill structure.",
            "type": "object",
            "example": "",
            "allOf": [
                {
                    "$ref": "fit-core.schema.json#/$defs/EntityRef"
                },
                {
                    "type": "object",
                    "properties": {
                        "id": {
                            "type": "string",
                            "description": "unique identifier",
                            "example": "5605916175",
                            "minLength": 1,
                            "maxLength": 10
                        }
                    }
                }
            ],
            "discriminator": {
                "propertyName": "@type",
                "mapping": {
                    "BillingAccountRef": "#/$defs/BillingAccountRef"
                }
            }
        },
        "OrderItemActionType": {
            "description": "Action to be performed on the product.",
            "type": "string",
            "enum": [
                "add",
                "modify",
                "delete",
                "nochange",
                "transfer"
            ]
        },
        "OrderItemRelationship": {
            "description": "Used to describe relationships between order items for complex business cases (e.g. product change).",
            "allOf": [
                {
                    "$ref": "fit-core.schema.json#/$defs/Extensible"
                },
                {
                    "type": "object",
                    "properties": {
                        "id": {
                            "description": "Id of the related Order item (must be in the same Order)",
                            "type": "string",
                            "example": "2d7ed5fd-9f62-4211-bc84-357f5f7b80f5"
                        },
                        "relationshipType": {
                            "description": "Relationship type as relies on, bundles, etc...",
                            "type": "string",
                            "example": "requires"
                        }
                    }
                }
            ],
            "discriminator": {
                "propertyName": "@type",
                "mapping": {
                    "OrderItemRelationship": "#/$defs/OrderItemRelationship"
                }
            }
        },
        "ProductOrderRelationship": {
            "description": "The ProductOrderRelationship makes it possible to document references to other product orders. Use cases include orders on behalf of third parties and group orders.",
            "allOf": [
                {
                    "$ref": "fit-core.schema.json#/$defs/Entity"
                },
                {
                    "type": "object",
                    "properties": {
                        "relationshipType": {
                            "description": "The type of product order relationship",
                            "type": "string",
                            "example": "requires"
                        },
                        "productOrder": {
                            "description": "Product order",
                            "type": "array",
                            "items": {
                                "$ref": "#/$defs/ProductOrderRefOrValue"
                            },
                            "example": []
                        }
                    }
                }
            ],
            "discriminator": {
                "propertyName": "@type",
                "mapping": {
                    "ProductOrderRelationship": "#/$defs/ProductOrderRelationship"
                }
            }
        },
        "Product": {
            "description": "A product offering procured by a customer or other interested party playing a party role. A product is realized as one or more service(s) and / or resource(s).",
            "allOf": [
                {
                    "$ref": "fit-core.schema.json#/$defs/Entity"
                },
                {
                    "type": "object",
                    "properties": {
                        "@type": {
                            "type": "string",
                            "pattern": "^(?!ProductRef$)"
                        },
                        "id": {
                            "type": "string",
                            "description": "unique identifier",
                            "minLength": 1,
                            "maxLength": 36,
                            "example": "2d7ed5fd-9f62-4211-bc84-357f5f7b80f5"
                        },
                        "creationDate": {
                            "description": "Date and time when the product was created",
                            "type": "string",
                            "format": "date-time",
                            "example": "2023-01-01T08:00:00+01:00"
                        },
                        "description": {
                            "description": "Is the description of the product. It could be copied from the description of the Product Offering.",
                            "type": "string",
                            "example": "Lorem ipsum dolor"
                        },
                        "name": {
                            "description": "Name of the product. It could be the same as the name of the product offering",
                            "type": "string",
                            "example": "Acme ludicrous speed fiber line"
                        },
                        "orderDate": {
                            "description": "Is the date when the product was ordered",
                            "type": "string",
                            "format": "date-time",
                            "example": "2023-01-01T08:00:00+01:00"
                        },
                        "startDate": {
                            "description": "Is the date from which the product starts",
                            "type": "string",
                            "format": "date-time",
                            "example": "2023-01-01T08:00:00+01:00"
                        },
                        "terminationDate": {
                            "description": "Is the date when the product was terminated",
                            "type": "string",
                            "format": "date-time",
                            "example": "2023-01-01T08:00:00+01:00"
                        },
                        "relatedPlace": {
                            "description": "Related place",
                            "type": "array",
                            "items": {
                                "$ref": "fit-common.schema.json#/$defs/RelatedPlaceRefOrValue"
                            },
                            "example": []
                        },
                        "product": {
                            "description": "Product",
                            "type": "array",
                            "items": {
                                "$ref": "#/$defs/ProductRefOrValue"
                            },
                            "example": []
                        },
                        "productCharacteristic": {
                            "description": "Product characteristic",
                            "type": "array",
                            "items": {
                                "$ref": "fit-common.schema.json#/$defs/Characteristic"
                            },
                            "example": []
                        },
                        "productOffering": {
                            "$ref": "#/$defs/ProductOfferingRefOrValue"
                        },
                        "productRelationship": {
                            "description": "Product relationship",
                            "type": "array",
                            "items": {
                                "$ref": "#/$defs/ProductRelationship"
                            },
                            "example": []
                        },
                        "productSpecification": {
                            "$ref": "#/$defs/ProductSpecificationRef"
                        },
                        "relatedParty": {
                            "type": "array",
                            "items": {
                                "$ref": "fit-common.schema.json#/$defs/RelatedPartyOrPartyRole"
                            },
                            "example": []
                        },
                        "status": {
                            "$ref": "#/$defs/ProductStatusType"
                        }
                    }
                }
            ],
            "discriminator": {
                "propertyName": "@type",
                "mapping": {
                    "Product": "#/$defs/Product",
                    "BitstreamAccessProduct": "#/$defs/BitstreamAccessProduct",
                    "OpticalAccessLineProduct": "#/$defs/OpticalAccessLineProduct",
                    "HvtLocalLoopProduct": "#/$defs/HvtLocalLoopProduct",
                    "KvzLocalLoopProduct": "#/$defs/KvzLocalLoopProduct",
                    "StandaloneFieldServiceProduct": "#/defs/StandaloneFieldServiceProduct"
                }
            }
        },
        "ProductOfferingQualificationRef": {
            "description": "It's a productOfferingQualification that has been executed previously",
            "type": "object",
            "allOf": [
                {
                    "$ref": "fit-core.schema.json#/$defs/EntityRef"
                },
                {
                    "type": "object",
                    "properties": {
                        "id": {
                            "type": "string",
                            "description": "unique identifier",
                            "example": "2d7ed5fd-9f62-4211-bc84-357f5f7b80f5",
                            "minLength": 1,
                            "maxLength": 36
                        }
                    }
                }
            ],
            "discriminator": {
                "propertyName": "@type",
                "mapping": {
                    "ProductOfferingQualificationRef": "#/$defs/ProductOfferingQualificationRef"
                }
            }
        },
        "ProductOrder": {
            "description": "A Product Order is a type of order which  can  be used to place an order between a customer and a service provider or between a service provider and a partner and vice versa,",
            "allOf": [
                {
                    "$ref": "fit-core.schema.json#/$defs/Entity"
                },
                {
                    "$id": "#ProductOrder",
                    "type": "object",
                    "required": [
                        "productOrderItem",
                        "category",
                        "creationDate",
                        "orderPostedDate",
                        "state",
                        "stateChangeDate"
                    ],
                    "properties": {
                        "category": {
                            "description": "Used to categorize the order from a business perspective (new, productChange, groupChange, productModification, termination, groupMigration)",
                            "type": "string",
                            "example": "new"
                        },
                        "description": {
                            "description": "Description of the product order",
                            "type": "string",
                            "example": "Lorem ipsum dolor"
                        },
                        "expectedCompletionDate": {
                            "description": "Expected delivery date amended by the provider",
                            "type": "string",
                            "format": "date-time",
                            "example": "2025-12-24T19:30:00+01:00"
                        },
                        "creationDate": {
                            "description": "Date when the order resource was created",
                            "type": "string",
                            "format": "date-time",
                            "example": "2023-01-01T08:00:00+01:00"
                        },
                        "orderIsChargingRelevant": {
                            "description": "Boolean amended by the provider defining if the processing of the ProductOrder is charging relevant",
                            "type": "boolean",
                            "example": false
                        },
                        "orderPostedDate": {
                            "description": "Date when the order was posted by the requester",
                            "type": "string",
                            "format": "date-time",
                            "example": "2023-01-01T08:00:00+01:00"
                        },
                        "priority": {
                            "description": "A way that can be used by consumers to prioritize orders in OM system (from 0 to 4 : 0 is the highest priority, and 4 the lowest)",
                            "type": "string",
                            "example": "4"
                        },
                        "requestedCompletionDate": {
                            "description": "Requested delivery date from the requestors perspective",
                            "type": "string",
                            "format": "date-time",
                            "example": "2025-12-24T19:30:00+01:00"
                        },
                        "agreement": {
                            "description": "A reference to an agreement defined in the context of the product order",
                            "type": "array",
                            "items": {
                                "$ref": "fit-common.schema.json#/$defs/AgreementRefOrValue"
                            },
                            "example": []
                        },
                        "externalId": {
                            "description": "A reference to an externally defined object in the context of the product order",
                            "type": "array",
                            "items": {
                                "$ref": "fit-common.schema.json#/$defs/ExternalIdentifier"
                            },
                            "example": []
                        },
                        "billingAccount": {
                            "$ref": "#/$defs/BillingAccountRef"
                        },
                        "note": {
                            "description": "Note",
                            "type": "array",
                            "items": {
                                "$ref": "fit-common.schema.json#/$defs/Note"
                            },
                            "example": []
                        },
                        "productOfferingQualification": {
                            "description": "Product offering qualification",
                            "type": "array",
                            "items": {
                                "$ref": "#/$defs/ProductOfferingQualificationRef"
                            },
                            "example": []
                        },
                        "productOrderItem": {
                            "description": "Product order item",
                            "type": "array",
                            "items": {
                                "$ref": "#/$defs/ProductOrderItem"
                            },
                            "example": [],
                            "minItems": 1
                        },
                        "relatedParty": {
                            "description": "Related party",
                            "type": "array",
                            "items": {
                                "$ref": "fit-common.schema.json#/$defs/RelatedPartyOrPartyRole"
                            },
                            "example": []
                        },
                        "state": {
                            "$ref": "fit-common.schema.json#/$defs/StateType"
                        },
                        "stateChangeDate": {
                            "description": "The date and time the state changed.",
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-01-01T12:00:00+01:00"
                        },
                        "stateChangeMessage": {
                            "description": "Message for the state change described as a combination of a text and a code.",
                            "type": "array",
                            "items": {
                                "$ref": "fit-common.schema.json#/$defs/Message"
                            },
                            "example": []
                        },
                        "stateChangeHistory": {
                            "description": "The state change history that is associated to the Entity. Populated by the server",
                            "type": "array",
                            "items": {
                                "$ref": "fit-common.schema.json#/$defs/StateChange"
                            },
                            "example": []
                        },
                        "earliestOrderRetry": {
                            "description": "Earliest date when the order can be submitted again.",
                            "type": "string",
                            "format": "date-time",
                            "example": "2023-01-01T08:00:00+01:00"
                        },
                        "attachment": {
                            "description": "Attachment",
                            "type": "array",
                            "items": {
                                "$ref": "fit-common.schema.json#/$defs/AttachmentRefOrValue"
                            },
                            "example": []
                        },
                        "productOrderJeopardyAlert": {
                            "description": "List of ProductOrderJeopardyAlerts. A ProductOrderJeopardyAlert represents a predicted exception during a product order processing that would brings risk to complete successfully the order.",
                            "type": "array",
                            "items": {
                                "$ref": "#/$defs/ProductOrderJeopardyAlert"
                            },
                            "example": []
                        },
                        "productOrderMilestone": {
                            "description": "List of ProductOrderMilestones. A ProductOrderMilestone represents an action or event marking a significant change or stage in processing of a product order.",
                            "type": "array",
                            "items": {
                                "$ref": "#/$defs/ProductOrderMilestone"
                            },
                            "example": []
                        },
                        "productOrderRelationship": {
                            "description": "Product order relationship",
                            "type": "array",
                            "items": {
                                "$ref": "#/$defs/ProductOrderRelationship"
                            },
                            "example": []
                        },
                        "providerChangeInfo": {
                            "$ref": "#/$defs/ProviderChangeInfo"
                        },
                        "additionalOrderInformation": {
                            "$ref": "#/$defs/AdditionalOrderInformation"
                        }
                    }
                }
            ],
            "discriminator": {
                "propertyName": "@type",
                "mapping": {
                    "ProductOrder": "#/$defs/ProductOrder"
                }
            }
        },
        "ProductOrderItem": {
            "description": "An identified part of the order. A product order is decomposed into one or more order items.",
            "allOf": [
                {
                    "$ref": "fit-core.schema.json#/$defs/Extensible"
                },
                {
                    "type": "object",
                    "required": [
                        "action",
                        "id"
                    ],
                    "properties": {
                        "id": {
                            "description": "Identifier of the ProductOrder item (generally it is a sequence number 01, 02, 03,...)",
                            "type": "string",
                            "example": "01",
                            "minLength": 1,
                            "maxLength": 36
                        },
                        "action": {
                            "$ref": "#/$defs/OrderItemActionType"
                        },
                        "billingAccount": {
                            "$ref": "#/$defs/BillingAccountRef"
                        },
                        "product": {
                            "$ref": "#/$defs/ProductRefOrValue"
                        },
                        "productOffering": {
                            "$ref": "#/$defs/ProductOfferingRefOrValue"
                        },
                        "alternateProductOffering": {
                            "$ref": "#/$defs/ProductOfferingRefOrValue"
                        },
                        "productOrderItemRelationship": {
                            "description": "Product order item relationship",
                            "type": "array",
                            "items": {
                                "$ref": "#/$defs/OrderItemRelationship"
                            },
                            "example": []
                        },
                        "productOfferingQualificationItem": {
                            "$ref": "#/$defs/ProductOfferingQualificationItemRef"
                        },
                        "endUserAppointmentIsNecessary": {
                            "description": "Defines if an end user appointment is required for this order item",
                            "type": "boolean",
                            "example": false
                        },
                        "requestedTimeSlot": {
                            "$ref": "fit-common.schema.json#/$defs/TimeSlot"
                        },
                        "appointment": {
                            "$ref": "fit-common.schema.json#/$defs/AppointmentRefOrValue"
                        }
                    },
                    "allOf": [
                        {
                            "if": {
                                "properties": {
                                    "action": {
                                        "const": "add"
                                    }
                                }
                            },
                            "then": {
                                "required": [
                                    "productOffering"
                                ]
                            }
                        },
                        {
                            "if": {
                                "not": {
                                    "properties": {
                                        "action": {
                                            "const": "modify"
                                        }
                                    }
                                }
                            },
                            "then": {
                                "anyOf": [
                                    {
                                        "required": [
                                            "product"
                                        ]
                                    },
                                    {
                                        "required": [
                                            "productOffering"
                                        ]
                                    }
                                ]
                            }
                        }
                    ]
                }
            ],
            "discriminator": {
                "propertyName": "@type",
                "mapping": {
                    "ProductOrderItem": "#/$defs/ProductOrderItem"
                }
            }
        },
        "ProductOfferingQualificationItemRef": {
            "description": "It's a productOfferingQualification item that has been executed previously",
            "allOf": [
                {
                    "$ref": "fit-core.schema.json#/$defs/Extensible"
                },
                {
                    "type": "object",
                    "properties": {
                        "productOfferingQualificationName": {
                            "description": "Name of the related entity.",
                            "type": "string",
                            "example": "n/a"
                        },
                        "productOfferingQualificationHref": {
                            "description": "Reference of the related entity.",
                            "type": "string",
                            "example": "n/a"
                        },
                        "@referredType": {
                            "description": "The actual type of the target instance when needed for disambiguation.",
                            "type": "string",
                            "example": "n/a"
                        },
                        "productOfferingQualificationId": {
                            "description": "Unique identifier of a related entity.",
                            "type": "string",
                            "example": "2d7ed5fd-9f62-4211-bc84-357f5f7b80f5"
                        },
                        "itemId": {
                            "description": "Id of an item of a product offering qualification",
                            "type": "string",
                            "example": "2d7ed5fd-9f62-4211-bc84-357f5f7b80f5"
                        }
                    }
                }
            ]
        },
        "ProductOrderRef": {
            "description": "ProductOrder (ProductOrder). The product order which the action is related with.",
            "type": "object",
            "allOf": [
                {
                    "$ref": "fit-core.schema.json#/$defs/EntityRef"
                }
            ]
        },
        "ProductOrderRefOrValue": {
            "description": "Product reference or value",
            "type": "object",
            "discriminator": {
                "propertyName": "@type"
            },
            "oneOf": [
                {
                    "$ref": "#/$defs/ProductOrderRef"
                },
                {
                    "$ref": "#/$defs/ProductOrder"
                }
            ]
        },
        "ProductRef": {
            "description": "Product reference",
            "type": "object",
            "allOf": [
                {
                    "$ref": "fit-core.schema.json#/$defs/EntityRef"
                },
                {
                    "type": "object",
                    "properties": {
                        "@type": {
                            "type": "string",
                            "enum": [
                                "ProductRef"
                            ]
                        }
                    }
                }
            ]
        },
        "ProductRefOrValue": {
            "description": "A product to be created defined by value or existing defined by reference.",
            "type": "object",
            "discriminator": {
                "propertyName": "@type"
            },
            "required": [
                "@type"
            ],
            "oneOf": [
                {
                    "$ref": "#/$defs/ProductRef"
                },
                {
                    "$ref": "#/$defs/Product"
                }
            ]
        },
        "ProductRelationship": {
            "description": "Used to describe relationship between product.",
            "type": "object",
            "properties": {
                "relationshipType": {
                    "description": "Relationship type as relies on, bundles, etc...",
                    "type": "string",
                    "example": "requires"
                }
            },
            "allOf": [
                {
                    "$ref": "fit-core.schema.json#/$defs/EntityRef"
                }
            ],
            "discriminator": {
                "propertyName": "@type",
                "mapping": {
                    "ProductRelationship": "#/$defs/ProductRelationship"
                }
            }
        },
        "ProductStatusType": {
            "description": "Possible values for the status of the product:<ul>\n<li>*created*: Product created</li>\n<li>*pendingActive*: Product pending active</li>\n<li>*cancelled*: Product cancelled</li>\n<li>*active*: Product active</li>\n<li>*pendingTerminate*: Product pendingTerminate</li>\n<li>*terminated*: Product terminated</li>\n<li>*suspended*: Product suspended</li>\n<li>*aborted*: Product aborted</li>\n</ul>",
            "type": "string",
            "enum": [
                "created",
                "pendingActive",
                "cancelled",
                "active",
                "pendingTerminate",
                "terminated",
                "suspended",
                "aborted"
            ]
        },
        "BitstreamAccessProduct": {
            "description": "Bitstream access product",
            "allOf": [
                {
                    "$ref": "#/$defs/Product"
                },
                {
                    "type": "object",
                    "properties": {
                        "@type": {
                            "type": "string",
                            "enum": [
                                "BitstreamAccessProduct"
                            ]
                        },
                        "accessTechnology": {
                            "description": "Defines the type of connectivity (e.g. FTTH, FTTB, FTTC, HFC, Coax, TAL, OAL)",
                            "type": "string",
                            "example": "FTTH"
                        },
                        "accessProtocol": {
                            "description": "Defines the type and technology of the access (e.g. Ethernet, P2P, GPON, XGS-PON, VDSL, GFAST-CuDa., GFAST-Coax, DOCSIS, ADSL, SDSL, ...)",
                            "type": "string",
                            "example": "VDSL"
                        },
                        "upstreamNominalBandwidth": {
                            "description": "Defines the upstream access bandwidth (e.g. 100 Mbit/s , 1 Gbit/s, 100 Kbit/s)",
                            "$ref": "fit-common.schema.json#/$defs/Quantity"
                        },
                        "downstreamNominalBandwidth": {
                            "description": "Defines the downstream access bandwidth (e.g. 400 Mbit/s , 1 Gbit/s )",
                            "$ref": "fit-common.schema.json#/$defs/Quantity"
                        },
                        "trafficHandOver": {
                            "description": "Defines how the traffic is handed over to the reseller (e.g. L2, L3, LT)",
                            "type": "string",
                            "example": "L2"
                        },
                        "trafficAggregation": {
                            "description": "Defines the aggregation provided by the supplier hand over close to customer, in a region  or one central hand over for the complete country (e.g. local, regional, national)",
                            "type": "string",
                            "example": "local"
                        },
                        "networkTerminationUnitType": {
                            "description": "Defines the type of the access termination (e.g. withOnt, withoutOnt)",
                            "type": "string",
                            "example": "withOnt"
                        },
                        "uniConnectorType": {
                            "description": "Defines the interface of the access termination (e.g. TAE, RJ45, E2000, LC-APC, MMD (Multi Media Dose -> Koaxialdose, F-Stecker) ...)",
                            "type": "string",
                            "example": "RJ45"
                        },
                        "reversePowering": {
                            "description": "Defines if the DSLAM needs to be reverse powered (e.g. yes, no)",
                            "type": "string",
                            "example": "yes"
                        },
                        "leadTime": {
                            "description": "Defines the typical lead time for provisioning an access",
                            "$ref": "fit-common.schema.json#/$defs/Duration"
                        },
                        "lineID": {
                            "description": "Defines the identifier of the access line. If ProductId is not known for change orders, the contract number of the product to be changed / terminated can be entered here by the buyer",
                            "type": "string"
                        },
                        "virtualAccessLineId": {
                            "description": "Line-Identifier for the end customer",
                            "type": "string"
                        },
                        "enni": {
                            "description": "Identifies the point of traffic interconnection external network to network interconnection (e.g. value or location of A10NSP)",
                            "type": "string"
                        },
                        "enniPort": {
                            "description": "Defines the configured port",
                            "type": "string",
                            "example": "n/a"
                        },
                        "cvlan": {
                            "description": "Defines the configured C-VLAN",
                            "type": "string",
                            "example": "n/a"
                        },
                        "svlan": {
                            "description": "Defines the configured S-VLAN",
                            "type": "string"
                        },
                        "networkTerminationUnitLocation": {
                            "description": "Describes the location of the network termination (e.g. describes the position of TAE/GF-TA or ONT)",
                            "type": "string"
                        },
                        "homeId": {
                            "description": "Identifies the GF-TA unit at the end user's premises.",
                            "type": "string",
                            "example": "a12d5a4545"
                        },
                        "ontSerialNumber": {
                            "description": "Serial number of the ONT",
                            "type": "string",
                            "example": "1515515155115"
                        },
                        "trafficLimitationUpstream": {
                            "description": "Defines the traffic/Speedlimit of bandwidth",
                            "$ref": "fit-common.schema.json#/$defs/Quantity"
                        },
                        "trafficLimitationDownstream": {
                            "description": "Defines the traffic/Speedlimit of bandwidth",
                            "$ref": "fit-common.schema.json#/$defs/Quantity"
                        },
                        "singleContractIdExistingProduct": {
                            "description": "If ProductId is not known for change orders, the contract number of the product to be changed / canceled can be entered here",
                            "type": "string",
                            "example": "3072576895"
                        }
                    }
                }
            ],
            "discriminator": {
                "propertyName": "@type",
                "mapping": {
                    "BitstreamAccessProduct": "#/$defs/BitstreamAccessProduct"
                }
            }
        },
        "OpticalAccessLineProduct": {
            "description": "Optical access line product",
            "allOf": [
                {
                    "$ref": "#/$defs/Product"
                },
                {
                    "type": "object",
                    "required": [
                        "patchService"
                    ],
                    "properties": {
                        "patchService": {
                            "description": "Entity connecting active and passive port",
                            "$ref": "#/$defs/PatchServiceType"
                        },
                        "passiveAccessLineId": {
                            "description": "Technical identifier for the fibre optical cable - starting at the ODF to the customers house - homeId",
                            "type": "string",
                            "example": "DEU.DGW.G465157FDU"
                        },
                        "ontType": {
                            "description": "Type of ONT",
                            "type": "string",
                            "example": "9000"
                        },
                        "ontActivationCode": {
                            "description": "Code required to activate an ONT at this connection, has to be provided by the NGA and used only if the ANE offers a service to deliver the ONT to the end-customer.",
                            "type": "string",
                            "example": "Aalskdg78q"
                        },
                        "ontSerialNumber": {
                            "description": "Serial number of ONT",
                            "type": "string",
                            "example": "ALCL:F8ADCACF"
                        },
                        "oltName": {
                            "description": "Name of the OLT the fibre shall be/is connected to.",
                            "type": "string",
                            "example": "dtm4711-access6"
                        },
                        "oltPort": {
                            "description": "Port of the OLT the fibre shall be/is connected to.",
                            "type": "string",
                            "example": "3/7/15"
                        },
                        "splitterName": {
                            "description": "Name of the splitter",
                            "type": "string",
                            "example": "bch1743-NVT7-MUX34"
                        },
                        "splitterPort": {
                            "description": "Port on the splitter the fibre is connected to may be provided by the NGA or ANE depending on set-up of the project",
                            "type": "string",
                            "example": "27"
                        },
                        "switchingDataNga": {
                            "description": "Data provided by the NGA (owner of the active network) about the active fibre optical connection. Defines the location of the fibre in the POP.",
                            "$ref": "#/$defs/SwitchingDataOal"
                        },
                        "switchingDataAne": {
                            "description": "Data provided by the ANE (owner of the passive network) about the passive fibre optical connection. Defines the location of the fibre in the POP.",
                            "$ref": "#/$defs/SwitchingDataOal"
                        },
                        "ontProvidedBy": {
                            "description": "Provider of the ONT (e.g. Buyer, Seller)",
                            "example": "Buyer"
                        }
                    }
                }
            ],
            "discriminator": {
                "propertyName": "@type",
                "mapping": {
                    "OpticalAccessLineProduct": "#/$defs/OpticalAccessLineProduct"
                }
            }
        },
        "PatchServiceType": {
            "description": "Possible values are:<ul>\n<li>*partner*</li>\n<li>*supplier*</li>\n</ul>",
            "type": "string",
            "enum": [
                "partner",
                "supplier"
            ]
        },
        "SwitchingDataOal": {
            "description": "Switching data optical access line",
            "type": "object",
            "properties": {
                "room": {
                    "description": "Room the ODF is located",
                    "type": "string",
                    "example": "A"
                },
                "rack": {
                    "description": "Rack the ODF is located",
                    "type": "string",
                    "example": "1"
                },
                "shelf": {
                    "description": "Shelf in the rack",
                    "type": "string",
                    "example": "3"
                },
                "slot": {
                    "description": "Slot in the shelf",
                    "type": "string",
                    "example": "5"
                },
                "port": {
                    "description": "Port in the slot",
                    "type": "string",
                    "example": "SPL-410688-05-B-2-32"
                },
                "ppid": {
                    "description": "PortId",
                    "type": "string",
                    "example": "000SP50"
                }
            }
        },
        "HvtLocalLoopProduct": {
            "description": "Local loop from the central office",
            "allOf": [
                {
                    "$ref": "#/$defs/LocalLoopProduct"
                },
                {
                    "type": "object",
                    "properties": {
                        "switchingDataHvt": {
                            "description": "Switching data for the Local loop from the central office",
                            "type": "array",
                            "items": {
                                "$ref": "#/$defs/SwitchingDataHvt"
                            },
                            "example": [],
                            "maxItems": 2,
                            "minItems": 1
                        }
                    }
                }
            ],
            "discriminator": {
                "propertyName": "@type",
                "mapping": {
                    "HvtLocalLoopProduct": "#/$defs/HvtLocalLoopProduct"
                }
            }
        },
        "KvzLocalLoopProduct": {
            "description": "Local loop from the curb",
            "allOf": [
                {
                    "$ref": "#/$defs/LocalLoopProduct"
                },
                {
                    "type": "object",
                    "properties": {
                        "switchingDataKvz": {
                            "description": "Switching data for the Local loop from the curb",
                            "type": "array",
                            "items": {
                                "$ref": "#/$defs/SwitchingDataKvz"
                            },
                            "example": [],
                            "maxItems": 2,
                            "minItems": 1
                        }
                    }
                }
            ],
            "discriminator": {
                "propertyName": "@type",
                "mapping": {
                    "KvzLocalLoopProduct": "#/$defs/KvzLocalLoopProduct"
                }
            }
        },
        "LocalLoopProduct": {
            "description": "Local loop product",
            "allOf": [
                {
                    "$ref": "#/$defs/Product"
                },
                {
                    "type": "object",
                    "properties": {
                        "transmissionMethod": {
                            "description": "Transmission method",
                            "type": "string",
                            "example": "H01"
                        },
                        "loopResistance": {
                            "description": "Total resistance (unit: ohms) of the loop",
                            "type": "string",
                            "example": "<1200"
                        },
                        "maxGrossBitrate": {
                            "description": "Max. gross bit rate in kbit/s",
                            "type": "string",
                            "example": "9000"
                        },
                        "singleContractIdExistingProduct": {
                            "description": "If ProductId is not known for change orders, the contract number of the product to be changed / canceled can be entered here",
                            "type": "string",
                            "example": "3072345760"
                        },
                        "accessLine": {
                            "$ref": "#/$defs/AccessLine"
                        },
                        "lineSegment": {
                            "description": "Line segment",
                            "type": "array",
                            "items": {
                                "$ref": "#/$defs/LineSegment"
                            },
                            "example": [],
                            "maxItems": 99
                        },
                        "access": {
                            "$ref": "#/$defs/Access"
                        }
                    }
                }
            ],
            "discriminator": {
                "propertyName": "@type",
                "mapping": {
                    "LocalLoopProduct": "#/$defs/LocalLoopProduct"
                }
            }
        },
        "StandaloneFieldServiceProduct": {
            "description": "StandaloneFieldService product",
            "allOf": [
                {
                    "$ref": "#/$defs/Product"
                },
                {
                    "type": "object",
                    "properties": {
                        "networkTerminationUnitLocation": {
                            "description": "Describes the location of the network termination (e.g. describes the position of TAE/GF-TA or ONT)",
                            "type": "string"
                        },
                        "homeId": {
                            "description": "Identifies the GF-TA unit at the end user's premises.",
                            "type": "string",
                            "example": "a12d5a4545"
                        }
                    }
                }
            ],
            "discriminator": {
                "propertyName": "@type",
                "mapping": {
                    "StandaloneFieldServiceProduct": "#/$defs/StandaloneFieldServiceProduct"
                }
            }
        },
        "AccessLine": {
            "description": "Access line for the local loop",
            "type": "object",
            "properties": {
                "lineKey": {
                    "description": "Indicates the type of line",
                    "type": "string",
                    "example": "96W"
                },
                "areaCodeA": {
                    "description": "The area code of location A",
                    "type": "string",
                    "example": "228"
                },
                "areaCodeB": {
                    "description": "The area code of location B",
                    "type": "string",
                    "example": "228"
                },
                "talSequenceNumber": {
                    "description": "Consecutive number to identify the line",
                    "type": "string",
                    "example": "FXP00WZTRH"
                }
            },
            "required": [
                "lineKey",
                "areaCodeA",
                "areaCodeB",
                "talSequenceNumber"
            ]
        },
        "LineSegment": {
            "description": "Line segment",
            "type": "object",
            "properties": {
                "id": {
                    "description": "Consecutive number to identify the line section",
                    "type": "string",
                    "example": "1"
                },
                "length": {
                    "description": "Length (unit: meter) of the line section",
                    "type": "string",
                    "example": "441"
                },
                "diameter": {
                    "description": "Diameter of the line section",
                    "type": "string",
                    "example": "500"
                }
            },
            "required": [
                "id",
                "length",
                "diameter"
            ]
        },
        "Access": {
            "description": "Notes on the commissioned connection",
            "type": "object",
            "properties": {
                "areaCode": {
                    "description": "Area code of the previous connection (when changing provider)",
                    "type": "string",
                    "example": "228"
                },
                "subscriberNumber": {
                    "description": "Phone number of the previous connection (when changing provider)",
                    "type": "string",
                    "example": "123456"
                }
            },
            "required": [
                "areaCode",
                "subscriberNumber"
            ]
        },
        "SwitchingDataKvz": {
            "description": "Switching data for the Local loop from the curb",
            "type": "object",
            "properties": {
                "kvzId": {
                    "description": "Unique identifier of the cable distributor",
                    "type": "string",
                    "example": "20"
                },
                "kvzSwitchingId": {
                    "description": "Information from the carrier regarding its switching data",
                    "type": "string",
                    "example": "285"
                }
            },
            "required": [
                "kvzId",
                "kvzSwitchingId"
            ]
        },
        "SwitchingDataHvt": {
            "description": "Switching data for the Local loop from the central office",
            "type": "object",
            "properties": {
                "uevt": {
                    "description": "Number of  the \"Übergabeverteiler\"",
                    "type": "string",
                    "example": "0203"
                },
                "evs": {
                    "description": "Number of  the \"Endverschluss\"",
                    "type": "string",
                    "example": "24"
                },
                "copperPairId": {
                    "description": "Number of  the twisted pair",
                    "type": "string",
                    "example": "43"
                }
            },
            "required": [
                "uevt",
                "evs",
                "copperPairId"
            ]
        },
        "ProductOrderMilestone": {
            "description": "A ProductOrderMilestone represents an action or event marking a significant change or stage in processing of a product order.",
            "type": "object",
            "allOf": [
                {
                    "$ref": "fit-common.schema.json#/$defs/Milestone"
                }
            ],
            "discriminator": {
                "propertyName": "@type",
                "mapping": {
                    "ProductOrderMilestone": "#/$defs/ProductOrderMilestone"
                }
            }
        },
        "ProductOrderJeopardyAlert": {
            "description": "A ProductOrderJeopardyAlert represents a predicted exception during a product order processing that would brings risk to complete successfully the order.",
            "type": "object",
            "allOf": [
                {
                    "$ref": "fit-common.schema.json#/$defs/JeopardyAlert"
                }
            ],
            "discriminator": {
                "propertyName": "@type",
                "mapping": {
                    "ProductOrderJeopardyAlert": "#/$defs/ProductOrderJeopardyAlert"
                }
            }
        },
        "ProviderChangeInfo": {
            "description": "Additional provider change information for terminating provider",
            "allOf": [
                {
                    "$ref": "fit-core.schema.json#/$defs/Extensible"
                },
                {
                    "type": "object",
                    "properties": {
                        "respondTime": {
                            "description": "Latest time the response to the provider change request must have been submitted",
                            "type": "string",
                            "format": "date-time",
                            "example": "2025-12-24T19:30:00+01:00"
                        },
                        "approval": {
                            "description": "State of the provider change approval",
                            "type": "boolean",
                            "example": true
                        },
                        "responseMessage": {
                            "$ref": "fit-common.schema.json#/$defs/Message"
                        }
                    }
                }
            ],
            "discriminator": {
                "propertyName": "@type",
                "mapping": {
                    "ProviderChangeInfo": "#/$defs/ProviderChangeInfo"
                }
            }
        },
        "AdditionalOrderInformation": {
            "description": "Defines additional order information",
            "type": "object",
            "properties": {
                "providerChangeAgreementTechnology": {
                    "description": "Technology of the old product (only for Provider Change Use Cases)",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "example": "Kupfer"
                },
                "providerChangeAgreementLineId": {
                    "description": "LineId of the old product (only for Provider Change Use Cases)",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "example": "DEU.XYZ.HV1G1"
                },
                "providerChangeAgreementSingleContractId": {
                    "description": "Single Contract Id of the old product (only for Provider Change Use Cases)",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10,
                    "example": "3213214567"
                },
                "providerChangePassiveAccessLineId": {
                    "description": "Single Contract Id of the old product (only for Provider Change Use Cases)",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "example": "123456789"
                },
                "previousTenantGivenName": {
                    "description": "Given Name of the previous tenant",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "example": "Karl"
                },
                "previousTenantFamilyName": {
                    "description": "Family Name of the previous tenant",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "example": "Klammer"
                },
                "previousTenantNationalDestinationCode": {
                    "description": "National destination code of the previous tenant",
                    "type": "string",
                    "pattern": "^[1-9][0-9]{1,4}$",
                    "example": "228"
                },
                "previousTenantSubscriberNumber": {
                    "description": "Subscriber number of the previous tenant",
                    "type": "string",
                    "pattern": "^[0-9]{2,14}$",
                    "example": "1234567"
                },
                "campaignIdentifier": {
                    "type": "array",
                    "items": {
                        "type": "string",
                        "description": "Identifier for marketing campaigns, e. g. promotions",
                        "minLength": 1,
                        "maxLength": 30,
                        "example": "#A6"
                    }
                },
                "projectIdentifier": {
                    "description": "Identifier for specific projects",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "example": "12a"
                },
                "couplingIdentifier": {
                    "description": "Identifier for specific projects",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "example": "23b"
                },
                "orderBindingId": {
                    "description": "Identifier used to bind orders",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10,
                    "example": "34c"
                },
                "orderBindingNumberOfOrders": {
                    "description": "Number of orders (used together with orderBindingId)",
                    "type": "integer",
                    "example": 2
                },
                "orderBindingFailedExternalOrderId": {
                    "description": "Failed order number (refers to another failed order)",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "example": "3213214568"
                },
                "copperPairInUseLineKey": {
                    "description": "LineKey of the copper pair in Use",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "example": "96W"
                },
                "copperPairInUseNationalDestinationCodeA": {
                    "description": "NationalDestinationCodeA of the copper pair in Use",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "example": "228"
                },
                "copperPairInUseNationalDestinationCodeB": {
                    "description": "NationalDestinationCodeB of the copper pair in Use",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "example": "228"
                },
                "copperPairInUseTalSequenceNumber": {
                    "description": "TalSequenceNumber of the copper pair in Use",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "example": "FXP00WZTRH"
                },
                "hardwareIdType": {
                    "description": "HardwareId to identify the line: type",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "example": "OntSerialNumber"
                },
                "hardwareIdValue": {
                    "description": "HardwareId to identify the line: value",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "example": "53674F3DC03FD37C"
                },
                "aggregatorProductOffering": {
                    "description": "Name of pre product",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "example": "n/a"
                },
                "aggregatorNGA": {
                    "description": "Seller name of pre product",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "example": "n/a"
                },
                "aggregatorOrderAction": {
                    "description": "Order category of pre product",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "example": "n/a"
                },
                "aggregatorOrderId": {
                    "description": "Order id of pre product",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "example": "n/a"
                }
            }
        },
        "InstallationInstruction": {
            "description": "Specialization of Note",
            "allOf": [
                {
                    "$ref": "fit-common.schema.json#/$defs/Note"
                },
                {
                    "type": "object"
                }
            ]
        },
        "TargetProductSchema": {
            "description": "The reference object to the schema and type of target product which is described by product specification",
            "type": "object",
            "properties": {
                "@schemaLocation": {
                    "description": "This field provides a link to the schema describing the target product",
                    "type": "string",
                    "example": "https://schemas.example.com/example/schema"
                },
                "@type": {
                    "description": "Class type of the target product",
                    "type": "string",
                    "example": ""
                }
            },
            "required": [
                "@schemaLocation",
                "@type"
            ]
        },
        "ProductSpecificationRef": {
            "description": "Product specification reference: A ProductSpecification is a detailed description of a tangible or intangible object made available externally in the form of a ProductOffering to customers or other parties playing a party role.",
            "allOf": [
                {
                    "$ref": "fit-core.schema.json#/$defs/EntityRef"
                },
                {
                    "type": "object",
                    "properties": {
                        "id": {
                            "description": "Unique Identifier of the product specification",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 36,
                            "example": "2d7ed5fd-9f62-4211-bc84-357f5f7b80f5"
                        },
                        "name": {
                            "description": "Name of the product specification",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                        },
                        "version": {
                            "description": "Version of the product specification",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100,
                            "example": "1.0"
                        },
                        "targetProductSchema": {
                            "$ref": "#/$defs/TargetProductSchema",
                            "minLength": 1,
                            "maxLength": 100
                        }
                    }
                }
            ]
        },
        "ProductOffering": {
            "description": "Represents entities that are orderable from the provider of the catalog, this resource includes pricing information.",
            "allOf": [
                {
                    "$ref": "fit-core.schema.json#/$defs/Entity"
                },
                {
                    "type": "object",
                    "properties": {
                        "description": {
                            "description": "Description of the productOffering",
                            "type": "string",
                            "example": "Lorem ipsum dolor"
                        },
                        "version": {
                            "description": "ProductOffering version",
                            "type": "string",
                            "example": "1.0"
                        },
                        "lifecycleStatus": {
                            "description": "Used to indicate the current lifecycle status",
                            "type": "string",
                            "example": "created"
                        },
                        "name": {
                            "description": "Name of the productOffering",
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100,
                            "example": "product offering name"
                        },
                        "productSpecification": {
                            "description": "A ProductSpecification is a detailed description of a tangible or intangible object made available externally in the form of a ProductOffering to customers or other parties playing a party role.",
                            "$ref": "#/$defs/ProductSpecificationRef"
                        }
                    },
                    "required": [
                        "name"
                    ]
                }
            ]
        },
        "ProductOfferingRef": {
            "description": "ProductOffering reference. A product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing information.",
            "type": "object",
            "allOf": [
                {
                    "$ref": "fit-core.schema.json#/$defs/EntityRef"
                }
            ]
        },
        "ProductOfferingRefOrValue": {
            "description": "The polymorphic attributes @type, @schemaLocation & @referredType are related to the Resource entity and not the ProductOfferingRefOrValue class itself",
            "type": "object",
            "discriminator": {
                "propertyName": "@type"
            },
            "oneOf": [
                {
                    "$ref": "#/$defs/ProductOffering"
                },
                {
                    "$ref": "#/$defs/ProductOfferingRef"
                }
            ]
        }
    }
}