org.smartdeveloperhub.jenkins.crawler.xml.ci.CompositeJob Maven / Gradle / Ivy
Show all versions of ci-jenkins-crawler Show documentation
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2016.07.14 at 09:08:59 AM UTC
//
package org.smartdeveloperhub.jenkins.crawler.xml.ci;
import java.net.URI;
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 org.jvnet.jaxb2_commons.lang.CopyStrategy;
import org.jvnet.jaxb2_commons.lang.CopyTo;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* Java class for CompositeJob complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="CompositeJob">
* <complexContent>
* <extension base="{http://www.smartdeveloperhub.org/harvester/ci/model/v1}Job">
* <sequence>
* <element name="subJobs">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="job" type="{http://www.smartdeveloperhub.org/harvester/ci/model/v1}Reference" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CompositeJob", namespace = "http://www.smartdeveloperhub.org/harvester/ci/model/v1", propOrder = {
"subJobs"
})
@XmlRootElement(name = "compositeJob", namespace = "http://www.smartdeveloperhub.org/harvester/ci/model/v1")
public class CompositeJob
extends Job
implements Cloneable, CopyTo, Equals, HashCode, ToString
{
@XmlElement(required = true)
protected CompositeJob.SubJobs subJobs;
/**
* Default no-arg constructor
*
*/
public CompositeJob() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public CompositeJob(final URI url, final String id, final String title, final String description, final JobType type, final Codebase codebase, final boolean runnable, final Job.Runs runs, final URI instance, final CompositeJob.SubJobs subJobs) {
super(url, id, title, description, type, codebase, runnable, runs, instance);
this.subJobs = subJobs;
}
/**
* Gets the value of the subJobs property.
*
* @return
* possible object is
* {@link CompositeJob.SubJobs }
*
*/
public CompositeJob.SubJobs getSubJobs() {
return subJobs;
}
/**
* Sets the value of the subJobs property.
*
* @param value
* allowed object is
* {@link CompositeJob.SubJobs }
*
*/
public void setSubJobs(CompositeJob.SubJobs value) {
this.subJobs = value;
}
public boolean isSetSubJobs() {
return (this.subJobs!= null);
}
public CompositeJob withSubJobs(CompositeJob.SubJobs value) {
setSubJobs(value);
return this;
}
@Override
public CompositeJob withType(JobType value) {
setType(value);
return this;
}
@Override
public CompositeJob withCodebase(Codebase value) {
setCodebase(value);
return this;
}
@Override
public CompositeJob withRunnable(boolean value) {
setRunnable(value);
return this;
}
@Override
public CompositeJob withRuns(Job.Runs value) {
setRuns(value);
return this;
}
@Override
public CompositeJob withInstance(URI value) {
setInstance(value);
return this;
}
@Override
public CompositeJob withUrl(URI value) {
setUrl(value);
return this;
}
@Override
public CompositeJob withId(String value) {
setId(value);
return this;
}
@Override
public CompositeJob withTitle(String value) {
setTitle(value);
return this;
}
@Override
public CompositeJob withDescription(String value) {
setDescription(value);
return this;
}
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
super.appendFields(locator, buffer, strategy);
{
CompositeJob.SubJobs theSubJobs;
theSubJobs = this.getSubJobs();
strategy.appendField(locator, this, "subJobs", buffer, theSubJobs);
}
return buffer;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof CompositeJob)) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final CompositeJob that = ((CompositeJob) object);
{
CompositeJob.SubJobs lhsSubJobs;
lhsSubJobs = this.getSubJobs();
CompositeJob.SubJobs rhsSubJobs;
rhsSubJobs = that.getSubJobs();
if (!strategy.equals(LocatorUtils.property(thisLocator, "subJobs", lhsSubJobs), LocatorUtils.property(thatLocator, "subJobs", rhsSubJobs), lhsSubJobs, rhsSubJobs)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = super.hashCode(locator, strategy);
{
CompositeJob.SubJobs theSubJobs;
theSubJobs = this.getSubJobs();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "subJobs", theSubJobs), currentHashCode, theSubJobs);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public Object clone() {
return copyTo(createNewInstance());
}
public Object copyTo(Object target) {
final CopyStrategy strategy = JAXBCopyStrategy.INSTANCE;
return copyTo(null, target, strategy);
}
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
super.copyTo(locator, draftCopy, strategy);
if (draftCopy instanceof CompositeJob) {
final CompositeJob copy = ((CompositeJob) draftCopy);
if (this.isSetSubJobs()) {
CompositeJob.SubJobs sourceSubJobs;
sourceSubJobs = this.getSubJobs();
CompositeJob.SubJobs copySubJobs = ((CompositeJob.SubJobs) strategy.copy(LocatorUtils.property(locator, "subJobs", sourceSubJobs), sourceSubJobs));
copy.setSubJobs(copySubJobs);
} else {
copy.subJobs = null;
}
}
return draftCopy;
}
public Object createNewInstance() {
return new CompositeJob();
}
/**
* Java class for anonymous complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="job" type="{http://www.smartdeveloperhub.org/harvester/ci/model/v1}Reference" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"jobs"
})
public static class SubJobs implements Cloneable, CopyTo, Equals, HashCode, ToString
{
@XmlElement(name = "job")
protected List jobs;
/**
* Default no-arg constructor
*
*/
public SubJobs() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public SubJobs(final List jobs) {
this.jobs = jobs;
}
/**
* Gets the value of the jobs 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 jobs property.
*
*
* For example, to add a new item, do as follows:
*
* getJobs().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Reference }
*
*
*/
public List getJobs() {
if (jobs == null) {
jobs = new ArrayList();
}
return this.jobs;
}
public boolean isSetJobs() {
return ((this.jobs!= null)&&(!this.jobs.isEmpty()));
}
public void unsetJobs() {
this.jobs = null;
}
public CompositeJob.SubJobs withJobs(Reference... values) {
if (values!= null) {
for (Reference value: values) {
getJobs().add(value);
}
}
return this;
}
public CompositeJob.SubJobs withJobs(Collection values) {
if (values!= null) {
getJobs().addAll(values);
}
return this;
}
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
{
List theJobs;
theJobs = (this.isSetJobs()?this.getJobs():null);
strategy.appendField(locator, this, "jobs", buffer, theJobs);
}
return buffer;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof CompositeJob.SubJobs)) {
return false;
}
if (this == object) {
return true;
}
final CompositeJob.SubJobs that = ((CompositeJob.SubJobs) object);
{
List lhsJobs;
lhsJobs = (this.isSetJobs()?this.getJobs():null);
List rhsJobs;
rhsJobs = (that.isSetJobs()?that.getJobs():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "jobs", lhsJobs), LocatorUtils.property(thatLocator, "jobs", rhsJobs), lhsJobs, rhsJobs)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = 1;
{
List theJobs;
theJobs = (this.isSetJobs()?this.getJobs():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "jobs", theJobs), currentHashCode, theJobs);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public Object clone() {
return copyTo(createNewInstance());
}
public Object copyTo(Object target) {
final CopyStrategy strategy = JAXBCopyStrategy.INSTANCE;
return copyTo(null, target, strategy);
}
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof CompositeJob.SubJobs) {
final CompositeJob.SubJobs copy = ((CompositeJob.SubJobs) draftCopy);
if (this.isSetJobs()) {
List sourceJobs;
sourceJobs = (this.isSetJobs()?this.getJobs():null);
@SuppressWarnings("unchecked")
List copyJobs = ((List ) strategy.copy(LocatorUtils.property(locator, "jobs", sourceJobs), sourceJobs));
copy.unsetJobs();
if (copyJobs!= null) {
List uniqueJobsl = copy.getJobs();
uniqueJobsl.addAll(copyJobs);
}
} else {
copy.unsetJobs();
}
}
return draftCopy;
}
public Object createNewInstance() {
return new CompositeJob.SubJobs();
}
}
}