{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "schema:Trip",
  "title": "Trip",
  "description": "A trip or journey. An itinerary of visits to one or more places.",
  "type": "object",
  "allOf": [
    {
      "description": "A utility class that serves as the umbrella for a number of 'intangible' things such as quantities, structured values, etc.",
      "$ref": "schema:Intangible"
    }
  ],
  "properties": {
    "arrivalTime": {
      "description": "The expected arrival time.",
      "anyOf": [
        { "type": "string", "format": "date-time" },
        { "type": "string", "format": "time" }
      ]
    },
    "departureTime": {
      "description": "The expected departure time.",
      "anyOf": [
        { "type": "string", "format": "date-time" },
        { "type": "string", "format": "time" }
      ]
    },
    "itinerary": {
      "description": "Destination(s) ( [[Place]] ) that make up a trip. For a trip where destination order is important use [[ItemList]] to specify that order (see examples).",
      "oneOf": [
        {
          "anyOf": [{ "$ref": "schema:ItemList" }, { "$ref": "schema:Place" }]
        },
        {
          "type": "array",
          "items": {
            "anyOf": [{ "$ref": "schema:ItemList" }, { "$ref": "schema:Place" }]
          }
        }
      ]
    },
    "offers": {
      "description": "An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, perform a service, or give away tickets to an event. Use [[businessFunction]] to indicate the kind of transaction offered, i.e. sell, lease, etc. This property can also be used to describe a [[Demand]]. While this property is listed as expected on a number of common types, it can be used in others. In that case, using a second type, such as Product or a subtype of Product, can clarify the nature of the offer.\n      ",
      "oneOf": [
        { "anyOf": [{ "$ref": "schema:Demand" }, { "$ref": "schema:Offer" }] },
        {
          "type": "array",
          "items": {
            "anyOf": [{ "$ref": "schema:Demand" }, { "$ref": "schema:Offer" }]
          }
        }
      ]
    },
    "partOfTrip": {
      "description": "Identifies that this [[Trip]] is a subTrip of another Trip.  For example Day 1, Day 2, etc. of a multi-day trip.",
      "oneOf": [
        { "$ref": "schema:Trip" },
        { "type": "array", "items": { "$ref": "schema:Trip" } }
      ]
    },
    "provider": {
      "description": "The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.",
      "anyOf": [{ "$ref": "schema:Organization" }, { "$ref": "schema:Person" }]
    },
    "subTrip": {
      "description": "Identifies a [[Trip]] that is a subTrip of this Trip.  For example Day 1, Day 2, etc. of a multi-day trip.",
      "oneOf": [
        { "$ref": "schema:Trip" },
        { "type": "array", "items": { "$ref": "schema:Trip" } }
      ]
    },
    "tripOrigin": {
      "description": "The location of origin of the trip, prior to any destination(s).",
      "$ref": "schema:Place"
    }
  }
}
