com.huaweicloud.sdk.cpts.v1.model.UpdateTaskStatusRequest Maven / Gradle / Ivy
package com.huaweicloud.sdk.cpts.v1.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
import java.util.function.Consumer;
/**
* Request Object
*/
public class UpdateTaskStatusRequest {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "test_suite_id")
private Integer testSuiteId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "task_id")
private Integer taskId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "body")
private UpdateTaskStatusRequestBody body;
public UpdateTaskStatusRequest withTestSuiteId(Integer testSuiteId) {
this.testSuiteId = testSuiteId;
return this;
}
/**
* 测试工程id
* minimum: 0
* maximum: 2147483647
* @return testSuiteId
*/
public Integer getTestSuiteId() {
return testSuiteId;
}
public void setTestSuiteId(Integer testSuiteId) {
this.testSuiteId = testSuiteId;
}
public UpdateTaskStatusRequest withTaskId(Integer taskId) {
this.taskId = taskId;
return this;
}
/**
* 任务id
* minimum: 0
* maximum: 2147483647
* @return taskId
*/
public Integer getTaskId() {
return taskId;
}
public void setTaskId(Integer taskId) {
this.taskId = taskId;
}
public UpdateTaskStatusRequest withBody(UpdateTaskStatusRequestBody body) {
this.body = body;
return this;
}
public UpdateTaskStatusRequest withBody(Consumer bodySetter) {
if (this.body == null) {
this.body = new UpdateTaskStatusRequestBody();
bodySetter.accept(this.body);
}
return this;
}
/**
* Get body
* @return body
*/
public UpdateTaskStatusRequestBody getBody() {
return body;
}
public void setBody(UpdateTaskStatusRequestBody body) {
this.body = body;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
UpdateTaskStatusRequest that = (UpdateTaskStatusRequest) obj;
return Objects.equals(this.testSuiteId, that.testSuiteId) && Objects.equals(this.taskId, that.taskId)
&& Objects.equals(this.body, that.body);
}
@Override
public int hashCode() {
return Objects.hash(testSuiteId, taskId, body);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UpdateTaskStatusRequest {\n");
sb.append(" testSuiteId: ").append(toIndentedString(testSuiteId)).append("\n");
sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n");
sb.append(" body: ").append(toIndentedString(body)).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 ");
}
}