API GetTaskStatus return task detail.
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
2020-07-29 Version: 1.36.542
|
||||||
|
- API GetTaskStatus return task detail.
|
||||||
|
|
||||||
2020-07-29 Version: 1.36.541
|
2020-07-29 Version: 1.36.541
|
||||||
- Generated 2020-05-18 for `dataworks-public`.
|
- Generated 2020-05-18 for `dataworks-public`.
|
||||||
|
|
||||||
|
|||||||
@@ -39,15 +39,12 @@ namespace AlibabaCloud
|
|||||||
void setClientToken(const std::string& clientToken);
|
void setClientToken(const std::string& clientToken);
|
||||||
std::string getInstanceId()const;
|
std::string getInstanceId()const;
|
||||||
void setInstanceId(const std::string& instanceId);
|
void setInstanceId(const std::string& instanceId);
|
||||||
std::string getRegionId()const;
|
|
||||||
void setRegionId(const std::string& regionId);
|
|
||||||
std::string getTaskId()const;
|
std::string getTaskId()const;
|
||||||
void setTaskId(const std::string& taskId);
|
void setTaskId(const std::string& taskId);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string clientToken_;
|
std::string clientToken_;
|
||||||
std::string instanceId_;
|
std::string instanceId_;
|
||||||
std::string regionId_;
|
|
||||||
std::string taskId_;
|
std::string taskId_;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -32,16 +32,36 @@ namespace AlibabaCloud
|
|||||||
class ALIBABACLOUD_VIDEOSEARCH_EXPORT GetTaskStatusResult : public ServiceResult
|
class ALIBABACLOUD_VIDEOSEARCH_EXPORT GetTaskStatusResult : public ServiceResult
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
struct TaskInfo
|
||||||
|
{
|
||||||
|
int status;
|
||||||
|
long taskId;
|
||||||
|
std::string description;
|
||||||
|
std::string videoId;
|
||||||
|
std::string errorInfo;
|
||||||
|
float duration;
|
||||||
|
std::string processResultOss;
|
||||||
|
long submitTime;
|
||||||
|
std::string videoUrl;
|
||||||
|
std::string videoTags;
|
||||||
|
long finishTime;
|
||||||
|
long analysisUseTime;
|
||||||
|
int storageInfo;
|
||||||
|
std::string queryTags;
|
||||||
|
std::string resolution;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
GetTaskStatusResult();
|
GetTaskStatusResult();
|
||||||
explicit GetTaskStatusResult(const std::string &payload);
|
explicit GetTaskStatusResult(const std::string &payload);
|
||||||
~GetTaskStatusResult();
|
~GetTaskStatusResult();
|
||||||
|
TaskInfo getTaskInfo()const;
|
||||||
int getData()const;
|
int getData()const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void parse(const std::string &payload);
|
void parse(const std::string &payload);
|
||||||
private:
|
private:
|
||||||
|
TaskInfo taskInfo_;
|
||||||
int data_;
|
int data_;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -49,17 +49,6 @@ void GetTaskStatusRequest::setInstanceId(const std::string& instanceId)
|
|||||||
setBodyParameter("InstanceId", instanceId);
|
setBodyParameter("InstanceId", instanceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GetTaskStatusRequest::getRegionId()const
|
|
||||||
{
|
|
||||||
return regionId_;
|
|
||||||
}
|
|
||||||
|
|
||||||
void GetTaskStatusRequest::setRegionId(const std::string& regionId)
|
|
||||||
{
|
|
||||||
regionId_ = regionId;
|
|
||||||
setParameter("RegionId", regionId);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string GetTaskStatusRequest::getTaskId()const
|
std::string GetTaskStatusRequest::getTaskId()const
|
||||||
{
|
{
|
||||||
return taskId_;
|
return taskId_;
|
||||||
|
|||||||
@@ -39,11 +39,47 @@ void GetTaskStatusResult::parse(const std::string &payload)
|
|||||||
Json::Value value;
|
Json::Value value;
|
||||||
reader.parse(payload, value);
|
reader.parse(payload, value);
|
||||||
setRequestId(value["RequestId"].asString());
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto taskInfoNode = value["TaskInfo"];
|
||||||
|
if(!taskInfoNode["AnalysisUseTime"].isNull())
|
||||||
|
taskInfo_.analysisUseTime = std::stol(taskInfoNode["AnalysisUseTime"].asString());
|
||||||
|
if(!taskInfoNode["Duration"].isNull())
|
||||||
|
taskInfo_.duration = std::stof(taskInfoNode["Duration"].asString());
|
||||||
|
if(!taskInfoNode["ProcessResultOss"].isNull())
|
||||||
|
taskInfo_.processResultOss = taskInfoNode["ProcessResultOss"].asString();
|
||||||
|
if(!taskInfoNode["Resolution"].isNull())
|
||||||
|
taskInfo_.resolution = taskInfoNode["Resolution"].asString();
|
||||||
|
if(!taskInfoNode["Status"].isNull())
|
||||||
|
taskInfo_.status = std::stoi(taskInfoNode["Status"].asString());
|
||||||
|
if(!taskInfoNode["SubmitTime"].isNull())
|
||||||
|
taskInfo_.submitTime = std::stol(taskInfoNode["SubmitTime"].asString());
|
||||||
|
if(!taskInfoNode["FinishTime"].isNull())
|
||||||
|
taskInfo_.finishTime = std::stol(taskInfoNode["FinishTime"].asString());
|
||||||
|
if(!taskInfoNode["TaskId"].isNull())
|
||||||
|
taskInfo_.taskId = std::stol(taskInfoNode["TaskId"].asString());
|
||||||
|
if(!taskInfoNode["ErrorInfo"].isNull())
|
||||||
|
taskInfo_.errorInfo = taskInfoNode["ErrorInfo"].asString();
|
||||||
|
if(!taskInfoNode["StorageInfo"].isNull())
|
||||||
|
taskInfo_.storageInfo = std::stoi(taskInfoNode["StorageInfo"].asString());
|
||||||
|
if(!taskInfoNode["Description"].isNull())
|
||||||
|
taskInfo_.description = taskInfoNode["Description"].asString();
|
||||||
|
if(!taskInfoNode["VideoId"].isNull())
|
||||||
|
taskInfo_.videoId = taskInfoNode["VideoId"].asString();
|
||||||
|
if(!taskInfoNode["VideoTags"].isNull())
|
||||||
|
taskInfo_.videoTags = taskInfoNode["VideoTags"].asString();
|
||||||
|
if(!taskInfoNode["VideoUrl"].isNull())
|
||||||
|
taskInfo_.videoUrl = taskInfoNode["VideoUrl"].asString();
|
||||||
|
if(!taskInfoNode["QueryTags"].isNull())
|
||||||
|
taskInfo_.queryTags = taskInfoNode["QueryTags"].asString();
|
||||||
if(!value["Data"].isNull())
|
if(!value["Data"].isNull())
|
||||||
data_ = std::stoi(value["Data"].asString());
|
data_ = std::stoi(value["Data"].asString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GetTaskStatusResult::TaskInfo GetTaskStatusResult::getTaskInfo()const
|
||||||
|
{
|
||||||
|
return taskInfo_;
|
||||||
|
}
|
||||||
|
|
||||||
int GetTaskStatusResult::getData()const
|
int GetTaskStatusResult::getData()const
|
||||||
{
|
{
|
||||||
return data_;
|
return data_;
|
||||||
|
|||||||
Reference in New Issue
Block a user