com.huaweicloud.sdk.iam.v3.model.KeystoneListUsersResponse Maven / Gradle / Ivy
package com.huaweicloud.sdk.iam.v3.model;
import com.huaweicloud.sdk.core.SdkResponse;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.huaweicloud.sdk.iam.v3.model.KeystoneListUsersResult;
import com.huaweicloud.sdk.iam.v3.model.Links;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import java.util.Objects;
/**
* Response Object
*/
public class KeystoneListUsersResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="links")
private Links links;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="users")
private List users = null;
public KeystoneListUsersResponse withLinks(Links links) {
this.links = links;
return this;
}
public KeystoneListUsersResponse withLinks(Consumer linksSetter) {
if(this.links == null ){
this.links = new Links();
linksSetter.accept(this.links);
}
return this;
}
/**
* Get links
* @return links
*/
public Links getLinks() {
return links;
}
public void setLinks(Links links) {
this.links = links;
}
public KeystoneListUsersResponse withUsers(List users) {
this.users = users;
return this;
}
public KeystoneListUsersResponse addUsersItem(KeystoneListUsersResult usersItem) {
if(this.users == null) {
this.users = new ArrayList<>();
}
this.users.add(usersItem);
return this;
}
public KeystoneListUsersResponse withUsers(Consumer> usersSetter) {
if(this.users == null) {
this.users = new ArrayList<>();
}
usersSetter.accept(this.users);
return this;
}
/**
* IAM用户信息列表。
* @return users
*/
public List getUsers() {
return users;
}
public void setUsers(List users) {
this.users = users;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
KeystoneListUsersResponse keystoneListUsersResponse = (KeystoneListUsersResponse) o;
return Objects.equals(this.links, keystoneListUsersResponse.links) &&
Objects.equals(this.users, keystoneListUsersResponse.users);
}
@Override
public int hashCode() {
return Objects.hash(links, users);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class KeystoneListUsersResponse {\n");
sb.append(" links: ").append(toIndentedString(links)).append("\n");
sb.append(" users: ").append(toIndentedString(users)).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 ");
}
}