-Fix return message field type

This commit is contained in:
sdk-team
2023-08-02 01:59:00 +00:00
parent 12a2e32e06
commit c5e8e9a8a8
13 changed files with 22 additions and 15 deletions

View File

@@ -1 +1 @@
1.36.1706 1.36.1707

View File

@@ -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;

View File

@@ -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_;
}; };
} }

View File

@@ -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_;
}; };
} }

View File

@@ -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;
}; };

View File

@@ -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;
}; };

View File

@@ -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())

View File

@@ -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_;
} }

View File

@@ -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_;
} }

View File

@@ -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));
} }

View File

@@ -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";
} }

View File

@@ -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));
} }

View File

@@ -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";
} }