{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "fit-tmf621.schema.json",
  "title": "Trouble Ticket Object",
  "oneOf": [
    {
      "properties": {
        "@type": {
          "const": "TroubleTicket"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/TroubleTicket"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "TroubleTicket_FVO"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/TroubleTicket_FVO"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "FaultTicket"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/FaultTicket"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "FaultTicket_FVO"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/FaultTicket_FVO"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "CancelTroubleTicket"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/CancelTroubleTicket"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "CancelTroubleTicket_FVO"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/CancelTroubleTicket_FVO"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "InflightChangeTroubleTicket"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/InflightChangeTroubleTicket"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "InflightChangeTroubleTicket_FVO"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/InflightChangeTroubleTicket_FVO"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "TroubleTicketSpecification"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/TroubleTicketSpecification"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "TroubleTicketCreateEvent"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/TroubleTicketCreateEvent"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "TroubleTicketAttributeValueChangeEvent"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/TroubleTicketAttributeValueChangeEvent"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "TroubleTicketStatusChangeEvent"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/TroubleTicketStatusChangeEvent"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "TroubleTicketResolvedEvent"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/TroubleTicketResolvedEvent"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "TroubleTicketInformationRequiredEvent"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/TroubleTicketInformationRequiredEvent"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "TroubleTicketMilestoneEvent"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/TroubleTicketMilestoneEvent"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "TroubleTicketJeopardyAlertEvent"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/TroubleTicketJeopardyAlertEvent"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "CancelTroubleTicketStateChangeEvent"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/CancelTroubleTicketStateChangeEvent"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "InflightChangeTroubleTicketStateChangeEvent"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/InflightChangeTroubleTicketStateChangeEvent"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "TroubleTicketSpecificationCreateEvent"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/TroubleTicketSpecificationCreateEvent"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "TroubleTicketSpecificationAttributeValueChangeEvent"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/TroubleTicketSpecificationAttributeValueChangeEvent"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "TroubleTicketSpecificationStatusChangeEvent"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/TroubleTicketSpecificationStatusChangeEvent"
        }
      ]
    },
    {
      "properties": {
        "@type": {
          "const": "TroubleTicketSpecificationDeleteEvent"
        }
      },
      "required": [
        "@type"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/TroubleTicketSpecificationDeleteEvent"
        }
      ]
    }
  ],
  "$defs": {
    "ChannelRef": {
      "description": "The channel to which the resource reference to. e.g. channel for selling product offerings, channel for opening a trouble ticket etc..",
      "type": "object",
      "allOf": [
        {
          "$ref": "fit-core.schema.json#/$defs/EntityRef"
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "ChannelRef": "#/$defs/ChannelRef"
        }
      }
    },
    "QuestionAnswer": {
      "description": "An object defined as a combination of a question and an answer.",
      "type": "object",
      "properties": {
        "questionId": {
          "description": "The ID of a question from a question/answer catalog",
          "type": "string",
          "example": "DSL01",
          "minLength": 1,
          "maxLength": 8
        },
        "answerId": {
          "description": "The ID of an answer from a question/answer catalog",
          "type": "string",
          "example": "DSL01-01",
          "minLength": 1,
          "maxLength": 8
        }
      },
      "required": [
        "questionId",
        "answerId"
      ],
      "x-fit-source": "created"
    },
    "ExpressFaultResolutionType": {
      "description": "Possible values for the express resolution selection:<ul>\n<li>*standard*: TODO</li>\n<li>*oneTime*: TODO</li>\n<li>*none*: TODO</li>\n</ul>",
      "type": "string",
      "enum": [
        "standard",
        "oneTime",
        "none"
      ]
    },
    "FaultTicket": {
      "allOf": [
        {
          "$ref": "#/$defs/TroubleTicket"
        },
        {
          "type": "object",
          "required": [
            "ticketType",
            "externalIdentifier",
            "agreement"
          ],
          "description": "A specific type of trouble ticket is a record of a fault on a product",
          "properties": {
            "ticketType": {
              "type": "string",
              "enum": [
                "fault",
                "dispute"
              ]
            },
            "attachment": {
              "description": "File(s) attached to the FaultTicket. e.g. picture of broken device",
              "type": "array",
              "items": {
                "allOf": [
                  {
                    "$ref": "fit-common.schema.json#/$defs/AttachmentRefOrValue"
                  },
                  {
                    "type": "object",
                    "required": [
                      "@type"
                    ],
                    "properties": {
                      "@type": {
                        "type": "string",
                        "enum": [
                          "Attachment",
                          "AttachmentRef"
                        ]
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "@type": {
                          "const": "Attachment"
                        }
                      },
                      "required": [
                        "@type"
                      ]
                    },
                    "then": {
                      "allOf": [
                        {
                          "$ref": "fit-common.schema.json#/$defs/Attachment"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "validFor": {
                              "allOf": [
                                {
                                  "$ref": "fit-common.schema.json#/$defs/TimePeriod"
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "startDateTime",
                                    "endDateTime"
                                  ]
                                }
                              ]
                            }
                          }
                        }
                      ]
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "@type": {
                          "const": "AttachmentRef"
                        }
                      },
                      "required": [
                        "@type"
                      ]
                    },
                    "then": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 36
                        },
                        "@referredType": {
                          "type": "string",
                          "const": "Attachment"
                        }
                      },
                      "required": [
                        "id",
                        "@referredType"
                      ]
                    }
                  }
                ]
              }
            },
            "agreement": {
              "description": "A reference to an agreement defined in the context of the product order",
              "type": "array",
              "minItems": 1,
              "items": {
                "allOf": [
                  {
                    "$ref": "fit-common.schema.json#/$defs/AgreementRefOrValue"
                  },
                  {
                    "type": "object",
                    "required": [
                      "@type"
                    ],
                    "properties": {
                      "@type": {
                        "type": "string",
                        "enum": [
                          "Agreement",
                          "AgreementRef"
                        ]
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "@type": {
                          "const": "Agreement"
                        }
                      },
                      "required": [
                        "@type"
                      ]
                    },
                    "then": {
                      "type": "object",
                      "required": [
                        "agreementType",
                        "name",
                        "businessId"
                      ],
                      "properties": {
                        "agreementType": {
                          "type": "string",
                          "enum": [
                            "buyerServiceContract",
                            "ordererServiceContract",
                            "singleContract"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 160
                        },
                        "businessId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40
                        },
                        "engagedParty": {
                          "type": "array",
                          "maxItems": 1,
                          "items": {
                            "type": "object",
                            "required": [
                              "@type",
                              "businessId"
                            ],
                            "properties": {
                              "@type": {
                                "type": "string",
                                "enum": [
                                  "Organization"
                                ]
                              },
                              "businessId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 10
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "@type": {
                          "const": "AgreementRef"
                        }
                      },
                      "required": [
                        "@type"
                      ]
                    },
                    "then": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 36
                        },
                        "@referredType": {
                          "type": "string",
                          "const": "Agreement"
                        }
                      },
                      "required": [
                        "id",
                        "@referredType"
                      ]
                    }
                  }
                ]
              }
            },
            "description": {
              "type": "string",
              "maxLength": 1024
            },
            "requestedResolutionDate": {
              "type": "string",
              "format": "date-time"
            },
            "endUserContactAllowed": {
              "description": "Defines if direct contact with end user is allowed",
              "type": "boolean"
            },
            "endUserAppointmentIsNecessary": {
              "description": "Defines if an appointment with the endUser is necessary",
              "type": "boolean"
            },
            "accessLineId": {
              "description": "Technical identifier for a physical connection",
              "type": "string",
              "example": "DEU.DTAG.FTYLIQ7PFT",
              "minLength": 7,
              "maxLength": 21
            },
            "networkTerminationLocation": {
              "description": "Describes the location of the network termination in the building",
              "type": "string",
              "example": "Flur",
              "minLength": 1,
              "maxLength": 160
            },
            "expressFaultResolution": {
              "$ref": "#/$defs/ExpressFaultResolutionType"
            },
            "faultQuestionnaire": {
              "description": "An array of questions and answers",
              "type": "array",
              "minItems": 0,
              "maxItems": 99,
              "items": {
                "$ref": "#/$defs/QuestionAnswer"
              }
            },
            "interimMessagesRequested": {
              "description": "Defines if interim messages are requested to be provided",
              "type": "boolean"
            },
            "resolutionDisputeReason": {
              "description": "Indicates the reason why the resolution of the trouble ticket is disputed",
              "type": "string",
              "maxLength": 1024
            },
            "requestedTimeSlot": {
              "$ref": "fit-common.schema.json#/$defs/TimeSlot"
            },
            "appointment": {
              "allOf": [
                {
                  "$ref": "fit-common.schema.json#/$defs/AppointmentRefOrValue"
                },
                {
                  "if": {
                    "properties": {
                      "@type": {
                        "const": "Appointment"
                      }
                    },
                    "required": [
                      "@type"
                    ]
                  },
                  "then": {
                    "properties": {
                      "validFor": {
                        "type": "object",
                        "required": [
                          "startDateTime",
                          "endDateTime"
                        ]
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "@type": {
                        "const": "AppointmentRef"
                      }
                    },
                    "required": [
                      "@type"
                    ]
                  },
                  "then": {
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 36
                      },
                      "@referredType": {
                        "type": "string",
                        "const": "Appointment"
                      }
                    },
                    "required": [
                      "id",
                      "@referredType"
                    ]
                  }
                }
              ]
            },
            "categoryId": {
              "description": "Identifier of the trouble ticket category",
              "type": "string",
              "minLength": 1,
              "maxLength": 8
            },
            "billingItem": {
              "description": "Array/List of billing items",
              "type": "array",
              "minItems": 0,
              "maxItems": 99,
              "items": {
                "type": "string"
              }
            },
            "relatedParty": {
              "description": "The related party(ies) that are associated to the ticket.",
              "type": "array",
              "minItems": 0,
              "maxItems": 99,
              "items": {
                "allOf": [
                  {
                    "$ref": "fit-common.schema.json#/$defs/RelatedPartyOrPartyRole"
                  },
                  {
                    "type": "object",
                    "required": [
                      "role",
                      "partyOrPartyRole"
                    ],
                    "properties": {
                      "role": {
                        "type": "string",
                        "enum": [
                          "locationAContact",
                          "installationContact",
                          "orderManagementSellerContact",
                          "orderManagementBuyerContact"
                        ]
                      },
                      "partyOrPartyRole": {
                        "description": "Either an Individual or an Organization.",
                        "oneOf": [
                          {
                            "allOf": [
                              {
                                "$ref": "fit-common.schema.json#/$defs/Individual"
                              },
                              {
                                "type": "object",
                                "required": [
                                  "@type",
                                  "familyName"
                                ],
                                "properties": {
                                  "@type": {
                                    "const": "Individual"
                                  },
                                  "familyName": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 30
                                  },
                                  "givenName": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 30
                                  },
                                  "salutation": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 30
                                  },
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 30
                                  },
                                  "contactMedium": {
                                    "type": "array",
                                    "items": {
                                      "allOf": [
                                        {
                                          "$ref": "fit-common.schema.json#/$defs/ContactMedium"
                                        },
                                        {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "required": [
                                                "@type",
                                                "contactType",
                                                "phoneNumber"
                                              ],
                                              "properties": {
                                                "@type": {
                                                  "const": "PhoneContactMedium"
                                                },
                                                "preferred": {
                                                  "type": "boolean"
                                                },
                                                "contactType": {
                                                  "type": "string",
                                                  "enum": [
                                                    "fixed",
                                                    "mobile"
                                                  ]
                                                },
                                                "phoneNumber": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 30
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "@type",
                                                "contactType",
                                                "emailAddress"
                                              ],
                                              "properties": {
                                                "@type": {
                                                  "const": "EmailContactMedium"
                                                },
                                                "preferred": {
                                                  "type": "boolean"
                                                },
                                                "contactType": {
                                                  "type": "string",
                                                  "enum": [
                                                    "email"
                                                  ]
                                                },
                                                "emailAddress": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 255
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "@type",
                                                "contactType",
                                                "city",
                                                "postcode",
                                                "streetName",
                                                "streetNr"
                                              ],
                                              "properties": {
                                                "@type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "PostalAddressContactMedium"
                                                  ]
                                                },
                                                "preferred": {
                                                  "type": "boolean"
                                                },
                                                "contactType": {
                                                  "type": "string",
                                                  "enum": [
                                                    "postal"
                                                  ]
                                                },
                                                "city": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 40
                                                },
                                                "country": {
                                                  "type": "string",
                                                  "minLength": 2,
                                                  "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,
                                                  "pattern": "^[0-9]{1,4}$"
                                                },
                                                "streetNrSuffix": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 6
                                                }
                                              }
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  }
                                }
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "$ref": "fit-common.schema.json#/$defs/Organization"
                              },
                              {
                                "type": "object",
                                "required": [
                                  "@type",
                                  "name"
                                ],
                                "properties": {
                                  "@type": {
                                    "const": "Organization"
                                  },
                                  "name": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 60
                                  },
                                  "contactMedium": {
                                    "type": "array",
                                    "items": {
                                      "allOf": [
                                        {
                                          "$ref": "fit-common.schema.json#/$defs/ContactMedium"
                                        },
                                        {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "required": [
                                                "@type",
                                                "contactType",
                                                "phoneNumber"
                                              ],
                                              "properties": {
                                                "@type": {
                                                  "const": "PhoneContactMedium"
                                                },
                                                "preferred": {
                                                  "type": "boolean"
                                                },
                                                "contactType": {
                                                  "type": "string",
                                                  "enum": [
                                                    "fixed",
                                                    "mobile"
                                                  ]
                                                },
                                                "phoneNumber": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 30
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "@type",
                                                "contactType",
                                                "emailAddress"
                                              ],
                                              "properties": {
                                                "@type": {
                                                  "const": "EmailContactMedium"
                                                },
                                                "preferred": {
                                                  "type": "boolean"
                                                },
                                                "contactType": {
                                                  "type": "string",
                                                  "enum": [
                                                    "email"
                                                  ]
                                                },
                                                "emailAddress": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 255
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "@type",
                                                "contactType",
                                                "city",
                                                "postcode",
                                                "streetName",
                                                "streetNr"
                                              ],
                                              "properties": {
                                                "@type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "PostalAddressContactMedium"
                                                  ]
                                                },
                                                "preferred": {
                                                  "type": "boolean"
                                                },
                                                "contactType": {
                                                  "type": "string",
                                                  "enum": [
                                                    "postal"
                                                  ]
                                                },
                                                "city": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 40
                                                },
                                                "country": {
                                                  "type": "string",
                                                  "minLength": 2,
                                                  "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,
                                                  "pattern": "^[0-9]{1,4}$"
                                                },
                                                "streetNrSuffix": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 6
                                                }
                                              }
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  }
                                }
                              }
                            ]
                          }
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "ticketType": {
                "const": "fault"
              }
            },
            "required": [
              "ticketType"
            ]
          },
          "then": {
            "allOf": [
              {
                "not": {
                  "required": [
                    "resolutionDisputeReason"
                  ]
                }
              }
            ]
          }
        },
        {
          "if": {
            "properties": {
              "ticketType": {
                "const": "dispute"
              }
            },
            "required": [
              "ticketType"
            ]
          },
          "then": {
            "required": [
              "troubleTicketRelationship"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "ticketType": {
                "const": "fault"
              }
            },
            "required": [
              "ticketType"
            ]
          },
          "then": {
            "properties": {
              "relatedParty": {
                "minItems": 2,
                "maxItems": 99
              }
            },
            "required": [
              "relatedParty"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "ticketType": {
                "const": "dispute"
              }
            },
            "required": [
              "ticketType"
            ]
          },
          "then": {
            "properties": {
              "relatedParty": {
                "minItems": 0,
                "maxItems": 99
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "ticketType": {
                "const": "fault"
              }
            },
            "required": [
              "ticketType"
            ]
          },
          "then": {
            "properties": {
              "relatedEntity": {
                "description": "An entity that is related to the ticket such as a bill, a product, etc. The entity against which the ticket is associated.",
                "type": "array",
                "minItems": 1,
                "maxItems": 3,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/TroubleTicketRelatedEntityItem"
                    },
                    {
                      "type": "object",
                      "required": [
                        "role",
                        "entity"
                      ],
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "affectedProduct",
                            "diagnosis",
                            "optionalServices"
                          ]
                        }
                      }
                    },
                    {
                      "if": {
                        "properties": {
                          "role": {
                            "const": "optionalServices"
                          }
                        },
                        "required": [
                          "role"
                        ]
                      },
                      "then": {
                        "properties": {
                          "entity": {
                            "type": "object",
                            "required": [
                              "@type",
                              "name"
                            ],
                            "properties": {
                              "@type": {
                                "const": "ProductOffering"
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 60
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "if": {
                        "properties": {
                          "role": {
                            "const": "affectedProduct"
                          }
                        },
                        "required": [
                          "role"
                        ]
                      },
                      "then": {
                        "properties": {
                          "entity": {
                            "type": "object",
                            "required": [
                              "@type",
                              "id",
                              "@referredType"
                            ],
                            "properties": {
                              "@type": {
                                "const": "EntityRef"
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 36
                              },
                              "@referredType": {
                                "const": "Product"
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "if": {
                        "properties": {
                          "role": {
                            "const": "diagnosis"
                          }
                        },
                        "required": [
                          "role"
                        ]
                      },
                      "then": {
                        "properties": {
                          "entity": {
                            "type": "object",
                            "required": [
                              "@type",
                              "id",
                              "@referredType"
                            ],
                            "properties": {
                              "@type": {
                                "const": "EntityRef"
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 36
                              },
                              "@referredType": {
                                "const": "ProductTest"
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            },
            "required": [
              "relatedEntity"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "ticketType": {
                "const": "dispute"
              }
            },
            "required": [
              "ticketType"
            ]
          },
          "then": {
            "properties": {
              "relatedEntity": {
                "description": "An entity that is related to the ticket such as a bill, a product, etc. The entity against which the ticket is associated.",
                "type": "array",
                "minItems": 0,
                "maxItems": 3,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/TroubleTicketRelatedEntityItem"
                    },
                    {
                      "type": "object",
                      "required": [
                        "role",
                        "entity"
                      ],
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "affectedProduct",
                            "diagnosis",
                            "optionalServices"
                          ]
                        }
                      }
                    },
                    {
                      "if": {
                        "properties": {
                          "role": {
                            "const": "optionalServices"
                          }
                        },
                        "required": [
                          "role"
                        ]
                      },
                      "then": {
                        "properties": {
                          "entity": {
                            "type": "object",
                            "required": [
                              "@type",
                              "name"
                            ],
                            "properties": {
                              "@type": {
                                "const": "ProductOffering"
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 60
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "if": {
                        "properties": {
                          "role": {
                            "const": "affectedProduct"
                          }
                        },
                        "required": [
                          "role"
                        ]
                      },
                      "then": {
                        "properties": {
                          "entity": {
                            "type": "object",
                            "required": [
                              "@type",
                              "id",
                              "@referredType"
                            ],
                            "properties": {
                              "@type": {
                                "const": "EntityRef"
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 36
                              },
                              "@referredType": {
                                "const": "Product"
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "if": {
                        "properties": {
                          "role": {
                            "const": "diagnosis"
                          }
                        },
                        "required": [
                          "role"
                        ]
                      },
                      "then": {
                        "properties": {
                          "entity": {
                            "type": "object",
                            "required": [
                              "@type",
                              "id",
                              "@referredType"
                            ],
                            "properties": {
                              "@type": {
                                "const": "EntityRef"
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 36
                              },
                              "@referredType": {
                                "const": "ProductTest"
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "FaultTicket": "#/$defs/FaultTicket"
        }
      }
    },
    "FaultTicket_FVO": {
      "allOf": [
        {
          "$ref": "#/$defs/TroubleTicket_FVO"
        },
        {
          "type": "object",
          "required": [
            "ticketType",
            "externalIdentifier",
            "agreement"
          ],
          "description": "A specific type of trouble ticket is a record of a fault on a product",
          "properties": {
            "ticketType": {
              "type": "string",
              "enum": [
                "fault",
                "dispute"
              ]
            },
            "agreement": {
              "description": "A reference to an agreement defined in the context of the product order",
              "type": "array",
              "minItems": 1,
              "items": {
                "allOf": [
                  {
                    "$ref": "fit-common.schema.json#/$defs/AgreementRefOrValue"
                  },
                  {
                    "type": "object",
                    "required": [
                      "@type"
                    ],
                    "properties": {
                      "@type": {
                        "type": "string",
                        "enum": [
                          "Agreement",
                          "AgreementRef"
                        ]
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "@type": {
                          "const": "Agreement"
                        }
                      },
                      "required": [
                        "@type"
                      ]
                    },
                    "then": {
                      "type": "object",
                      "required": [
                        "agreementType",
                        "name",
                        "businessId"
                      ],
                      "properties": {
                        "agreementType": {
                          "type": "string",
                          "enum": [
                            "buyerServiceContract",
                            "ordererServiceContract",
                            "singleContract"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 160
                        },
                        "businessId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40
                        },
                        "engagedParty": {
                          "type": "array",
                          "maxItems": 1,
                          "items": {
                            "type": "object",
                            "required": [
                              "@type",
                              "businessId"
                            ],
                            "properties": {
                              "@type": {
                                "type": "string",
                                "enum": [
                                  "Organization"
                                ]
                              },
                              "businessId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 10
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "@type": {
                          "const": "AgreementRef"
                        }
                      },
                      "required": [
                        "@type"
                      ]
                    },
                    "then": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 36
                        },
                        "@referredType": {
                          "type": "string",
                          "const": "Agreement"
                        }
                      },
                      "required": [
                        "id",
                        "@referredType"
                      ]
                    }
                  }
                ]
              }
            },
            "description": {
              "type": "string",
              "maxLength": 1024
            },
            "requestedResolutionDate": {
              "type": "string",
              "format": "date-time"
            },
            "endUserContactAllowed": {
              "description": "Defines if direct contact with end user is allowed",
              "type": "boolean"
            },
            "endUserAppointmentIsNecessary": {
              "description": "Defines if an appointment with the endUser is necessary",
              "type": "boolean"
            },
            "accessLineId": {
              "description": "Technical identifier for a physical connection",
              "type": "string",
              "example": "DEU.DTAG.FTYLIQ7PFT",
              "minLength": 7,
              "maxLength": 21
            },
            "networkTerminationLocation": {
              "description": "Describes the location of the network termination in the building",
              "type": "string",
              "example": "Flur",
              "minLength": 1,
              "maxLength": 160
            },
            "expressFaultResolution": {
              "$ref": "#/$defs/ExpressFaultResolutionType"
            },
            "faultQuestionnaire": {
              "description": "An array of questions and answers",
              "type": "array",
              "minItems": 0,
              "maxItems": 99,
              "items": {
                "$ref": "#/$defs/QuestionAnswer"
              }
            },
            "interimMessagesRequested": {
              "description": "Defines if interim messages are requested to be provided",
              "type": "boolean"
            },
            "resolutionDisputeReason": {
              "description": "Indicates the reason why the resolution of the trouble ticket is disputed",
              "type": "string",
              "maxLength": 1024
            },
            "requestedTimeSlot": {
              "$ref": "fit-common.schema.json#/$defs/TimeSlot"
            },
            "appointment": {
              "allOf": [
                {
                  "$ref": "fit-common.schema.json#/$defs/AppointmentRefOrValue"
                },
                {
                  "if": {
                    "properties": {
                      "@type": {
                        "const": "Appointment"
                      }
                    },
                    "required": [
                      "@type"
                    ]
                  },
                  "then": {
                    "properties": {
                      "validFor": {
                        "type": "object",
                        "required": [
                          "startDateTime",
                          "endDateTime"
                        ]
                      }
                    }
                  }
                },
                {
                  "if": {
                    "properties": {
                      "@type": {
                        "const": "AppointmentRef"
                      }
                    },
                    "required": [
                      "@type"
                    ]
                  },
                  "then": {
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 36
                      },
                      "@referredType": {
                        "type": "string",
                        "const": "Appointment"
                      }
                    },
                    "required": [
                      "id",
                      "@referredType"
                    ]
                  }
                }
              ]
            },
            "categoryId": {
              "description": "Identifier of the trouble ticket category",
              "type": "string",
              "minLength": 1,
              "maxLength": 8
            },
            "billingItem": {
              "description": "Array/List of billing items",
              "type": "array",
              "minItems": 0,
              "maxItems": 99,
              "items": {
                "type": "string"
              }
            },
            "relatedParty": {
              "description": "The related party(ies) that are associated to the ticket.",
              "type": "array",
              "minItems": 0,
              "maxItems": 99,
              "items": {
                "allOf": [
                  {
                    "$ref": "fit-common.schema.json#/$defs/RelatedPartyOrPartyRole"
                  },
                  {
                    "type": "object",
                    "required": [
                      "role",
                      "partyOrPartyRole"
                    ],
                    "properties": {
                      "role": {
                        "type": "string",
                        "enum": [
                          "locationAContact",
                          "installationContact",
                          "orderManagementSellerContact",
                          "orderManagementBuyerContact"
                        ]
                      },
                      "partyOrPartyRole": {
                        "description": "Either an Individual or an Organization.",
                        "oneOf": [
                          {
                            "allOf": [
                              {
                                "$ref": "fit-common.schema.json#/$defs/Individual"
                              },
                              {
                                "type": "object",
                                "required": [
                                  "@type",
                                  "familyName"
                                ],
                                "properties": {
                                  "@type": {
                                    "const": "Individual"
                                  },
                                  "familyName": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 30
                                  },
                                  "givenName": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 30
                                  },
                                  "salutation": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 30
                                  },
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 30
                                  },
                                  "contactMedium": {
                                    "type": "array",
                                    "items": {
                                      "allOf": [
                                        {
                                          "$ref": "fit-common.schema.json#/$defs/ContactMedium"
                                        },
                                        {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "required": [
                                                "@type",
                                                "contactType",
                                                "phoneNumber"
                                              ],
                                              "properties": {
                                                "@type": {
                                                  "const": "PhoneContactMedium"
                                                },
                                                "preferred": {
                                                  "type": "boolean"
                                                },
                                                "contactType": {
                                                  "type": "string",
                                                  "enum": [
                                                    "fixed",
                                                    "mobile"
                                                  ]
                                                },
                                                "phoneNumber": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 30
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "@type",
                                                "contactType",
                                                "emailAddress"
                                              ],
                                              "properties": {
                                                "@type": {
                                                  "const": "EmailContactMedium"
                                                },
                                                "preferred": {
                                                  "type": "boolean"
                                                },
                                                "contactType": {
                                                  "type": "string",
                                                  "enum": [
                                                    "email"
                                                  ]
                                                },
                                                "emailAddress": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 255
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "@type",
                                                "contactType",
                                                "city",
                                                "postcode",
                                                "streetName",
                                                "streetNr"
                                              ],
                                              "properties": {
                                                "@type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "PostalAddressContactMedium"
                                                  ]
                                                },
                                                "preferred": {
                                                  "type": "boolean"
                                                },
                                                "contactType": {
                                                  "type": "string",
                                                  "enum": [
                                                    "postal"
                                                  ]
                                                },
                                                "city": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 40
                                                },
                                                "country": {
                                                  "type": "string",
                                                  "minLength": 2,
                                                  "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,
                                                  "pattern": "^[0-9]{1,4}$"
                                                },
                                                "streetNrSuffix": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 6
                                                }
                                              }
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  }
                                }
                              }
                            ]
                          },
                          {
                            "allOf": [
                              {
                                "$ref": "fit-common.schema.json#/$defs/Organization"
                              },
                              {
                                "type": "object",
                                "required": [
                                  "@type",
                                  "name"
                                ],
                                "properties": {
                                  "@type": {
                                    "const": "Organization"
                                  },
                                  "name": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 60
                                  },
                                  "contactMedium": {
                                    "type": "array",
                                    "items": {
                                      "allOf": [
                                        {
                                          "$ref": "fit-common.schema.json#/$defs/ContactMedium"
                                        },
                                        {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "required": [
                                                "@type",
                                                "contactType",
                                                "phoneNumber"
                                              ],
                                              "properties": {
                                                "@type": {
                                                  "const": "PhoneContactMedium"
                                                },
                                                "preferred": {
                                                  "type": "boolean"
                                                },
                                                "contactType": {
                                                  "type": "string",
                                                  "enum": [
                                                    "fixed",
                                                    "mobile"
                                                  ]
                                                },
                                                "phoneNumber": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 30
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "@type",
                                                "contactType",
                                                "emailAddress"
                                              ],
                                              "properties": {
                                                "@type": {
                                                  "const": "EmailContactMedium"
                                                },
                                                "preferred": {
                                                  "type": "boolean"
                                                },
                                                "contactType": {
                                                  "type": "string",
                                                  "enum": [
                                                    "email"
                                                  ]
                                                },
                                                "emailAddress": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 255
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "@type",
                                                "contactType",
                                                "city",
                                                "postcode",
                                                "streetName",
                                                "streetNr"
                                              ],
                                              "properties": {
                                                "@type": {
                                                  "type": "string",
                                                  "enum": [
                                                    "PostalAddressContactMedium"
                                                  ]
                                                },
                                                "preferred": {
                                                  "type": "boolean"
                                                },
                                                "contactType": {
                                                  "type": "string",
                                                  "enum": [
                                                    "postal"
                                                  ]
                                                },
                                                "city": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 40
                                                },
                                                "country": {
                                                  "type": "string",
                                                  "minLength": 2,
                                                  "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,
                                                  "pattern": "^[0-9]{1,4}$"
                                                },
                                                "streetNrSuffix": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 6
                                                }
                                              }
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  }
                                }
                              }
                            ]
                          }
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "ticketType": {
                "const": "fault"
              }
            },
            "required": [
              "ticketType"
            ]
          },
          "then": {
            "allOf": [
              {
                "not": {
                  "required": [
                    "resolutionDisputeReason"
                  ]
                }
              }
            ]
          }
        },
        {
          "if": {
            "properties": {
              "ticketType": {
                "const": "dispute"
              }
            },
            "required": [
              "ticketType"
            ]
          },
          "then": {
            "required": [
              "troubleTicketRelationship"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "ticketType": {
                "const": "fault"
              }
            },
            "required": [
              "ticketType"
            ]
          },
          "then": {
            "properties": {
              "relatedParty": {
                "minItems": 2,
                "maxItems": 99
              }
            },
            "required": [
              "relatedParty"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "ticketType": {
                "const": "dispute"
              }
            },
            "required": [
              "ticketType"
            ]
          },
          "then": {
            "properties": {
              "relatedParty": {
                "minItems": 0,
                "maxItems": 99
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "ticketType": {
                "const": "fault"
              }
            },
            "required": [
              "ticketType"
            ]
          },
          "then": {
            "properties": {
              "relatedEntity": {
                "description": "An entity that is related to the ticket such as a bill, a product, etc. The entity against which the ticket is associated.",
                "type": "array",
                "minItems": 1,
                "maxItems": 3,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/TroubleTicketRelatedEntityItem"
                    },
                    {
                      "type": "object",
                      "required": [
                        "role",
                        "entity"
                      ],
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "affectedProduct",
                            "diagnosis",
                            "optionalServices"
                          ]
                        }
                      }
                    },
                    {
                      "if": {
                        "properties": {
                          "role": {
                            "const": "optionalServices"
                          }
                        },
                        "required": [
                          "role"
                        ]
                      },
                      "then": {
                        "properties": {
                          "entity": {
                            "type": "object",
                            "required": [
                              "@type",
                              "name"
                            ],
                            "properties": {
                              "@type": {
                                "const": "ProductOffering"
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 60
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "if": {
                        "properties": {
                          "role": {
                            "const": "affectedProduct"
                          }
                        },
                        "required": [
                          "role"
                        ]
                      },
                      "then": {
                        "properties": {
                          "entity": {
                            "type": "object",
                            "required": [
                              "@type",
                              "id",
                              "@referredType"
                            ],
                            "properties": {
                              "@type": {
                                "const": "EntityRef"
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 36
                              },
                              "@referredType": {
                                "const": "Product"
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "if": {
                        "properties": {
                          "role": {
                            "const": "diagnosis"
                          }
                        },
                        "required": [
                          "role"
                        ]
                      },
                      "then": {
                        "properties": {
                          "entity": {
                            "type": "object",
                            "required": [
                              "@type",
                              "id",
                              "@referredType"
                            ],
                            "properties": {
                              "@type": {
                                "const": "EntityRef"
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 36
                              },
                              "@referredType": {
                                "const": "ProductTest"
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            },
            "required": [
              "relatedEntity"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "ticketType": {
                "const": "dispute"
              }
            },
            "required": [
              "ticketType"
            ]
          },
          "then": {
            "properties": {
              "relatedEntity": {
                "description": "An entity that is related to the ticket such as a bill, a product, etc. The entity against which the ticket is associated.",
                "type": "array",
                "minItems": 0,
                "maxItems": 3,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/$defs/TroubleTicketRelatedEntityItem"
                    },
                    {
                      "type": "object",
                      "required": [
                        "role",
                        "entity"
                      ],
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "affectedProduct",
                            "diagnosis",
                            "optionalServices"
                          ]
                        }
                      }
                    },
                    {
                      "if": {
                        "properties": {
                          "role": {
                            "const": "optionalServices"
                          }
                        },
                        "required": [
                          "role"
                        ]
                      },
                      "then": {
                        "properties": {
                          "entity": {
                            "type": "object",
                            "required": [
                              "@type",
                              "name"
                            ],
                            "properties": {
                              "@type": {
                                "const": "ProductOffering"
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 60
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "if": {
                        "properties": {
                          "role": {
                            "const": "affectedProduct"
                          }
                        },
                        "required": [
                          "role"
                        ]
                      },
                      "then": {
                        "properties": {
                          "entity": {
                            "type": "object",
                            "required": [
                              "@type",
                              "id",
                              "@referredType"
                            ],
                            "properties": {
                              "@type": {
                                "const": "EntityRef"
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 36
                              },
                              "@referredType": {
                                "const": "Product"
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "if": {
                        "properties": {
                          "role": {
                            "const": "diagnosis"
                          }
                        },
                        "required": [
                          "role"
                        ]
                      },
                      "then": {
                        "properties": {
                          "entity": {
                            "type": "object",
                            "required": [
                              "@type",
                              "id",
                              "@referredType"
                            ],
                            "properties": {
                              "@type": {
                                "const": "EntityRef"
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 36
                              },
                              "@referredType": {
                                "const": "ProductTest"
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "FaultTicket": "#/$defs/FaultTicket_FVO"
        }
      }
    },
    "ProductRef": {
      "allOf": [
        {
          "$ref": "fit-core.schema.json#/$defs/EntityRef"
        },
        {
          "type": "object",
          "description": "Reference to a product"
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "ProductRef": "#/$defs/ProductRef"
        }
      }
    },
    "ProductTestRef": {
      "allOf": [
        {
          "$ref": "fit-core.schema.json#/$defs/EntityRef"
        },
        {
          "type": "object",
          "description": "Reference to a product test"
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "ProductTestRef": "#/$defs/ProductTestRef"
        }
      }
    },
    "TroubleTicket": {
      "allOf": [
        {
          "$ref": "fit-core.schema.json#/$defs/Entity"
        },
        {
          "type": "object",
          "required": [
            "orderPostedDate"
          ],
          "description": "A trouble ticket is a record of an issue that is created, tracked, and managed by a trouble ticket management system",
          "properties": {
            "name": {
              "description": "Name of the trouble ticket, typically a short description provided by the user that create the ticket",
              "type": "string"
            },
            "description": {
              "description": "Description of the trouble or issue",
              "type": "string"
            },
            "orderPostedDate": {
              "description": "Date when the order was posted by the requester",
              "type": "string",
              "format": "date-time"
            },
            "severity": {
              "description": "The severity of the issue. Indicate the implication of the issue on the expected functionality e.g. of a system, application, service etc.. \nSeverity values can be for example : Critical, Major, Minor",
              "type": "string"
            },
            "ticketType": {
              "description": "represent a business type of the trouble ticket e.g. incident, complain, request",
              "type": "string"
            },
            "attachment": {
              "description": "File(s) attached to the trouble ticket. e.g. picture of broken device, scaning of a bill or charge",
              "type": "array",
              "items": {
                "$ref": "fit-common.schema.json#/$defs/AttachmentRefOrValue"
              }
            },
            "channel": {
              "$ref": "#/$defs/ChannelRef"
            },
            "creationDate": {
              "description": "The date on which the trouble ticket was created",
              "type": "string",
              "format": "date-time"
            },
            "requestedResolutionDate": {
              "description": "The resolution date requested by the user",
              "type": "string",
              "format": "date-time"
            },
            "expectedResolutionDate": {
              "description": "The expected resolution date determined by the trouble ticket system",
              "type": "string",
              "format": "date-time"
            },
            "resolutionDate": {
              "description": "The date and time the trouble ticket was resolved",
              "type": "string",
              "format": "date-time"
            },
            "externalIdentifier": {
              "type": "array",
              "items": {
                "allOf": [
                  {
                    "$ref": "fit-common.schema.json#/$defs/ExternalIdentifier"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "externalIdentifierType": {
                        "type": "string",
                        "enum": [
                          "troubleTicketExternalId"
                        ]
                      }
                    }
                  }
                ]
              }
            },
            "lastUpdate": {
              "description": "The date and time that the trouble ticket was last updated",
              "type": "string",
              "format": "date-time"
            },
            "note": {
              "description": "The note(s) that are associated to the ticket.",
              "type": "array",
              "items": {
                "allOf": [
                  {
                    "$ref": "fit-common.schema.json#/$defs/Note"
                  },
                  {
                    "type": "object",
                    "required": [
                      "text"
                    ],
                    "properties": {
                      "@type": {
                        "type": "string",
                        "const": "TroubleTicketRemark",
                        "minLength": 1,
                        "maxLength": 40
                      },
                      "text": {
                        "description": "Text of the note",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      }
                    }
                  }
                ]
              }
            },
            "priority": {
              "description": "The priority of the trouble ticket and how quickly the issue should be resolved. Example: Critical, High, Medium, Low. The value is set by the ticket management system considering the severity, ticket type etc...",
              "type": "string"
            },
            "relatedEntity": {
              "description": "An entity that is related to the ticket such as a bill, a product, etc. The entity against which the ticket is associated.",
              "type": "array",
              "items": {
                "$ref": "#/$defs/TroubleTicketRelatedEntityItem"
              }
            },
            "relatedParty": {
              "description": "The related party(ies) that are associated to the ticket.",
              "type": "array",
              "items": {
                "$ref": "fit-common.schema.json#/$defs/RelatedPartyOrPartyRole"
              }
            },
            "status": {
              "$ref": "#/$defs/TroubleTicketStatusType"
            },
            "statusChangeDate": {
              "description": "The date and time the status changed.",
              "type": "string",
              "format": "date-time"
            },
            "statusChangeMessage": {
              "description": "Message for the status change described as a combination of a text and a code.",
              "type": "array",
              "items": {
                "allOf": [
                  {
                    "$ref": "fit-common.schema.json#/$defs/Message"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string",
                        "description": "Predefined text describing the message corresponding to the code",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      "code": {
                        "type": "string",
                        "description": "Predefined code corresponding to the message",
                        "minLength": 1,
                        "maxLength": 10
                      },
                      "additionalInformation": {
                        "type": "string",
                        "description": "additional textual information for the message",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    }
                  }
                ]
              },
              "x-fit-source": "created"
            },
            "statusChangeHistory": {
              "description": "The status change history that are associated to the ticket. Populated by the server",
              "type": "array",
              "items": {
                "$ref": "fit-common.schema.json#/$defs/StatusChange"
              }
            },
            "troubleTicketRelationship": {
              "description": "A list of trouble ticket relationships (TroubleTicketRelationship [*]). Represents a relationship between trouble tickets",
              "type": "array",
              "items": {
                "$ref": "#/$defs/TroubleTicketRelationship"
              }
            },
            "troubleTicketCharacteristic": {
              "description": "List of characteristics of the trouble ticket",
              "type": "array",
              "items": {
                "$ref": "fit-common.schema.json#/$defs/Characteristic"
              }
            },
            "troubleTicketJeopardyAlert": {
              "description": "List of TroubleTicketJeopardyAlerts. A TroubleTicketJeopardyAlert represents a predicted exception during a trouble ticket processing that would brings risk to resolve successfully the trouble ticket.",
              "type": "array",
              "items": {
                "$ref": "#/$defs/TroubleTicketJeopardyAlert"
              },
              "x-fit-source": "created"
            },
            "troubleTicketMilestone": {
              "description": "List of TroubleTicketMilestones. A TroubleTicketMilestone represents an action or event marking a significant change or stage in processing of a trouble ticket.",
              "type": "array",
              "items": {
                "$ref": "#/$defs/TroubleTicketMilestone"
              },
              "x-fit-source": "created"
            },
            "troubleTicketSpecification": {
              "$ref": "#/$defs/TroubleTicketSpecificationRef"
            },
            "ticketIsChargingRelevant": {
              "description": "Boolean amended by the provider defining if the processing of the TroubleTicket is charging relevant",
              "type": "boolean",
              "example": false
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicket": "#/$defs/TroubleTicket",
          "FaultTicket": "#/$defs/FaultTicket"
        }
      }
    },
    "TroubleTicketAttributeValueChangeEvent": {
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/AttributeValueChangeEvent"
        },
        {
          "type": "object",
          "description": "TroubleTicketAttributeValueChange structure",
          "properties": {
            "event": {
              "$ref": "#/$defs/TroubleTicketAttributeValueChangeEventPayload"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicketAttributeValueChangeEvent": "#/$defs/TroubleTicketAttributeValueChangeEvent"
        }
      },
      "x-implements": [
        "de.akspri.fit.interfaces.IEvent<TroubleTicketAttributeValueChangeEvent>"
      ]
    },
    "TroubleTicketAttributeValueChangeEventPayload": {
      "description": "TroubleTicketAttributeValueChangeEventPayload generic structure",
      "type": "object",
      "properties": {
        "troubleTicket": {
          "$ref": "#/$defs/TroubleTicket"
        }
      }
    },
    "TroubleTicketCreateEvent": {
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/Event"
        },
        {
          "type": "object",
          "description": "TroubleTicketCreateEvent generic structure",
          "properties": {
            "event": {
              "$ref": "#/$defs/TroubleTicketCreateEventPayload"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicketCreateEvent": "#/$defs/TroubleTicketCreateEvent"
        }
      },
      "x-implements": [
        "de.akspri.fit.interfaces.IEvent<TroubleTicketCreateEvent>"
      ]
    },
    "TroubleTicketCreateEventPayload": {
      "description": "TroubleTicketCreateEventPayload generic structure",
      "type": "object",
      "properties": {
        "troubleTicket": {
          "$ref": "#/$defs/TroubleTicket"
        }
      }
    },
    "TroubleTicketInformationRequiredEvent": {
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/Event"
        },
        {
          "type": "object",
          "description": "TroubleTicketInformationRequiredEvent generic structure",
          "properties": {
            "fieldPath": {
              "description": "TODO",
              "type": "array",
              "items": {
                "$ref": "fit-common.schema.json#/$defs/FieldPath"
              }
            },
            "event": {
              "$ref": "#/$defs/TroubleTicketInformationRequiredEventPayload"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicketInformationRequiredEvent": "#/$defs/TroubleTicketInformationRequiredEvent"
        }
      },
      "x-implements": [
        "de.akspri.fit.interfaces.IEvent<TroubleTicketInformationRequiredEvent>"
      ]
    },
    "TroubleTicketInformationRequiredEventPayload": {
      "description": "TroubleTicketInformationRequiredEventPayload generic structure",
      "type": "object",
      "properties": {
        "troubleTicket": {
          "$ref": "#/$defs/TroubleTicket"
        },
        "informationRequired": {
          "$ref": "fit-common.schema.json#/$defs/JsonPatch"
        }
      }
    },
    "TroubleTicketJeopardyAlert": {
      "description": "A TroubleTicketJeopardyAlert represents a predicted exception during a trouble ticket processing that would brings risk to resolve successfully the trouble ticket.",
      "type": "object",
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/JeopardyAlert"
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicketJeopardyAlert": "#/$defs/TroubleTicketJeopardyAlert"
        }
      }
    },
    "TroubleTicketJeopardyAlertEvent": {
      "description": "TroubleTicketJeopardyAlertEvent generic structure",
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/Event"
        },
        {
          "type": "object",
          "properties": {
            "event": {
              "$ref": "#/$defs/TroubleTicketJeopardyAlertEventPayload"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicketJeopardyAlertEvent": "#/$defs/TroubleTicketJeopardyAlertEvent"
        }
      },
      "x-fit-source": "created",
      "x-implements": [
        "de.akspri.fit.interfaces.IEvent<TroubleTicketJeopardyAlertEvent>"
      ]
    },
    "TroubleTicketJeopardyAlertEventPayload": {
      "description": "TroubleTicketJeopardyAlertEventPayload generic structure",
      "type": "object",
      "properties": {
        "troubleTicket": {
          "$ref": "#/$defs/TroubleTicket"
        }
      },
      "x-fit-source": "created"
    },
    "TroubleTicketMilestone": {
      "description": "A TroubleTicketMilestone represents an action or event marking a significant change or stage in processing of a trouble ticket.",
      "type": "object",
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/Milestone"
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicketMilestone": "#/$defs/TroubleTicketMilestone"
        }
      }
    },
    "TroubleTicketMilestoneEvent": {
      "description": "TroubleTicketMilestoneEvent generic structure",
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/Event"
        },
        {
          "type": "object",
          "properties": {
            "event": {
              "$ref": "#/$defs/TroubleTicketMilestoneEventPayload"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicketMilestoneEvent": "#/$defs/TroubleTicketMilestoneEvent"
        }
      },
      "x-fit-source": "created",
      "x-implements": [
        "de.akspri.fit.interfaces.IEvent<TroubleTicketMilestoneEvent>"
      ]
    },
    "TroubleTicketMilestoneEventPayload": {
      "description": "TroubleTicketMilestoneEventPayload generic structure",
      "type": "object",
      "properties": {
        "troubleTicket": {
          "$ref": "#/$defs/TroubleTicket"
        }
      },
      "x-fit-source": "created"
    },
    "TroubleTicketRef": {
      "allOf": [
        {
          "$ref": "fit-core.schema.json#/$defs/EntityRef"
        },
        {
          "type": "object",
          "description": "Reference to an TroubleTicket object",
          "required": [
            "id"
          ],
          "properties": {
            "id": {
              "description": "Identifier of the corresponding TroubleTicket",
              "type": "string",
              "minLength": 1,
              "maxLength": 36,
              "example": "450e8400-e29b-11d4-a716-446651440001"
            },
            "version": {
              "description": "The version of the trouble ticket , in case it is desired to maintain multiple versions of trouble ticket",
              "type": "string"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicketRef": "#/$defs/TroubleTicketRef"
        }
      }
    },
    "TroubleTicketRelationship": {
      "allOf": [
        {
          "$ref": "fit-core.schema.json#/$defs/EntityRef"
        },
        {
          "type": "object",
          "description": "Represents a relationship between trouble tickets",
          "required": [
            "relationshipType"
          ],
          "properties": {
            "relationshipType": {
              "description": "Type of relationship",
              "type": "string",
              "enum": [
                "disputedTicket",
                "isDisputedBy"
              ]
            },
            "id": {
              "description": "Identifier of the referred entity.",
              "type": "string",
              "example": "2d7ed5fd-9f62-4211-bc84-357f5f7b80f5",
              "minLength": 1,
              "maxLength": 36
            }
          }
        }
      ]
    },
    "TroubleTicketResolvedEvent": {
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/Event"
        },
        {
          "type": "object",
          "description": "TroubleTicketResolvedEvent generic structure",
          "properties": {
            "event": {
              "$ref": "#/$defs/TroubleTicketResolvedEventPayload"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicketResolvedEvent": "#/$defs/TroubleTicketResolvedEvent"
        }
      },
      "x-implements": [
        "de.akspri.fit.interfaces.IEvent<TroubleTicketResolvedEvent>"
      ]
    },
    "TroubleTicketResolvedEventPayload": {
      "description": "TroubleTicketResolvedEventPayload generic structure",
      "type": "object",
      "properties": {
        "troubleTicket": {
          "$ref": "#/$defs/TroubleTicket"
        }
      }
    },
    "TroubleTicketStatusChangeEvent": {
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/Event"
        },
        {
          "type": "object",
          "description": "TroubleTicketStatusChangeEvent generic structure",
          "properties": {
            "event": {
              "$ref": "#/$defs/TroubleTicketStatusChangeEventPayload"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicketStatusChangeEvent": "#/$defs/TroubleTicketStatusChangeEvent"
        }
      },
      "x-implements": [
        "de.akspri.fit.interfaces.IEvent<TroubleTicketStatusChangeEvent>"
      ]
    },
    "TroubleTicketStatusChangeEventPayload": {
      "description": "TroubleTicketStatusChangeEventPayload generic structure",
      "type": "object",
      "properties": {
        "troubleTicket": {
          "$ref": "#/$defs/TroubleTicket"
        }
      }
    },
    "TroubleTicketStatusType": {
      "description": "Possible values for the status of the trouble ticket<ul>\n<li>*acknowledged*: TODO</li>\n<li>*rejected*: TODO</li>\n<li>*pending*: TODO</li>\n<li>*held*: TODO</li>\n<li>*inProgress*: TODO</li>\n<li>*cancelled*: TODO</li>\n<li>*closed*: TODO</li>\n<li>*resolved*: TODO</li>\n<li>*failed*: TODO</li>\n</ul>",
      "type": "string",
      "enum": [
        "acknowledged",
        "rejected",
        "pending",
        "held",
        "inProgress",
        "cancelled",
        "closed",
        "resolved",
        "failed"
      ]
    },
    "TroubleTicket_FVO": {
      "allOf": [
        {
          "$ref": "fit-core.schema.json#/$defs/Extensible_FVO"
        },
        {
          "type": "object",
          "description": "A trouble ticket is a record of an issue that is created, tracked, and managed by a trouble ticket management system",
          "properties": {
            "name": {
              "description": "Name of the trouble ticket, typically a short description provided by the user that create the ticket",
              "type": "string"
            },
            "description": {
              "description": "Description of the trouble or issue",
              "type": "string"
            },
            "orderPostedDate": {
              "description": "Date when the order was posted by the requester",
              "type": "string",
              "format": "date-time"
            },
            "severity": {
              "description": "The severity of the issue. Indicate the implication of the issue on the expected functionality e.g. of a system, application, service etc.. \nSeverity values can be for example : Critical, Major, Minor",
              "type": "string"
            },
            "ticketType": {
              "description": "Represent a business type of the trouble ticket e.g. incident, complain, request",
              "type": "string"
            },
            "attachment": {
              "description": "File(s) attached to the trouble ticket. e.g. pictur of broken device, scaning of a bill or charge",
              "type": "array",
              "items": {
                "$ref": "fit-common.schema.json#/$defs/AttachmentRefOrValue"
              }
            },
            "channel": {
              "$ref": "#/$defs/ChannelRef"
            },
            "requestedResolutionDate": {
              "description": "The resolution date requested by the user",
              "type": "string",
              "format": "date-time"
            },
            "externalIdentifier": {
              "type": "array",
              "items": {
                "allOf": [
                  {
                    "$ref": "fit-common.schema.json#/$defs/ExternalIdentifier"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "externalIdentifierType": {
                        "type": "string",
                        "enum": [
                          "troubleTicketExternalId"
                        ]
                      }
                    }
                  }
                ]
              }
            },
            "note": {
              "description": "The note(s) that are associated to the ticket.",
              "type": "array",
              "items": {
                "allOf": [
                  {
                    "$ref": "fit-common.schema.json#/$defs/Note"
                  },
                  {
                    "type": "object",
                    "required": [
                      "text"
                    ],
                    "properties": {
                      "@type": {
                        "type": "string",
                        "const": "TroubleTicketRemark",
                        "minLength": 1,
                        "maxLength": 40
                      },
                      "text": {
                        "description": "Text of the note",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1024
                      }
                    }
                  }
                ]
              }
            },
            "priority": {
              "description": "The priority of the trouble ticket and how quickly the issue should be resolved. Example: Critical, High, Medium, Low. The value is set by the ticket management system considering the severity, ticket type etc...",
              "type": "string"
            },
            "relatedEntity": {
              "description": "An entity that is related to the ticket such as a bill, a product, etc. The entity against which the ticket is associated.",
              "type": "array",
              "items": {
                "$ref": "#/$defs/TroubleTicketRelatedEntityItem"
              }
            },
            "relatedParty": {
              "description": "The related party(ies) that are associated to the ticket.",
              "type": "array",
              "items": {
                "$ref": "fit-common.schema.json#/$defs/RelatedPartyOrPartyRole"
              }
            },
            "troubleTicketRelationship": {
              "description": "A list of trouble ticket relationships (TroubleTicketRelationship [*]). Represents a relationship between trouble tickets",
              "type": "array",
              "items": {
                "$ref": "#/$defs/TroubleTicketRelationship"
              }
            },
            "troubleTicketCharacteristic": {
              "description": "List of characteristics of the trouble ticket",
              "type": "array",
              "items": {
                "$ref": "fit-common.schema.json#/$defs/Characteristic"
              }
            }
          },
          "required": [
            "ticketType",
            "orderPostedDate"
          ]
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicket": "#/$defs/TroubleTicket_FVO"
        }
      }
    },
    "TroubleTicketRelatedEntityItem": {
      "type": "object",
      "required": [
        "role",
        "entity"
      ],
      "properties": {
        "role": {
          "type": "string"
        },
        "entity": {
          "type": "object",
          "required": [
            "@type"
          ],
          "allOf": [
            {
              "if": {
                "properties": {
                  "@type": {
                    "const": "ProductOffering"
                  }
                },
                "required": [
                  "@type"
                ]
              },
              "then": {
                "properties": {
                  "@type": {
                    "const": "ProductOffering"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  }
                },
                "required": [
                  "name"
                ]
              }
            },
            {
              "if": {
                "properties": {
                  "@type": {
                    "const": "EntityRef"
                  }
                },
                "required": [
                  "@type"
                ]
              },
              "then": {
                "properties": {
                  "@type": {
                    "const": "EntityRef"
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  },
                  "@referredType": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "@referredType"
                ]
              }
            }
          ]
        }
      }
    },
    "TroubleTicketSpecification": {
      "description": "TroubleTicketSpecification defines the common attributes and relationships of a set of\nrelated trouble tickets, while trouble ticket defines a specific instance that is based\non a particular trouble ticket specification.",
      "type": "object",
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/EntitySpecification"
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicketSpecification": "#/$defs/TroubleTicketSpecification"
        }
      }
    },
    "InflightChangeTroubleTicket": {
      "description": "Request to change an existing trouble ticket in-flight",
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/TaskEntity"
        },
        {
          "type": "object",
          "required": [
            "@type",
            "category"
          ],
          "properties": {
            "@type": {
              "const": "InflightChangeTroubleTicket"
            },
            "troubleTicket": {
              "description": "Explicit reference to the related TroubleTicket",
              "allOf": [
                {
                  "$ref": "#/$defs/TroubleTicketRef"
                },
                {
                  "type": "object",
                  "required": [
                    "@type",
                    "id"
                  ],
                  "properties": {
                    "@type": {
                      "const": "TroubleTicketRef"
                    },
                    "id": {
                      "description": "Identifier of the corresponding TroubleTicket",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 36,
                      "example": "450e8400-e29b-11d4-a716-446651440001"
                    }
                  }
                }
              ],
              "example": []
            },
            "appointment": {
              "$ref": "fit-common.schema.json#/$defs/AppointmentRefOrValue"
            },
            "buyerMessage": {
              "description": "message, send from Buyer to Seller",
              "x-fit-source": "created",
              "allOf": [
                {
                  "$ref": "fit-common.schema.json#/$defs/Message"
                },
                {
                  "type": "object",
                  "required": [
                    "text",
                    "code"
                  ],
                  "properties": {
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    },
                    "code": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 10
                    },
                    "additionalInformation": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    }
                  }
                }
              ]
            },
            "category": {
              "x-fit-source": "created",
              "description": "Type of action to be performed with the task resource",
              "type": "array",
              "minItems": 1,
              "maxItems": 2,
              "items": {
                "type": "string",
                "description": "Possible values for the category of the task resource:\n<ul>\n<li><b>add</b>: add information, e.g., a note or a related party</li>\n<li><b>reschedule</b>: reschedule the troubleTicket</li>\n</ul>",
                "enum": [
                  "add",
                  "reschedule"
                ]
              }
            },
            "externalIdentifier": {
              "description": "A reference to an externally defined object in the context of the managed entity",
              "type": "array",
              "items": {
                "$ref": "fit-common.schema.json#/$defs/ExternalIdentifier"
              },
              "example": []
            },
            "note": {
              "description": "Note",
              "type": "array",
              "items": {
                "$ref": "fit-common.schema.json#/$defs/Note"
              },
              "example": []
            },
            "stateChangeDate": {
              "description": "The date and time the state changed.",
              "type": "string",
              "format": "date-time",
              "example": "2023-01-01T08:00:00+01:00"
            },
            "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": []
            },
            "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": []
            },
            "requestedResolutionDate": {
              "description": "The resolution date requested by the user",
              "type": "string",
              "format": "date-time",
              "x-fit-source": "created"
            },
            "requestedTimeSlot": {
              "$ref": "fit-common.schema.json#/$defs/TimeSlot"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "InflightChangeTroubleTicket": "#/$defs/InflightChangeTroubleTicket"
        }
      }
    },
    "InflightChangeTroubleTicket_FVO": {
      "description": "Request to change an existing trouble ticket in-flight",
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/TaskEntity_FVO"
        },
        {
          "type": "object",
          "required": [
            "@type",
            "category"
          ],
          "properties": {
            "@type": {
              "const": "InflightChangeTroubleTicket_FVO"
            },
            "troubleTicket": {
              "description": "Explicit reference to the related TroubleTicket",
              "allOf": [
                {
                  "$ref": "#/$defs/TroubleTicketRef"
                },
                {
                  "type": "object",
                  "required": [
                    "@type",
                    "id"
                  ],
                  "properties": {
                    "@type": {
                      "const": "TroubleTicketRef"
                    },
                    "id": {
                      "description": "Identifier of the corresponding TroubleTicket",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 36,
                      "example": "450e8400-e29b-11d4-a716-446651440001"
                    }
                  }
                }
              ]
            },
            "appointment": {
              "$ref": "fit-common.schema.json#/$defs/AppointmentRefOrValue"
            },
            "buyerMessage": {
              "description": "message, send from Buyer to Seller",
              "x-fit-source": "created",
              "allOf": [
                {
                  "$ref": "fit-common.schema.json#/$defs/Message"
                },
                {
                  "type": "object",
                  "required": [
                    "text",
                    "code"
                  ],
                  "properties": {
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    },
                    "code": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 10
                    },
                    "additionalInformation": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    }
                  }
                }
              ]
            },
            "category": {
              "x-fit-source": "created",
              "description": "Type of action to be performed with the task resource",
              "type": "array",
              "minItems": 1,
              "maxItems": 2,
              "items": {
                "type": "string",
                "enum": [
                  "add",
                  "reschedule"
                ]
              },
              "example": [
                "add"
              ]
            },
            "externalIdentifier": {
              "description": "A reference to an externally defined object in the context of the managed entity",
              "type": "array",
              "items": {
                "$ref": "fit-common.schema.json#/$defs/ExternalIdentifier"
              },
              "example": []
            },
            "note": {
              "description": "Note",
              "type": "array",
              "items": {
                "$ref": "fit-common.schema.json#/$defs/Note"
              },
              "example": []
            },
            "requestedResolutionDate": {
              "description": "The resolution date requested by the user",
              "type": "string",
              "format": "date-time",
              "x-fit-source": "created"
            },
            "requestedTimeSlot": {
              "$ref": "fit-common.schema.json#/$defs/TimeSlot"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "InflightChangeTroubleTicket_FVO": "#/$defs/InflightChangeTroubleTicket_FVO"
        }
      }
    },
    "InflightChangeTroubleTicketStateChangeEvent": {
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/Event"
        },
        {
          "type": "object",
          "description": "InflightChangeTroubleTicketStateChangeEvent generic structure",
          "properties": {
            "event": {
              "$ref": "#/$defs/InflightChangeTroubleTicketStateChangeEventPayload"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "InflightChangeTroubleTicketStateChangeEvent": "#/$defs/InflightChangeTroubleTicketStateChangeEvent"
        }
      },
      "x-implements": [
        "de.akspri.fit.interfaces.IEvent<InflightChangeTroubleTicketStateChangeEvent>"
      ]
    },
    "InflightChangeTroubleTicketStateChangeEventPayload": {
      "description": "InflightChangeTroubleTicketStateChangeEventPayload generic structure",
      "type": "object",
      "properties": {
        "inflightChangeTroubleTicket": {
          "$ref": "#/$defs/InflightChangeTroubleTicket"
        }
      }
    },
    "CancelTroubleTicket": {
      "description": "Request to cancel an existing trouble ticket",
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/TaskEntity"
        },
        {
          "type": "object",
          "required": [
            "@type"
          ],
          "properties": {
            "@type": {
              "const": "CancelTroubleTicket"
            },
            "troubleTicket": {
              "description": "Explicit reference to the related TroubleTicket",
              "allOf": [
                {
                  "$ref": "#/$defs/TroubleTicketRef"
                },
                {
                  "type": "object",
                  "required": [
                    "@type",
                    "id"
                  ],
                  "properties": {
                    "@type": {
                      "const": "TroubleTicketRef"
                    },
                    "id": {
                      "description": "Identifier of the corresponding TroubleTicket",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 36,
                      "example": "450e8400-e29b-11d4-a716-446651440001"
                    }
                  }
                }
              ]
            },
            "stateChangeDate": {
              "description": "The date and time the state changed.",
              "type": "string",
              "format": "date-time",
              "example": "2023-01-01T08: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": []
            },
            "externalIdentifier": {
              "description": "A reference to an externally defined object in the context of the managed entity",
              "type": "array",
              "items": {
                "$ref": "fit-common.schema.json#/$defs/ExternalIdentifier"
              },
              "example": []
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "CancelTroubleTicket": "#/$defs/CancelTroubleTicket"
        }
      }
    },
    "CancelTroubleTicket_FVO": {
      "description": "Request to cancel an existing trouble ticket",
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/TaskEntity_FVO"
        },
        {
          "type": "object",
          "required": [
            "@type"
          ],
          "properties": {
            "@type": {
              "const": "CancelTroubleTicket_FVO"
            },
            "troubleTicket": {
              "description": "Explicit reference to the related TroubleTicket",
              "allOf": [
                {
                  "$ref": "#/$defs/TroubleTicketRef"
                },
                {
                  "type": "object",
                  "required": [
                    "@type",
                    "id"
                  ],
                  "properties": {
                    "@type": {
                      "const": "TroubleTicketRef"
                    },
                    "id": {
                      "description": "Identifier of the corresponding TroubleTicket",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 36,
                      "example": "450e8400-e29b-11d4-a716-446651440001"
                    }
                  }
                }
              ]
            },
            "externalIdentifier": {
              "description": "A reference to an externally defined object in the context of the managed entity",
              "type": "array",
              "items": {
                "$ref": "fit-common.schema.json#/$defs/ExternalIdentifier"
              },
              "example": []
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "CancelTroubleTicket_FVO": "#/$defs/CancelTroubleTicket_FVO"
        }
      }
    },
    "CancelTroubleTicketStateChangeEvent": {
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/Event"
        },
        {
          "type": "object",
          "description": "CancelTroubleTicketStateChangeEvent generic structure",
          "properties": {
            "event": {
              "$ref": "#/$defs/CancelTroubleTicketStateChangeEventPayload"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "CancelTroubleTicketStateChangeEvent": "#/$defs/CancelTroubleTicketStateChangeEvent"
        }
      },
      "x-implements": [
        "de.akspri.fit.interfaces.IEvent<CancelTroubleTicketStateChangeEvent>"
      ]
    },
    "CancelTroubleTicketStateChangeEventPayload": {
      "description": "CancelTroubleTicketStateChangeEventPayload generic structure",
      "type": "object",
      "properties": {
        "cancelTroubleTicket": {
          "$ref": "#/$defs/CancelTroubleTicket"
        }
      }
    },
    "TroubleTicketSpecificationAttributeValueChangeEvent": {
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/AttributeValueChangeEvent"
        },
        {
          "type": "object",
          "description": "TroubleTicketSpecificationAttributeValueChange structure",
          "properties": {
            "event": {
              "$ref": "#/$defs/TroubleTicketSpecificationAttributeValueChangeEventPayload"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicketSpecificationAttributeValueChangeEvent": "#/$defs/TroubleTicketSpecificationAttributeValueChangeEvent"
        }
      },
      "x-implements": [
        "de.akspri.fit.interfaces.IEvent<TroubleTicketSpecificationAttributeValueChangeEvent>"
      ]
    },
    "TroubleTicketSpecificationAttributeValueChangeEventPayload": {
      "description": "TroubleTicketSpecificationAttributeValueChangeEventPayload generic structure",
      "type": "object",
      "properties": {
        "troubleTicketSpecification": {
          "$ref": "#/$defs/TroubleTicketSpecification"
        }
      }
    },
    "TroubleTicketSpecificationCreateEvent": {
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/Event"
        },
        {
          "type": "object",
          "description": "TroubleTicketSpecificationCreateEvent generic structure",
          "properties": {
            "event": {
              "$ref": "#/$defs/TroubleTicketSpecificationCreateEventPayload"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicketSpecificationCreateEvent": "#/$defs/TroubleTicketSpecificationCreateEvent"
        }
      },
      "x-implements": [
        "de.akspri.fit.interfaces.IEvent<TroubleTicketSpecificationCreateEvent>"
      ]
    },
    "TroubleTicketSpecificationCreateEventPayload": {
      "description": "TroubleTicketSpecificationCreateEventPayload generic structure",
      "type": "object",
      "properties": {
        "troubleTicketSpecification": {
          "$ref": "#/$defs/TroubleTicketSpecification"
        }
      }
    },
    "TroubleTicketSpecificationDeleteEvent": {
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/Event"
        },
        {
          "type": "object",
          "description": "TroubleTicketSpecificationDeleteEvent generic structure",
          "properties": {
            "event": {
              "$ref": "#/$defs/TroubleTicketSpecificationDeleteEventPayload"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicketSpecificationDeleteEvent": "#/$defs/TroubleTicketSpecificationDeleteEvent"
        }
      },
      "x-implements": [
        "de.akspri.fit.interfaces.IEvent<TroubleTicketSpecificationDeleteEvent>"
      ]
    },
    "TroubleTicketSpecificationDeleteEventPayload": {
      "description": "TroubleTicketSpecificationDeleteEventPayload generic structure",
      "type": "object",
      "properties": {
        "troubleTicketSpecification": {
          "$ref": "#/$defs/TroubleTicketSpecification"
        }
      }
    },
    "TroubleTicketSpecificationRef": {
      "allOf": [
        {
          "$ref": "fit-core.schema.json#/$defs/EntityRef"
        },
        {
          "type": "object",
          "description": "Reference to an TroubleTicketSpecification object",
          "properties": {
            "version": {
              "description": "The version of the trouble ticket specification, in case it is desired to maintain\nmultiple versions of trouble ticket specifications",
              "type": "string"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicketSpecificationRef": "#/$defs/TroubleTicketSpecificationRef"
        }
      }
    },
    "TroubleTicketSpecificationStatusChangeEvent": {
      "allOf": [
        {
          "$ref": "fit-common.schema.json#/$defs/Event"
        },
        {
          "type": "object",
          "description": "TroubleTicketSpecificationStatusChangeEvent generic structure",
          "properties": {
            "event": {
              "$ref": "#/$defs/TroubleTicketSpecificationStatusChangeEventPayload"
            }
          }
        }
      ],
      "discriminator": {
        "propertyName": "@type",
        "mapping": {
          "TroubleTicketSpecificationStatusChangeEvent": "#/$defs/TroubleTicketSpecificationStatusChangeEvent"
        }
      },
      "x-implements": [
        "de.akspri.fit.interfaces.IEvent<TroubleTicketSpecificationStatusChangeEvent>"
      ]
    },
    "TroubleTicketSpecificationStatusChangeEventPayload": {
      "description": "TroubleTicketSpecificationStatusChangeEventPayload generic structure",
      "type": "object",
      "properties": {
        "troubleTicketSpecification": {
          "$ref": "#/$defs/TroubleTicketSpecification"
        }
      }
    }
  }
}