ru.yandex.qatools.allure.model.Step Maven / Gradle / Ivy
package ru.yandex.qatools.allure.model;
import java.io.Serializable;
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.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlType;
/**
* Java class for step complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="step">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <all>
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="attachments" type="{urn:model.allure.qatools.yandex.ru}attachments" minOccurs="0"/>
* <element name="steps" type="{urn:model.allure.qatools.yandex.ru}steps" minOccurs="0"/>
* </all>
* <attribute name="start" use="required" type="{http://www.w3.org/2001/XMLSchema}long" />
* <attribute name="stop" use="required" type="{http://www.w3.org/2001/XMLSchema}long" />
* <attribute name="status" use="required" type="{urn:model.allure.qatools.yandex.ru}status" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "step", propOrder = {
})
public class Step implements Serializable
{
private final static long serialVersionUID = 1L;
@XmlElement(required = true)
protected String name;
protected String title;
@XmlElementWrapper
@XmlElement(name = "attachment")
protected List attachments;
@XmlElementWrapper
@XmlElement(name = "step")
protected List steps;
@XmlAttribute(name = "start", required = true)
protected long start;
@XmlAttribute(name = "stop", required = true)
protected long stop;
@XmlAttribute(name = "status", required = true)
protected Status status;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the title property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTitle() {
return title;
}
/**
* Sets the value of the title property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTitle(String value) {
this.title = value;
}
/**
* Gets the value of the start property.
*
*/
public long getStart() {
return start;
}
/**
* Sets the value of the start property.
*
*/
public void setStart(long value) {
this.start = value;
}
/**
* Gets the value of the stop property.
*
*/
public long getStop() {
return stop;
}
/**
* Sets the value of the stop property.
*
*/
public void setStop(long value) {
this.stop = value;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link Status }
*
*/
public Status getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link Status }
*
*/
public void setStatus(Status value) {
this.status = value;
}
public List getAttachments() {
if (attachments == null) {
attachments = new ArrayList();
}
return attachments;
}
public void setAttachments(List attachments) {
this.attachments = attachments;
}
public List getSteps() {
if (steps == null) {
steps = new ArrayList();
}
return steps;
}
public void setSteps(List steps) {
this.steps = steps;
}
public Step withName(String value) {
setName(value);
return this;
}
public Step withTitle(String value) {
setTitle(value);
return this;
}
public Step withStart(long value) {
setStart(value);
return this;
}
public Step withStop(long value) {
setStop(value);
return this;
}
public Step withStatus(Status value) {
setStatus(value);
return this;
}
public Step withAttachments(Attachment... values) {
if (values!= null) {
for (Attachment value: values) {
getAttachments().add(value);
}
}
return this;
}
public Step withAttachments(Collection values) {
if (values!= null) {
getAttachments().addAll(values);
}
return this;
}
public Step withAttachments(List attachments) {
setAttachments(attachments);
return this;
}
public Step withSteps(Step... values) {
if (values!= null) {
for (Step value: values) {
getSteps().add(value);
}
}
return this;
}
public Step withSteps(Collection values) {
if (values!= null) {
getSteps().addAll(values);
}
return this;
}
public Step withSteps(List steps) {
setSteps(steps);
return this;
}
}