add openapi for Personalized Text to Image ablity init version.

This commit is contained in:
sdk-team
2024-08-01 04:06:12 +00:00
parent e532f5fe74
commit b91b263fdd
13 changed files with 175 additions and 74 deletions

View File

@@ -1 +1 @@
1.36.1963
1.36.1964

View File

@@ -34,26 +34,10 @@ namespace AlibabaCloud
public:
struct DataItem
{
struct InferenceJobListItem
{
std::string jobStatus;
double jobTrainProgress;
std::string createTime;
std::string id;
std::vector<std::string> resultImageUrl;
std::string promptId;
std::string modelId;
};
std::string jobStatus;
std::string objectType;
double jobTrainProgress;
std::string createTime;
std::vector<std::string> imageUrl;
std::string id;
int inferenceImageCount;
std::vector<DataItem::InferenceJobListItem> inferenceJobList;
std::string modelId;
std::string name;
std::string serviceCode;
std::string serviceName;
int freeConcurrencyCount;
int freeCount;
};
@@ -62,6 +46,7 @@ namespace AlibabaCloud
~AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult();
std::vector<DataItem> getdata()const;
std::string getRequestId()const;
int getHttpStatusCode()const;
std::string getErrMessage()const;
bool getSuccess()const;
std::string getErrCode()const;
@@ -71,6 +56,7 @@ namespace AlibabaCloud
private:
std::vector<DataItem> data_;
std::string requestId_;
int httpStatusCode_;
std::string errMessage_;
bool success_;
std::string errCode_;

View File

@@ -34,7 +34,13 @@ namespace AlibabaCloud
public:
struct Data
{
std::string modelTrainStatus;
std::string jobStatus;
double jobTrainProgress;
std::string createTime;
std::string id;
std::vector<std::string> resultImageUrl;
std::string promptId;
std::string modelId;
};
@@ -42,6 +48,7 @@ namespace AlibabaCloud
explicit Personalizedtxt2imgAddInferenceJobResult(const std::string &payload);
~Personalizedtxt2imgAddInferenceJobResult();
std::string getRequestId()const;
int getHttpStatusCode()const;
Data getData()const;
std::string getErrMessage()const;
bool getSuccess()const;
@@ -51,6 +58,7 @@ namespace AlibabaCloud
void parse(const std::string &payload);
private:
std::string requestId_;
int httpStatusCode_;
Data data_;
std::string errMessage_;
bool success_;

View File

@@ -34,7 +34,26 @@ namespace AlibabaCloud
public:
struct Data
{
std::string modelTrainStatus;
struct InferenceJobListItem
{
std::string jobStatus;
double jobTrainProgress;
std::string createTime;
std::string id;
std::vector<std::string> resultImageUrl;
std::string promptId;
std::string modelId;
};
std::string jobStatus;
std::string objectType;
double jobTrainProgress;
std::string createTime;
std::vector<std::string> imageUrl;
std::string id;
int inferenceImageCount;
std::vector<InferenceJobListItem> inferenceJobList;
std::string modelId;
std::string name;
};
@@ -42,6 +61,7 @@ namespace AlibabaCloud
explicit Personalizedtxt2imgAddModelTrainJobResult(const std::string &payload);
~Personalizedtxt2imgAddModelTrainJobResult();
std::string getRequestId()const;
int getHttpStatusCode()const;
Data getData()const;
std::string getErrMessage()const;
bool getSuccess()const;
@@ -51,6 +71,7 @@ namespace AlibabaCloud
void parse(const std::string &payload);
private:
std::string requestId_;
int httpStatusCode_;
Data data_;
std::string errMessage_;
bool success_;

View File

