4747import com .qcloud .cos .model .ciModel .auditing .DocumentAuditingRequest ;
4848import com .qcloud .cos .model .ciModel .auditing .TextAuditingRequest ;
4949import com .qcloud .cos .model .ciModel .auditing .VideoAuditingRequest ;
50+ import com .qcloud .cos .model .ciModel .auditing .WebpageAuditingRequest ;
5051import com .qcloud .cos .model .ciModel .bucket .DocBucketRequest ;
5152import com .qcloud .cos .model .ciModel .common .MediaOutputObject ;
5253import com .qcloud .cos .model .ciModel .job .DocJobObject ;
@@ -804,6 +805,7 @@ public static byte[] convertToXmlByteArray(TextAuditingRequest request) {
804805 xml .start ("Input" );
805806 addIfNotNull (xml , "Object" , request .getInput ().getObject ());
806807 addIfNotNull (xml , "Content" , request .getInput ().getContent ());
808+ addIfNotNull (xml , "Url" , request .getInput ().getUrl ());
807809 addIfNotNull (xml , "DataId" , request .getInput ().getDataId ());
808810 xml .end ();
809811 Conf conf = request .getConf ();
@@ -827,6 +829,7 @@ public static byte[] convertToXmlByteArray(DocumentAuditingRequest request) {
827829 xml .start ("Request" );
828830 xml .start ("Input" );
829831 addIfNotNull (xml , "Url" , request .getInput ().getUrl ());
832+ addIfNotNull (xml , "Object" , request .getInput ().getObject ());
830833 addIfNotNull (xml , "Type" , request .getInput ().getType ());
831834 addIfNotNull (xml , "DataId" , request .getInput ().getDataId ());
832835 xml .end ();
@@ -845,6 +848,29 @@ public static byte[] convertToXmlByteArray(DocumentAuditingRequest request) {
845848 return xml .getBytes ();
846849 }
847850
851+ public static byte [] convertToXmlByteArray (WebpageAuditingRequest request ) {
852+ XmlWriter xml = new XmlWriter ();
853+
854+ xml .start ("Request" );
855+ xml .start ("Input" );
856+ addIfNotNull (xml , "Url" , request .getInput ().getUrl ());
857+ xml .end ();
858+ Conf conf = request .getConf ();
859+ xml .start ("Conf" );
860+ String detectType = conf .getDetectType ();
861+ if ("all" .equalsIgnoreCase (detectType )) {
862+ detectType = "Porn,Terrorism,Politics,Ads,Illegal,Abuse" ;
863+ }
864+ addIfNotNull (xml , "DetectType" , detectType );
865+ addIfNotNull (xml , "Callback" , conf .getCallback ());
866+ addIfNotNull (xml , "BizType" , conf .getBizType ());
867+ addIfNotNull (xml , "ReturnHighlightHtml" , conf .getReturnHighlightHtml ());
868+ xml .end ();
869+
870+ xml .end ();
871+ return xml .getBytes ();
872+ }
873+
848874 public static byte [] convertToXmlByteArray (BatchImageAuditingRequest request ) {
849875 XmlWriter xml = new XmlWriter ();
850876
0 commit comments