All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.huaweicloud.sdk.frs.v2.model.AddFacesUrlReq Maven / Gradle / Ivy

There is a newer version: 3.1.114
Show newest version
package com.huaweicloud.sdk.frs.v2.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Objects;

/**
 * AddFacesUrlReq
 */
public class AddFacesUrlReq {

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "image_url")

    private String imageUrl;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "external_fields")

    private Object externalFields;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "external_image_id")

    private String externalImageId;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "single")

    private Boolean single;

    public AddFacesUrlReq withImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
        return this;
    }

    /**
     * [图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/api-face/face_02_0006.html)。](tag:hc) [图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0006.html)。](tag:hk)
     * @return imageUrl
     */
    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public AddFacesUrlReq withExternalFields(Object externalFields) {
        this.externalFields = externalFields;
        return this;
    }

    /**
     * 根据用户自定义数据类型,填入相应的数值。 创建faceset时定义该字段,Json字符串不校验重复性,参考[[自定义字段](https://support.huaweicloud.com/api-face/face_02_0012.html)。](tag:hc)[[自定义字段](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0012.html)。](tag:hk)
     * @return externalFields
     */
    public Object getExternalFields() {
        return externalFields;
    }

    public void setExternalFields(Object externalFields) {
        this.externalFields = externalFields;
    }

    public AddFacesUrlReq withExternalImageId(String externalImageId) {
        this.externalImageId = externalImageId;
        return this;
    }

    /**
     * 用户指定的图片外部ID,与当前图像绑定。用户没提供,系统会生成一个。 该ID长度范围为1~36位,可以包含字母、数字、中划线或者下划线,不包含其他的特殊字符。
     * @return externalImageId
     */
    public String getExternalImageId() {
        return externalImageId;
    }

    public void setExternalImageId(String externalImageId) {
        this.externalImageId = externalImageId;
    }

    public AddFacesUrlReq withSingle(Boolean single) {
        this.single = single;
        return this;
    }

    /**
     * 是否将图片中的最大人脸添加至人脸库。可选值包括: • true: 传入的单张图片中如果包含多张人脸,则只将最大人脸添加到人脸库中。 • false: 默认为false。传入的单张图片中如果包含多张人脸,则将所有人脸添加至人脸库中。
     * @return single
     */
    public Boolean getSingle() {
        return single;
    }

    public void setSingle(Boolean single) {
        this.single = single;
    }

    @Override
    public boolean equals(java.lang.Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        AddFacesUrlReq that = (AddFacesUrlReq) obj;
        return Objects.equals(this.imageUrl, that.imageUrl) && Objects.equals(this.externalFields, that.externalFields)
            && Objects.equals(this.externalImageId, that.externalImageId) && Objects.equals(this.single, that.single);
    }

    @Override
    public int hashCode() {
        return Objects.hash(imageUrl, externalFields, externalImageId, single);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class AddFacesUrlReq {\n");
        sb.append("    imageUrl: ").append(toIndentedString(imageUrl)).append("\n");
        sb.append("    externalFields: ").append(toIndentedString(externalFields)).append("\n");
        sb.append("    externalImageId: ").append(toIndentedString(externalImageId)).append("\n");
        sb.append("    single: ").append(toIndentedString(single)).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    ");
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy