org.hudsonci.rest.model.build.TestsDTO 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 tests complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="tests">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="total" type="{http://www.w3.org/2001/XMLSchema}int"/>
* <element name="failed" type="{http://www.w3.org/2001/XMLSchema}int"/>
* <element name="skipped" type="{http://www.w3.org/2001/XMLSchema}int"/>
* <element name="suite" type="{http://hudson-ci.org/xsd/hudson/2.1.0/rest/build}testSuite" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "tests", propOrder = {
"total",
"failed",
"skipped",
"suites"
})
@XmlRootElement(name = "tests")
public class TestsDTO {
@JsonProperty("total")
protected int total;
@JsonProperty("failed")
protected int failed;
@JsonProperty("skipped")
protected int skipped;
@XmlElement(name = "suite", required = true)
@JsonProperty("suites")
protected List suites;
/**
* Gets the value of the total property.
*
*/
public int getTotal() {
return total;
}
/**
* Sets the value of the total property.
*
*/
public void setTotal(int value) {
this.total = value;
}
/**
* Gets the value of the failed property.
*
*/
public int getFailed() {
return failed;
}
/**
* Sets the value of the failed property.
*
*/
public void setFailed(int value) {
this.failed = value;
}
/**
* Gets the value of the skipped property.
*
*/
public int getSkipped() {
return skipped;
}
/**
* Sets the value of the skipped property.
*
*/
public void setSkipped(int value) {
this.skipped = value;
}
/**
* Gets the value of the suites 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 suites property.
*
*
* For example, to add a new item, do as follows:
*
* getSuites().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link TestSuiteDTO }
*
*
*/
public List getSuites() {
if (suites == null) {
suites = new ArrayList();
}
return this.suites;
}
public TestsDTO withTotal(int value) {
setTotal(value);
return this;
}
public TestsDTO withFailed(int value) {
setFailed(value);
return this;
}
public TestsDTO withSkipped(int value) {
setSkipped(value);
return this;
}
public TestsDTO withSuites(TestSuiteDTO... values) {
if (values!= null) {
for (TestSuiteDTO value: values) {
getSuites().add(value);
}
}
return this;
}
public TestsDTO withSuites(Collection values) {
if (values!= null) {
getSuites().addAll(values);
}
return this;
}
@Override
public boolean equals(final Object obj) {
if (obj == null) {
return false;
}
if (this == obj) {
return true;
}
if (!(obj instanceof TestsDTO)) {
return false;
}
final TestsDTO that = ((TestsDTO) obj);
final EqualsBuilder builder = new EqualsBuilder();
builder.append(this.getTotal(), that.getTotal());
builder.append(this.getFailed(), that.getFailed());
builder.append(this.getSkipped(), that.getSkipped());
builder.append(this.getSuites(), that.getSuites());
return builder.build();
}
@Override
public int hashCode() {
final HashCodeBuilder builder = new HashCodeBuilder();
builder.append(this.getTotal());
builder.append(this.getFailed());
builder.append(this.getSkipped());
builder.append(this.getSuites());
return builder.build();
}
}