
de.vdv.ojp20.MultiPointTripResultStructure 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.time.Duration;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
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;
import org.opentripplanner.ojp.util.DurationXmlAdapter;
/**
* Structure for a multipoint trip result and associated problems
*
* Java class for MultiPointTripResultStructure complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MultiPointTripResultStructure", propOrder = {
"id",
"errorCondition",
"trip",
"tripSummary",
"originWaitTime",
"destinationWaitTime",
"tripFare"
})
public class MultiPointTripResultStructure {
/**
* Id of this trip result for referencing purposes. Unique within multipoint-trip response.
*
*/
@XmlElement(name = "Id", required = true)
@XmlJavaTypeAdapter(NormalizedStringAdapter.class)
@XmlSchemaType(name = "normalizedString")
protected String id;
/**
* Problems related to this trip result.
*
*/
@XmlElement(name = "ErrorCondition")
protected List errorCondition;
/**
* Information on the trip.
*
*/
@XmlElement(name = "Trip")
protected TripStructure trip;
/**
* Summary on trip. Only if requestor set TripSummaryOnly in request.
*
*/
@XmlElement(name = "TripSummary")
protected TripSummaryStructure tripSummary;
/**
* Additional wait time at origin of this trip.
*
*/
@XmlElement(name = "OriginWaitTime", type = String.class)
@XmlJavaTypeAdapter(DurationXmlAdapter.class)
@XmlSchemaType(name = "duration")
protected Duration originWaitTime;
/**
* Additional wait time at destination of this trip.
*
*/
@XmlElement(name = "DestinationWaitTime", type = String.class)
@XmlJavaTypeAdapter(DurationXmlAdapter.class)
@XmlSchemaType(name = "duration")
protected Duration destinationWaitTime;
/**
* Fare and fare product information for this trip as a whole or parts of it.
*
*/
@XmlElement(name = "TripFare")
protected List tripFare;
/**
* Id of this trip result for referencing purposes. Unique within multipoint-trip response.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
* @see #getId()
*/
public void setId(String value) {
this.id = value;
}
/**
* Problems related to this trip result.
*
* 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;
}
/**
* Information on the trip.
*
* @return
* possible object is
* {@link TripStructure }
*
*/
public TripStructure getTrip() {
return trip;
}
/**
* Sets the value of the trip property.
*
* @param value
* allowed object is
* {@link TripStructure }
*
* @see #getTrip()
*/
public void setTrip(TripStructure value) {
this.trip = value;
}
/**
* Summary on trip. Only if requestor set TripSummaryOnly in request.
*
* @return
* possible object is
* {@link TripSummaryStructure }
*
*/
public TripSummaryStructure getTripSummary() {
return tripSummary;
}
/**
* Sets the value of the tripSummary property.
*
* @param value
* allowed object is
* {@link TripSummaryStructure }
*
* @see #getTripSummary()
*/
public void setTripSummary(TripSummaryStructure value) {
this.tripSummary = value;
}
/**
* Additional wait time at origin of this trip.
*
* @return
* possible object is
* {@link String }
*
*/
public Duration getOriginWaitTime() {
return originWaitTime;
}
/**
* Sets the value of the originWaitTime property.
*
* @param value
* allowed object is
* {@link String }
*
* @see #getOriginWaitTime()
*/
public void setOriginWaitTime(Duration value) {
this.originWaitTime = value;
}
/**
* Additional wait time at destination of this trip.
*
* @return
* possible object is
* {@link String }
*
*/
public Duration getDestinationWaitTime() {
return destinationWaitTime;
}
/**
* Sets the value of the destinationWaitTime property.
*
* @param value
* allowed object is
* {@link String }
*
* @see #getDestinationWaitTime()
*/
public void setDestinationWaitTime(Duration value) {
this.destinationWaitTime = value;
}
/**
* Fare and fare product information for this trip as a whole or parts of it.
*
* Gets the value of the tripFare 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 tripFare property.
*
*
* For example, to add a new item, do as follows:
*
*
* getTripFare().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link TripFareResultStructure }
*
*
*
* @return
* The value of the tripFare property.
*/
public List getTripFare() {
if (tripFare == null) {
tripFare = new ArrayList<>();
}
return this.tripFare;
}
public MultiPointTripResultStructure withId(String value) {
setId(value);
return this;
}
public MultiPointTripResultStructure withErrorCondition(OJPErrorStructure... values) {
if (values!= null) {
for (OJPErrorStructure value: values) {
getErrorCondition().add(value);
}
}
return this;
}
public MultiPointTripResultStructure withErrorCondition(Collection values) {
if (values!= null) {
getErrorCondition().addAll(values);
}
return this;
}
public MultiPointTripResultStructure withTrip(TripStructure value) {
setTrip(value);
return this;
}
public MultiPointTripResultStructure withTripSummary(TripSummaryStructure value) {
setTripSummary(value);
return this;
}
public MultiPointTripResultStructure withOriginWaitTime(Duration value) {
setOriginWaitTime(value);
return this;
}
public MultiPointTripResultStructure withDestinationWaitTime(Duration value) {
setDestinationWaitTime(value);
return this;
}
public MultiPointTripResultStructure withTripFare(TripFareResultStructure... values) {
if (values!= null) {
for (TripFareResultStructure value: values) {
getTripFare().add(value);
}
}
return this;
}
public MultiPointTripResultStructure withTripFare(Collection values) {
if (values!= null) {
getTripFare().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);
}
}