com.huaweicloud.sdk.osm.v2.model.ListUnreadNewInstantMessagesResponse Maven / Gradle / Ivy
package com.huaweicloud.sdk.osm.v2.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 ListUnreadNewInstantMessagesResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "imunread")
private List imunread = null;
public ListUnreadNewInstantMessagesResponse withImunread(List imunread) {
this.imunread = imunread;
return this;
}
public ListUnreadNewInstantMessagesResponse addImunreadItem(ImUnreadV2 imunreadItem) {
if (this.imunread == null) {
this.imunread = new ArrayList<>();
}
this.imunread.add(imunreadItem);
return this;
}
public ListUnreadNewInstantMessagesResponse withImunread(Consumer> imunreadSetter) {
if (this.imunread == null) {
this.imunread = new ArrayList<>();
}
imunreadSetter.accept(this.imunread);
return this;
}
/**
* 未读消息列表
* @return imunread
*/
public List getImunread() {
return imunread;
}
public void setImunread(List imunread) {
this.imunread = imunread;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ListUnreadNewInstantMessagesResponse that = (ListUnreadNewInstantMessagesResponse) obj;
return Objects.equals(this.imunread, that.imunread);
}
@Override
public int hashCode() {
return Objects.hash(imunread);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ListUnreadNewInstantMessagesResponse {\n");
sb.append(" imunread: ").append(toIndentedString(imunread)).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 ");
}
}