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

com.huaweicloud.sdk.cloudtest.v1.model.BatchUpdateVersionTestCasesResponse Maven / Gradle / Ivy

There is a newer version: 3.1.114
Show newest version
package com.huaweicloud.sdk.cloudtest.v1.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.huaweicloud.sdk.core.SdkResponse;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.function.Consumer;

/**
 * Response Object
 */
public class BatchUpdateVersionTestCasesResponse extends SdkResponse {

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "id")

    private String id;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "name")

    private String name;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "success_list")

    private List successList = null;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "failed_list")

    private List failedList = null;

    public BatchUpdateVersionTestCasesResponse withId(String id) {
        this.id = id;
        return this;
    }

    /**
     * CTS需要返回资源id
     * @return id
     */
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

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

    /**
     * CTS需要返回资源name
     * @return name
     */
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BatchUpdateVersionTestCasesResponse withSuccessList(List successList) {
        this.successList = successList;
        return this;
    }

    public BatchUpdateVersionTestCasesResponse addSuccessListItem(String successListItem) {
        if (this.successList == null) {
            this.successList = new ArrayList<>();
        }
        this.successList.add(successListItem);
        return this;
    }

    public BatchUpdateVersionTestCasesResponse withSuccessList(Consumer> successListSetter) {
        if (this.successList == null) {
            this.successList = new ArrayList<>();
        }
        successListSetter.accept(this.successList);
        return this;
    }

    /**
     * 成功批量更新用例的id列表
     * @return successList
     */
    public List getSuccessList() {
        return successList;
    }

    public void setSuccessList(List successList) {
        this.successList = successList;
    }

    public BatchUpdateVersionTestCasesResponse withFailedList(List failedList) {
        this.failedList = failedList;
        return this;
    }

    public BatchUpdateVersionTestCasesResponse addFailedListItem(String failedListItem) {
        if (this.failedList == null) {
            this.failedList = new ArrayList<>();
        }
        this.failedList.add(failedListItem);
        return this;
    }

    public BatchUpdateVersionTestCasesResponse withFailedList(Consumer> failedListSetter) {
        if (this.failedList == null) {
            this.failedList = new ArrayList<>();
        }
        failedListSetter.accept(this.failedList);
        return this;
    }

    /**
     * 没有批量更新用例的id列表
     * @return failedList
     */
    public List getFailedList() {
        return failedList;
    }

    public void setFailedList(List failedList) {
        this.failedList = failedList;
    }

    @Override
    public boolean equals(java.lang.Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        BatchUpdateVersionTestCasesResponse that = (BatchUpdateVersionTestCasesResponse) obj;
        return Objects.equals(this.id, that.id) && Objects.equals(this.name, that.name)
            && Objects.equals(this.successList, that.successList) && Objects.equals(this.failedList, that.failedList);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, successList, failedList);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class BatchUpdateVersionTestCasesResponse {\n");
        sb.append("    id: ").append(toIndentedString(id)).append("\n");
        sb.append("    name: ").append(toIndentedString(name)).append("\n");
        sb.append("    successList: ").append(toIndentedString(successList)).append("\n");
        sb.append("    failedList: ").append(toIndentedString(failedList)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    /**
     * Convert the given object to string with each line indented by 4 spaces
     * (except the first line).
     */
    private String toIndentedString(java.lang.Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy