-Fix return message field type
This commit is contained in:
@@ -36,6 +36,7 @@ namespace AlibabaCloud
|
|||||||
{
|
{
|
||||||
struct TaskResult
|
struct TaskResult
|
||||||
{
|
{
|
||||||
|
std::string alphaUrl;
|
||||||
int videoDuration;
|
int videoDuration;
|
||||||
std::string failCode;
|
std::string failCode;
|
||||||
std::string subtitlesUrl;
|
std::string subtitlesUrl;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ namespace AlibabaCloud
|
|||||||
std::string getMessage()const;
|
std::string getMessage()const;
|
||||||
Data getData()const;
|
Data getData()const;
|
||||||
std::string getCode()const;
|
std::string getCode()const;
|
||||||
std::string getSuccess()const;
|
bool getSuccess()const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void parse(const std::string &payload);
|
void parse(const std::string &payload);
|
||||||
@@ -52,7 +52,7 @@ namespace AlibabaCloud
|
|||||||
std::string message_;
|
std::string message_;
|
||||||
Data data_;
|
Data data_;
|
||||||
std::string code_;
|
std::string code_;
|
||||||
std::string success_;
|
bool success_;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ namespace AlibabaCloud
|
|||||||
std::string getMessage()const;
|
std::string getMessage()const;
|
||||||
Data getData()const;
|
Data getData()const;
|
||||||
std::string getCode()const;
|
std::string getCode()const;
|
||||||
std::string getSuccess()const;
|
bool getSuccess()const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void parse(const std::string &payload);
|
void parse(const std::string &payload);
|
||||||
@@ -52,7 +52,7 @@ namespace AlibabaCloud
|
|||||||
std::string message_;
|
std::string message_;
|
||||||
Data data_;
|
Data data_;
|
||||||
std::string code_;
|
std::string code_;
|
||||||
std::string success_;
|
bool success_;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ public:
|
|||||||
bool isAlpha;
|
bool isAlpha;
|
||||||
std::string backgroundImageUrl;
|
std::string backgroundImageUrl;
|
||||||
bool isSubtitles;
|
bool isSubtitles;
|
||||||
|
bool subtitleEmbedded;
|
||||||
int resolution;
|
int resolution;
|
||||||
int alphaFormat;
|
int alphaFormat;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ public:
|
|||||||
bool isAlpha;
|
bool isAlpha;
|
||||||
std::string backgroundImageUrl;
|
std::string backgroundImageUrl;
|
||||||
bool isSubtitles;
|
bool isSubtitles;
|
||||||
|
bool subtitleEmbedded;
|
||||||
int resolution;
|
int resolution;
|
||||||
int alphaFormat;
|
int alphaFormat;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ void GetVideoTaskInfoResult::parse(const std::string &payload)
|
|||||||
data_.taskResult.failCode = taskResultNode["FailCode"].asString();
|
data_.taskResult.failCode = taskResultNode["FailCode"].asString();
|
||||||
if(!taskResultNode["VideoDuration"].isNull())
|
if(!taskResultNode["VideoDuration"].isNull())
|
||||||
data_.taskResult.videoDuration = std::stoi(taskResultNode["VideoDuration"].asString());
|
data_.taskResult.videoDuration = std::stoi(taskResultNode["VideoDuration"].asString());
|
||||||
|
if(!taskResultNode["AlphaUrl"].isNull())
|
||||||
|
data_.taskResult.alphaUrl = taskResultNode["AlphaUrl"].asString();
|
||||||
if(!value["Code"].isNull())
|
if(!value["Code"].isNull())
|
||||||
code_ = value["Code"].asString();
|
code_ = value["Code"].asString();
|
||||||
if(!value["Message"].isNull())
|
if(!value["Message"].isNull())
|
||||||
|
|||||||
@@ -42,12 +42,12 @@ void SubmitAudioTo2DAvatarVideoTaskResult::parse(const std::string &payload)
|
|||||||
auto dataNode = value["Data"];
|
auto dataNode = value["Data"];
|
||||||
if(!dataNode["TaskUuid"].isNull())
|
if(!dataNode["TaskUuid"].isNull())
|
||||||
data_.taskUuid = dataNode["TaskUuid"].asString();
|
data_.taskUuid = dataNode["TaskUuid"].asString();
|
||||||
|
if(!value["Success"].isNull())
|
||||||
|
success_ = value["Success"].asString() == "true";
|
||||||
if(!value["Code"].isNull())
|
if(!value["Code"].isNull())
|
||||||
code_ = value["Code"].asString();
|
code_ = value["Code"].asString();
|
||||||
if(!value["Message"].isNull())
|
if(!value["Message"].isNull())
|
||||||
message_ = value["Message"].asString();
|
message_ = value["Message"].asString();
|
||||||
if(!value["Success"].isNull())
|
|
||||||
success_ = value["Success"].asString();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ std::string SubmitAudioTo2DAvatarVideoTaskResult::getCode()const
|
|||||||
return code_;
|
return code_;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string SubmitAudioTo2DAvatarVideoTaskResult::getSuccess()const
|
bool SubmitAudioTo2DAvatarVideoTaskResult::getSuccess()const
|
||||||
{
|
{
|
||||||
return success_;
|
return success_;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,12 +42,12 @@ void SubmitAudioTo3DAvatarVideoTaskResult::parse(const std::string &payload)
|
|||||||
auto dataNode = value["Data"];
|
auto dataNode = value["Data"];
|
||||||
if(!dataNode["TaskUuid"].isNull())
|
if(!dataNode["TaskUuid"].isNull())
|
||||||
data_.taskUuid = dataNode["TaskUuid"].asString();
|
data_.taskUuid = dataNode["TaskUuid"].asString();
|
||||||
|
if(!value["Success"].isNull())
|
||||||
|
success_ = value["Success"].asString() == "true";
|
||||||
if(!value["Code"].isNull())
|
if(!value["Code"].isNull())
|
||||||
code_ = value["Code"].asString();
|
code_ = value["Code"].asString();
|
||||||
if(!value["Message"].isNull())
|
if(!value["Message"].isNull())
|
||||||
message_ = value["Message"].asString();
|
message_ = value["Message"].asString();
|
||||||
if(!value["Success"].isNull())
|
|
||||||
success_ = value["Success"].asString();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ std::string SubmitAudioTo3DAvatarVideoTaskResult::getCode()const
|
|||||||
return code_;
|
return code_;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string SubmitAudioTo3DAvatarVideoTaskResult::getSuccess()const
|
bool SubmitAudioTo3DAvatarVideoTaskResult::getSuccess()const
|
||||||
{
|
{
|
||||||
return success_;
|
return success_;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ void SubmitTextTo2DAvatarVideoTaskRequest::setVideoInfo(const SubmitTextTo2DAvat
|
|||||||
setParameter(std::string("VideoInfo") + ".IsAlpha", videoInfo.isAlpha ? "true" : "false");
|
setParameter(std::string("VideoInfo") + ".IsAlpha", videoInfo.isAlpha ? "true" : "false");
|
||||||
setParameter(std::string("VideoInfo") + ".BackgroundImageUrl", videoInfo.backgroundImageUrl);
|
setParameter(std::string("VideoInfo") + ".BackgroundImageUrl", videoInfo.backgroundImageUrl);
|
||||||
setParameter(std::string("VideoInfo") + ".IsSubtitles", videoInfo.isSubtitles ? "true" : "false");
|
setParameter(std::string("VideoInfo") + ".IsSubtitles", videoInfo.isSubtitles ? "true" : "false");
|
||||||
|
setParameter(std::string("VideoInfo") + ".SubtitleEmbedded", videoInfo.subtitleEmbedded ? "true" : "false");
|
||||||
setParameter(std::string("VideoInfo") + ".Resolution", std::to_string(videoInfo.resolution));
|
setParameter(std::string("VideoInfo") + ".Resolution", std::to_string(videoInfo.resolution));
|
||||||
setParameter(std::string("VideoInfo") + ".AlphaFormat", std::to_string(videoInfo.alphaFormat));
|
setParameter(std::string("VideoInfo") + ".AlphaFormat", std::to_string(videoInfo.alphaFormat));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,12 +42,12 @@ void SubmitTextTo2DAvatarVideoTaskResult::parse(const std::string &payload)
|
|||||||
auto dataNode = value["Data"];
|
auto dataNode = value["Data"];
|
||||||
if(!dataNode["TaskUuid"].isNull())
|
if(!dataNode["TaskUuid"].isNull())
|
||||||
data_.taskUuid = dataNode["TaskUuid"].asString();
|
data_.taskUuid = dataNode["TaskUuid"].asString();
|
||||||
|
if(!value["Success"].isNull())
|
||||||
|
success_ = value["Success"].asString() == "true";
|
||||||
if(!value["Code"].isNull())
|
if(!value["Code"].isNull())
|
||||||
code_ = value["Code"].asString();
|
code_ = value["Code"].asString();
|
||||||
if(!value["Message"].isNull())
|
if(!value["Message"].isNull())
|
||||||
message_ = value["Message"].asString();
|
message_ = value["Message"].asString();
|
||||||
if(!value["Success"].isNull())
|
|
||||||
success_ = value["Success"].asString() == "true";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ void SubmitTextTo3DAvatarVideoTaskRequest::setVideoInfo(const SubmitTextTo3DAvat
|
|||||||
setParameter(std::string("VideoInfo") + ".IsAlpha", videoInfo.isAlpha ? "true" : "false");
|
setParameter(std::string("VideoInfo") + ".IsAlpha", videoInfo.isAlpha ? "true" : "false");
|
||||||
setParameter(std::string("VideoInfo") + ".BackgroundImageUrl", videoInfo.backgroundImageUrl);
|
setParameter(std::string("VideoInfo") + ".BackgroundImageUrl", videoInfo.backgroundImageUrl);
|
||||||
setParameter(std::string("VideoInfo") + ".IsSubtitles", videoInfo.isSubtitles ? "true" : "false");
|
setParameter(std::string("VideoInfo") + ".IsSubtitles", videoInfo.isSubtitles ? "true" : "false");
|
||||||
|
setParameter(std::string("VideoInfo") + ".SubtitleEmbedded", videoInfo.subtitleEmbedded ? "true" : "false");
|
||||||
setParameter(std::string("VideoInfo") + ".Resolution", std::to_string(videoInfo.resolution));
|
setParameter(std::string("VideoInfo") + ".Resolution", std::to_string(videoInfo.resolution));
|
||||||
setParameter(std::string("VideoInfo") + ".AlphaFormat", std::to_string(videoInfo.alphaFormat));
|
setParameter(std::string("VideoInfo") + ".AlphaFormat", std::to_string(videoInfo.alphaFormat));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,12 +42,12 @@ void SubmitTextTo3DAvatarVideoTaskResult::parse(const std::string &payload)
|
|||||||
auto dataNode = value["Data"];
|
auto dataNode = value["Data"];
|
||||||
if(!dataNode["TaskUuid"].isNull())
|
if(!dataNode["TaskUuid"].isNull())
|
||||||
data_.taskUuid = dataNode["TaskUuid"].asString();
|
data_.taskUuid = dataNode["TaskUuid"].asString();
|
||||||
|
if(!value["Success"].isNull())
|
||||||
|
success_ = value["Success"].asString() == "true";
|
||||||
if(!value["Code"].isNull())
|
if(!value["Code"].isNull())
|
||||||
code_ = value["Code"].asString();
|
code_ = value["Code"].asString();
|
||||||
if(!value["Message"].isNull())
|
if(!value["Message"].isNull())
|
||||||
message_ = value["Message"].asString();
|
message_ = value["Message"].asString();
|
||||||
if(!value["Success"].isNull())
|
|
||||||
success_ = value["Success"].asString() == "true";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user