com.huaweicloud.sdk.apm.v1.model.AgentDeleteParam Maven / Gradle / Ivy
package com.huaweicloud.sdk.apm.v1.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.function.Consumer;
/**
* 删除agent入参。
*/
public class AgentDeleteParam {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "instance_list")
private List instanceList = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "region")
private String region;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "business_id")
private Long businessId;
public AgentDeleteParam withInstanceList(List instanceList) {
this.instanceList = instanceList;
return this;
}
public AgentDeleteParam addInstanceListItem(Long instanceListItem) {
if (this.instanceList == null) {
this.instanceList = new ArrayList<>();
}
this.instanceList.add(instanceListItem);
return this;
}
public AgentDeleteParam withInstanceList(Consumer> instanceListSetter) {
if (this.instanceList == null) {
this.instanceList = new ArrayList<>();
}
instanceListSetter.accept(this.instanceList);
return this;
}
/**
* 实例列表。
* @return instanceList
*/
public List getInstanceList() {
return instanceList;
}
public void setInstanceList(List instanceList) {
this.instanceList = instanceList;
}
public AgentDeleteParam withRegion(String region) {
this.region = region;
return this;
}
/**
* region英文名称。
* @return region
*/
public String getRegion() {
return region;
}
public void setRegion(String region) {
this.region = region;
}
public AgentDeleteParam withBusinessId(Long businessId) {
this.businessId = businessId;
return this;
}
/**
* 应用id。
* @return businessId
*/
public Long getBusinessId() {
return businessId;
}
public void setBusinessId(Long businessId) {
this.businessId = businessId;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
AgentDeleteParam that = (AgentDeleteParam) obj;
return Objects.equals(this.instanceList, that.instanceList) && Objects.equals(this.region, that.region)
&& Objects.equals(this.businessId, that.businessId);
}
@Override
public int hashCode() {
return Objects.hash(instanceList, region, businessId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AgentDeleteParam {\n");
sb.append(" instanceList: ").append(toIndentedString(instanceList)).append("\n");
sb.append(" region: ").append(toIndentedString(region)).append("\n");
sb.append(" businessId: ").append(toIndentedString(businessId)).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 ");
}
}