com.huaweicloud.sdk.iam.v3.model.KeystoneListEndpointsResponse 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.Endpoint;
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 KeystoneListEndpointsResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="links")
private Links links;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="endpoints")
private List endpoints = null;
public KeystoneListEndpointsResponse withLinks(Links links) {
this.links = links;
return this;
}
public KeystoneListEndpointsResponse 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 KeystoneListEndpointsResponse withEndpoints(List endpoints) {
this.endpoints = endpoints;
return this;
}
public KeystoneListEndpointsResponse addEndpointsItem(Endpoint endpointsItem) {
if(this.endpoints == null) {
this.endpoints = new ArrayList<>();
}
this.endpoints.add(endpointsItem);
return this;
}
public KeystoneListEndpointsResponse withEndpoints(Consumer> endpointsSetter) {
if(this.endpoints == null) {
this.endpoints = new ArrayList<>();
}
endpointsSetter.accept(this.endpoints);
return this;
}
/**
* 终端节点信息列表。
* @return endpoints
*/
public List getEndpoints() {
return endpoints;
}
public void setEndpoints(List endpoints) {
this.endpoints = endpoints;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
KeystoneListEndpointsResponse keystoneListEndpointsResponse = (KeystoneListEndpointsResponse) o;
return Objects.equals(this.links, keystoneListEndpointsResponse.links) &&
Objects.equals(this.endpoints, keystoneListEndpointsResponse.endpoints);
}
@Override
public int hashCode() {
return Objects.hash(links, endpoints);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class KeystoneListEndpointsResponse {\n");
sb.append(" links: ").append(toIndentedString(links)).append("\n");
sb.append(" endpoints: ").append(toIndentedString(endpoints)).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 ");
}
}