@@ -34,7 +34,13 @@ namespace AlibabaCloud
public:
struct Data
{
std::string modelTrainStatus;
std::string jobStatus;
double jobTrainProgress;
std::string createTime;
std::string id;
std::vector<std::string> resultImageUrl;
std::string promptId;
std::string modelId;
};
@@ -42,6 +48,7 @@ namespace AlibabaCloud
explicit Personalizedtxt2imgQueryInferenceJobInfoResult(const std::string &payload);
~Personalizedtxt2imgQueryInferenceJobInfoResult();
std::string getRequestId()const;
int getHttpStatusCode()const;
Data getData()const;
std::string getErrMessage()const;
bool getSuccess()const;
@@ -51,6 +58,7 @@ namespace AlibabaCloud
void parse(const std::string &payload);
private:
std::string requestId_;
int httpStatusCode_;
Data data_;
std::string errMessage_;
bool success_;

View File

@@ -62,6 +62,7 @@ namespace AlibabaCloud
~Personalizedtxt2imgQueryModelTrainJobListResult();
std::vector<DataItem> getdata()const;
std::string getRequestId()const;
int getHttpStatusCode()const;
std::string getErrMessage()const;
bool getSuccess()const;
std::string getErrCode()const;
@@ -71,6 +72,7 @@ namespace AlibabaCloud
private:
std::vector<DataItem> data_;
std::string requestId_;
int httpStatusCode_;
std::string errMessage_;
bool success_;
std::string errCode_;

View File

@@ -42,6 +42,7 @@ namespace AlibabaCloud
explicit Personalizedtxt2imgQueryModelTrainStatusResult(const std::string &payload);
~Personalizedtxt2imgQueryModelTrainStatusResult();
std::string getRequestId()const;
int getHttpStatusCode()const;
Data getData()const;
std::string getErrMessage()const;
bool getSuccess()const;
@@ -51,6 +52,7 @@ namespace AlibabaCloud
void parse(const std::string &payload);
private:
std::string requestId_;
int httpStatusCode_;
Data data_;
std::string errMessage_;
bool success_;

View File

@@ -43,46 +43,14 @@ void AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult::parse(const std::s
for (auto valuedatadataItem : alldataNode)
{
DataItem dataObject;
if(!valuedatadataItem["id"].isNull())
dataObject.id = valuedatadataItem["id"].asString();
if(!valuedatadataItem["modelId"].isNull())
dataObject.modelId = valuedatadataItem["modelId"].asString();
if(!valuedatadataItem["name"].isNull())
dataObject.name = valuedatadataItem["name"].asString();
if(!valuedatadataItem["objectType"].isNull())
dataObject.objectType = valuedatadataItem["objectType"].asString();
if(!valuedatadataItem["jobStatus"].isNull())
dataObject.jobStatus = valuedatadataItem["jobStatus"].asString();
if(!valuedatadataItem["jobTrainProgress"].isNull())
dataObject.jobTrainProgress = valuedatadataItem["jobTrainProgress"].asString();
if(!valuedatadataItem["inferenceImageCount"].isNull())
dataObject.inferenceImageCount = std::stoi(valuedatadataItem["inferenceImageCount"].asString());
if(!valuedatadataItem["createTime"].isNull())
dataObject.createTime = valuedatadataItem["createTime"].asString();
auto allinferenceJobListNode = valuedatadataItem["inferenceJobList"]["inferenceJobListItem"];
for (auto valuedatadataIteminferenceJobListinferenceJobListItem : allinferenceJobListNode)
{
DataItem::InferenceJobListItem inferenceJobListObject;
if(!valuedatadataIteminferenceJobListinferenceJobListItem["id"].isNull())
inferenceJobListObject.id = valuedatadataIteminferenceJobListinferenceJobListItem["id"].asString();
if(!valuedatadataIteminferenceJobListinferenceJobListItem["promptId"].isNull())
inferenceJobListObject.promptId = valuedatadataIteminferenceJobListinferenceJobListItem["promptId"].asString();
if(!valuedatadataIteminferenceJobListinferenceJobListItem["modelId"].isNull())
inferenceJobListObject.modelId = valuedatadataIteminferenceJobListinferenceJobListItem["modelId"].asString();
if(!valuedatadataIteminferenceJobListinferenceJobListItem["jobStatus"].isNull())
inferenceJobListObject.jobStatus = valuedatadataIteminferenceJobListinferenceJobListItem["jobStatus"].asString();
if(!valuedatadataIteminferenceJobListinferenceJobListItem["jobTrainProgress"].isNull())
inferenceJobListObject.jobTrainProgress = valuedatadataIteminferenceJobListinferenceJobListItem["jobTrainProgress"].asString();
if(!valuedatadataIteminferenceJobListinferenceJobListItem["createTime"].isNull())
inferenceJobListObject.createTime = valuedatadataIteminferenceJobListinferenceJobListItem["createTime"].asString();
auto allResultImageUrl = value["resultImageUrl"]["resultImageUrl"];
for (auto value : allResultImageUrl)
inferenceJobListObject.resultImageUrl.push_back(value.asString());
dataObject.inferenceJobList.push_back(inferenceJobListObject);
}
auto allImageUrl = value["imageUrl"]["imageUrl"];
for (auto value : allImageUrl)
dataObject.imageUrl.push_back(value.asString());
if(!valuedatadataItem["ServiceCode"].isNull())
dataObject.serviceCode = valuedatadataItem["ServiceCode"].asString();
if(!valuedatadataItem["ServiceName"].isNull())
dataObject.serviceName = valuedatadataItem["ServiceName"].asString();
if(!valuedatadataItem["FreeCount"].isNull())
dataObject.freeCount = std::stoi(valuedatadataItem["FreeCount"].asString());
if(!valuedatadataItem["FreeConcurrencyCount"].isNull())
dataObject.freeConcurrencyCount = std::stoi(valuedatadataItem["FreeConcurrencyCount"].asString());
data_.push_back(dataObject);
}
if(!value["requestId"].isNull())
@@ -93,6 +61,8 @@ void AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult::parse(const std::s
errCode_ = value["errCode"].asString();
if(!value["errMessage"].isNull())
errMessage_ = value["errMessage"].asString();
if(!value["httpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["httpStatusCode"].asString());
}
@@ -106,6 +76,11 @@ std::string AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult::getRequestI
return requestId_;
}
int AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult::getErrMessage()const
{
return errMessage_;

View File

@@ -39,9 +39,22 @@ void Personalizedtxt2imgAddInferenceJobResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["modelTrainStatus"].isNull())
data_.modelTrainStatus = dataNode["modelTrainStatus"].asString();
auto dataNode = value["data"];
if(!dataNode["id"].isNull())
data_.id = dataNode["id"].asString();
if(!dataNode["promptId"].isNull())
data_.promptId = dataNode["promptId"].asString();
if(!dataNode["modelId"].isNull())
data_.modelId = dataNode["modelId"].asString();
if(!dataNode["jobStatus"].isNull())
data_.jobStatus = dataNode["jobStatus"].asString();
if(!dataNode["jobTrainProgress"].isNull())
data_.jobTrainProgress = dataNode["jobTrainProgress"].asString();
if(!dataNode["createTime"].isNull())
data_.createTime = dataNode["createTime"].asString();
auto allResultImageUrl = dataNode["resultImageUrl"]["resultImageUrl"];
for (auto value : allResultImageUrl)
data_.resultImageUrl.push_back(value.asString());
if(!value["requestId"].isNull())
requestId_ = value["requestId"].asString();
if(!value["success"].isNull())
@@ -50,6 +63,8 @@ void Personalizedtxt2imgAddInferenceJobResult::parse(const std::string &payload)
errCode_ = value["errCode"].asString();
if(!value["errMessage"].isNull())
errMessage_ = value["errMessage"].asString();
if(!value["httpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["httpStatusCode"].asString());
}
@@ -58,6 +73,11 @@ std::string Personalizedtxt2imgAddInferenceJobResult::getRequestId()const
return requestId_;
}
int Personalizedtxt2imgAddInferenceJobResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
Personalizedtxt2imgAddInferenceJobResult::Data Personalizedtxt2imgAddInferenceJobResult::getData()const
{
return data_;

View File

@@ -39,9 +39,47 @@ void Personalizedtxt2imgAddModelTrainJobResult::parse(const std::string &payload
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["modelTrainStatus"].isNull())
data_.modelTrainStatus = dataNode["modelTrainStatus"].asString();
auto dataNode = value["data"];
if(!dataNode["id"].isNull())
data_.id = dataNode["id"].asString();
if(!dataNode["modelId"].isNull())
data_.modelId = dataNode["modelId"].asString();
if(!dataNode["name"].isNull())
data_.name = dataNode["name"].asString();
if(!dataNode["objectType"].isNull())
data_.objectType = dataNode["objectType"].asString();
if(!dataNode["jobStatus"].isNull())
data_.jobStatus = dataNode["jobStatus"].asString();
if(!dataNode["jobTrainProgress"].isNull())
data_.jobTrainProgress = dataNode["jobTrainProgress"].asString();
if(!dataNode["inferenceImageCount"].isNull())
data_.inferenceImageCount = std::stoi(dataNode["inferenceImageCount"].asString());
if(!dataNode["createTime"].isNull())
data_.createTime = dataNode["createTime"].asString();
auto allinferenceJobListNode = dataNode["inferenceJobList"]["inferenceJobListItem"];
for (auto dataNodeinferenceJobListinferenceJobListItem : allinferenceJobListNode)
{
Data::InferenceJobListItem inferenceJobListItemObject;
if(!dataNodeinferenceJobListinferenceJobListItem["id"].isNull())
inferenceJobListItemObject.id = dataNodeinferenceJobListinferenceJobListItem["id"].asString();
if(!dataNodeinferenceJobListinferenceJobListItem["promptId"].isNull())
inferenceJobListItemObject.promptId = dataNodeinferenceJobListinferenceJobListItem["promptId"].asString();
if(!dataNodeinferenceJobListinferenceJobListItem["modelId"].isNull())
inferenceJobListItemObject.modelId = dataNodeinferenceJobListinferenceJobListItem["modelId"].asString();
if(!dataNodeinferenceJobListinferenceJobListItem["jobStatus"].isNull())
inferenceJobListItemObject.jobStatus = dataNodeinferenceJobListinferenceJobListItem["jobStatus"].asString();
if(!dataNodeinferenceJobListinferenceJobListItem["jobTrainProgress"].isNull())
inferenceJobListItemObject.jobTrainProgress = dataNodeinferenceJobListinferenceJobListItem["jobTrainProgress"].asString();
if(!dataNodeinferenceJobListinferenceJobListItem["createTime"].isNull())
inferenceJobListItemObject.createTime = dataNodeinferenceJobListinferenceJobListItem["createTime"].asString();
auto allResultImageUrl = value["resultImageUrl"]["resultImageUrl"];
for (auto value : allResultImageUrl)
inferenceJobListItemObject.resultImageUrl.push_back(value.asString());
data_.inferenceJobList.push_back(inferenceJobListItemObject);
}
auto allImageUrl = dataNode["imageUrl"]["imageUrl"];
for (auto value : allImageUrl)
data_.imageUrl.push_back(value.asString());
if(!value["requestId"].isNull())
requestId_ = value["requestId"].asString();
if(!value["success"].isNull())
@@ -50,6 +88,8 @@ void Personalizedtxt2imgAddModelTrainJobResult::parse(const std::string &payload
errCode_ = value["errCode"].asString();
if(!value["errMessage"].isNull())
errMessage_ = value["errMessage"].asString();
if(!value["httpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["httpStatusCode"].asString());
}
@@ -58,6 +98,11 @@ std::string Personalizedtxt2imgAddModelTrainJobResult::getRequestId()const
return requestId_;
}
int Personalizedtxt2imgAddModelTrainJobResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
Personalizedtxt2imgAddModelTrainJobResult::Data Personalizedtxt2imgAddModelTrainJobResult::getData()const
{
return data_;

View File

@@ -39,9 +39,22 @@ void Personalizedtxt2imgQueryInferenceJobInfoResult::parse(const std::string &pa
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["modelTrainStatus"].isNull())
data_.modelTrainStatus = dataNode["modelTrainStatus"].asString();
auto dataNode = value["data"];
if(!dataNode["id"].isNull())
data_.id = dataNode["id"].asString();
if(!dataNode["promptId"].isNull())
data_.promptId = dataNode["promptId"].asString();
if(!dataNode["modelId"].isNull())
data_.modelId = dataNode["modelId"].asString();
if(!dataNode["jobStatus"].isNull())
data_.jobStatus = dataNode["jobStatus"].asString();
if(!dataNode["jobTrainProgress"].isNull())
data_.jobTrainProgress = dataNode["jobTrainProgress"].asString();
if(!dataNode["createTime"].isNull())
data_.createTime = dataNode["createTime"].asString();
auto allResultImageUrl = dataNode["resultImageUrl"]["resultImageUrl"];
for (auto value : allResultImageUrl)
data_.resultImageUrl.push_back(value.asString());
if(!value["requestId"].isNull())
requestId_ = value["requestId"].asString();
if(!value["success"].isNull())
@@ -50,6 +63,8 @@ void Personalizedtxt2imgQueryInferenceJobInfoResult::parse(const std::string &pa
errCode_ = value["errCode"].asString();
if(!value["errMessage"].isNull())
errMessage_ = value["errMessage"].asString();
if(!value["httpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["httpStatusCode"].asString());
}
@@ -58,6 +73,11 @@ std::string Personalizedtxt2imgQueryInferenceJobInfoResult::getRequestId()const
return requestId_;
}
int Personalizedtxt2imgQueryInferenceJobInfoResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
Personalizedtxt2imgQueryInferenceJobInfoResult::Data Personalizedtxt2imgQueryInferenceJobInfoResult::getData()const
{
return data_;

View File

@@ -93,6 +93,8 @@ void Personalizedtxt2imgQueryModelTrainJobListResult::parse(const std::string &p
errCode_ = value["errCode"].asString();
if(!value["errMessage"].isNull())
errMessage_ = value["errMessage"].asString();
if(!value["httpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["httpStatusCode"].asString());
}
@@ -106,6 +108,11 @@ std::string Personalizedtxt2imgQueryModelTrainJobListResult::getRequestId()const
return requestId_;
}
int Personalizedtxt2imgQueryModelTrainJobListResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string Personalizedtxt2imgQueryModelTrainJobListResult::getErrMessage()const
{
return errMessage_;

View File

@@ -39,7 +39,7 @@ void Personalizedtxt2imgQueryModelTrainStatusResult::parse(const std::string &pa
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto dataNode = value["data"];
if(!dataNode["modelTrainStatus"].isNull())
data_.modelTrainStatus = dataNode["modelTrainStatus"].asString();
if(!value["requestId"].isNull())
@@ -50,6 +50,8 @@ void Personalizedtxt2imgQueryModelTrainStatusResult::parse(const std::string &pa
errCode_ = value["errCode"].asString();
if(!value["errMessage"].isNull())
errMessage_ = value["errMessage"].asString();
if(!value["httpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["httpStatusCode"].asString());
}
@@ -58,6 +60,11 @@ std::string Personalizedtxt2imgQueryModelTrainStatusResult::getRequestId()const
return requestId_;
}
int Personalizedtxt2imgQueryModelTrainStatusResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
Personalizedtxt2imgQueryModelTrainStatusResult::Data Personalizedtxt2imgQueryModelTrainStatusResult::getData()const
{
return data_;