com.huaweicloud.sdk.imagesearch.v2.model.DeleteParam Maven / Gradle / Ivy
package com.huaweicloud.sdk.imagesearch.v2.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Consumer;
/**
* DeleteParam
*/
public class DeleteParam {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "force")
private Boolean force;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "item_id")
private String itemId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "custom_tags")
private Map> customTags = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "custom_num_tags")
private Map customNumTags = null;
public DeleteParam withForce(Boolean force) {
this.force = force;
return this;
}
/**
* 是否幂等删除数据,默认为false。仅对指定ID删除生效。 - false: 数据不存在时返回错误信息。 - true: 数据不存在时返回成功,用于幂等删除场景。
* @return force
*/
public Boolean getForce() {
return force;
}
public void setForce(Boolean force) {
this.force = force;
}
public DeleteParam withItemId(String itemId) {
this.itemId = itemId;
return this;
}
/**
* 数据的服务实例级唯一标识,字符长度范围为[1, 256]。 - item_id/custom_tags/custom_num_tags中必须给定至少一个参数,以支持对服务实例中的数据进行指定ID删除或条件删除。 - 如给定item_id参数,则进行指定ID删除,否则进行条件删除。
* @return itemId
*/
public String getItemId() {
return itemId;
}
public void setItemId(String itemId) {
this.itemId = itemId;
}
public DeleteParam withCustomTags(Map> customTags) {
this.customTags = customTags;
return this;
}
public DeleteParam putCustomTagsItem(String key, List customTagsItem) {
if (this.customTags == null) {
this.customTags = new HashMap<>();
}
this.customTags.put(key, customTagsItem);
return this;
}
public DeleteParam withCustomTags(Consumer