com.huaweicloud.sdk.iam.v3.model.KeystoneShowCatalogResponse 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.Catalog;
import com.huaweicloud.sdk.iam.v3.model.LinksSelf;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import java.util.Objects;
/**
* Response Object
*/
public class KeystoneShowCatalogResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="catalog")
private List catalog = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="links")
private LinksSelf links;
public KeystoneShowCatalogResponse withCatalog(List catalog) {
this.catalog = catalog;
return this;
}
public KeystoneShowCatalogResponse addCatalogItem(Catalog catalogItem) {
if(this.catalog == null) {
this.catalog = new ArrayList<>();
}
this.catalog.add(catalogItem);
return this;
}
public KeystoneShowCatalogResponse withCatalog(Consumer> catalogSetter) {
if(this.catalog == null) {
this.catalog = new ArrayList<>();
}
catalogSetter.accept(this.catalog);
return this;
}
/**
* 服务目录信息列表。
* @return catalog
*/
public List getCatalog() {
return catalog;
}
public void setCatalog(List catalog) {
this.catalog = catalog;
}
public KeystoneShowCatalogResponse withLinks(LinksSelf links) {
this.links = links;
return this;
}
public KeystoneShowCatalogResponse withLinks(Consumer linksSetter) {
if(this.links == null ){
this.links = new LinksSelf();
linksSetter.accept(this.links);
}
return this;
}
/**
* Get links
* @return links
*/
public LinksSelf getLinks() {
return links;
}
public void setLinks(LinksSelf links) {
this.links = links;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
KeystoneShowCatalogResponse keystoneShowCatalogResponse = (KeystoneShowCatalogResponse) o;
return Objects.equals(this.catalog, keystoneShowCatalogResponse.catalog) &&
Objects.equals(this.links, keystoneShowCatalogResponse.links);
}
@Override
public int hashCode() {
return Objects.hash(catalog, links);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class KeystoneShowCatalogResponse {\n");
sb.append(" catalog: ").append(toIndentedString(catalog)).append("\n");
sb.append(" links: ").append(toIndentedString(links)).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 ");
}
}