com.huaweicloud.sdk.hss.v5.model.ChangeHostsGroupRequestInfo Maven / Gradle / Ivy
package com.huaweicloud.sdk.hss.v5.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;
/**
* ChangeHostsGroupRequestInfo
*/
public class ChangeHostsGroupRequestInfo {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "group_name")
private String groupName;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "group_id")
private String groupId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "host_id_list")
private List hostIdList = null;
public ChangeHostsGroupRequestInfo withGroupName(String groupName) {
this.groupName = groupName;
return this;
}
/**
* 服务器组名称
* @return groupName
*/
public String getGroupName() {
return groupName;
}
public void setGroupName(String groupName) {
this.groupName = groupName;
}
public ChangeHostsGroupRequestInfo withGroupId(String groupId) {
this.groupId = groupId;
return this;
}
/**
* 服务器组ID
* @return groupId
*/
public String getGroupId() {
return groupId;
}
public void setGroupId(String groupId) {
this.groupId = groupId;
}
public ChangeHostsGroupRequestInfo withHostIdList(List hostIdList) {
this.hostIdList = hostIdList;
return this;
}
public ChangeHostsGroupRequestInfo addHostIdListItem(String hostIdListItem) {
if (this.hostIdList == null) {
this.hostIdList = new ArrayList<>();
}
this.hostIdList.add(hostIdListItem);
return this;
}
public ChangeHostsGroupRequestInfo withHostIdList(Consumer> hostIdListSetter) {
if (this.hostIdList == null) {
this.hostIdList = new ArrayList<>();
}
hostIdListSetter.accept(this.hostIdList);
return this;
}
/**
* 服务器ID列表
* @return hostIdList
*/
public List getHostIdList() {
return hostIdList;
}
public void setHostIdList(List hostIdList) {
this.hostIdList = hostIdList;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ChangeHostsGroupRequestInfo that = (ChangeHostsGroupRequestInfo) obj;
return Objects.equals(this.groupName, that.groupName) && Objects.equals(this.groupId, that.groupId)
&& Objects.equals(this.hostIdList, that.hostIdList);
}
@Override
public int hashCode() {
return Objects.hash(groupName, groupId, hostIdList);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ChangeHostsGroupRequestInfo {\n");
sb.append(" groupName: ").append(toIndentedString(groupName)).append("\n");
sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n");
sb.append(" hostIdList: ").append(toIndentedString(hostIdList)).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 ");
}
}