public class ImageModerationRequest extends AbstractModel
Constructor and Description |
---|
ImageModerationRequest() |
ImageModerationRequest(ImageModerationRequest source)
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.
|
Modifier and Type | Method and Description |
---|---|
String |
getBizType()
Get This field indicates the specific number of the policy, which is used for API scheduling and can be configured in the CMS console.
|
String |
getDataId()
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 (_-@#)**. |
Device |
getDevice()
Get This field indicates the information of the device that corresponds to the object to be detected.
|
String |
getFileContent()
Get This field indicates the Base64 encoding of the image to be detected.
|
String |
getFileUrl()
Get URL of the image to moderate.
|
Long |
getInterval()
Get **For GIF/long image detection only**.
|
Long |
getMaxFrames()
Get **For GIF/long image detection only**.
|
User |
getUser()
Get This field indicates the information of the user that corresponds to the object to be detected.
|
void |
setBizType(String 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.
|
void |
setDataId(String 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 (_-@#)**. |
void |
setDevice(Device Device)
Set This field indicates the information of the device that corresponds to the object to be detected.
|
void |
setFileContent(String FileContent)
Set This field indicates the Base64 encoding of the image to be detected.
|
void |
setFileUrl(String FileUrl)
Set URL of the image to moderate.
|
void |
setInterval(Long Interval)
Set **For GIF/long image detection only**.
|
void |
setMaxFrames(Long MaxFrames)
Set **For GIF/long image detection only**.
|
void |
setUser(User User)
Set This field indicates the information of the user that corresponds to the object to be detected.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, getMultipartRequestParams, set, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, toJsonString
public ImageModerationRequest()
public ImageModerationRequest(ImageModerationRequest source)
public String getBizType()
public void setBizType(String BizType)
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.public String getDataId()
public void setDataId(String DataId)
DataId
- This field indicates the data ID assigned by you to the object to be detected for easier file identification and management.public String getFileContent()
public void setFileContent(String FileContent)
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.public String getFileUrl()
public void setFileUrl(String FileUrl)
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. public Long getInterval()
public void setInterval(Long Interval)
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.public Long getMaxFrames()
public void setMaxFrames(Long MaxFrames)
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).public User getUser()
public void setUser(User User)
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 Device getDevice()
public void setDevice(Device Device)
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.Copyright © 2023. All rights reserved.