com.huaweicloud.sdk.aom.v3.model.PageResourceListParam Maven / Gradle / Ivy
package com.huaweicloud.sdk.aom.v3.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Consumer;
/**
* PageResourceListParam
*/
public class PageResourceListParam {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "marker")
private String marker;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "limit")
private Integer limit;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "keywords")
private Map keywords = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "ci_relationships")
private Boolean ciRelationships;
/**
* 节点类型,取值:application、sub_application、component、environment
*/
public static final class CiTypeEnum {
/**
* Enum APPLICATION for value: "APPLICATION"
*/
public static final CiTypeEnum APPLICATION = new CiTypeEnum("APPLICATION");
/**
* Enum SUB_APPLICATION for value: "SUB_APPLICATION"
*/
public static final CiTypeEnum SUB_APPLICATION = new CiTypeEnum("SUB_APPLICATION");
/**
* Enum COMPONENT for value: "COMPONENT"
*/
public static final CiTypeEnum COMPONENT = new CiTypeEnum("COMPONENT");
/**
* Enum ENVIRONMENT for value: "ENVIRONMENT"
*/
public static final CiTypeEnum ENVIRONMENT = new CiTypeEnum("ENVIRONMENT");
private static final Map STATIC_FIELDS = createStaticFields();
private static Map createStaticFields() {
Map map = new HashMap<>();
map.put("APPLICATION", APPLICATION);
map.put("SUB_APPLICATION", SUB_APPLICATION);
map.put("COMPONENT", COMPONENT);
map.put("ENVIRONMENT", ENVIRONMENT);
return Collections.unmodifiableMap(map);
}
private String value;
CiTypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static CiTypeEnum fromValue(String value) {
if (value == null) {
return null;
}
return java.util.Optional.ofNullable(STATIC_FIELDS.get(value)).orElse(new CiTypeEnum(value));
}
public static CiTypeEnum valueOf(String value) {
if (value == null) {
return null;
}
return java.util.Optional.ofNullable(STATIC_FIELDS.get(value))
.orElseThrow(() -> new IllegalArgumentException("Unexpected value '" + value + "'"));
}
@Override
public boolean equals(Object obj) {
if (obj instanceof CiTypeEnum) {
return this.value.equals(((CiTypeEnum) obj).value);
}
return false;
}
@Override
public int hashCode() {
return this.value.hashCode();
}
}
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "ci_type")
private CiTypeEnum ciType;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "ci_region")
private String ciRegion;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "ci_ids")
private List ciIds = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "ci_id")
private String ciId;
public PageResourceListParam withMarker(String marker) {
this.marker = marker;
return this;
}
/**
* 页面的分页标志位,为分页的最后一条记录的id
* @return marker
*/
public String getMarker() {
return marker;
}
public void setMarker(String marker) {
this.marker = marker;
}
public PageResourceListParam withLimit(Integer limit) {
this.limit = limit;
return this;
}
/**
* 查询返回记录的数量限制。limit可以为空,如果值小于1或者大于100,则会使用默认值100
* @return limit
*/
public Integer getLimit() {
return limit;
}
public void setLimit(Integer limit) {
this.limit = limit;
}
public PageResourceListParam withKeywords(Map keywords) {
this.keywords = keywords;
return this;
}
public PageResourceListParam putKeywordsItem(String key, String keywordsItem) {
if (this.keywords == null) {
this.keywords = new HashMap<>();
}
this.keywords.put(key, keywordsItem);
return this;
}
public PageResourceListParam withKeywords(Consumer