![JAR search and dependency download from the Maven repository](/logo.png)
com.tencentcloudapi.ims.v20201229.models.ImageModerationRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tencentcloud-sdk-java-intl-en Show documentation
Show all versions of tencentcloud-sdk-java-intl-en Show documentation
Tencent Cloud API SDK for Java
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.ims.v20201229.models;
import com.tencentcloudapi.common.AbstractModel;
import com.tencentcloudapi.common.SSEResponseModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class ImageModerationRequest extends AbstractModel {
/**
* This field indicates the specific number of the policy, which is used for API scheduling and can be configured in the CMS console. If the `Biztype` parameter is passed in, a moderation policy will be used based on the business scenario; otherwise, the default moderation policy will be used.
Note: `Biztype` can contain 3–32 digits, letters, and underscores; different `Biztype` values are associated with different business scenarios and moderation policies, so you need to verify the `Biztype` before calling this API.
*/
@SerializedName("BizType")
@Expose
private String BizType;
/**
* This field indicates the data ID assigned by you to the object to be detected for easier file identification and management.
It **can contain up to 64 letters, digits, and special symbols (_-@#)**.
*/
@SerializedName("DataId")
@Expose
private String DataId;
/**
* This field indicates the Base64 encoding of the image to be detected. The image **size cannot exceed 5 MB**. **A resolution of 256x256 or higher is recommended**; otherwise, the recognition effect may be affected.
Note: **you must enter a value for either this field or `FileUrl`**.
*/
@SerializedName("FileContent")
@Expose
private String FileContent;
/**
* URL of the image to moderate. It supports PNG, JPG, JPEG, BMP, GIF AND WEBP files. The file **cannot exceed 5 MB** and the resolution should not below **256*246**. The default timeout period is 3 seconds. Note that **redirection URLs may be blocked by security policies**. In this case, an error message will return. For example, if an HTTP request gets the 302 code, the error `ResourceUnavailable.ImageDownloadError` is returned.
**Either `FileUrl` or `FileContent` must be specified.
*/
@SerializedName("FileUrl")
@Expose
private String FileUrl;
/**
* **For GIF/long image detection only**. This field indicates the GIF frame capturing frequency (the image interval for capturing a frame for detection). For long images, you should round the width:height ratio as the total number of images to be split. The default value is 0, where only the first frame of the GIF image will be detected, and the long image will not be split.
Note: the `Interval` and `MaxFrames` parameters need to be used in combination; for example, if `Interval` is `3` and `MaxFrames` is `400`, the GIF/long image will be detected once every two frames for up to 400 frames.
*/
@SerializedName("Interval")
@Expose
private Long Interval;
/**
* **For GIF/long image detection only**. This field indicates the maximum number of frames that can be captured. The default value is 1, where only the first frame of the input GIF image will be detected, and the long image will not be split (which may cause a processing timeout).
Note: the `Interval` and `MaxFrames` parameters need to be used in combination; for example, if `Interval` is `3` and `MaxFrames` is `400`, the GIF/long image will be detected once every two frames for up to 400 frames.
*/
@SerializedName("MaxFrames")
@Expose
private Long MaxFrames;
/**
* This field indicates the information of the user that corresponds to the object to be detected. It can be passed in to identify the user involved in the violation.
*/
@SerializedName("User")
@Expose
private User User;
/**
* This field indicates the information of the device that corresponds to the object to be detected. It can be passed in to identify the device involved in the violation.
*/
@SerializedName("Device")
@Expose
private Device Device;
/**
* Get This field indicates the specific number of the policy, which is used for API scheduling and can be configured in the CMS console. If the `Biztype` parameter is passed in, a moderation policy will be used based on the business scenario; otherwise, the default moderation policy will be used.
Note: `Biztype` can contain 3–32 digits, letters, and underscores; different `Biztype` values are associated with different business scenarios and moderation policies, so you need to verify the `Biztype` before calling this API.
* @return BizType This field indicates the specific number of the policy, which is used for API scheduling and can be configured in the CMS console. If the `Biztype` parameter is passed in, a moderation policy will be used based on the business scenario; otherwise, the default moderation policy will be used.
Note: `Biztype` can contain 3–32 digits, letters, and underscores; different `Biztype` values are associated with different business scenarios and moderation policies, so you need to verify the `Biztype` before calling this API.
*/
public String getBizType() {
return this.BizType;
}
/**
* Set This field indicates the specific number of the policy, which is used for API scheduling and can be configured in the CMS console. If the `Biztype` parameter is passed in, a moderation policy will be used based on the business scenario; otherwise, the default moderation policy will be used.
Note: `Biztype` can contain 3–32 digits, letters, and underscores; different `Biztype` values are associated with different business scenarios and moderation policies, so you need to verify the `Biztype` before calling this API.
* @param BizType This field indicates the specific number of the policy, which is used for API scheduling and can be configured in the CMS console. If the `Biztype` parameter is passed in, a moderation policy will be used based on the business scenario; otherwise, the default moderation policy will be used.
Note: `Biztype` can contain 3–32 digits, letters, and underscores; different `Biztype` values are associated with different business scenarios and moderation policies, so you need to verify the `Biztype` before calling this API.
*/
public void setBizType(String BizType) {
this.BizType = BizType;
}
/**
* Get This field indicates the data ID assigned by you to the object to be detected for easier file identification and management.
It **can contain up to 64 letters, digits, and special symbols (_-@#)**.
* @return DataId This field indicates the data ID assigned by you to the object to be detected for easier file identification and management.
It **can contain up to 64 letters, digits, and special symbols (_-@#)**.
*/
public String getDataId() {
return this.DataId;
}
/**
* Set This field indicates the data ID assigned by you to the object to be detected for easier file identification and management.
It **can contain up to 64 letters, digits, and special symbols (_-@#)**.
* @param DataId This field indicates the data ID assigned by you to the object to be detected for easier file identification and management.
It **can contain up to 64 letters, digits, and special symbols (_-@#)**.
*/
public void setDataId(String DataId) {
this.DataId = DataId;
}
/**
* Get This field indicates the Base64 encoding of the image to be detected. The image **size cannot exceed 5 MB**. **A resolution of 256x256 or higher is recommended**; otherwise, the recognition effect may be affected.
Note: **you must enter a value for either this field or `FileUrl`**.
* @return FileContent This field indicates the Base64 encoding of the image to be detected. The image **size cannot exceed 5 MB**. **A resolution of 256x256 or higher is recommended**; otherwise, the recognition effect may be affected.
Note: **you must enter a value for either this field or `FileUrl`**.
*/
public String getFileContent() {
return this.FileContent;
}
/**
* Set This field indicates the Base64 encoding of the image to be detected. The image **size cannot exceed 5 MB**. **A resolution of 256x256 or higher is recommended**; otherwise, the recognition effect may be affected.
Note: **you must enter a value for either this field or `FileUrl`**.
* @param FileContent This field indicates the Base64 encoding of the image to be detected. The image **size cannot exceed 5 MB**. **A resolution of 256x256 or higher is recommended**; otherwise, the recognition effect may be affected.
Note: **you must enter a value for either this field or `FileUrl`**.
*/
public void setFileContent(String FileContent) {
this.FileContent = FileContent;
}
/**
* Get URL of the image to moderate. It supports PNG, JPG, JPEG, BMP, GIF AND WEBP files. The file **cannot exceed 5 MB** and the resolution should not below **256*246**. The default timeout period is 3 seconds. Note that **redirection URLs may be blocked by security policies**. In this case, an error message will return. For example, if an HTTP request gets the 302 code, the error `ResourceUnavailable.ImageDownloadError` is returned.
**Either `FileUrl` or `FileContent` must be specified.
* @return FileUrl URL of the image to moderate. It supports PNG, JPG, JPEG, BMP, GIF AND WEBP files. The file **cannot exceed 5 MB** and the resolution should not below **256*246**. The default timeout period is 3 seconds. Note that **redirection URLs may be blocked by security policies**. In this case, an error message will return. For example, if an HTTP request gets the 302 code, the error `ResourceUnavailable.ImageDownloadError` is returned.
**Either `FileUrl` or `FileContent` must be specified.
*/
public String getFileUrl() {
return this.FileUrl;
}
/**
* Set URL of the image to moderate. It supports PNG, JPG, JPEG, BMP, GIF AND WEBP files. The file **cannot exceed 5 MB** and the resolution should not below **256*246**. The default timeout period is 3 seconds. Note that **redirection URLs may be blocked by security policies**. In this case, an error message will return. For example, if an HTTP request gets the 302 code, the error `ResourceUnavailable.ImageDownloadError` is returned.
**Either `FileUrl` or `FileContent` must be specified.
* @param FileUrl URL of the image to moderate. It supports PNG, JPG, JPEG, BMP, GIF AND WEBP files. The file **cannot exceed 5 MB** and the resolution should not below **256*246**. The default timeout period is 3 seconds. Note that **redirection URLs may be blocked by security policies**. In this case, an error message will return. For example, if an HTTP request gets the 302 code, the error `ResourceUnavailable.ImageDownloadError` is returned.
**Either `FileUrl` or `FileContent` must be specified.
*/
public void setFileUrl(String FileUrl) {
this.FileUrl = FileUrl;
}
/**
* Get **For GIF/long image detection only**. This field indicates the GIF frame capturing frequency (the image interval for capturing a frame for detection). For long images, you should round the width:height ratio as the total number of images to be split. The default value is 0, where only the first frame of the GIF image will be detected, and the long image will not be split.
Note: the `Interval` and `MaxFrames` parameters need to be used in combination; for example, if `Interval` is `3` and `MaxFrames` is `400`, the GIF/long image will be detected once every two frames for up to 400 frames.
* @return Interval **For GIF/long image detection only**. This field indicates the GIF frame capturing frequency (the image interval for capturing a frame for detection). For long images, you should round the width:height ratio as the total number of images to be split. The default value is 0, where only the first frame of the GIF image will be detected, and the long image will not be split.
Note: the `Interval` and `MaxFrames` parameters need to be used in combination; for example, if `Interval` is `3` and `MaxFrames` is `400`, the GIF/long image will be detected once every two frames for up to 400 frames.
*/
public Long getInterval() {
return this.Interval;
}
/**
* Set **For GIF/long image detection only**. This field indicates the GIF frame capturing frequency (the image interval for capturing a frame for detection). For long images, you should round the width:height ratio as the total number of images to be split. The default value is 0, where only the first frame of the GIF image will be detected, and the long image will not be split.
Note: the `Interval` and `MaxFrames` parameters need to be used in combination; for example, if `Interval` is `3` and `MaxFrames` is `400`, the GIF/long image will be detected once every two frames for up to 400 frames.
* @param Interval **For GIF/long image detection only**. This field indicates the GIF frame capturing frequency (the image interval for capturing a frame for detection). For long images, you should round the width:height ratio as the total number of images to be split. The default value is 0, where only the first frame of the GIF image will be detected, and the long image will not be split.
Note: the `Interval` and `MaxFrames` parameters need to be used in combination; for example, if `Interval` is `3` and `MaxFrames` is `400`, the GIF/long image will be detected once every two frames for up to 400 frames.
*/
public void setInterval(Long Interval) {
this.Interval = Interval;
}
/**
* Get **For GIF/long image detection only**. This field indicates the maximum number of frames that can be captured. The default value is 1, where only the first frame of the input GIF image will be detected, and the long image will not be split (which may cause a processing timeout).
Note: the `Interval` and `MaxFrames` parameters need to be used in combination; for example, if `Interval` is `3` and `MaxFrames` is `400`, the GIF/long image will be detected once every two frames for up to 400 frames.
* @return MaxFrames **For GIF/long image detection only**. This field indicates the maximum number of frames that can be captured. The default value is 1, where only the first frame of the input GIF image will be detected, and the long image will not be split (which may cause a processing timeout).
Note: the `Interval` and `MaxFrames` parameters need to be used in combination; for example, if `Interval` is `3` and `MaxFrames` is `400`, the GIF/long image will be detected once every two frames for up to 400 frames.
*/
public Long getMaxFrames() {
return this.MaxFrames;
}
/**
* Set **For GIF/long image detection only**. This field indicates the maximum number of frames that can be captured. The default value is 1, where only the first frame of the input GIF image will be detected, and the long image will not be split (which may cause a processing timeout).
Note: the `Interval` and `MaxFrames` parameters need to be used in combination; for example, if `Interval` is `3` and `MaxFrames` is `400`, the GIF/long image will be detected once every two frames for up to 400 frames.
* @param MaxFrames **For GIF/long image detection only**. This field indicates the maximum number of frames that can be captured. The default value is 1, where only the first frame of the input GIF image will be detected, and the long image will not be split (which may cause a processing timeout).
Note: the `Interval` and `MaxFrames` parameters need to be used in combination; for example, if `Interval` is `3` and `MaxFrames` is `400`, the GIF/long image will be detected once every two frames for up to 400 frames.
*/
public void setMaxFrames(Long MaxFrames) {
this.MaxFrames = MaxFrames;
}
/**
* Get This field indicates the information of the user that corresponds to the object to be detected. It can be passed in to identify the user involved in the violation.
* @return User This field indicates the information of the user that corresponds to the object to be detected. It can be passed in to identify the user involved in the violation.
*/
public User getUser() {
return this.User;
}
/**
* Set This field indicates the information of the user that corresponds to the object to be detected. It can be passed in to identify the user involved in the violation.
* @param User This field indicates the information of the user that corresponds to the object to be detected. It can be passed in to identify the user involved in the violation.
*/
public void setUser(User User) {
this.User = User;
}
/**
* Get This field indicates the information of the device that corresponds to the object to be detected. It can be passed in to identify the device involved in the violation.
* @return Device This field indicates the information of the device that corresponds to the object to be detected. It can be passed in to identify the device involved in the violation.
*/
public Device getDevice() {
return this.Device;
}
/**
* Set This field indicates the information of the device that corresponds to the object to be detected. It can be passed in to identify the device involved in the violation.
* @param Device This field indicates the information of the device that corresponds to the object to be detected. It can be passed in to identify the device involved in the violation.
*/
public void setDevice(Device Device) {
this.Device = Device;
}
public ImageModerationRequest() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public ImageModerationRequest(ImageModerationRequest source) {
if (source.BizType != null) {
this.BizType = new String(source.BizType);
}
if (source.DataId != null) {
this.DataId = new String(source.DataId);
}
if (source.FileContent != null) {
this.FileContent = new String(source.FileContent);
}
if (source.FileUrl != null) {
this.FileUrl = new String(source.FileUrl);
}
if (source.Interval != null) {
this.Interval = new Long(source.Interval);
}
if (source.MaxFrames != null) {
this.MaxFrames = new Long(source.MaxFrames);
}
if (source.User != null) {
this.User = new User(source.User);
}
if (source.Device != null) {
this.Device = new Device(source.Device);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap map, String prefix) {
this.setParamSimple(map, prefix + "BizType", this.BizType);
this.setParamSimple(map, prefix + "DataId", this.DataId);
this.setParamSimple(map, prefix + "FileContent", this.FileContent);
this.setParamSimple(map, prefix + "FileUrl", this.FileUrl);
this.setParamSimple(map, prefix + "Interval", this.Interval);
this.setParamSimple(map, prefix + "MaxFrames", this.MaxFrames);
this.setParamObj(map, prefix + "User.", this.User);
this.setParamObj(map, prefix + "Device.", this.Device);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy