org.hudsonci.rest.model.build.BuildsDTO Maven / Gradle / Ivy
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.05.19 at 02:21:23 PM PDT
//
package org.hudsonci.rest.model.build;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import com.flipthebird.gwthashcodeequals.EqualsBuilder;
import com.flipthebird.gwthashcodeequals.HashCodeBuilder;
import org.codehaus.jackson.annotate.JsonProperty;
/**
* Java class for builds complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="builds">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="build" type="{http://hudson-ci.org/xsd/hudson/2.1.0/rest/build}build" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "builds", propOrder = {
"builds"
})
@XmlRootElement(name = "builds")
public class BuildsDTO {
@XmlElement(name = "build")
@JsonProperty("builds")
protected List builds;
/**
* Gets the value of the builds 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 builds property.
*
*
* For example, to add a new item, do as follows:
*
* getBuilds().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link BuildDTO }
*
*
*/
public List getBuilds() {
if (builds == null) {
builds = new ArrayList();
}
return this.builds;
}
public BuildsDTO withBuilds(BuildDTO... values) {
if (values!= null) {
for (BuildDTO value: values) {
getBuilds().add(value);
}
}
return this;
}
public BuildsDTO withBuilds(Collection values) {
if (values!= null) {
getBuilds().addAll(values);
}
return this;
}
@Override
public boolean equals(final Object obj) {
if (obj == null) {
return false;
}
if (this == obj) {
return true;
}
if (!(obj instanceof BuildsDTO)) {
return false;
}
final BuildsDTO that = ((BuildsDTO) obj);
final EqualsBuilder builder = new EqualsBuilder();
builder.append(this.getBuilds(), that.getBuilds());
return builder.build();
}
@Override
public int hashCode() {
final HashCodeBuilder builder = new HashCodeBuilder();
builder.append(this.getBuilds());
return builder.build();
}
}