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

org.touchbit.testrail4j.jackson2.model.TRSection 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;


/**
 * The depth, display_order and parent fields determine the hierarchy of the sections in a test suite. The depth field is 0 for all sections on the root level and greater than 0 for all child sections. The depth field therefore resembles the level in the section hierarchy. Also see get_sections for an example.
 * 
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
    "description",
    "id",
    "suite_id",
    "parent_id",
    "name",
    "depth",
    "display_order"
})
public class TRSection {

    /**
     * The description of the section (added with TestRail 4.0)
     * 
     */
    @JsonProperty("description")
    @JsonPropertyDescription("The description of the section (added with TestRail 4.0)")
    private String description;
    /**
     * The ID of the section
     * 
     */
    @JsonProperty("id")
    @JsonPropertyDescription("The ID of the section")
    private Long id;
    /**
     * The ID of the test suite (ignored if the project is operating in single suite mode, required otherwise)
     * 
     */
    @JsonProperty("suite_id")
    @JsonPropertyDescription("The ID of the test suite (ignored if the project is operating in single suite mode, required otherwise)")
    private Long suiteId;
    /**
     * The ID of the parent section (to build section hierarchies)
     * 
     */
    @JsonProperty("parent_id")
    @JsonPropertyDescription("The ID of the parent section (to build section hierarchies)")
    private Long parentId;
    /**
     * The name of the section (required)
     * (Required)
     * 
     */
    @JsonProperty("name")
    @JsonPropertyDescription("The name of the section (required)")
    private String name;
    /**
     * The level in the section hierarchy of the test suite
     * 
     */
    @JsonProperty("depth")
    @JsonPropertyDescription("The level in the section hierarchy of the test suite")
    private Long depth;
    /**
     * The order in the test suite
     * 
     */
    @JsonProperty("display_order")
    @JsonPropertyDescription("The order in the test suite")
    private Long displayOrder;
    @JsonIgnore
    private Map additionalProperties = new HashMap();

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

    /**
     * 
     * @param suiteId
     * @param depth
     * @param name
     * @param displayOrder
     * @param description
     * @param id
     * @param parentId
     */
    public TRSection(String description, Long id, Long suiteId, Long parentId, String name, Long depth, Long displayOrder) {
        super();
        this.description = description;
        this.id = id;
        this.suiteId = suiteId;
        this.parentId = parentId;
        this.name = name;
        this.depth = depth;
        this.displayOrder = displayOrder;
    }

    /**
     * The description of the section (added with TestRail 4.0)
     * 
     */
    @JsonProperty("description")
    public String getDescription() {
        return description;
    }

    /**
     * The description of the section (added with TestRail 4.0)
     * 
     */
    @JsonProperty("description")
    public void setDescription(String description) {
        this.description = description;
    }

    public TRSection withDescription(String description) {
        this.description = description;
        return this;
    }

    /**
     * The ID of the section
     * 
     */
    @JsonProperty("id")
    public Long getId() {
        return id;
    }

    /**
     * The ID of the section
     * 
     */
    @JsonProperty("id")
    public void setId(Long id) {
        this.id = id;
    }

    public TRSection withId(Long id) {
        this.id = id;
        return this;
    }

    /**
     * The ID of the test suite (ignored if the project is operating in single suite mode, required otherwise)
     * 
     */
    @JsonProperty("suite_id")
    public Long getSuiteId() {
        return suiteId;
    }

    /**
     * The ID of the test suite (ignored if the project is operating in single suite mode, required otherwise)
     * 
     */
    @JsonProperty("suite_id")
    public void setSuiteId(Long suiteId) {
        this.suiteId = suiteId;
    }

    public TRSection withSuiteId(Long suiteId) {
        this.suiteId = suiteId;
        return this;
    }

    /**
     * The ID of the parent section (to build section hierarchies)
     * 
     */
    @JsonProperty("parent_id")
    public Long getParentId() {
        return parentId;
    }

    /**
     * The ID of the parent section (to build section hierarchies)
     * 
     */
    @JsonProperty("parent_id")
    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public TRSection withParentId(Long parentId) {
        this.parentId = parentId;
        return this;
    }

    /**
     * The name of the section (required)
     * (Required)
     * 
     */
    @JsonProperty("name")
    public String getName() {
        return name;
    }

    /**
     * The name of the section (required)
     * (Required)
     * 
     */
    @JsonProperty("name")
    public void setName(String name) {
        this.name = name;
    }

    public TRSection withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * The level in the section hierarchy of the test suite
     * 
     */
    @JsonProperty("depth")
    public Long getDepth() {
        return depth;
    }

    /**
     * The level in the section hierarchy of the test suite
     * 
     */
    @JsonProperty("depth")
    public void setDepth(Long depth) {
        this.depth = depth;
    }

    public TRSection withDepth(Long depth) {
        this.depth = depth;
        return this;
    }

    /**
     * The order in the test suite
     * 
     */
    @JsonProperty("display_order")
    public Long getDisplayOrder() {
        return displayOrder;
    }

    /**
     * The order in the test suite
     * 
     */
    @JsonProperty("display_order")
    public void setDisplayOrder(Long displayOrder) {
        this.displayOrder = displayOrder;
    }

    public TRSection withDisplayOrder(Long displayOrder) {
        this.displayOrder = displayOrder;
        return this;
    }

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

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

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

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(TRSection.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
        sb.append("description");
        sb.append('=');
        sb.append(((this.description == null)?"":this.description));
        sb.append(',');
        sb.append("id");
        sb.append('=');
        sb.append(((this.id == null)?"":this.id));
        sb.append(',');
        sb.append("suiteId");
        sb.append('=');
        sb.append(((this.suiteId == null)?"":this.suiteId));
        sb.append(',');
        sb.append("parentId");
        sb.append('=');
        sb.append(((this.parentId == null)?"":this.parentId));
        sb.append(',');
        sb.append("name");
        sb.append('=');
        sb.append(((this.name == null)?"":this.name));
        sb.append(',');
        sb.append("depth");
        sb.append('=');
        sb.append(((this.depth == null)?"":this.depth));
        sb.append(',');
        sb.append("displayOrder");
        sb.append('=');
        sb.append(((this.displayOrder == null)?"":this.displayOrder));
        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.suiteId == null)? 0 :this.suiteId.hashCode()));
        result = ((result* 31)+((this.depth == null)? 0 :this.depth.hashCode()));
        result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode()));
        result = ((result* 31)+((this.displayOrder == null)? 0 :this.displayOrder.hashCode()));
        result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode()));
        result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode()));
        result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode()));
        result = ((result* 31)+((this.parentId == null)? 0 :this.parentId.hashCode()));
        return result;
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if ((other instanceof TRSection) == false) {
            return false;
        }
        TRSection rhs = ((TRSection) other);
        return (((((((((this.suiteId == rhs.suiteId)||((this.suiteId!= null)&&this.suiteId.equals(rhs.suiteId)))&&((this.depth == rhs.depth)||((this.depth!= null)&&this.depth.equals(rhs.depth))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.displayOrder == rhs.displayOrder)||((this.displayOrder!= null)&&this.displayOrder.equals(rhs.displayOrder))))&&((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.parentId == rhs.parentId)||((this.parentId!= null)&&this.parentId.equals(rhs.parentId))));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy