com.qcloud.cos.internal.Unmarshallers Maven / Gradle / Ivy
/*
* Copyright 2010-2019 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.
* According to cos feature, we modify some class,comment, field name, etc.
*/
package com.qcloud.cos.internal;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.List;
import com.qcloud.cos.internal.XmlResponsesSaxParser.CompleteMultipartUploadHandler;
import com.qcloud.cos.internal.XmlResponsesSaxParser.CopyObjectResultHandler;
import com.qcloud.cos.internal.cihandler.*;
import com.qcloud.cos.model.*;
import com.qcloud.cos.model.bucketcertificate.BucketGetDomainCertificate;
import com.qcloud.cos.model.ciModel.auditing.AudioAuditingResponse;
import com.qcloud.cos.model.ciModel.auditing.AuditingStrategyListResponse;
import com.qcloud.cos.model.ciModel.auditing.AuditingStrategyResponse;
import com.qcloud.cos.model.ciModel.auditing.AuditingTextLibResponse;
import com.qcloud.cos.model.ciModel.auditing.BatchImageAuditingResponse;
import com.qcloud.cos.model.ciModel.auditing.DocumentAuditingResponse;
import com.qcloud.cos.model.ciModel.auditing.ImageAuditingResponse;
import com.qcloud.cos.model.ciModel.auditing.TextAuditingResponse;
import com.qcloud.cos.model.ciModel.auditing.VideoAuditingResponse;
import com.qcloud.cos.model.ciModel.auditing.WebpageAuditingResponse;
import com.qcloud.cos.model.ciModel.bucket.DocBucketResponse;
import com.qcloud.cos.model.ciModel.bucket.MediaBucketResponse;
import com.qcloud.cos.model.ciModel.image.AutoTranslationBlockResponse;
import com.qcloud.cos.model.ciModel.image.DetectFaceResponse;
import com.qcloud.cos.model.ciModel.image.ImageInspectRequest;
import com.qcloud.cos.model.ciModel.image.ImageLabelResponse;
import com.qcloud.cos.model.ciModel.image.ImageLabelV2Response;
import com.qcloud.cos.model.ciModel.image.ImageSearchResponse;
import com.qcloud.cos.model.ciModel.image.ImageStyleResponse;
import com.qcloud.cos.model.ciModel.job.BatchJobResponse;
import com.qcloud.cos.model.ciModel.job.DocJobListResponse;
import com.qcloud.cos.model.ciModel.job.DocJobResponse;
import com.qcloud.cos.model.ciModel.job.FileProcessJobResponse;
import com.qcloud.cos.model.ciModel.job.MediaJobResponse;
import com.qcloud.cos.model.ciModel.job.MediaListJobResponse;
import com.qcloud.cos.model.ciModel.mediaInfo.MediaInfoResponse;
import com.qcloud.cos.model.ciModel.persistence.AIGameRecResponse;
import com.qcloud.cos.model.ciModel.persistence.DetectCarResponse;
import com.qcloud.cos.model.ciModel.queue.DocListQueueResponse;
import com.qcloud.cos.model.ciModel.queue.MediaListQueueResponse;
import com.qcloud.cos.model.ciModel.queue.MediaQueueResponse;
import com.qcloud.cos.model.ciModel.snapshot.PrivateM3U8Response;
import com.qcloud.cos.model.ciModel.snapshot.SnapshotResponse;
import com.qcloud.cos.model.ciModel.template.MediaListTemplateResponse;
import com.qcloud.cos.model.ciModel.template.MediaTemplateResponse;
import com.qcloud.cos.model.ciModel.workflow.MediaWorkflowExecutionResponse;
import com.qcloud.cos.model.ciModel.workflow.MediaWorkflowExecutionsResponse;
import com.qcloud.cos.model.ciModel.workflow.MediaWorkflowListResponse;
import com.qcloud.cos.model.ciModel.workflow.MediaWorkflowResponse;
/*** Collection of unmarshallers for COS XML responses. */
public class Unmarshallers {
/**
* Unmarshaller for the ListBuckets XML response.
*/
public static final class ListBucketsUnmarshaller
implements Unmarshaller, InputStream> {
public List unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseListMyBucketsResponse(in).getBuckets();
}
}
// /**
// * Unmarshaller for the ListBuckets XML response, parsing out the owner even if the list is
// * empty.
// */
// public static final class ListBucketsOwnerUnmarshaller
// implements Unmarshaller {
// public Owner unmarshall(InputStream in) throws Exception {
// return new XmlResponsesSaxParser().parseListMyBucketsResponse(in).getOwner();
// }
// }
/**
* Unmarshaller for the ListObjects XML response.
*/
public static final class ListObjectsUnmarshaller
implements Unmarshaller {
private final boolean shouldSDKDecodeResponse;
public ListObjectsUnmarshaller(final boolean shouldSDKDecodeResponse) {
this.shouldSDKDecodeResponse = shouldSDKDecodeResponse;
}
public ObjectListing unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseListBucketObjectsResponse(in, shouldSDKDecodeResponse).getObjectListing();
}
}
/**
* Unmarshaller for the ListVersions XML response.
*/
public static final class VersionListUnmarshaller
implements Unmarshaller {
private final boolean shouldSDKDecodeResponse;
public VersionListUnmarshaller(final boolean shouldSDKDecodeResponse) {
this.shouldSDKDecodeResponse = shouldSDKDecodeResponse;
}
public VersionListing unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseListVersionsResponse(in, shouldSDKDecodeResponse).getListing();
}
}
/**
* Unmarshaller for the AccessControlList XML response.
*/
public static final class AccessControlListUnmarshaller
implements Unmarshaller {
public AccessControlList unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseAccessControlListResponse(in)
.getAccessControlList();
}
}
/**
* Unmarshaller for the AccessControlList XML response.
*/
public static final class ImagePersistenceUnmarshaller
implements Unmarshaller {
public ObjectMetadata unmarshall(InputStream in) throws Exception {
ObjectMetadata objectMetadata = new ObjectMetadata();
objectMetadata.setCiUploadResult(new XmlResponsesSaxParser().parseImagePersistenceResponse(in)
.getCiUploadResult());
return objectMetadata;
}
}
//
// /**
// * Unmarshaller for the BucketLoggingStatus XML response.
// */
// public static final class BucketLoggingConfigurationnmarshaller
// implements Unmarshaller {
// public BucketLoggingConfiguration unmarshall(InputStream in) throws Exception {
// return new XmlResponsesSaxParser().parseLoggingStatusResponse(in)
// .getBucketLoggingConfiguration();
// }
// }
//
/**
* Unmarshaller for the BucketLocation XML response.
*/
public static final class BucketLocationUnmarshaller
implements Unmarshaller {
public String unmarshall(InputStream in) throws Exception {
String location = new XmlResponsesSaxParser().parseBucketLocationResponse(in);
if (location == null)
location = "Unknown Region";
return location;
}
}
/**
* Unmarshaller for the BucketVersionConfiguration XML response.
*/
public static final class BucketVersioningConfigurationUnmarshaller
implements Unmarshaller {
public BucketVersioningConfiguration unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseVersioningConfigurationResponse(in)
.getConfiguration();
}
}
/**
* Unmarshaller for the BucketTaggingConfiguration XML response.
*/
public static final class BucketTaggingConfigurationUnmarshaller implements
Unmarshaller {
public BucketTaggingConfiguration unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseTaggingConfigurationResponse(in).getConfiguration();
}
}
//
// /**
// * Unmarshaller for the BucketWebsiteConfiguration XML response.
// */
// public static final class BucketWebsiteConfigurationUnmarshaller
// implements Unmarshaller {
// public BucketWebsiteConfiguration unmarshall(InputStream in) throws Exception {
// return new XmlResponsesSaxParser().parseWebsiteConfigurationResponse(in)
// .getConfiguration();
// }
// }
//
// /**
// * Unmarshaller for the BucketNotificationConfiguration XML response.
// */
// public static final class BucketNotificationConfigurationUnmarshaller
// implements Unmarshaller {
// public BucketNotificationConfiguration unmarshall(InputStream in) throws Exception {
// return new XmlResponsesSaxParser().parseNotificationConfigurationResponse(in)
// .getConfiguration();
// }
// }
//
// /**
// * Unmarshaller for the BucketTaggingConfiguration XML response.
// */
// public static final class BucketTaggingConfigurationUnmarshaller
// implements Unmarshaller {
// public BucketTaggingConfiguration unmarshall(InputStream in) throws Exception {
// return new XmlResponsesSaxParser().parseTaggingConfigurationResponse(in)
// .getConfiguration();
// }
// }
/**
* Unmarshaller for the a direct InputStream response.
*/
public static final class InputStreamUnmarshaller
implements Unmarshaller {
public InputStream unmarshall(InputStream in) throws Exception {
return in;
}
}
/**
* Unmarshaller for the CopyObject XML response.
*/
public static final class CopyObjectUnmarshaller
implements Unmarshaller {
public CopyObjectResultHandler unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseCopyObjectResponse(in);
}
}
public static final class CompleteMultipartUploadResultUnmarshaller
implements Unmarshaller {
public CompleteMultipartUploadHandler unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseCompleteMultipartUploadResponse(in);
}
}
public static final class InitiateMultipartUploadResultUnmarshaller
implements Unmarshaller {
public InitiateMultipartUploadResult unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseInitiateMultipartUploadResponse(in)
.getInitiateMultipartUploadResult();
}
}
public static final class ListMultipartUploadsResultUnmarshaller
implements Unmarshaller {
public MultipartUploadListing unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseListMultipartUploadsResponse(in)
.getListMultipartUploadsResult();
}
}
public static final class ListPartsResultUnmarshaller
implements Unmarshaller {
public PartListing unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseListPartsResponse(in).getListPartsResult();
}
}
public static final class DeleteObjectsResultUnmarshaller
implements Unmarshaller {
public DeleteObjectsResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseDeletedObjectsResult(in)
.getDeleteObjectResult();
}
}
public static final class BucketLifecycleConfigurationUnmarshaller
implements Unmarshaller {
public BucketLifecycleConfiguration unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseBucketLifecycleConfigurationResponse(in)
.getConfiguration();
}
}
public static final class BucketCrossOriginConfigurationUnmarshaller
implements Unmarshaller {
public BucketCrossOriginConfiguration unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseBucketCrossOriginConfigurationResponse(in)
.getConfiguration();
}
}
public static final class BucketDomainConfigurationUnmarshaller
implements Unmarshaller {
public BucketDomainConfiguration unmarshall(InputStream in) throws Exception {
if (in.available() == 0) {
return null;
}
return new XmlResponsesSaxParser().parseBucketDomainConfigurationResponse(in)
.getConfiguration();
}
}
public static final class BucketDomainCertificateUnmarshaller
implements Unmarshaller {
public BucketGetDomainCertificate unmarshall(InputStream in) throws Exception {
if (in.available() == 0) {
return null;
}
return new XmlResponsesSaxParser().parseBucketDomainCertificateResponse(in)
.getBucketDomainCertificate();
}
}
public static final class BucketRefererConfigurationUnmarshaller
implements Unmarshaller {
public BucketRefererConfiguration unmarshall(InputStream in) throws Exception {
if (in.available() == 0) {
return null;
}
return new XmlResponsesSaxParser().parseBucketRefererConfigurationResponse(in)
.getConfiguration();
}
}
/**
* Unmarshaller for the BucketNotificationConfiguration XML response.
*/
public static final class BucketReplicationConfigurationUnmarshaller
implements Unmarshaller {
public BucketReplicationConfiguration unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseReplicationConfigurationResponse(in)
.getConfiguration();
}
}
/**
* Unmarshaller for the BucketWebsiteConfiguration XML response.
*/
public static final class BucketWebsiteConfigurationUnmarshaller implements
Unmarshaller {
public BucketWebsiteConfiguration unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseWebsiteConfigurationResponse(in).getConfiguration();
}
}
/**
* Unmarshaller for the BucketLoggingStatus XML response.
*/
public static final class BucketLoggingConfigurationnmarshaller implements
Unmarshaller {
public BucketLoggingConfiguration unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseLoggingStatusResponse(in).getBucketLoggingConfiguration();
}
}
/**
* Unmarshaller for the GetBucketInventoryConfiguration XML response.
*/
public static final class GetBucketInventoryConfigurationUnmarshaller implements
Unmarshaller {
public GetBucketInventoryConfigurationResult unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseGetBucketInventoryConfigurationResponse(in).getResult();
}
}
/**
* Unmarshaller for the ListBucketInventoryConfigurations XML response.
*/
public static final class ListBucketInventoryConfigurationsUnmarshaller implements
Unmarshaller {
public ListBucketInventoryConfigurationsResult unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseBucketListInventoryConfigurationsResponse(in).getResult();
}
}
/**
* Unmarshaller for the DeleteBucketInventoryConfiguration XML response.
*/
public static final class DeleteBucketInventoryConfigurationUnmarshaller implements
Unmarshaller {
public DeleteBucketInventoryConfigurationResult unmarshall(InputStream in) throws Exception {
return new DeleteBucketInventoryConfigurationResult();
}
}
/**
* Unmarshaller for the SetBucketInventoryConfiguration XML response.
*/
public static final class SetBucketInventoryConfigurationUnmarshaller implements
Unmarshaller {
public SetBucketInventoryConfigurationResult unmarshall(InputStream in) throws Exception {
return new SetBucketInventoryConfigurationResult();
}
}
public static final class GetObjectTaggingResponseUnmarshaller implements Unmarshaller {
@Override
public GetObjectTaggingResult unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseObjectTaggingResponse(in).getResult();
}
}
/**
* Unmarshaller for the ListBucketInventoryConfigurations XML response.
*/
public static final class GetBucketIntelligentTierConfigurationsUnmarshaller implements
Unmarshaller {
public BucketIntelligentTierConfiguration unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseBucketIntelligentTierConfigurationsResponse(in).getConfiguration();
}
}
public static final class SetObjectTaggingResponseUnmarshaller implements Unmarshaller {
@Override
public SetObjectTaggingResult unmarshall(InputStream in) throws Exception {
return new SetObjectTaggingResult();
}
}
public static final class DeleteObjectTaggingResponseUnmarshaller implements Unmarshaller {
@Override
public DeleteObjectTaggingResult unmarshall(InputStream in) throws Exception {
return new DeleteObjectTaggingResult();
}
}
public static final class ListQueueUnmarshaller
implements Unmarshaller {
public MediaListQueueResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseListQueueResponse(in).getResponse();
}
}
public static final class DocListQueueUnmarshaller
implements Unmarshaller {
public DocListQueueResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseDocListQueueResponse(in).getResponse();
}
}
public static final class QueueUnmarshaller
implements Unmarshaller {
public MediaQueueResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseUpdateMediaQueueResponse(in).getResponse();
}
}
public static final class TemplateUnmarshaller
implements Unmarshaller {
public MediaTemplateResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseMediaTemplateResponse(in).getResponse();
}
}
public static final class SnapshotUnmarshaller
implements Unmarshaller {
public SnapshotResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseSnapshotResponse(in).getResponse();
}
}
public static final class MediaInfoUnmarshaller
implements Unmarshaller {
public MediaInfoResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseGenerateMediainfoResponse(in).getResponse();
}
}
public static final class WorkflowExecutionsUnmarshaller
implements Unmarshaller {
public MediaWorkflowExecutionsResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseMediaWorkflowExecutionsResponse(in).getResponse();
}
}
public static final class WorkflowListUnmarshaller
implements Unmarshaller {
public MediaWorkflowListResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseWorkflowListResponse(in).getResponse();
}
}
public static final class WorkflowExecutionUnmarshaller
implements Unmarshaller {
public MediaWorkflowExecutionResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseWorkflowExecutionResponse(in).getResponse();
}
}
public static final class ListTemplateUnmarshaller
implements Unmarshaller {
public MediaListTemplateResponse unmarshall(InputStream in) throws IOException {
return new XmlResponsesSaxParser().parseDescribeMediaTemplatesResponse(in).getResponse();
}
}
public static final class ListJobUnmarshaller
implements Unmarshaller {
public MediaListJobResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseMediaJobsRespones(in).getResponse();
}
}
public static final class JobUnmarshaller
implements Unmarshaller {
public MediaJobResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseMediaJobRespones(in).getResponse();
}
}
public static final class JobCreatUnmarshaller
implements Unmarshaller {
public MediaJobResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseJobCreatResponse(in).getResponse();
}
}
public static final class BatchJobUnmarshaller
implements Unmarshaller {
public BatchJobResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseBatchJobResponse(in).getResponse();
}
}
public static final class ListBucketUnmarshaller
implements Unmarshaller {
public MediaBucketResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseListBucketResponse(in).getResponse();
}
}
public static final class DocListBucketUnmarshaller
implements Unmarshaller {
public DocBucketResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseDocListBucketResponse(in).getResponse();
}
}
public static final class WorkflowUnmarshaller
implements Unmarshaller {
public MediaWorkflowResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseWorkflowResponse(in).getResponse();
}
}
public static final class DocProcessJobUnmarshaller
implements Unmarshaller {
public DocJobResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseDocJobResponse(in).getResponse();
}
}
public static final class DescribeDocJobUnmarshaller
implements Unmarshaller {
public DocJobResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseDescribeDocJobResponse(in).getResponse();
}
}
public static final class DescribeDocJobsUnmarshaller
implements Unmarshaller {
public DocJobListResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseDocJobListResponse(in).getResponse();
}
}
public static final class ImageAuditingUnmarshaller
implements Unmarshaller {
public ImageAuditingResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseImageAuditingResponse(in).getResponse();
}
}
public static final class VideoAuditingUnmarshaller
implements Unmarshaller {
public VideoAuditingResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseVideoAuditingJobResponse(in).getResponse();
}
}
public static final class VideoAuditingJobUnmarshaller
implements Unmarshaller {
public VideoAuditingResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseDescribeVideoAuditingJobResponse(in).getResponse();
}
}
public static final class AudioAuditingUnmarshaller
implements Unmarshaller {
public AudioAuditingResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseAudioAuditingJobResponse(in).getResponse();
}
}
public static final class AudioAuditingJobUnmarshaller
implements Unmarshaller {
public AudioAuditingResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseDescribeAudioAuditingJobResponse(in).getResponse();
}
}
public static final class ImageLabelUnmarshaller
implements Unmarshaller {
public ImageLabelResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseImageLabelResponse(in).getResponse();
}
}
public static final class ImageLabelV2Unmarshaller
implements Unmarshaller {
public ImageLabelV2Response unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseImageLabelV2Response(in).getResponse();
}
}
public static final class TextAuditingJobUnmarshaller
implements Unmarshaller {
public TextAuditingResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseTextAuditingResponse(in).getResponse();
}
}
public static final class TextAuditingDescribeJobUnmarshaller
implements Unmarshaller {
public TextAuditingResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseTextAuditingDescribeResponse(in).getResponse();
}
}
public static final class DocumentAuditingJobUnmarshaller
implements Unmarshaller {
public DocumentAuditingResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseDocumentAuditingResponse(in).getResponse();
}
}
public static final class DocumentAuditingDescribeJobUnmarshaller
implements Unmarshaller {
public DocumentAuditingResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseDocumentAuditingDescribeResponse(in).getResponse();
}
}
public static final class BatchImageAuditingJobUnmarshaller
implements Unmarshaller {
public BatchImageAuditingResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseBatchImageAuditingResponse(in).getResponse();
}
}
public static class WebpageAuditingJobUnmarshaller implements Unmarshaller {
public WebpageAuditingResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseWebpageAuditingJobResponse(in).getResponse();
}
}
public static final class WebpageAuditingDescribeJobUnmarshaller
implements Unmarshaller {
public WebpageAuditingResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseDWebpageAuditingDescribeResponse(in).getResponse();
}
}
public static final class ImageAuditingDescribeJobUnmarshaller
implements Unmarshaller {
public ImageAuditingResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseImageAuditingDescribeResponse(in).getResponse();
}
}
public static final class PrivateM3U8Unmarshaller
implements Unmarshaller {
public PrivateM3U8Response unmarshall(InputStream in) throws Exception {
PrivateM3U8Response privateM3U8Response = new PrivateM3U8Response();
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
StringBuffer sb = new StringBuffer("");
String line = "";
String NL = System.getProperty("line.separator");
while ((line = reader.readLine()) != null) {
sb.append(line + NL);
}
privateM3U8Response.setM3u8(sb.toString());
if (privateM3U8Response.getM3u8() == null)
privateM3U8Response.setM3u8("Unknown Error");
return privateM3U8Response;
}
}
public static final class DetectCarUnmarshaller
implements Unmarshaller {
public DetectCarResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseDetectCarResponse(in).getResponse();
}
}
public static final class SearchImagesUnmarshaller
implements Unmarshaller {
public ImageSearchResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseSearchImagesResponse(in).getResponse();
}
}
public static final class triggerWorkflowListUnmarshaller
implements Unmarshaller {
public MediaWorkflowListResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parsetriggerWorkflowListResponse(in).getResponse();
}
}
public static final class GenerateQrcodeUnmarshaller
implements Unmarshaller {
public String unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseGenerateQrcodeResponse(in).getResponse();
}
}
public static final class getImageStyleUnmarshaller
implements Unmarshaller {
public ImageStyleResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseGetImageStyleResponse(in).getResponse();
}
}
public static final class DecompressionResultUnmarshaller
implements Unmarshaller {
public DecompressionResult unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseDecompressionResult(in)
.getDecompressionResult();
}
}
public static final class ListJobsResultUnmarshaller
implements Unmarshaller {
public ListJobsResult unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser().parseListJobsResult(in).getResult();
}
}
public static final class ReportBadCaseUnmarshaller
implements Unmarshaller {
public String unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseReportBadCase(in).getResponse();
}
}
public static final class FileProcessUnmarshaller
implements Unmarshaller {
public FileProcessJobResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseFileProcessResponse(in).getResponse();
}
}
public static final class AutoTranslationBlockUnmarshaller
implements Unmarshaller {
public AutoTranslationBlockResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseAutoTranslationBlockResponse(in).getResponse();
}
}
public static final class DetectFaceUnmarshaller
implements Unmarshaller {
public DetectFaceResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseDetectFaceResponse(in).getResponse();
}
}
public static final class AIGameRecUnmarshaller
implements Unmarshaller {
public AIGameRecResponse unmarshall(InputStream in) throws Exception {
return new XmlResponsesSaxParser()
.parseAIGameRecResponse(in).getResponse();
}
}
public static final class AuditingStrategyUnmarshaller
implements Unmarshaller {
public AuditingStrategyResponse unmarshall(InputStream in) {
return new AuditingStrategyHandler().getResponse(in);
}
}
public static final class AuditingStrategyListUnmarshaller
implements Unmarshaller {
public AuditingStrategyListResponse unmarshall(InputStream in) {
return new AuditingStrategyHandler().getResponseList(in);
}
}
public static final class AuditingTextLibUnmarshaller
implements Unmarshaller {
public AuditingTextLibResponse unmarshall(InputStream in) {
return new AuditingTextLibHandler().getResponse(in);
}
}
public static final class CICommonUnmarshaller implements Unmarshaller {
private Class tClass;
public CICommonUnmarshaller(Class cls) {
this.tClass = cls;
}
public T unmarshall(InputStream in) {
return new CICommonHandler().getResponse(in,tClass);
}
}
public static final class CICommonJsonUnmarshaller implements Unmarshaller {
private Class tClass;
public CICommonJsonUnmarshaller(Class cls) {
this.tClass = cls;
}
public T unmarshall(InputStream in) throws IOException {
return new CICommonJsonResponseHandler().getResponse(in,tClass);
}
}
public static class CIJsonUnmarshaller implements Unmarshaller{
private Class tClass;
public CIJsonUnmarshaller(Class aClass) {
this.tClass = aClass;
}
@Override
public T unmarshall(InputStream in) throws Exception {
return new CIJsonHandler().getResponse(in,tClass);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy