
de.vdv.ojp20.TripFareResultStructure Maven / Gradle / Ivy
Show all versions of ojp-java-model Show documentation
//
// This file was generated by the Eclipse Implementation of JAXB, v4.0.5
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
//
package de.vdv.ojp20;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlElementRef;
import jakarta.xml.bind.annotation.XmlElementRefs;
import jakarta.xml.bind.annotation.XmlSchemaType;
import jakarta.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.adapters.NormalizedStringAdapter;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.opentripplanner.ojp.netex.OmitNullsToStringStyle;
/**
* Structure of a single TripFareResult. This may cover the whole trip or only the part the service can answer. If only partial answers can be delivered, then this must be indicated with FARE_ADDITIONALTICKETS (as a warning). For a given trip multiple FareResults may need to be combined to get the whole tariff. A typical example may be classic public transport and a sharing leg. Some legs, e.g., TransferLegs and walking ContinuousLeg will never have a price. The service may include them in one of the tickets. If the whole trip is for free, then a TripFareResult with a price of 0 is expected. It is possible to have combined FareResults (e.g., for a bundle) and in addition price each leg individually.
*
* Java class for TripFareResultStructure complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TripFareResultStructure", propOrder = {
"errorCondition",
"tripId",
"bookingId",
"legRangeGroup",
"passedZones",
"fareProduct",
"staticInfoUrl"
})
public class TripFareResultStructure {
/**
* Result-specific error messages.
*
*/
@XmlElement(name = "ErrorCondition")
protected List errorCondition;
@XmlElement(name = "TripId")
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
@XmlSchemaType(name = "normalizedString")
protected String tripId;
@XmlElement(name = "BookingId")
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
@XmlSchemaType(name = "normalizedString")
protected String bookingId;
/**
* A ticket may be valid for multiple non-consecutive legs. TransferLegs and ContinuousLegs without a tariff may be either included or ignored. If the tariff depends on not having a ContinuousLeg e.g., with sharing in the middle, then the server must decide, if it wants to provide more than one TripFareResult.
*
*/
@XmlElementRefs({
@XmlElementRef(name = "FromLegIdRef", namespace = "http://www.vdv.de/ojp", type = JAXBElement.class, required = false),
@XmlElementRef(name = "ToLegIdRef", namespace = "http://www.vdv.de/ojp", type = JAXBElement.class, required = false)
})
protected List> legRangeGroup;
/**
* The sequence of passed fare zones.
*
*/
@XmlElement(name = "PassedZones")
protected TariffZoneListInAreaStructure passedZones;
/**
* One or more FareProducts that are valid for this part of the trip.
*
*/
@XmlElement(name = "FareProduct")
protected List fareProduct;
/**
* URL to static information page on the web.
*
*/
@XmlElement(name = "StaticInfoUrl")
protected List staticInfoUrl;
/**
* Result-specific error messages.
*
* Gets the value of the errorCondition property.
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a set
method for the errorCondition property.
*
*
* For example, to add a new item, do as follows:
*
*
* getErrorCondition().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link OJPErrorStructure }
*
*
*
* @return
* The value of the errorCondition property.
*/
public List getErrorCondition() {
if (errorCondition == null) {
errorCondition = new ArrayList<>();
}
return this.errorCondition;
}
/**
* Gets the value of the tripId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTripId() {
return tripId;
}
/**
* Sets the value of the tripId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTripId(String value) {
this.tripId = value;
}
/**
* Gets the value of the bookingId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getBookingId() {
return bookingId;
}
/**
* Sets the value of the bookingId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setBookingId(String value) {
this.bookingId = value;
}
/**
* A ticket may be valid for multiple non-consecutive legs. TransferLegs and ContinuousLegs without a tariff may be either included or ignored. If the tariff depends on not having a ContinuousLeg e.g., with sharing in the middle, then the server must decide, if it wants to provide more than one TripFareResult.
*
* Gets the value of the legRangeGroup property.
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a set
method for the legRangeGroup property.
*
*
* For example, to add a new item, do as follows:
*
*
* getLegRangeGroup().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link JAXBElement }{@code <}{@link String }{@code >}
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*
*
* @return
* The value of the legRangeGroup property.
*/
public List> getLegRangeGroup() {
if (legRangeGroup == null) {
legRangeGroup = new ArrayList<>();
}
return this.legRangeGroup;
}
/**
* The sequence of passed fare zones.
*
* @return
* possible object is
* {@link TariffZoneListInAreaStructure }
*
*/
public TariffZoneListInAreaStructure getPassedZones() {
return passedZones;
}
/**
* Sets the value of the passedZones property.
*
* @param value
* allowed object is
* {@link TariffZoneListInAreaStructure }
*
* @see #getPassedZones()
*/
public void setPassedZones(TariffZoneListInAreaStructure value) {
this.passedZones = value;
}
/**
* One or more FareProducts that are valid for this part of the trip.
*
* Gets the value of the fareProduct property.
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a set
method for the fareProduct property.
*
*
* For example, to add a new item, do as follows:
*
*
* getFareProduct().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link FareProductStructure }
*
*
*
* @return
* The value of the fareProduct property.
*/
public List getFareProduct() {
if (fareProduct == null) {
fareProduct = new ArrayList<>();
}
return this.fareProduct;
}
/**
* URL to static information page on the web.
*
* Gets the value of the staticInfoUrl property.
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a set
method for the staticInfoUrl property.
*
*
* For example, to add a new item, do as follows:
*
*
* getStaticInfoUrl().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link WebLinkStructure }
*
*
*
* @return
* The value of the staticInfoUrl property.
*/
public List getStaticInfoUrl() {
if (staticInfoUrl == null) {
staticInfoUrl = new ArrayList<>();
}
return this.staticInfoUrl;
}
public TripFareResultStructure withErrorCondition(OJPErrorStructure... values) {
if (values!= null) {
for (OJPErrorStructure value: values) {
getErrorCondition().add(value);
}
}
return this;
}
public TripFareResultStructure withErrorCondition(Collection values) {
if (values!= null) {
getErrorCondition().addAll(values);
}
return this;
}
public TripFareResultStructure withTripId(String value) {
setTripId(value);
return this;
}
public TripFareResultStructure withBookingId(String value) {
setBookingId(value);
return this;
}
public TripFareResultStructure withLegRangeGroup(JAXBElement ... values) {
if (values!= null) {
for (JAXBElement value: values) {
getLegRangeGroup().add(value);
}
}
return this;
}
public TripFareResultStructure withLegRangeGroup(Collection> values) {
if (values!= null) {
getLegRangeGroup().addAll(values);
}
return this;
}
public TripFareResultStructure withPassedZones(TariffZoneListInAreaStructure value) {
setPassedZones(value);
return this;
}
public TripFareResultStructure withFareProduct(FareProductStructure... values) {
if (values!= null) {
for (FareProductStructure value: values) {
getFareProduct().add(value);
}
}
return this;
}
public TripFareResultStructure withFareProduct(Collection values) {
if (values!= null) {
getFareProduct().addAll(values);
}
return this;
}
public TripFareResultStructure withStaticInfoUrl(WebLinkStructure... values) {
if (values!= null) {
for (WebLinkStructure value: values) {
getStaticInfoUrl().add(value);
}
}
return this;
}
public TripFareResultStructure withStaticInfoUrl(Collection values) {
if (values!= null) {
getStaticInfoUrl().addAll(values);
}
return this;
}
/**
* Generates a String representation of the contents of this type.
* This is an extension method, produced by the 'ts' xjc plugin
*
*/
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, OmitNullsToStringStyle.INSTANCE);
}
}