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

com.aliyun.openservices.log.response.GetJobInstanceResponse Maven / Gradle / Ivy

There is a newer version: 0.6.115
Show newest version
package com.aliyun.openservices.log.response;

import com.alibaba.fastjson.JSONObject;
import com.aliyun.openservices.log.common.JobInstance;
import com.aliyun.openservices.log.exception.LogException;
import com.aliyun.openservices.log.internal.ErrorCodes;
import java.util.Map;

/**
 * ScheduledSQL jobInstances Response
 */
public class GetJobInstanceResponse extends Response {
    private static final long serialVersionUID = 889623903109968396L;
    private JobInstance jobInstance;
    public GetJobInstanceResponse(Map headers) {
        super(headers);
    }
    public JobInstance getJobInstance() {
        return jobInstance;
    }
    public void setJobInstance(JobInstance jobInstance) {
        this.jobInstance = jobInstance;
    }
    public void deserialize(JSONObject value, String requestId) throws LogException {
        jobInstance = new JobInstance();
        try {
            jobInstance.deserialize(value);
        } catch (final Exception ex) {
            throw new LogException(ErrorCodes.BAD_RESPONSE, "Unable to deserialize JSON to model: " + ex.getMessage(), ex, requestId);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy