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

com.aliyun.datahub.model.serialize.UpdateSubscriptionStateResultJsonDeser Maven / Gradle / Ivy

There is a newer version: 2.25.6
Show newest version
package com.aliyun.datahub.model.serialize;

import com.aliyun.datahub.common.transport.Response;
import com.aliyun.datahub.exception.DatahubServiceException;
import com.aliyun.datahub.model.UpdateSubscriptionResult;
import com.aliyun.datahub.model.UpdateSubscriptionStateRequest;

public class UpdateSubscriptionStateResultJsonDeser implements Deserializer {
    @Override
    public UpdateSubscriptionResult deserialize(UpdateSubscriptionStateRequest request, Response response) throws DatahubServiceException {
        if (!response.isOK()) {
            throw JsonErrorParser.getInstance().parse(response);
        }

        return new UpdateSubscriptionResult();
    }

    private UpdateSubscriptionStateResultJsonDeser() {}

    private static UpdateSubscriptionStateResultJsonDeser instance;

    public static UpdateSubscriptionStateResultJsonDeser getInstance() {
        if (instance == null) {
            instance = new UpdateSubscriptionStateResultJsonDeser();
        }
        return instance;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy