intelligentcreation-20250301/include/alibabacloud/intelligent_creation_20250301.hpp (513 lines of code) (raw):

// This file is auto-generated, don't edit it. Thanks. #ifndef ALIBABACLOUD_INTELLIGENTCREATION20250301_H_ #define ALIBABACLOUD_INTELLIGENTCREATION20250301_H_ #include <alibabacloud/open_api.hpp> #include <darabonba/core.hpp> #include <darabonba/util.hpp> #include <iostream> #include <map> using namespace std; namespace Alibabacloud_IntelligentCreation20250301 { class CreateLabelTaskRequest : public Darabonba::Model { public: shared_ptr<string> callbackUrl{}; shared_ptr<string> fileUrl{}; shared_ptr<string> idempotentId{}; shared_ptr<string> labelTemplateId{}; CreateLabelTaskRequest() {} explicit CreateLabelTaskRequest(const std::map<string, boost::any> &config) : Darabonba::Model(config) { fromMap(config); }; void validate() override {} map<string, boost::any> toMap() override { map<string, boost::any> res; if (callbackUrl) { res["CallbackUrl"] = boost::any(*callbackUrl); } if (fileUrl) { res["FileUrl"] = boost::any(*fileUrl); } if (idempotentId) { res["IdempotentId"] = boost::any(*idempotentId); } if (labelTemplateId) { res["LabelTemplateId"] = boost::any(*labelTemplateId); } return res; } void fromMap(map<string, boost::any> m) override { if (m.find("CallbackUrl") != m.end() && !m["CallbackUrl"].empty()) { callbackUrl = make_shared<string>(boost::any_cast<string>(m["CallbackUrl"])); } if (m.find("FileUrl") != m.end() && !m["FileUrl"].empty()) { fileUrl = make_shared<string>(boost::any_cast<string>(m["FileUrl"])); } if (m.find("IdempotentId") != m.end() && !m["IdempotentId"].empty()) { idempotentId = make_shared<string>(boost::any_cast<string>(m["IdempotentId"])); } if (m.find("LabelTemplateId") != m.end() && !m["LabelTemplateId"].empty()) { labelTemplateId = make_shared<string>(boost::any_cast<string>(m["LabelTemplateId"])); } } virtual ~CreateLabelTaskRequest() = default; }; class CreateLabelTaskResponseBody : public Darabonba::Model { public: shared_ptr<string> requestId{}; shared_ptr<string> taskId{}; CreateLabelTaskResponseBody() {} explicit CreateLabelTaskResponseBody(const std::map<string, boost::any> &config) : Darabonba::Model(config) { fromMap(config); }; void validate() override {} map<string, boost::any> toMap() override { map<string, boost::any> res; if (requestId) { res["RequestId"] = boost::any(*requestId); } if (taskId) { res["TaskId"] = boost::any(*taskId); } return res; } void fromMap(map<string, boost::any> m) override { if (m.find("RequestId") != m.end() && !m["RequestId"].empty()) { requestId = make_shared<string>(boost::any_cast<string>(m["RequestId"])); } if (m.find("TaskId") != m.end() && !m["TaskId"].empty()) { taskId = make_shared<string>(boost::any_cast<string>(m["TaskId"])); } } virtual ~CreateLabelTaskResponseBody() = default; }; class CreateLabelTaskResponse : public Darabonba::Model { public: shared_ptr<map<string, string>> headers{}; shared_ptr<long> statusCode{}; shared_ptr<CreateLabelTaskResponseBody> body{}; CreateLabelTaskResponse() {} explicit CreateLabelTaskResponse(const std::map<string, boost::any> &config) : Darabonba::Model(config) { fromMap(config); }; void validate() override {} map<string, boost::any> toMap() override { map<string, boost::any> res; if (headers) { res["headers"] = boost::any(*headers); } if (statusCode) { res["statusCode"] = boost::any(*statusCode); } if (body) { res["body"] = body ? boost::any(body->toMap()) : boost::any(map<string,boost::any>({})); } return res; } void fromMap(map<string, boost::any> m) override { if (m.find("headers") != m.end() && !m["headers"].empty()) { map<string, string> map1 = boost::any_cast<map<string, string>>(m["headers"]); map<string, string> toMap1; for (auto item:map1) { toMap1[item.first] = item.second; } headers = make_shared<map<string, string>>(toMap1); } if (m.find("statusCode") != m.end() && !m["statusCode"].empty()) { statusCode = make_shared<long>(boost::any_cast<long>(m["statusCode"])); } if (m.find("body") != m.end() && !m["body"].empty()) { if (typeid(map<string, boost::any>) == m["body"].type()) { CreateLabelTaskResponseBody model1; model1.fromMap(boost::any_cast<map<string, boost::any>>(m["body"])); body = make_shared<CreateLabelTaskResponseBody>(model1); } } } virtual ~CreateLabelTaskResponse() = default; }; class CreateOssUploadTokenRequest : public Darabonba::Model { public: shared_ptr<string> fileName{}; shared_ptr<string> fileType{}; CreateOssUploadTokenRequest() {} explicit CreateOssUploadTokenRequest(const std::map<string, boost::any> &config) : Darabonba::Model(config) { fromMap(config); }; void validate() override {} map<string, boost::any> toMap() override { map<string, boost::any> res; if (fileName) { res["FileName"] = boost::any(*fileName); } if (fileType) { res["FileType"] = boost::any(*fileType); } return res; } void fromMap(map<string, boost::any> m) override { if (m.find("FileName") != m.end() && !m["FileName"].empty()) { fileName = make_shared<string>(boost::any_cast<string>(m["FileName"])); } if (m.find("FileType") != m.end() && !m["FileType"].empty()) { fileType = make_shared<string>(boost::any_cast<string>(m["FileType"])); } } virtual ~CreateOssUploadTokenRequest() = default; }; class CreateOssUploadTokenResponseBody : public Darabonba::Model { public: shared_ptr<string> accessId{}; shared_ptr<string> expireTime{}; shared_ptr<string> host{}; shared_ptr<string> key{}; shared_ptr<string> policy{}; shared_ptr<string> requestId{}; shared_ptr<string> signature{}; shared_ptr<string> url{}; CreateOssUploadTokenResponseBody() {} explicit CreateOssUploadTokenResponseBody(const std::map<string, boost::any> &config) : Darabonba::Model(config) { fromMap(config); }; void validate() override {} map<string, boost::any> toMap() override { map<string, boost::any> res; if (accessId) { res["AccessId"] = boost::any(*accessId); } if (expireTime) { res["ExpireTime"] = boost::any(*expireTime); } if (host) { res["Host"] = boost::any(*host); } if (key) { res["Key"] = boost::any(*key); } if (policy) { res["Policy"] = boost::any(*policy); } if (requestId) { res["RequestId"] = boost::any(*requestId); } if (signature) { res["Signature"] = boost::any(*signature); } if (url) { res["Url"] = boost::any(*url); } return res; } void fromMap(map<string, boost::any> m) override { if (m.find("AccessId") != m.end() && !m["AccessId"].empty()) { accessId = make_shared<string>(boost::any_cast<string>(m["AccessId"])); } if (m.find("ExpireTime") != m.end() && !m["ExpireTime"].empty()) { expireTime = make_shared<string>(boost::any_cast<string>(m["ExpireTime"])); } if (m.find("Host") != m.end() && !m["Host"].empty()) { host = make_shared<string>(boost::any_cast<string>(m["Host"])); } if (m.find("Key") != m.end() && !m["Key"].empty()) { key = make_shared<string>(boost::any_cast<string>(m["Key"])); } if (m.find("Policy") != m.end() && !m["Policy"].empty()) { policy = make_shared<string>(boost::any_cast<string>(m["Policy"])); } if (m.find("RequestId") != m.end() && !m["RequestId"].empty()) { requestId = make_shared<string>(boost::any_cast<string>(m["RequestId"])); } if (m.find("Signature") != m.end() && !m["Signature"].empty()) { signature = make_shared<string>(boost::any_cast<string>(m["Signature"])); } if (m.find("Url") != m.end() && !m["Url"].empty()) { url = make_shared<string>(boost::any_cast<string>(m["Url"])); } } virtual ~CreateOssUploadTokenResponseBody() = default; }; class CreateOssUploadTokenResponse : public Darabonba::Model { public: shared_ptr<map<string, string>> headers{}; shared_ptr<long> statusCode{}; shared_ptr<CreateOssUploadTokenResponseBody> body{}; CreateOssUploadTokenResponse() {} explicit CreateOssUploadTokenResponse(const std::map<string, boost::any> &config) : Darabonba::Model(config) { fromMap(config); }; void validate() override {} map<string, boost::any> toMap() override { map<string, boost::any> res; if (headers) { res["headers"] = boost::any(*headers); } if (statusCode) { res["statusCode"] = boost::any(*statusCode); } if (body) { res["body"] = body ? boost::any(body->toMap()) : boost::any(map<string,boost::any>({})); } return res; } void fromMap(map<string, boost::any> m) override { if (m.find("headers") != m.end() && !m["headers"].empty()) { map<string, string> map1 = boost::any_cast<map<string, string>>(m["headers"]); map<string, string> toMap1; for (auto item:map1) { toMap1[item.first] = item.second; } headers = make_shared<map<string, string>>(toMap1); } if (m.find("statusCode") != m.end() && !m["statusCode"].empty()) { statusCode = make_shared<long>(boost::any_cast<long>(m["statusCode"])); } if (m.find("body") != m.end() && !m["body"].empty()) { if (typeid(map<string, boost::any>) == m["body"].type()) { CreateOssUploadTokenResponseBody model1; model1.fromMap(boost::any_cast<map<string, boost::any>>(m["body"])); body = make_shared<CreateOssUploadTokenResponseBody>(model1); } } } virtual ~CreateOssUploadTokenResponse() = default; }; class CreateTextLabelRequest : public Darabonba::Model { public: shared_ptr<string> data{}; shared_ptr<string> labelTemplateId{}; CreateTextLabelRequest() {} explicit CreateTextLabelRequest(const std::map<string, boost::any> &config) : Darabonba::Model(config) { fromMap(config); }; void validate() override {} map<string, boost::any> toMap() override { map<string, boost::any> res; if (data) { res["Data"] = boost::any(*data); } if (labelTemplateId) { res["LabelTemplateId"] = boost::any(*labelTemplateId); } return res; } void fromMap(map<string, boost::any> m) override { if (m.find("Data") != m.end() && !m["Data"].empty()) { data = make_shared<string>(boost::any_cast<string>(m["Data"])); } if (m.find("LabelTemplateId") != m.end() && !m["LabelTemplateId"].empty()) { labelTemplateId = make_shared<string>(boost::any_cast<string>(m["LabelTemplateId"])); } } virtual ~CreateTextLabelRequest() = default; }; class CreateTextLabelResponseBody : public Darabonba::Model { public: shared_ptr<string> data{}; shared_ptr<string> requestId{}; shared_ptr<string> tokens{}; CreateTextLabelResponseBody() {} explicit CreateTextLabelResponseBody(const std::map<string, boost::any> &config) : Darabonba::Model(config) { fromMap(config); }; void validate() override {} map<string, boost::any> toMap() override { map<string, boost::any> res; if (data) { res["Data"] = boost::any(*data); } if (requestId) { res["RequestId"] = boost::any(*requestId); } if (tokens) { res["Tokens"] = boost::any(*tokens); } return res; } void fromMap(map<string, boost::any> m) override { if (m.find("Data") != m.end() && !m["Data"].empty()) { data = make_shared<string>(boost::any_cast<string>(m["Data"])); } if (m.find("RequestId") != m.end() && !m["RequestId"].empty()) { requestId = make_shared<string>(boost::any_cast<string>(m["RequestId"])); } if (m.find("Tokens") != m.end() && !m["Tokens"].empty()) { tokens = make_shared<string>(boost::any_cast<string>(m["Tokens"])); } } virtual ~CreateTextLabelResponseBody() = default; }; class CreateTextLabelResponse : public Darabonba::Model { public: shared_ptr<map<string, string>> headers{}; shared_ptr<long> statusCode{}; shared_ptr<CreateTextLabelResponseBody> body{}; CreateTextLabelResponse() {} explicit CreateTextLabelResponse(const std::map<string, boost::any> &config) : Darabonba::Model(config) { fromMap(config); }; void validate() override {} map<string, boost::any> toMap() override { map<string, boost::any> res; if (headers) { res["headers"] = boost::any(*headers); } if (statusCode) { res["statusCode"] = boost::any(*statusCode); } if (body) { res["body"] = body ? boost::any(body->toMap()) : boost::any(map<string,boost::any>({})); } return res; } void fromMap(map<string, boost::any> m) override { if (m.find("headers") != m.end() && !m["headers"].empty()) { map<string, string> map1 = boost::any_cast<map<string, string>>(m["headers"]); map<string, string> toMap1; for (auto item:map1) { toMap1[item.first] = item.second; } headers = make_shared<map<string, string>>(toMap1); } if (m.find("statusCode") != m.end() && !m["statusCode"].empty()) { statusCode = make_shared<long>(boost::any_cast<long>(m["statusCode"])); } if (m.find("body") != m.end() && !m["body"].empty()) { if (typeid(map<string, boost::any>) == m["body"].type()) { CreateTextLabelResponseBody model1; model1.fromMap(boost::any_cast<map<string, boost::any>>(m["body"])); body = make_shared<CreateTextLabelResponseBody>(model1); } } } virtual ~CreateTextLabelResponse() = default; }; class GetLabelTaskResultRequest : public Darabonba::Model { public: shared_ptr<string> taskId{}; GetLabelTaskResultRequest() {} explicit GetLabelTaskResultRequest(const std::map<string, boost::any> &config) : Darabonba::Model(config) { fromMap(config); }; void validate() override {} map<string, boost::any> toMap() override { map<string, boost::any> res; if (taskId) { res["TaskId"] = boost::any(*taskId); } return res; } void fromMap(map<string, boost::any> m) override { if (m.find("TaskId") != m.end() && !m["TaskId"].empty()) { taskId = make_shared<string>(boost::any_cast<string>(m["TaskId"])); } } virtual ~GetLabelTaskResultRequest() = default; }; class GetLabelTaskResultResponseBody : public Darabonba::Model { public: shared_ptr<string> requestId{}; shared_ptr<string> resultDataUrl{}; shared_ptr<string> status{}; shared_ptr<string> tokens{}; GetLabelTaskResultResponseBody() {} explicit GetLabelTaskResultResponseBody(const std::map<string, boost::any> &config) : Darabonba::Model(config) { fromMap(config); }; void validate() override {} map<string, boost::any> toMap() override { map<string, boost::any> res; if (requestId) { res["RequestId"] = boost::any(*requestId); } if (resultDataUrl) { res["ResultDataUrl"] = boost::any(*resultDataUrl); } if (status) { res["Status"] = boost::any(*status); } if (tokens) { res["Tokens"] = boost::any(*tokens); } return res; } void fromMap(map<string, boost::any> m) override { if (m.find("RequestId") != m.end() && !m["RequestId"].empty()) { requestId = make_shared<string>(boost::any_cast<string>(m["RequestId"])); } if (m.find("ResultDataUrl") != m.end() && !m["ResultDataUrl"].empty()) { resultDataUrl = make_shared<string>(boost::any_cast<string>(m["ResultDataUrl"])); } if (m.find("Status") != m.end() && !m["Status"].empty()) { status = make_shared<string>(boost::any_cast<string>(m["Status"])); } if (m.find("Tokens") != m.end() && !m["Tokens"].empty()) { tokens = make_shared<string>(boost::any_cast<string>(m["Tokens"])); } } virtual ~GetLabelTaskResultResponseBody() = default; }; class GetLabelTaskResultResponse : public Darabonba::Model { public: shared_ptr<map<string, string>> headers{}; shared_ptr<long> statusCode{}; shared_ptr<GetLabelTaskResultResponseBody> body{}; GetLabelTaskResultResponse() {} explicit GetLabelTaskResultResponse(const std::map<string, boost::any> &config) : Darabonba::Model(config) { fromMap(config); }; void validate() override {} map<string, boost::any> toMap() override { map<string, boost::any> res; if (headers) { res["headers"] = boost::any(*headers); } if (statusCode) { res["statusCode"] = boost::any(*statusCode); } if (body) { res["body"] = body ? boost::any(body->toMap()) : boost::any(map<string,boost::any>({})); } return res; } void fromMap(map<string, boost::any> m) override { if (m.find("headers") != m.end() && !m["headers"].empty()) { map<string, string> map1 = boost::any_cast<map<string, string>>(m["headers"]); map<string, string> toMap1; for (auto item:map1) { toMap1[item.first] = item.second; } headers = make_shared<map<string, string>>(toMap1); } if (m.find("statusCode") != m.end() && !m["statusCode"].empty()) { statusCode = make_shared<long>(boost::any_cast<long>(m["statusCode"])); } if (m.find("body") != m.end() && !m["body"].empty()) { if (typeid(map<string, boost::any>) == m["body"].type()) { GetLabelTaskResultResponseBody model1; model1.fromMap(boost::any_cast<map<string, boost::any>>(m["body"])); body = make_shared<GetLabelTaskResultResponseBody>(model1); } } } virtual ~GetLabelTaskResultResponse() = default; }; class Client : Alibabacloud_OpenApi::Client { public: explicit Client(const shared_ptr<Alibabacloud_OpenApi::Config>& config); string getEndpoint(shared_ptr<string> productId, shared_ptr<string> regionId, shared_ptr<string> endpointRule, shared_ptr<string> network, shared_ptr<string> suffix, shared_ptr<map<string, string>> endpointMap, shared_ptr<string> endpoint); CreateLabelTaskResponse createLabelTaskWithOptions(shared_ptr<CreateLabelTaskRequest> request, shared_ptr<map<string, string>> headers, shared_ptr<Darabonba_Util::RuntimeOptions> runtime); CreateLabelTaskResponse createLabelTask(shared_ptr<CreateLabelTaskRequest> request); CreateOssUploadTokenResponse createOssUploadTokenWithOptions(shared_ptr<CreateOssUploadTokenRequest> request, shared_ptr<map<string, string>> headers, shared_ptr<Darabonba_Util::RuntimeOptions> runtime); CreateOssUploadTokenResponse createOssUploadToken(shared_ptr<CreateOssUploadTokenRequest> request); CreateTextLabelResponse createTextLabelWithOptions(shared_ptr<CreateTextLabelRequest> request, shared_ptr<map<string, string>> headers, shared_ptr<Darabonba_Util::RuntimeOptions> runtime); CreateTextLabelResponse createTextLabel(shared_ptr<CreateTextLabelRequest> request); GetLabelTaskResultResponse getLabelTaskResultWithOptions(shared_ptr<GetLabelTaskResultRequest> request, shared_ptr<map<string, string>> headers, shared_ptr<Darabonba_Util::RuntimeOptions> runtime); GetLabelTaskResultResponse getLabelTaskResult(shared_ptr<GetLabelTaskResultRequest> request); virtual ~Client() = default; }; } // namespace Alibabacloud_IntelligentCreation20250301 #endif