All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.touchbit.testrail4j.jackson2.model.TRStep Maven / Gradle / Ivy

The newest version!

package org.touchbit.testrail4j.jackson2.model;

import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;


/**
 * Test Case (Steps) template step
 * 
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
    "content",
    "expected",
    "actual",
    "status_id"
})
public class TRStep {

    /**
     * Step value
     * 
     */
    @JsonProperty("content")
    @JsonPropertyDescription("Step value")
    private String content;
    /**
     * Step expected result
     * 
     */
    @JsonProperty("expected")
    @JsonPropertyDescription("Step expected result")
    private String expected;
    /**
     * Step actual result
     * 
     */
    @JsonProperty("actual")
    @JsonPropertyDescription("Step actual result")
    private String actual;
    /**
     * The ID of the test step status.
     * 
     */
    @JsonProperty("status_id")
    @JsonPropertyDescription("The ID of the test step status.")
    private String statusId;
    @JsonIgnore
    private Map additionalProperties = new HashMap();

    /**
     * No args constructor for use in serialization
     * 
     */
    public TRStep() {
    }

    /**
     * 
     * @param actual
     * @param statusId
     * @param expected
     * @param content
     */
    public TRStep(String content, String expected, String actual, String statusId) {
        super();
        this.content = content;
        this.expected = expected;
        this.actual = actual;
        this.statusId = statusId;
    }

    /**
     * Step value
     * 
     */
    @JsonProperty("content")
    public String getContent() {
        return content;
    }

    /**
     * Step value
     * 
     */
    @JsonProperty("content")
    public void setContent(String content) {
        this.content = content;
    }

    public TRStep withContent(String content) {
        this.content = content;
        return this;
    }

    /**
     * Step expected result
     * 
     */
    @JsonProperty("expected")
    public String getExpected() {
        return expected;
    }

    /**
     * Step expected result
     * 
     */
    @JsonProperty("expected")
    public void setExpected(String expected) {
        this.expected = expected;
    }

    public TRStep withExpected(String expected) {
        this.expected = expected;
        return this;
    }

    /**
     * Step actual result
     * 
     */
    @JsonProperty("actual")
    public String getActual() {
        return actual;
    }

    /**
     * Step actual result
     * 
     */
    @JsonProperty("actual")
    public void setActual(String actual) {
        this.actual = actual;
    }

    public TRStep withActual(String actual) {
        this.actual = actual;
        return this;
    }

    /**
     * The ID of the test step status.
     * 
     */
    @JsonProperty("status_id")
    public String getStatusId() {
        return statusId;
    }

    /**
     * The ID of the test step status.
     * 
     */
    @JsonProperty("status_id")
    public void setStatusId(String statusId) {
        this.statusId = statusId;
    }

    public TRStep withStatusId(String statusId) {
        this.statusId = statusId;
        return this;
    }

    @JsonAnyGetter
    public Map getAdditionalProperties() {
        return this.additionalProperties;
    }

    @JsonAnySetter
    public void setAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
    }

    public TRStep withAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
        return this;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(TRStep.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
        sb.append("content");
        sb.append('=');
        sb.append(((this.content == null)?"":this.content));
        sb.append(',');
        sb.append("expected");
        sb.append('=');
        sb.append(((this.expected == null)?"":this.expected));
        sb.append(',');
        sb.append("actual");
        sb.append('=');
        sb.append(((this.actual == null)?"":this.actual));
        sb.append(',');
        sb.append("statusId");
        sb.append('=');
        sb.append(((this.statusId == null)?"":this.statusId));
        sb.append(',');
        sb.append("additionalProperties");
        sb.append('=');
        sb.append(((this.additionalProperties == null)?"":this.additionalProperties));
        sb.append(',');
        if (sb.charAt((sb.length()- 1)) == ',') {
            sb.setCharAt((sb.length()- 1), ']');
        } else {
            sb.append(']');
        }
        return sb.toString();
    }

    @Override
    public int hashCode() {
        int result = 1;
        result = ((result* 31)+((this.actual == null)? 0 :this.actual.hashCode()));
        result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode()));
        result = ((result* 31)+((this.statusId == null)? 0 :this.statusId.hashCode()));
        result = ((result* 31)+((this.content == null)? 0 :this.content.hashCode()));
        result = ((result* 31)+((this.expected == null)? 0 :this.expected.hashCode()));
        return result;
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if ((other instanceof TRStep) == false) {
            return false;
        }
        TRStep rhs = ((TRStep) other);
        return ((((((this.actual == rhs.actual)||((this.actual!= null)&&this.actual.equals(rhs.actual)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.statusId == rhs.statusId)||((this.statusId!= null)&&this.statusId.equals(rhs.statusId))))&&((this.content == rhs.content)||((this.content!= null)&&this.content.equals(rhs.content))))&&((this.expected == rhs.expected)||((this.expected!= null)&&this.expected.equals(rhs.expected))));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy