Compare commits

..

166 Commits

Author SHA1 Message Date
sdk-team
bdba38a5ae Generated 2025-02-28 for AIPodcast. 2025-05-30 08:30:08 +00:00
sdk-team
75a566b4d3 Add api request parameters and error code. 2025-05-28 03:35:19 +00:00
sdk-team
1e67a571a1 Generated 2014-08-15 for Rds. 2025-05-22 03:25:14 +00:00
sdk-team
fc5b3998fe Added param for ActivateLicenseResponse . 2025-05-21 07:36:30 +00:00
sdk-team
23a2074f17 Added param for ActivateLicenseResponse . 2025-05-20 07:12:27 +00:00
sdk-team
b4df698c3e Update water-mark params. 2025-05-14 03:38:22 +00:00
sdk-team
9f1edb0b33 Add Api ReadSchedulerxDesignateDetail. 2025-05-13 06:45:52 +00:00
sdk-team
5bd1d921f4 Generated 2021-05-17 for Itag. 2025-05-06 09:45:58 +00:00
sdk-team
c0c834e64a Generated 2021-03-08 for eds-user. 2025-04-27 03:10:49 +00:00
sdk-team
9b2557bf41 Generated 2014-08-28 for Ess. 2025-04-25 07:04:42 +00:00
sdk-team
1f2e0e0b42 Generated 2021-03-08 for eds-user. 2025-04-23 02:50:57 +00:00
sdk-team
0b9b79f37b Generate SDK unified. 2025-04-15 10:09:19 +00:00
sdk-team
62ea99cdb2 Add SmartqQueryAbility api request parameters. 2025-04-14 07:21:42 +00:00
nanhe
54be46c456 Update README 2025-04-09 11:53:20 +08:00
sdk-team
8d6c81401f Generated 2015-12-01 for Dds. 2025-04-08 11:19:38 +00:00
sdk-team
72138b276a Generated 2020-05-18 for dataworks-public. 2025-04-07 12:32:14 +00:00
sdk-team
53d26e9957 Generated 2022-12-01 for ResourceCenter. 2025-04-02 07:11:49 +00:00
sdk-team
7f21cf83b9 Generated 2025-02-28 for AIPodcast. 2025-04-02 05:14:19 +00:00
sdk-team
cf5863b104 Add parameters to control different role. 2025-03-31 02:44:45 +00:00
sdk-team
28503fa2e5 New Version. 2025-03-28 10:00:21 +00:00
sdk-team
a71e6dd1ae Generated 2020-05-18 for dataworks-public. 2025-03-27 12:33:01 +00:00
sdk-team
af9bc95b0b Generated 2020-06-01 for SWAS-OPEN. 2025-03-25 08:46:38 +00:00
sdk-team
4208be77a5 Support Conditional Access Policy. 2025-03-21 09:12:12 +00:00
sdk-team
338fe94f31 GetDailyPlayRegionStatis 2025-03-21 08:58:16 +00:00
sdk-team
fb513278fe Supported DescribeImageSharePermission. 2025-03-18 07:33:31 +00:00
weeping
ec9cd15b58 Fix array memory leak 2025-03-17 17:17:09 +08:00
sdk-team
1954195d9c Generated 2022-07-28 for sophonsoar. 2025-03-14 08:59:46 +00:00
sdk-team
ffd0c138d3 Add API errors. 2025-03-14 06:43:36 +00:00
sdk-team
40a7995d11 Unified upgrade SDK. 2025-03-12 09:40:25 +00:00
sdk-team
2ebf998ace Generated 2019-01-23 for Drds. 2025-03-11 03:26:07 +00:00
sdk-team
444397191f Add auto grouping apis. 2025-03-03 09:36:51 +00:00
sdk-team
a09160460b Generated 2020-06-01 for SWAS-OPEN. 2025-02-11 08:53:45 +00:00
sdk-team
cd9e24cdd0 Generated 2019-03-07 for Cloudauth. 2025-02-11 03:29:17 +00:00
sdk-team
6830235852 Add ModifyInstanceProperties. 2025-02-07 10:05:43 +00:00
sdk-team
bc2d245597 Rebuild. 2025-02-06 02:43:00 +00:00
sdk-team
168c4f1cf1 Generated 2017-08-01 for polardb. 2025-01-20 01:52:49 +00:00
sdk-team
948b05b62e Generated 2023-01-20 for csas. 2025-01-14 03:39:53 +00:00
sdk-team
3e5235c2ca Modify BatchGetMediaInfos. 2025-01-08 06:44:13 +00:00
sdk-team
6deaa997fb Add SmartQ APIs. 2024-12-30 03:17:17 +00:00
sdk-team
dbe02e376e CreateJob and UpdateJob support ExecutorBlockStrategy. 2024-12-26 11:08:03 +00:00
sdk-team
0c2f5f41c4 -Supported DeleteEip 2024-12-25 06:26:47 +00:00
sdk-team
1d1099683e Supported Jumbo for HDENI and LENI. 2024-12-24 10:07:48 +00:00
sdk-team
48362f9159 Generated 2020-06-16 for Alb. 2024-12-23 02:27:21 +00:00
sdk-team
574a5e964d Add BatchGetMediaInfos. 2024-12-19 04:48:02 +00:00
sdk-team
04ef9028c2 Add Support Real time mock table. 2024-12-18 07:26:57 +00:00
sdk-team
ff5406a429 Generated 2023-05-22 for selectdb. 2024-12-18 06:47:38 +00:00
sdk-team
18687c978c Supported Pageable of ListDataLakeDatabase API. 2024-12-12 03:36:09 +00:00
sdk-team
5416b57b75 Support fromData for UpdateRulesAttribute and Createrules 2024-12-11 03:20:18 +00:00
sdk-team
43d3080407 Generated 2016-11-01 for live. 2024-12-06 09:15:03 +00:00
sdk-team
fe745e81c4 -Release GetJobDetail, ListJobInfo. 2024-12-06 02:44:58 +00:00
sdk-team
e05ba433d0 Add LabelPriorityLevel in UpdateModelFeature API. 2024-12-02 04:00:57 +00:00
sdk-team
19026e1ca1 SubmitTranscodeJobs Add SessionId. 2024-11-28 12:41:01 +00:00
sdk-team
4d0d423351 Generated 2017-11-10 for Ens. 2024-11-27 12:36:52 +00:00
sdk-team
5d774bf4d2 Add SmartqQueryAbility api. 2024-11-26 12:15:42 +00:00
sdk-team
5c863a0c43 Update DescribeApiMetering API. 2024-11-26 05:17:03 +00:00
sdk-team
d5a286f460 Generated 2021-11-11 for qianzhou. 2024-11-22 09:45:23 +00:00
sdk-team
055e9fa24d Init. 2024-11-19 08:27:29 +00:00
sdk-team
779a64ae99 Generated 2016-11-01 for live. 2024-11-14 09:35:45 +00:00
sdk-team
689a48e2ef Supported AndroidMessageOppoCategory, AndroidMessageOppoNotifyLevel for Push and MassPush. 2024-11-13 03:46:58 +00:00
sdk-team
c32d539146 Generated 2015-12-01 for Dds. 2024-11-05 11:37:35 +00:00
sdk-team
348726cb09 Support Ipv4LocalAddresses and Ipv6LocalAddresses. 2024-11-04 07:48:42 +00:00
sdk-team
5edf5643a2 DescribeInstanceTypes add CpuOptions. 2024-10-31 12:18:01 +00:00
sdk-team
5cdab50afe Update to support new apis. 2024-10-30 09:39:06 +00:00
sdk-team
cb3e058f3f Update to support new apis. 2024-10-30 09:14:35 +00:00
sdk-team
e2c46d1143 Generated 2023-01-20 for csas. 2024-10-30 08:34:07 +00:00
sdk-team
3b852794f3 Support describe and modify NVMe on instance. 2024-10-30 02:27:39 +00:00
sdk-team
16d6566bf7 Support Fileset for BmCPFS. 2024-10-28 06:32:17 +00:00
sdk-team
2758ad51c0 Generated 2017-11-10 for Ens. 2024-10-25 02:57:00 +00:00
sdk-team
51939b77c4 Publish sdk. 2024-10-24 09:37:26 +00:00
sdk-team
3f0e3c3e9a Update Endpoint. 2024-10-23 09:57:47 +00:00
sdk-team
c13c576175 ListUsers,ListUserBasicInfos api新增支持status字段 2024-10-23 09:18:06 +00:00
sdk-team
ef4cdc8756 Add openapi StartEaiJupyter. 2024-10-22 03:02:13 +00:00
sdk-team
61a4b220eb Gwlb Open API released. 2024-10-18 03:12:25 +00:00
sdk-team
183190fd14 基于转移码的转出接口 2024-10-17 11:52:52 +00:00
sdk-team
a7841818f4 Gwlb Open API released. 2024-10-16 09:41:04 +00:00
sdk-team
9c795d127b Add ResourcePoolOptions.Strategy for CreateAutoProvisioningGroup. 2024-10-15 07:23:57 +00:00
sdk-team
52c309ecd7 GetPlayInfo Add EncryptMode. 2024-10-11 03:08:35 +00:00
sdk-team
d00f8d0fb2 Add ManualRunMailTask, GetMailTaskStatus and GetWorksEmbedList apis. 2024-10-10 09:55:45 +00:00
sdk-team
4393e6e44f Support Android badge. 2024-10-10 02:00:52 +00:00
sdk-team
e676e2e38f Generated 2022-12-01 for ResourceCenter. 2024-10-08 07:58:51 +00:00
sdk-team
429d57cff4 Generated 2018-08-28 for Tag. 2024-09-30 07:06:34 +00:00
sdk-team
179314c9fe Generated 2021-12-21 for wss. 2024-09-29 14:43:53 +00:00
sdk-team
f0133be6a9 Generated 2020-05-18 for dataworks-public. 2024-09-29 01:46:27 +00:00
sdk-team
bb7cab374e Support command audit for ecs. 2024-09-27 02:31:15 +00:00
sdk-team
66cb681daa Update to support new apis. 2024-09-26 06:31:46 +00:00
sdk-team
e2d298dba8 Generated 2024-02-22 for OssSddp. 2024-09-24 03:29:18 +00:00
sdk-team
ce74411ad3 Add API Ram meta. 2024-09-18 06:15:56 +00:00
sdk-team
bb1c3193e8 Generated 2020-03-15 for AccountLabel. 2024-09-14 03:32:27 +00:00
sdk-team
ed4f7ee25b Update EBS default encrypted APIs from private to public. 2024-09-14 01:52:14 +00:00
sdk-team
351c9e254f Update EBS default encrypted APIs from private to public. 2024-09-10 06:33:37 +00:00
sdk-team
cfd6b2d640 QueryChatappBindWaba接口增加businessId, businessName参数返回 2024-09-03 02:48:24 +00:00
sdk-team
ba5ab1093f Generated 2019-09-01 for OceanBasePro. 2024-09-02 06:27:40 +00:00
sdk-team
4b90751575 Generated 2016-01-20 for Kms. 2024-08-30 09:01:07 +00:00
sdk-team
a6e6fc3981 增加国际一口价相关接口. 2024-08-30 02:52:51 +00:00
sdk-team
ac4e846136 Generated 2015-12-01 for Dds. 2024-08-28 05:45:41 +00:00
sdk-team
b88765a938 治理检测新增第一版OpenAPI 2024-08-23 02:51:13 +00:00
sdk-team
776d68f0aa Generated 2017-11-10 for Ens. 2024-08-23 02:42:48 +00:00
sdk-team
1f76e81f67 Update to support new apis. 2024-08-22 11:53:28 +00:00
sdk-team
1c261b822a Support record for ecs. 2024-08-21 09:54:20 +00:00
sdk-team
23eaeedb69 增加DescribeVodDomainMax95BpsData 2024-08-20 03:24:44 +00:00
sdk-team
87f3f72876 Support effective time for CreateOrUpdateSilencePolicy interface. 2024-08-15 09:16:07 +00:00
sdk-team
44c9ab5768 Support RDS Custom. 2024-08-13 13:37:47 +00:00
sdk-team
ff4508956b Update to support new apis. 2024-08-13 12:18:16 +00:00
sdk-team
0329dcee47 Support DryRun parameter OpenAPI. 2024-08-13 09:29:05 +00:00
sdk-team
8f4a119a7e -DescribeVodCertificateDetail, DescribeVodCertificateList增加返回参数 2024-08-13 09:20:58 +00:00
sdk-team
63bf0ee442 Generated 2020-06-01 for SWAS-OPEN. 2024-08-12 07:15:09 +00:00
sdk-team
47cb3f0fcb Add QueryData, ModifyCopilotEmbedConfig, QueryCopilotEmbedConfig and QueryDataRange APIs. 2024-08-07 02:10:45 +00:00
sdk-team
776a55cf64 Update to support new apis. 2024-08-06 09:44:30 +00:00
sdk-team
5fcbeb4782 Offline remote write related APIs. 2024-08-05 12:03:08 +00:00
sdk-team
ea1c1ae17e Generated 2019-09-01 for OceanBasePro. 2024-08-05 05:51:53 +00:00
sdk-team
b91b263fdd add openapi for Personalized Text to Image ablity init version. 2024-08-01 04:06:12 +00:00
sdk-team
e532f5fe74 Generated 2015-12-01 for Dds. 2024-08-01 03:52:42 +00:00
sdk-team
c1c37ba49a Update to support new apis. 2024-08-01 02:48:16 +00:00
sdk-team
7d74c183f6 Update DescribeApiMetering API. 2024-07-29 07:26:33 +00:00
sdk-team
1b9c5d6a42 Supported C#. 2024-07-26 10:24:10 +00:00
sdk-team
e762c1d057 增加号码开场白、命令等 2024-07-25 03:01:50 +00:00
sdk-team
16843433e4 Generated 2019-09-01 for OceanBasePro. 2024-07-24 10:05:23 +00:00
sdk-team
f80621c4a4 Generated 2014-08-15 for Rds. 2024-07-23 13:21:20 +00:00
sdk-team
4985a32853 Update water-mark params 2024-07-23 02:38:34 +00:00
sdk-team
7f6b7dbfba Support kibana Pvl private link operation. 2024-07-22 09:18:31 +00:00
sdk-team
18b7bafcd0 Account management add SourceBiz parameters. 2024-07-19 06:39:25 +00:00
sdk-team
4b9242545b Update SegmentCloth. 2024-07-19 02:48:43 +00:00
sdk-team
b3758c1857 初始发布 2024-07-18 04:36:21 +00:00
sdk-team
40e28f2005 Generated 2020-06-01 for SWAS-OPEN. 2024-07-16 02:16:51 +00:00
sdk-team
2e0f1478c6 Added param for ActivateLicenseResponse . 2024-07-10 06:30:49 +00:00
sdk-team
8c7efaba0f Update to support new apis. 2024-07-05 09:46:59 +00:00
sdk-team
fd5e85ebf9 Publish Api:GetNisNetworkRanking 2024-07-04 11:37:09 +00:00
sdk-team
ef538b5d54 Generated 2019-09-01 for OceanBasePro. 2024-07-04 11:05:51 +00:00
sdk-team
4e92d5b648 Supported APIs DescribeSDG,PreloadRegionSDG,UnloadRegionSDG,DeployInstanceSDG,RemoveInstanceSDG. 2024-07-03 07:59:22 +00:00
sdk-team
befcff9add Generated 2023-01-20 for csas. 2024-07-03 02:53:19 +00:00
sdk-team
78426b2c35 Generated 2019-09-01 for OceanBasePro. 2024-07-02 08:52:18 +00:00
sdk-team
1c37d47f07 Add UsageMetric. 2024-06-30 06:30:45 +00:00
sdk-team
afc1ac57c3 Add QueryAuditLog, QueryApprovalInfo, DataSourceBlood, DataSetBlood and QueryDataServiceList APIs. 2024-06-28 02:40:37 +00:00
sdk-team
7ad42a297f Supported AssumeRoleProxyChain for CreateHighDensityElasticNetworkInterface. 2024-06-26 02:57:51 +00:00
sdk-team
b2cade322d Create AppGroup Support Set AppVersion. 2024-06-25 16:24:22 +00:00
sdk-team
5d8d514785 Authentication template add SupportApps 2024-06-21 02:00:04 +00:00
sdk-team
d4d30d5bb7 Generated 2023-01-20 for csas. 2024-06-20 08:51:03 +00:00
sdk-team
8c606d0357 Add status operation api. 2024-06-18 09:20:10 +00:00
sdk-team
4a7816979a Update to support new apis. 2024-06-18 09:17:05 +00:00
sdk-team
ca3378ac03 Supported modification of securityGroupId for UpdateElasticNetworkInterface API. 2024-06-18 03:41:28 +00:00
sdk-team
0859b911b2 Generated 2020-02-02 for polardbx. 2024-06-18 01:44:15 +00:00
sdk-team
29b4bc0ce3 Generated 2020-06-01 for SWAS-OPEN. 2024-06-17 11:00:44 +00:00
sdk-team
d37523f568 CreateDBInstance add DNStorageSpace 2024-06-17 09:06:30 +00:00
sdk-team
928fc975b9 Update to support new apis. 2024-06-14 03:14:29 +00:00
sdk-team
6365b9f02d Generated 2019-09-01 for OceanBasePro. 2024-06-14 03:12:54 +00:00
sdk-team
fbc3817ea1 Add ListFeatureViewOnlineFeatures API. 2024-06-11 07:02:18 +00:00
sdk-team
db6a17b08c Domain Self Diagnosis. 2024-06-11 03:19:07 +00:00
sdk-team
d80ca0d7e2 Generated 2023-01-20 for csas. 2024-06-11 02:26:46 +00:00
sdk-team
83f9047345 Generated 2023-01-20 for csas. 2024-06-06 05:53:39 +00:00
sdk-team
458e22b006 ListOrderConsumeStatisticRecords add applicationExternalId serviceCode. 2024-06-06 03:00:53 +00:00
sdk-team
a375fa9d99 Support dms dg. 2024-06-05 06:32:50 +00:00
sdk-team
c8d90808f0 Update to support new apis. 2024-06-04 02:36:19 +00:00
sdk-team
886cef155f Supported gateway for hdeni api. 2024-06-03 07:01:54 +00:00
sdk-team
051077c805 Generated 2014-05-15 for Slb. 2024-05-30 12:41:59 +00:00
sdk-team
589d7c0177 Generated 2020-06-06 for cams. 2024-05-30 10:35:46 +00:00
sdk-team
22313c7d61 Update QueryFaceVideoTemplate. 2024-05-30 09:56:01 +00:00
sdk-team
192ded93b1 Support body 2024-05-29 02:38:54 +00:00
sdk-team
dde68d8a28 Generated 2019-09-01 for OceanBasePro. 2024-05-27 13:56:57 +00:00
sdk-team
b299d10992 Generated 2019-09-01 for OceanBasePro. 2024-05-27 10:41:59 +00:00
sdk-team
5c871c6dcd Generated 2015-12-01 for Dds. 2024-05-24 09:22:56 +00:00
sdk-team
3312e299ac Update to support new apis. 2024-05-24 02:47:35 +00:00
sdk-team
60bb031e74 Add SnapshotLinkId for DescribeSnapshots. 2024-05-23 06:10:07 +00:00
sdk-team
d74432d350 Generated 2019-09-01 for OceanBasePro. 2024-05-23 03:04:29 +00:00
sdk-team
7ddae594ab Generated 2020-06-01 for SWAS-OPEN. 2024-05-22 09:36:37 +00:00
sdk-team
3a727a7cb8 Support Spot Instance. 2024-05-22 07:55:38 +00:00
sdk-team
c0327a8b18 Add CreateTicket4Copilot API. 2024-05-22 05:42:21 +00:00
10620 changed files with 535889 additions and 127032 deletions

View File

@@ -11,9 +11,9 @@
<a href="https://codecov.io/gh/aliyun/aliyun-openapi-cpp-sdk"><img src="https://codecov.io/gh/aliyun/aliyun-openapi-cpp-sdk/branch/master/graph/badge.svg" alt="codecov"></a>
</p>
Alibaba Cloud SDK for C++ 让您不用复杂编程即可访问云服务器、负载均衡、云监控等阿里云服务。这里向您介绍如何获取 Alibaba Cloud SDK for C++ 并开始调用
阿里云 V1.0 SDK 即将进入基础安全维护阶段,不再建议使用,建议使用 V2.0 SDK
如果您在使用的过程中遇到任何问题,欢迎前往[阿里云SDK问答社区](https://yq.aliyun.com/tags/type_ask-tagid_23350)提问,提问前请阅读[提问引导](https://help.aliyun.com/document_detail/93957.html)。亦可在当前 GitHub [提交 Issues](https://github.com/aliyun/aliyun-openapi-cpp-sdk/issues/new)。
如果您在使用的过程中遇到任何问题,可在当前 GitHub [提交 Issues](https://github.com/aliyun/aliyun-openapi-cpp-sdk/issues/new)。
## 使用诊断

View File

@@ -11,9 +11,7 @@ English | [简体中文](./README-CN.md)
<a href="https://codecov.io/gh/aliyun/aliyun-openapi-cpp-sdk"><img src="https://codecov.io/gh/aliyun/aliyun-openapi-cpp-sdk/branch/master/graph/badge.svg" alt="codecov"></a>
</p>
Alibaba Cloud SDK for C++ allows you to access Alibaba Cloud services such as Elastic Compute Service (ECS), Server Load Balancer (SLB), and CloudMonitor. You can access Alibaba Cloud services without the need to handle API related tasks, such as signing and constructing your requests.
This document introduces how to obtain and call this SDK.
The Alibaba Cloud V1.0 SDK will soon enter the Basic Security Maintenance phase and is no longer recommended for use. It is suggested to use the V2.0 SDK instead.
If you have any problem while using Alibaba Cloud SDK for C++, please submit an [issue](https://github.com/aliyun/aliyun-openapi-cpp-sdk/issues/new).

View File

@@ -1 +1 @@
1.36.1908
1.36.2072

102
accountlabel/CMakeLists.txt Normal file
View File

@@ -0,0 +1,102 @@
#
# Copyright 2009-2017 Alibaba Cloud All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
set(accountlabel_public_header
include/alibabacloud/accountlabel/AccountLabelClient.h
include/alibabacloud/accountlabel/AccountLabelExport.h )
set(accountlabel_public_header_model
include/alibabacloud/accountlabel/model/AddCustomerLabelRequest.h
include/alibabacloud/accountlabel/model/AddCustomerLabelResult.h
include/alibabacloud/accountlabel/model/BatchFetchAccountLabelRequest.h
include/alibabacloud/accountlabel/model/BatchFetchAccountLabelResult.h
include/alibabacloud/accountlabel/model/DeleteCustomerLabelRequest.h
include/alibabacloud/accountlabel/model/DeleteCustomerLabelResult.h
include/alibabacloud/accountlabel/model/QueryCustomerLabelRequest.h
include/alibabacloud/accountlabel/model/QueryCustomerLabelResult.h
include/alibabacloud/accountlabel/model/QueryCustomerLabelByConfigGroupRequest.h
include/alibabacloud/accountlabel/model/QueryCustomerLabelByConfigGroupResult.h )
set(accountlabel_src
src/AccountLabelClient.cc
src/model/AddCustomerLabelRequest.cc
src/model/AddCustomerLabelResult.cc
src/model/BatchFetchAccountLabelRequest.cc
src/model/BatchFetchAccountLabelResult.cc
src/model/DeleteCustomerLabelRequest.cc
src/model/DeleteCustomerLabelResult.cc
src/model/QueryCustomerLabelRequest.cc
src/model/QueryCustomerLabelResult.cc
src/model/QueryCustomerLabelByConfigGroupRequest.cc
src/model/QueryCustomerLabelByConfigGroupResult.cc )
add_library(accountlabel ${LIB_TYPE}
${accountlabel_public_header}
${accountlabel_public_header_model}
${accountlabel_src})
set_target_properties(accountlabel
PROPERTIES
LINKER_LANGUAGE CXX
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}accountlabel
)
if(${LIB_TYPE} STREQUAL "SHARED")
set_target_properties(accountlabel
PROPERTIES
DEFINE_SYMBOL ALIBABACLOUD_ACCOUNTLABEL_LIBRARY)
endif()
target_include_directories(accountlabel
PRIVATE include
${CMAKE_SOURCE_DIR}/core/include
)
target_link_libraries(accountlabel
core)
if(CMAKE_HOST_WIN32)
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
set(jsoncpp_install_dir ${INSTALL_DIR})
add_dependencies(accountlabel
jsoncpp)
target_include_directories(accountlabel
PRIVATE ${jsoncpp_install_dir}/include)
target_link_libraries(accountlabel
${jsoncpp_install_dir}/lib/jsoncpp.lib)
set_target_properties(accountlabel
PROPERTIES
COMPILE_OPTIONS "/bigobj")
else()
target_include_directories(accountlabel
PRIVATE /usr/include/jsoncpp)
target_link_libraries(accountlabel
jsoncpp)
endif()
install(FILES ${accountlabel_public_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/accountlabel)
install(FILES ${accountlabel_public_header_model}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/accountlabel/model)
install(TARGETS accountlabel
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View File

@@ -0,0 +1,86 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ACCOUNTLABEL_ACCOUNTLABELCLIENT_H_
#define ALIBABACLOUD_ACCOUNTLABEL_ACCOUNTLABELCLIENT_H_
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include "AccountLabelExport.h"
#include "model/AddCustomerLabelRequest.h"
#include "model/AddCustomerLabelResult.h"
#include "model/BatchFetchAccountLabelRequest.h"
#include "model/BatchFetchAccountLabelResult.h"
#include "model/DeleteCustomerLabelRequest.h"
#include "model/DeleteCustomerLabelResult.h"
#include "model/QueryCustomerLabelRequest.h"
#include "model/QueryCustomerLabelResult.h"
#include "model/QueryCustomerLabelByConfigGroupRequest.h"
#include "model/QueryCustomerLabelByConfigGroupResult.h"
namespace AlibabaCloud
{
namespace AccountLabel
{
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT AccountLabelClient : public RpcServiceClient
{
public:
typedef Outcome<Error, Model::AddCustomerLabelResult> AddCustomerLabelOutcome;
typedef std::future<AddCustomerLabelOutcome> AddCustomerLabelOutcomeCallable;
typedef std::function<void(const AccountLabelClient*, const Model::AddCustomerLabelRequest&, const AddCustomerLabelOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddCustomerLabelAsyncHandler;
typedef Outcome<Error, Model::BatchFetchAccountLabelResult> BatchFetchAccountLabelOutcome;
typedef std::future<BatchFetchAccountLabelOutcome> BatchFetchAccountLabelOutcomeCallable;
typedef std::function<void(const AccountLabelClient*, const Model::BatchFetchAccountLabelRequest&, const BatchFetchAccountLabelOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BatchFetchAccountLabelAsyncHandler;
typedef Outcome<Error, Model::DeleteCustomerLabelResult> DeleteCustomerLabelOutcome;
typedef std::future<DeleteCustomerLabelOutcome> DeleteCustomerLabelOutcomeCallable;
typedef std::function<void(const AccountLabelClient*, const Model::DeleteCustomerLabelRequest&, const DeleteCustomerLabelOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteCustomerLabelAsyncHandler;
typedef Outcome<Error, Model::QueryCustomerLabelResult> QueryCustomerLabelOutcome;
typedef std::future<QueryCustomerLabelOutcome> QueryCustomerLabelOutcomeCallable;
typedef std::function<void(const AccountLabelClient*, const Model::QueryCustomerLabelRequest&, const QueryCustomerLabelOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryCustomerLabelAsyncHandler;
typedef Outcome<Error, Model::QueryCustomerLabelByConfigGroupResult> QueryCustomerLabelByConfigGroupOutcome;
typedef std::future<QueryCustomerLabelByConfigGroupOutcome> QueryCustomerLabelByConfigGroupOutcomeCallable;
typedef std::function<void(const AccountLabelClient*, const Model::QueryCustomerLabelByConfigGroupRequest&, const QueryCustomerLabelByConfigGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryCustomerLabelByConfigGroupAsyncHandler;
AccountLabelClient(const Credentials &credentials, const ClientConfiguration &configuration);
AccountLabelClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
AccountLabelClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~AccountLabelClient();
AddCustomerLabelOutcome addCustomerLabel(const Model::AddCustomerLabelRequest &request)const;
void addCustomerLabelAsync(const Model::AddCustomerLabelRequest& request, const AddCustomerLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AddCustomerLabelOutcomeCallable addCustomerLabelCallable(const Model::AddCustomerLabelRequest& request) const;
BatchFetchAccountLabelOutcome batchFetchAccountLabel(const Model::BatchFetchAccountLabelRequest &request)const;
void batchFetchAccountLabelAsync(const Model::BatchFetchAccountLabelRequest& request, const BatchFetchAccountLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
BatchFetchAccountLabelOutcomeCallable batchFetchAccountLabelCallable(const Model::BatchFetchAccountLabelRequest& request) const;
DeleteCustomerLabelOutcome deleteCustomerLabel(const Model::DeleteCustomerLabelRequest &request)const;
void deleteCustomerLabelAsync(const Model::DeleteCustomerLabelRequest& request, const DeleteCustomerLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteCustomerLabelOutcomeCallable deleteCustomerLabelCallable(const Model::DeleteCustomerLabelRequest& request) const;
QueryCustomerLabelOutcome queryCustomerLabel(const Model::QueryCustomerLabelRequest &request)const;
void queryCustomerLabelAsync(const Model::QueryCustomerLabelRequest& request, const QueryCustomerLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
QueryCustomerLabelOutcomeCallable queryCustomerLabelCallable(const Model::QueryCustomerLabelRequest& request) const;
QueryCustomerLabelByConfigGroupOutcome queryCustomerLabelByConfigGroup(const Model::QueryCustomerLabelByConfigGroupRequest &request)const;
void queryCustomerLabelByConfigGroupAsync(const Model::QueryCustomerLabelByConfigGroupRequest& request, const QueryCustomerLabelByConfigGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
QueryCustomerLabelByConfigGroupOutcomeCallable queryCustomerLabelByConfigGroupCallable(const Model::QueryCustomerLabelByConfigGroupRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_ACCOUNTLABEL_ACCOUNTLABELCLIENT_H_

View File

@@ -0,0 +1,32 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ACCOUNTLABEL_ACCOUNTLABELEXPORT_H_
#define ALIBABACLOUD_ACCOUNTLABEL_ACCOUNTLABELEXPORT_H_
#include <alibabacloud/core/Global.h>
#if defined(ALIBABACLOUD_SHARED)
# if defined(ALIBABACLOUD_ACCOUNTLABEL_LIBRARY)
# define ALIBABACLOUD_ACCOUNTLABEL_EXPORT ALIBABACLOUD_DECL_EXPORT
# else
# define ALIBABACLOUD_ACCOUNTLABEL_EXPORT ALIBABACLOUD_DECL_IMPORT
# endif
#else
# define ALIBABACLOUD_ACCOUNTLABEL_EXPORT
#endif
#endif // !ALIBABACLOUD_ACCOUNTLABEL_ACCOUNTLABELEXPORT_H_

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ACCOUNTLABEL_MODEL_ADDCUSTOMERLABELREQUEST_H_
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_ADDCUSTOMERLABELREQUEST_H_
#include <alibabacloud/accountlabel/AccountLabelExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AccountLabel {
namespace Model {
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT AddCustomerLabelRequest : public RpcServiceRequest {
public:
AddCustomerLabelRequest();
~AddCustomerLabelRequest();
std::string getLabelSeries() const;
void setLabelSeries(const std::string &labelSeries);
std::string getOrganization() const;
void setOrganization(const std::string &organization);
std::string getEndtime() const;
void setEndtime(const std::string &endtime);
long getPK() const;
void setPK(long pK);
std::string getStartTime() const;
void setStartTime(const std::string &startTime);
std::vector<std::string> getLabelTypes() const;
void setLabelTypes(const std::vector<std::string> &labelTypes);
std::string getUserName() const;
void setUserName(const std::string &userName);
std::string getToken() const;
void setToken(const std::string &token);
private:
std::string labelSeries_;
std::string organization_;
std::string endtime_;
long pK_;
std::string startTime_;
std::vector<std::string> labelTypes_;
std::string userName_;
std::string token_;
};
} // namespace Model
} // namespace AccountLabel
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_ADDCUSTOMERLABELREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ACCOUNTLABEL_MODEL_ADDCUSTOMERLABELRESULT_H_
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_ADDCUSTOMERLABELRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/accountlabel/AccountLabelExport.h>
namespace AlibabaCloud
{
namespace AccountLabel
{
namespace Model
{
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT AddCustomerLabelResult : public ServiceResult
{
public:
AddCustomerLabelResult();
explicit AddCustomerLabelResult(const std::string &payload);
~AddCustomerLabelResult();
std::string getMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_ADDCUSTOMERLABELRESULT_H_

View File

@@ -0,0 +1,57 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ACCOUNTLABEL_MODEL_BATCHFETCHACCOUNTLABELREQUEST_H_
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_BATCHFETCHACCOUNTLABELREQUEST_H_
#include <alibabacloud/accountlabel/AccountLabelExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AccountLabel {
namespace Model {
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT BatchFetchAccountLabelRequest : public RpcServiceRequest {
public:
BatchFetchAccountLabelRequest();
~BatchFetchAccountLabelRequest();
std::string getOrganization() const;
void setOrganization(const std::string &organization);
long getPk() const;
void setPk(long pk);
std::string getUserName() const;
void setUserName(const std::string &userName);
bool getInstant() const;
void setInstant(bool instant);
std::string getToken() const;
void setToken(const std::string &token);
std::vector<std::string> getLabelSeriesList() const;
void setLabelSeriesList(const std::vector<std::string> &labelSeriesList);
private:
std::string organization_;
long pk_;
std::string userName_;
bool instant_;
std::string token_;
std::vector<std::string> labelSeriesList_;
};
} // namespace Model
} // namespace AccountLabel
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_BATCHFETCHACCOUNTLABELREQUEST_H_

View File

@@ -0,0 +1,70 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ACCOUNTLABEL_MODEL_BATCHFETCHACCOUNTLABELRESULT_H_
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_BATCHFETCHACCOUNTLABELRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/accountlabel/AccountLabelExport.h>
namespace AlibabaCloud
{
namespace AccountLabel
{
namespace Model
{
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT BatchFetchAccountLabelResult : public ServiceResult
{
public:
struct AccountLabelInfoDto
{
std::string labelSeries;
long endTime;
long kp;
long gmtModified;
std::string label;
long startTime;
std::string creator;
long gmtCreated;
};
BatchFetchAccountLabelResult();
explicit BatchFetchAccountLabelResult(const std::string &payload);
~BatchFetchAccountLabelResult();
std::string getMessage()const;
std::vector<AccountLabelInfoDto> getData()const;
long getCount()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::vector<AccountLabelInfoDto> data_;
long count_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_BATCHFETCHACCOUNTLABELRESULT_H_

View File

@@ -0,0 +1,57 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ACCOUNTLABEL_MODEL_DELETECUSTOMERLABELREQUEST_H_
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_DELETECUSTOMERLABELREQUEST_H_
#include <alibabacloud/accountlabel/AccountLabelExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AccountLabel {
namespace Model {
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT DeleteCustomerLabelRequest : public RpcServiceRequest {
public:
DeleteCustomerLabelRequest();
~DeleteCustomerLabelRequest();
std::string getLabelSeries() const;
void setLabelSeries(const std::string &labelSeries);
std::string getOrganization() const;
void setOrganization(const std::string &organization);
long getPK() const;
void setPK(long pK);
std::vector<std::string> getLabelTypes() const;
void setLabelTypes(const std::vector<std::string> &labelTypes);
std::string getUserName() const;
void setUserName(const std::string &userName);
std::string getToken() const;
void setToken(const std::string &token);
private:
std::string labelSeries_;
std::string organization_;
long pK_;
std::vector<std::string> labelTypes_;
std::string userName_;
std::string token_;
};
} // namespace Model
} // namespace AccountLabel
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_DELETECUSTOMERLABELREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ACCOUNTLABEL_MODEL_DELETECUSTOMERLABELRESULT_H_
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_DELETECUSTOMERLABELRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/accountlabel/AccountLabelExport.h>
namespace AlibabaCloud
{
namespace AccountLabel
{
namespace Model
{
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT DeleteCustomerLabelResult : public ServiceResult
{
public:
DeleteCustomerLabelResult();
explicit DeleteCustomerLabelResult(const std::string &payload);
~DeleteCustomerLabelResult();
std::string getMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_DELETECUSTOMERLABELRESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELBYCONFIGGROUPREQUEST_H_
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELBYCONFIGGROUPREQUEST_H_
#include <alibabacloud/accountlabel/AccountLabelExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AccountLabel {
namespace Model {
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT QueryCustomerLabelByConfigGroupRequest : public RpcServiceRequest {
public:
QueryCustomerLabelByConfigGroupRequest();
~QueryCustomerLabelByConfigGroupRequest();
std::string getGroupType() const;
void setGroupType(const std::string &groupType);
long getPK() const;
void setPK(long pK);
std::string getToken() const;
void setToken(const std::string &token);
private:
std::string groupType_;
long pK_;
std::string token_;
};
} // namespace Model
} // namespace AccountLabel
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELBYCONFIGGROUPREQUEST_H_

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELBYCONFIGGROUPRESULT_H_
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELBYCONFIGGROUPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/accountlabel/AccountLabelExport.h>
namespace AlibabaCloud
{
namespace AccountLabel
{
namespace Model
{
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT QueryCustomerLabelByConfigGroupResult : public ServiceResult
{
public:
struct CustomerLabel
{
std::string labelSeries;
std::string label;
};
QueryCustomerLabelByConfigGroupResult();
explicit QueryCustomerLabelByConfigGroupResult(const std::string &payload);
~QueryCustomerLabelByConfigGroupResult();
std::string getMessage()const;
std::vector<CustomerLabel> getData()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::vector<CustomerLabel> data_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELBYCONFIGGROUPRESULT_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELREQUEST_H_
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELREQUEST_H_
#include <alibabacloud/accountlabel/AccountLabelExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AccountLabel {
namespace Model {
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT QueryCustomerLabelRequest : public RpcServiceRequest {
public:
QueryCustomerLabelRequest();
~QueryCustomerLabelRequest();
std::string getLabelSeries() const;
void setLabelSeries(const std::string &labelSeries);
long getPK() const;
void setPK(long pK);
std::string getToken() const;
void setToken(const std::string &token);
bool getInstant() const;
void setInstant(bool instant);
private:
std::string labelSeries_;
long pK_;
std::string token_;
bool instant_;
};
} // namespace Model
} // namespace AccountLabel
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELREQUEST_H_

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELRESULT_H_
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/accountlabel/AccountLabelExport.h>
namespace AlibabaCloud
{
namespace AccountLabel
{
namespace Model
{
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT QueryCustomerLabelResult : public ServiceResult
{
public:
struct CustomerLabel
{
std::string labelSeries;
std::string label;
};
QueryCustomerLabelResult();
explicit QueryCustomerLabelResult(const std::string &payload);
~QueryCustomerLabelResult();
std::string getMessage()const;
std::vector<CustomerLabel> getData()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::vector<CustomerLabel> data_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELRESULT_H_

View File

@@ -0,0 +1,233 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/accountlabel/AccountLabelClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::AccountLabel;
using namespace AlibabaCloud::AccountLabel::Model;
namespace
{
const std::string SERVICE_NAME = "AccountLabel";
}
AccountLabelClient::AccountLabelClient(const Credentials &credentials, const ClientConfiguration &configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AccountLabelClient::AccountLabelClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AccountLabelClient::AccountLabelClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AccountLabelClient::~AccountLabelClient()
{}
AccountLabelClient::AddCustomerLabelOutcome AccountLabelClient::addCustomerLabel(const AddCustomerLabelRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AddCustomerLabelOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AddCustomerLabelOutcome(AddCustomerLabelResult(outcome.result()));
else
return AddCustomerLabelOutcome(outcome.error());
}
void AccountLabelClient::addCustomerLabelAsync(const AddCustomerLabelRequest& request, const AddCustomerLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, addCustomerLabel(request), context);
};
asyncExecute(new Runnable(fn));
}
AccountLabelClient::AddCustomerLabelOutcomeCallable AccountLabelClient::addCustomerLabelCallable(const AddCustomerLabelRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AddCustomerLabelOutcome()>>(
[this, request]()
{
return this->addCustomerLabel(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AccountLabelClient::BatchFetchAccountLabelOutcome AccountLabelClient::batchFetchAccountLabel(const BatchFetchAccountLabelRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return BatchFetchAccountLabelOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return BatchFetchAccountLabelOutcome(BatchFetchAccountLabelResult(outcome.result()));
else
return BatchFetchAccountLabelOutcome(outcome.error());
}
void AccountLabelClient::batchFetchAccountLabelAsync(const BatchFetchAccountLabelRequest& request, const BatchFetchAccountLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, batchFetchAccountLabel(request), context);
};
asyncExecute(new Runnable(fn));
}
AccountLabelClient::BatchFetchAccountLabelOutcomeCallable AccountLabelClient::batchFetchAccountLabelCallable(const BatchFetchAccountLabelRequest &request) const
{
auto task = std::make_shared<std::packaged_task<BatchFetchAccountLabelOutcome()>>(
[this, request]()
{
return this->batchFetchAccountLabel(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AccountLabelClient::DeleteCustomerLabelOutcome AccountLabelClient::deleteCustomerLabel(const DeleteCustomerLabelRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteCustomerLabelOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteCustomerLabelOutcome(DeleteCustomerLabelResult(outcome.result()));
else
return DeleteCustomerLabelOutcome(outcome.error());
}
void AccountLabelClient::deleteCustomerLabelAsync(const DeleteCustomerLabelRequest& request, const DeleteCustomerLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteCustomerLabel(request), context);
};
asyncExecute(new Runnable(fn));
}
AccountLabelClient::DeleteCustomerLabelOutcomeCallable AccountLabelClient::deleteCustomerLabelCallable(const DeleteCustomerLabelRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteCustomerLabelOutcome()>>(
[this, request]()
{
return this->deleteCustomerLabel(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AccountLabelClient::QueryCustomerLabelOutcome AccountLabelClient::queryCustomerLabel(const QueryCustomerLabelRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return QueryCustomerLabelOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return QueryCustomerLabelOutcome(QueryCustomerLabelResult(outcome.result()));
else
return QueryCustomerLabelOutcome(outcome.error());
}
void AccountLabelClient::queryCustomerLabelAsync(const QueryCustomerLabelRequest& request, const QueryCustomerLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, queryCustomerLabel(request), context);
};
asyncExecute(new Runnable(fn));
}
AccountLabelClient::QueryCustomerLabelOutcomeCallable AccountLabelClient::queryCustomerLabelCallable(const QueryCustomerLabelRequest &request) const
{
auto task = std::make_shared<std::packaged_task<QueryCustomerLabelOutcome()>>(
[this, request]()
{
return this->queryCustomerLabel(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AccountLabelClient::QueryCustomerLabelByConfigGroupOutcome AccountLabelClient::queryCustomerLabelByConfigGroup(const QueryCustomerLabelByConfigGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return QueryCustomerLabelByConfigGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return QueryCustomerLabelByConfigGroupOutcome(QueryCustomerLabelByConfigGroupResult(outcome.result()));
else
return QueryCustomerLabelByConfigGroupOutcome(outcome.error());
}
void AccountLabelClient::queryCustomerLabelByConfigGroupAsync(const QueryCustomerLabelByConfigGroupRequest& request, const QueryCustomerLabelByConfigGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, queryCustomerLabelByConfigGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
AccountLabelClient::QueryCustomerLabelByConfigGroupOutcomeCallable AccountLabelClient::queryCustomerLabelByConfigGroupCallable(const QueryCustomerLabelByConfigGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<QueryCustomerLabelByConfigGroupOutcome()>>(
[this, request]()
{
return this->queryCustomerLabelByConfigGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,98 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/accountlabel/model/AddCustomerLabelRequest.h>
using AlibabaCloud::AccountLabel::Model::AddCustomerLabelRequest;
AddCustomerLabelRequest::AddCustomerLabelRequest()
: RpcServiceRequest("accountlabel", "2020-03-15", "AddCustomerLabel") {
setMethod(HttpRequest::Method::Post);
}
AddCustomerLabelRequest::~AddCustomerLabelRequest() {}
std::string AddCustomerLabelRequest::getLabelSeries() const {
return labelSeries_;
}
void AddCustomerLabelRequest::setLabelSeries(const std::string &labelSeries) {
labelSeries_ = labelSeries;
setParameter(std::string("LabelSeries"), labelSeries);
}
std::string AddCustomerLabelRequest::getOrganization() const {
return organization_;
}
void AddCustomerLabelRequest::setOrganization(const std::string &organization) {
organization_ = organization;
setParameter(std::string("Organization"), organization);
}
std::string AddCustomerLabelRequest::getEndtime() const {
return endtime_;
}
void AddCustomerLabelRequest::setEndtime(const std::string &endtime) {
endtime_ = endtime;
setParameter(std::string("Endtime"), endtime);
}
long AddCustomerLabelRequest::getPK() const {
return pK_;
}
void AddCustomerLabelRequest::setPK(long pK) {
pK_ = pK;
setParameter(std::string("PK"), std::to_string(pK));
}
std::string AddCustomerLabelRequest::getStartTime() const {
return startTime_;
}
void AddCustomerLabelRequest::setStartTime(const std::string &startTime) {
startTime_ = startTime;
setParameter(std::string("StartTime"), startTime);
}
std::vector<std::string> AddCustomerLabelRequest::getLabelTypes() const {
return labelTypes_;
}
void AddCustomerLabelRequest::setLabelTypes(const std::vector<std::string> &labelTypes) {
labelTypes_ = labelTypes;
}
std::string AddCustomerLabelRequest::getUserName() const {
return userName_;
}
void AddCustomerLabelRequest::setUserName(const std::string &userName) {
userName_ = userName;
setParameter(std::string("UserName"), userName);
}
std::string AddCustomerLabelRequest::getToken() const {
return token_;
}
void AddCustomerLabelRequest::setToken(const std::string &token) {
token_ = token;
setParameter(std::string("Token"), token);
}

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/accountlabel/model/AddCustomerLabelResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AccountLabel;
using namespace AlibabaCloud::AccountLabel::Model;
AddCustomerLabelResult::AddCustomerLabelResult() :
ServiceResult()
{}
AddCustomerLabelResult::AddCustomerLabelResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AddCustomerLabelResult::~AddCustomerLabelResult()
{}
void AddCustomerLabelResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string AddCustomerLabelResult::getMessage()const
{
return message_;
}
std::string AddCustomerLabelResult::getCode()const
{
return code_;
}
bool AddCustomerLabelResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,83 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/accountlabel/model/BatchFetchAccountLabelRequest.h>
using AlibabaCloud::AccountLabel::Model::BatchFetchAccountLabelRequest;
BatchFetchAccountLabelRequest::BatchFetchAccountLabelRequest()
: RpcServiceRequest("accountlabel", "2020-03-15", "BatchFetchAccountLabel") {
setMethod(HttpRequest::Method::Post);
}
BatchFetchAccountLabelRequest::~BatchFetchAccountLabelRequest() {}
std::string BatchFetchAccountLabelRequest::getOrganization() const {
return organization_;
}
void BatchFetchAccountLabelRequest::setOrganization(const std::string &organization) {
organization_ = organization;
setParameter(std::string("Organization"), organization);
}
long BatchFetchAccountLabelRequest::getPk() const {
return pk_;
}
void BatchFetchAccountLabelRequest::setPk(long pk) {
pk_ = pk;
setParameter(std::string("Pk"), std::to_string(pk));
}
std::string BatchFetchAccountLabelRequest::getUserName() const {
return userName_;
}
void BatchFetchAccountLabelRequest::setUserName(const std::string &userName) {
userName_ = userName;
setParameter(std::string("UserName"), userName);
}
bool BatchFetchAccountLabelRequest::getInstant() const {
return instant_;
}
void BatchFetchAccountLabelRequest::setInstant(bool instant) {
instant_ = instant;
setParameter(std::string("Instant"), instant ? "true" : "false");
}
std::string BatchFetchAccountLabelRequest::getToken() const {
return token_;
}
void BatchFetchAccountLabelRequest::setToken(const std::string &token) {
token_ = token;
setParameter(std::string("Token"), token);
}
std::vector<BatchFetchAccountLabelRequest::std::string> BatchFetchAccountLabelRequest::getLabelSeriesList() const {
return labelSeriesList_;
}
void BatchFetchAccountLabelRequest::setLabelSeriesList(const std::vector<BatchFetchAccountLabelRequest::std::string> &labelSeriesList) {
labelSeriesList_ = labelSeriesList;
for(int dep1 = 0; dep1 != labelSeriesList.size(); dep1++) {
setParameter(std::string("LabelSeriesList") + "." + std::to_string(dep1 + 1), labelSeriesList[dep1]);
}
}

View File

@@ -0,0 +1,99 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/accountlabel/model/BatchFetchAccountLabelResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AccountLabel;
using namespace AlibabaCloud::AccountLabel::Model;
BatchFetchAccountLabelResult::BatchFetchAccountLabelResult() :
ServiceResult()
{}
BatchFetchAccountLabelResult::BatchFetchAccountLabelResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BatchFetchAccountLabelResult::~BatchFetchAccountLabelResult()
{}
void BatchFetchAccountLabelResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataNode = value["Data"]["AccountLabelInfoDto"];
for (auto valueDataAccountLabelInfoDto : allDataNode)
{
AccountLabelInfoDto dataObject;
if(!valueDataAccountLabelInfoDto["Creator"].isNull())
dataObject.creator = valueDataAccountLabelInfoDto["Creator"].asString();
if(!valueDataAccountLabelInfoDto["EndTime"].isNull())
dataObject.endTime = std::stol(valueDataAccountLabelInfoDto["EndTime"].asString());
if(!valueDataAccountLabelInfoDto["GmtCreated"].isNull())
dataObject.gmtCreated = std::stol(valueDataAccountLabelInfoDto["GmtCreated"].asString());
if(!valueDataAccountLabelInfoDto["GmtModified"].isNull())
dataObject.gmtModified = std::stol(valueDataAccountLabelInfoDto["GmtModified"].asString());
if(!valueDataAccountLabelInfoDto["Kp"].isNull())
dataObject.kp = std::stol(valueDataAccountLabelInfoDto["Kp"].asString());
if(!valueDataAccountLabelInfoDto["Label"].isNull())
dataObject.label = valueDataAccountLabelInfoDto["Label"].asString();
if(!valueDataAccountLabelInfoDto["LabelSeries"].isNull())
dataObject.labelSeries = valueDataAccountLabelInfoDto["LabelSeries"].asString();
if(!valueDataAccountLabelInfoDto["StartTime"].isNull())
dataObject.startTime = std::stol(valueDataAccountLabelInfoDto["StartTime"].asString());
data_.push_back(dataObject);
}
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Count"].isNull())
count_ = std::stol(value["Count"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string BatchFetchAccountLabelResult::getMessage()const
{
return message_;
}
std::vector<BatchFetchAccountLabelResult::AccountLabelInfoDto> BatchFetchAccountLabelResult::getData()const
{
return data_;
}
long BatchFetchAccountLabelResult::getCount()const
{
return count_;
}
std::string BatchFetchAccountLabelResult::getCode()const
{
return code_;
}
bool BatchFetchAccountLabelResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,80 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/accountlabel/model/DeleteCustomerLabelRequest.h>
using AlibabaCloud::AccountLabel::Model::DeleteCustomerLabelRequest;
DeleteCustomerLabelRequest::DeleteCustomerLabelRequest()
: RpcServiceRequest("accountlabel", "2020-03-15", "DeleteCustomerLabel") {
setMethod(HttpRequest::Method::Post);
}
DeleteCustomerLabelRequest::~DeleteCustomerLabelRequest() {}
std::string DeleteCustomerLabelRequest::getLabelSeries() const {
return labelSeries_;
}
void DeleteCustomerLabelRequest::setLabelSeries(const std::string &labelSeries) {
labelSeries_ = labelSeries;
setParameter(std::string("LabelSeries"), labelSeries);
}
std::string DeleteCustomerLabelRequest::getOrganization() const {
return organization_;
}
void DeleteCustomerLabelRequest::setOrganization(const std::string &organization) {
organization_ = organization;
setParameter(std::string("Organization"), organization);
}
long DeleteCustomerLabelRequest::getPK() const {
return pK_;
}
void DeleteCustomerLabelRequest::setPK(long pK) {
pK_ = pK;
setParameter(std::string("PK"), std::to_string(pK));
}
std::vector<std::string> DeleteCustomerLabelRequest::getLabelTypes() const {
return labelTypes_;
}
void DeleteCustomerLabelRequest::setLabelTypes(const std::vector<std::string> &labelTypes) {
labelTypes_ = labelTypes;
}
std::string DeleteCustomerLabelRequest::getUserName() const {
return userName_;
}
void DeleteCustomerLabelRequest::setUserName(const std::string &userName) {
userName_ = userName;
setParameter(std::string("UserName"), userName);
}
std::string DeleteCustomerLabelRequest::getToken() const {
return token_;
}
void DeleteCustomerLabelRequest::setToken(const std::string &token) {
token_ = token;
setParameter(std::string("Token"), token);
}

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/accountlabel/model/DeleteCustomerLabelResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AccountLabel;
using namespace AlibabaCloud::AccountLabel::Model;
DeleteCustomerLabelResult::DeleteCustomerLabelResult() :
ServiceResult()
{}
DeleteCustomerLabelResult::DeleteCustomerLabelResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteCustomerLabelResult::~DeleteCustomerLabelResult()
{}
void DeleteCustomerLabelResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string DeleteCustomerLabelResult::getMessage()const
{
return message_;
}
std::string DeleteCustomerLabelResult::getCode()const
{
return code_;
}
bool DeleteCustomerLabelResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/accountlabel/model/QueryCustomerLabelByConfigGroupRequest.h>
using AlibabaCloud::AccountLabel::Model::QueryCustomerLabelByConfigGroupRequest;
QueryCustomerLabelByConfigGroupRequest::QueryCustomerLabelByConfigGroupRequest()
: RpcServiceRequest("accountlabel", "2020-03-15", "QueryCustomerLabelByConfigGroup") {
setMethod(HttpRequest::Method::Post);
}
QueryCustomerLabelByConfigGroupRequest::~QueryCustomerLabelByConfigGroupRequest() {}
std::string QueryCustomerLabelByConfigGroupRequest::getGroupType() const {
return groupType_;
}
void QueryCustomerLabelByConfigGroupRequest::setGroupType(const std::string &groupType) {
groupType_ = groupType;
setParameter(std::string("GroupType"), groupType);
}
long QueryCustomerLabelByConfigGroupRequest::getPK() const {
return pK_;
}
void QueryCustomerLabelByConfigGroupRequest::setPK(long pK) {
pK_ = pK;
setParameter(std::string("PK"), std::to_string(pK));
}
std::string QueryCustomerLabelByConfigGroupRequest::getToken() const {
return token_;
}
void QueryCustomerLabelByConfigGroupRequest::setToken(const std::string &token) {
token_ = token;
setParameter(std::string("Token"), token);
}

View File

@@ -0,0 +1,80 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/accountlabel/model/QueryCustomerLabelByConfigGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AccountLabel;
using namespace AlibabaCloud::AccountLabel::Model;
QueryCustomerLabelByConfigGroupResult::QueryCustomerLabelByConfigGroupResult() :
ServiceResult()
{}
QueryCustomerLabelByConfigGroupResult::QueryCustomerLabelByConfigGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryCustomerLabelByConfigGroupResult::~QueryCustomerLabelByConfigGroupResult()
{}
void QueryCustomerLabelByConfigGroupResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataNode = value["Data"]["CustomerLabel"];
for (auto valueDataCustomerLabel : allDataNode)
{
CustomerLabel dataObject;
if(!valueDataCustomerLabel["Label"].isNull())
dataObject.label = valueDataCustomerLabel["Label"].asString();
if(!valueDataCustomerLabel["LabelSeries"].isNull())
dataObject.labelSeries = valueDataCustomerLabel["LabelSeries"].asString();
data_.push_back(dataObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string QueryCustomerLabelByConfigGroupResult::getMessage()const
{
return message_;
}
std::vector<QueryCustomerLabelByConfigGroupResult::CustomerLabel> QueryCustomerLabelByConfigGroupResult::getData()const
{
return data_;
}
std::string QueryCustomerLabelByConfigGroupResult::getCode()const
{
return code_;
}
bool QueryCustomerLabelByConfigGroupResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/accountlabel/model/QueryCustomerLabelRequest.h>
using AlibabaCloud::AccountLabel::Model::QueryCustomerLabelRequest;
QueryCustomerLabelRequest::QueryCustomerLabelRequest()
: RpcServiceRequest("accountlabel", "2020-03-15", "QueryCustomerLabel") {
setMethod(HttpRequest::Method::Post);
}
QueryCustomerLabelRequest::~QueryCustomerLabelRequest() {}
std::string QueryCustomerLabelRequest::getLabelSeries() const {
return labelSeries_;
}
void QueryCustomerLabelRequest::setLabelSeries(const std::string &labelSeries) {
labelSeries_ = labelSeries;
setParameter(std::string("LabelSeries"), labelSeries);
}
long QueryCustomerLabelRequest::getPK() const {
return pK_;
}
void QueryCustomerLabelRequest::setPK(long pK) {
pK_ = pK;
setParameter(std::string("PK"), std::to_string(pK));
}
std::string QueryCustomerLabelRequest::getToken() const {
return token_;
}
void QueryCustomerLabelRequest::setToken(const std::string &token) {
token_ = token;
setParameter(std::string("Token"), token);
}
bool QueryCustomerLabelRequest::getInstant() const {
return instant_;
}
void QueryCustomerLabelRequest::setInstant(bool instant) {
instant_ = instant;
setParameter(std::string("Instant"), instant ? "true" : "false");
}

View File

@@ -0,0 +1,80 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/accountlabel/model/QueryCustomerLabelResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AccountLabel;
using namespace AlibabaCloud::AccountLabel::Model;
QueryCustomerLabelResult::QueryCustomerLabelResult() :
ServiceResult()
{}
QueryCustomerLabelResult::QueryCustomerLabelResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryCustomerLabelResult::~QueryCustomerLabelResult()
{}
void QueryCustomerLabelResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataNode = value["Data"]["CustomerLabel"];
for (auto valueDataCustomerLabel : allDataNode)
{
CustomerLabel dataObject;
if(!valueDataCustomerLabel["Label"].isNull())
dataObject.label = valueDataCustomerLabel["Label"].asString();
if(!valueDataCustomerLabel["LabelSeries"].isNull())
dataObject.labelSeries = valueDataCustomerLabel["LabelSeries"].asString();
data_.push_back(dataObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string QueryCustomerLabelResult::getMessage()const
{
return message_;
}
std::vector<QueryCustomerLabelResult::CustomerLabel> QueryCustomerLabelResult::getData()const
{
return data_;
}
std::string QueryCustomerLabelResult::getCode()const
{
return code_;
}
bool QueryCustomerLabelResult::getSuccess()const
{
return success_;
}

110
aicontent/CMakeLists.txt Normal file
View File

@@ -0,0 +1,110 @@
#
# Copyright 2009-2017 Alibaba Cloud All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
set(aicontent_public_header
include/alibabacloud/aicontent/AiContentClient.h
include/alibabacloud/aicontent/AiContentExport.h )
set(aicontent_public_header_model
include/alibabacloud/aicontent/model/AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest.h
include/alibabacloud/aicontent/model/AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult.h
include/alibabacloud/aicontent/model/Personalizedtxt2imgAddInferenceJobRequest.h
include/alibabacloud/aicontent/model/Personalizedtxt2imgAddInferenceJobResult.h
include/alibabacloud/aicontent/model/Personalizedtxt2imgAddModelTrainJobRequest.h
include/alibabacloud/aicontent/model/Personalizedtxt2imgAddModelTrainJobResult.h
include/alibabacloud/aicontent/model/Personalizedtxt2imgQueryImageAssetRequest.h
include/alibabacloud/aicontent/model/Personalizedtxt2imgQueryImageAssetResult.h
include/alibabacloud/aicontent/model/Personalizedtxt2imgQueryInferenceJobInfoRequest.h
include/alibabacloud/aicontent/model/Personalizedtxt2imgQueryInferenceJobInfoResult.h
include/alibabacloud/aicontent/model/Personalizedtxt2imgQueryModelTrainJobListRequest.h
include/alibabacloud/aicontent/model/Personalizedtxt2imgQueryModelTrainJobListResult.h
include/alibabacloud/aicontent/model/Personalizedtxt2imgQueryModelTrainStatusRequest.h
include/alibabacloud/aicontent/model/Personalizedtxt2imgQueryModelTrainStatusResult.h )
set(aicontent_src
src/AiContentClient.cc
src/model/AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest.cc
src/model/AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult.cc
src/model/Personalizedtxt2imgAddInferenceJobRequest.cc
src/model/Personalizedtxt2imgAddInferenceJobResult.cc
src/model/Personalizedtxt2imgAddModelTrainJobRequest.cc
src/model/Personalizedtxt2imgAddModelTrainJobResult.cc
src/model/Personalizedtxt2imgQueryImageAssetRequest.cc
src/model/Personalizedtxt2imgQueryImageAssetResult.cc
src/model/Personalizedtxt2imgQueryInferenceJobInfoRequest.cc
src/model/Personalizedtxt2imgQueryInferenceJobInfoResult.cc
src/model/Personalizedtxt2imgQueryModelTrainJobListRequest.cc
src/model/Personalizedtxt2imgQueryModelTrainJobListResult.cc
src/model/Personalizedtxt2imgQueryModelTrainStatusRequest.cc
src/model/Personalizedtxt2imgQueryModelTrainStatusResult.cc )
add_library(aicontent ${LIB_TYPE}
${aicontent_public_header}
${aicontent_public_header_model}
${aicontent_src})
set_target_properties(aicontent
PROPERTIES
LINKER_LANGUAGE CXX
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}aicontent
)
if(${LIB_TYPE} STREQUAL "SHARED")
set_target_properties(aicontent
PROPERTIES
DEFINE_SYMBOL ALIBABACLOUD_AICONTENT_LIBRARY)
endif()
target_include_directories(aicontent
PRIVATE include
${CMAKE_SOURCE_DIR}/core/include
)
target_link_libraries(aicontent
core)
if(CMAKE_HOST_WIN32)
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
set(jsoncpp_install_dir ${INSTALL_DIR})
add_dependencies(aicontent
jsoncpp)
target_include_directories(aicontent
PRIVATE ${jsoncpp_install_dir}/include)
target_link_libraries(aicontent
${jsoncpp_install_dir}/lib/jsoncpp.lib)
set_target_properties(aicontent
PROPERTIES
COMPILE_OPTIONS "/bigobj")
else()
target_include_directories(aicontent
PRIVATE /usr/include/jsoncpp)
target_link_libraries(aicontent
jsoncpp)
endif()
install(FILES ${aicontent_public_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/aicontent)
install(FILES ${aicontent_public_header_model}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/aicontent/model)
install(TARGETS aicontent
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View File

@@ -0,0 +1,102 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AICONTENT_AICONTENTCLIENT_H_
#define ALIBABACLOUD_AICONTENT_AICONTENTCLIENT_H_
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RoaServiceClient.h>
#include "AiContentExport.h"
#include "model/AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest.h"
#include "model/AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult.h"
#include "model/Personalizedtxt2imgAddInferenceJobRequest.h"
#include "model/Personalizedtxt2imgAddInferenceJobResult.h"
#include "model/Personalizedtxt2imgAddModelTrainJobRequest.h"
#include "model/Personalizedtxt2imgAddModelTrainJobResult.h"
#include "model/Personalizedtxt2imgQueryImageAssetRequest.h"
#include "model/Personalizedtxt2imgQueryImageAssetResult.h"
#include "model/Personalizedtxt2imgQueryInferenceJobInfoRequest.h"
#include "model/Personalizedtxt2imgQueryInferenceJobInfoResult.h"
#include "model/Personalizedtxt2imgQueryModelTrainJobListRequest.h"
#include "model/Personalizedtxt2imgQueryModelTrainJobListResult.h"
#include "model/Personalizedtxt2imgQueryModelTrainStatusRequest.h"
#include "model/Personalizedtxt2imgQueryModelTrainStatusResult.h"
namespace AlibabaCloud
{
namespace AiContent
{
class ALIBABACLOUD_AICONTENT_EXPORT AiContentClient : public RoaServiceClient
{
public:
typedef Outcome<Error, Model::AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult> AliyunConsoleOpenApiQueryAliyunConsoleServcieListOutcome;
typedef std::future<AliyunConsoleOpenApiQueryAliyunConsoleServcieListOutcome> AliyunConsoleOpenApiQueryAliyunConsoleServcieListOutcomeCallable;
typedef std::function<void(const AiContentClient*, const Model::AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest&, const AliyunConsoleOpenApiQueryAliyunConsoleServcieListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AliyunConsoleOpenApiQueryAliyunConsoleServcieListAsyncHandler;
typedef Outcome<Error, Model::Personalizedtxt2imgAddInferenceJobResult> Personalizedtxt2imgAddInferenceJobOutcome;
typedef std::future<Personalizedtxt2imgAddInferenceJobOutcome> Personalizedtxt2imgAddInferenceJobOutcomeCallable;
typedef std::function<void(const AiContentClient*, const Model::Personalizedtxt2imgAddInferenceJobRequest&, const Personalizedtxt2imgAddInferenceJobOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> Personalizedtxt2imgAddInferenceJobAsyncHandler;
typedef Outcome<Error, Model::Personalizedtxt2imgAddModelTrainJobResult> Personalizedtxt2imgAddModelTrainJobOutcome;
typedef std::future<Personalizedtxt2imgAddModelTrainJobOutcome> Personalizedtxt2imgAddModelTrainJobOutcomeCallable;
typedef std::function<void(const AiContentClient*, const Model::Personalizedtxt2imgAddModelTrainJobRequest&, const Personalizedtxt2imgAddModelTrainJobOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> Personalizedtxt2imgAddModelTrainJobAsyncHandler;
typedef Outcome<Error, Model::Personalizedtxt2imgQueryImageAssetResult> Personalizedtxt2imgQueryImageAssetOutcome;
typedef std::future<Personalizedtxt2imgQueryImageAssetOutcome> Personalizedtxt2imgQueryImageAssetOutcomeCallable;
typedef std::function<void(const AiContentClient*, const Model::Personalizedtxt2imgQueryImageAssetRequest&, const Personalizedtxt2imgQueryImageAssetOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> Personalizedtxt2imgQueryImageAssetAsyncHandler;
typedef Outcome<Error, Model::Personalizedtxt2imgQueryInferenceJobInfoResult> Personalizedtxt2imgQueryInferenceJobInfoOutcome;
typedef std::future<Personalizedtxt2imgQueryInferenceJobInfoOutcome> Personalizedtxt2imgQueryInferenceJobInfoOutcomeCallable;
typedef std::function<void(const AiContentClient*, const Model::Personalizedtxt2imgQueryInferenceJobInfoRequest&, const Personalizedtxt2imgQueryInferenceJobInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> Personalizedtxt2imgQueryInferenceJobInfoAsyncHandler;
typedef Outcome<Error, Model::Personalizedtxt2imgQueryModelTrainJobListResult> Personalizedtxt2imgQueryModelTrainJobListOutcome;
typedef std::future<Personalizedtxt2imgQueryModelTrainJobListOutcome> Personalizedtxt2imgQueryModelTrainJobListOutcomeCallable;
typedef std::function<void(const AiContentClient*, const Model::Personalizedtxt2imgQueryModelTrainJobListRequest&, const Personalizedtxt2imgQueryModelTrainJobListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> Personalizedtxt2imgQueryModelTrainJobListAsyncHandler;
typedef Outcome<Error, Model::Personalizedtxt2imgQueryModelTrainStatusResult> Personalizedtxt2imgQueryModelTrainStatusOutcome;
typedef std::future<Personalizedtxt2imgQueryModelTrainStatusOutcome> Personalizedtxt2imgQueryModelTrainStatusOutcomeCallable;
typedef std::function<void(const AiContentClient*, const Model::Personalizedtxt2imgQueryModelTrainStatusRequest&, const Personalizedtxt2imgQueryModelTrainStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> Personalizedtxt2imgQueryModelTrainStatusAsyncHandler;
AiContentClient(const Credentials &credentials, const ClientConfiguration &configuration);
AiContentClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
AiContentClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~AiContentClient();
AliyunConsoleOpenApiQueryAliyunConsoleServcieListOutcome aliyunConsoleOpenApiQueryAliyunConsoleServcieList(const Model::AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest &request)const;
void aliyunConsoleOpenApiQueryAliyunConsoleServcieListAsync(const Model::AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest& request, const AliyunConsoleOpenApiQueryAliyunConsoleServcieListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AliyunConsoleOpenApiQueryAliyunConsoleServcieListOutcomeCallable aliyunConsoleOpenApiQueryAliyunConsoleServcieListCallable(const Model::AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest& request) const;
Personalizedtxt2imgAddInferenceJobOutcome personalizedtxt2imgAddInferenceJob(const Model::Personalizedtxt2imgAddInferenceJobRequest &request)const;
void personalizedtxt2imgAddInferenceJobAsync(const Model::Personalizedtxt2imgAddInferenceJobRequest& request, const Personalizedtxt2imgAddInferenceJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
Personalizedtxt2imgAddInferenceJobOutcomeCallable personalizedtxt2imgAddInferenceJobCallable(const Model::Personalizedtxt2imgAddInferenceJobRequest& request) const;
Personalizedtxt2imgAddModelTrainJobOutcome personalizedtxt2imgAddModelTrainJob(const Model::Personalizedtxt2imgAddModelTrainJobRequest &request)const;
void personalizedtxt2imgAddModelTrainJobAsync(const Model::Personalizedtxt2imgAddModelTrainJobRequest& request, const Personalizedtxt2imgAddModelTrainJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
Personalizedtxt2imgAddModelTrainJobOutcomeCallable personalizedtxt2imgAddModelTrainJobCallable(const Model::Personalizedtxt2imgAddModelTrainJobRequest& request) const;
Personalizedtxt2imgQueryImageAssetOutcome personalizedtxt2imgQueryImageAsset(const Model::Personalizedtxt2imgQueryImageAssetRequest &request)const;
void personalizedtxt2imgQueryImageAssetAsync(const Model::Personalizedtxt2imgQueryImageAssetRequest& request, const Personalizedtxt2imgQueryImageAssetAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
Personalizedtxt2imgQueryImageAssetOutcomeCallable personalizedtxt2imgQueryImageAssetCallable(const Model::Personalizedtxt2imgQueryImageAssetRequest& request) const;
Personalizedtxt2imgQueryInferenceJobInfoOutcome personalizedtxt2imgQueryInferenceJobInfo(const Model::Personalizedtxt2imgQueryInferenceJobInfoRequest &request)const;
void personalizedtxt2imgQueryInferenceJobInfoAsync(const Model::Personalizedtxt2imgQueryInferenceJobInfoRequest& request, const Personalizedtxt2imgQueryInferenceJobInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
Personalizedtxt2imgQueryInferenceJobInfoOutcomeCallable personalizedtxt2imgQueryInferenceJobInfoCallable(const Model::Personalizedtxt2imgQueryInferenceJobInfoRequest& request) const;
Personalizedtxt2imgQueryModelTrainJobListOutcome personalizedtxt2imgQueryModelTrainJobList(const Model::Personalizedtxt2imgQueryModelTrainJobListRequest &request)const;
void personalizedtxt2imgQueryModelTrainJobListAsync(const Model::Personalizedtxt2imgQueryModelTrainJobListRequest& request, const Personalizedtxt2imgQueryModelTrainJobListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
Personalizedtxt2imgQueryModelTrainJobListOutcomeCallable personalizedtxt2imgQueryModelTrainJobListCallable(const Model::Personalizedtxt2imgQueryModelTrainJobListRequest& request) const;
Personalizedtxt2imgQueryModelTrainStatusOutcome personalizedtxt2imgQueryModelTrainStatus(const Model::Personalizedtxt2imgQueryModelTrainStatusRequest &request)const;
void personalizedtxt2imgQueryModelTrainStatusAsync(const Model::Personalizedtxt2imgQueryModelTrainStatusRequest& request, const Personalizedtxt2imgQueryModelTrainStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
Personalizedtxt2imgQueryModelTrainStatusOutcomeCallable personalizedtxt2imgQueryModelTrainStatusCallable(const Model::Personalizedtxt2imgQueryModelTrainStatusRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_AICONTENT_AICONTENTCLIENT_H_

View File

@@ -0,0 +1,32 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AICONTENT_AICONTENTEXPORT_H_
#define ALIBABACLOUD_AICONTENT_AICONTENTEXPORT_H_
#include <alibabacloud/core/Global.h>
#if defined(ALIBABACLOUD_SHARED)
# if defined(ALIBABACLOUD_AICONTENT_LIBRARY)
# define ALIBABACLOUD_AICONTENT_EXPORT ALIBABACLOUD_DECL_EXPORT
# else
# define ALIBABACLOUD_AICONTENT_EXPORT ALIBABACLOUD_DECL_IMPORT
# endif
#else
# define ALIBABACLOUD_AICONTENT_EXPORT
#endif
#endif // !ALIBABACLOUD_AICONTENT_AICONTENTEXPORT_H_

View File

@@ -0,0 +1,39 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AICONTENT_MODEL_ALIYUNCONSOLEOPENAPIQUERYALIYUNCONSOLESERVCIELISTREQUEST_H_
#define ALIBABACLOUD_AICONTENT_MODEL_ALIYUNCONSOLEOPENAPIQUERYALIYUNCONSOLESERVCIELISTREQUEST_H_
#include <alibabacloud/aicontent/AiContentExport.h>
#include <alibabacloud/core/RoaServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AiContent {
namespace Model {
class ALIBABACLOUD_AICONTENT_EXPORT AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest : public RoaServiceRequest {
public:
AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest();
~AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest();
private:
};
} // namespace Model
} // namespace AiContent
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AICONTENT_MODEL_ALIYUNCONSOLEOPENAPIQUERYALIYUNCONSOLESERVCIELISTREQUEST_H_

View File

@@ -0,0 +1,68 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AICONTENT_MODEL_ALIYUNCONSOLEOPENAPIQUERYALIYUNCONSOLESERVCIELISTRESULT_H_
#define ALIBABACLOUD_AICONTENT_MODEL_ALIYUNCONSOLEOPENAPIQUERYALIYUNCONSOLESERVCIELISTRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aicontent/AiContentExport.h>
namespace AlibabaCloud
{
namespace AiContent
{
namespace Model
{
class ALIBABACLOUD_AICONTENT_EXPORT AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult : public ServiceResult
{
public:
struct DataItem
{
std::string serviceCode;
std::string serviceName;
int freeConcurrencyCount;
int freeCount;
};
AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult();
explicit AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult(const std::string &payload);
~AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult();
std::vector<DataItem> getdata()const;
std::string getRequestId()const;
int getHttpStatusCode()const;
std::string getErrMessage()const;
bool getSuccess()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
std::vector<DataItem> data_;
std::string requestId_;
int httpStatusCode_;
std::string errMessage_;
bool success_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_AICONTENT_MODEL_ALIYUNCONSOLEOPENAPIQUERYALIYUNCONSOLESERVCIELISTRESULT_H_

View File

@@ -0,0 +1,42 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGADDINFERENCEJOBREQUEST_H_
#define ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGADDINFERENCEJOBREQUEST_H_
#include <alibabacloud/aicontent/AiContentExport.h>
#include <alibabacloud/core/RoaServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AiContent {
namespace Model {
class ALIBABACLOUD_AICONTENT_EXPORT Personalizedtxt2imgAddInferenceJobRequest : public RoaServiceRequest {
public:
Personalizedtxt2imgAddInferenceJobRequest();
~Personalizedtxt2imgAddInferenceJobRequest();
std::string getBody() const;
void setBody(const std::string &body);
private:
std::string body_;
};
} // namespace Model
} // namespace AiContent
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGADDINFERENCEJOBREQUEST_H_

View File

@@ -0,0 +1,71 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGADDINFERENCEJOBRESULT_H_
#define ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGADDINFERENCEJOBRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aicontent/AiContentExport.h>
namespace AlibabaCloud
{
namespace AiContent
{
namespace Model
{
class ALIBABACLOUD_AICONTENT_EXPORT Personalizedtxt2imgAddInferenceJobResult : public ServiceResult
{
public:
struct Data
{
std::string jobStatus;
double jobTrainProgress;
std::string createTime;
std::string id;
std::vector<std::string> resultImageUrl;
std::string promptId;
std::string modelId;
};
Personalizedtxt2imgAddInferenceJobResult();
explicit Personalizedtxt2imgAddInferenceJobResult(const std::string &payload);
~Personalizedtxt2imgAddInferenceJobResult();
std::string getRequestId()const;
int getHttpStatusCode()const;
Data getData()const;
std::string getErrMessage()const;
bool getSuccess()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
std::string requestId_;
int httpStatusCode_;
Data data_;
std::string errMessage_;
bool success_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGADDINFERENCEJOBRESULT_H_

View File

@@ -0,0 +1,42 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGADDMODELTRAINJOBREQUEST_H_
#define ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGADDMODELTRAINJOBREQUEST_H_
#include <alibabacloud/aicontent/AiContentExport.h>
#include <alibabacloud/core/RoaServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AiContent {
namespace Model {
class ALIBABACLOUD_AICONTENT_EXPORT Personalizedtxt2imgAddModelTrainJobRequest : public RoaServiceRequest {
public:
Personalizedtxt2imgAddModelTrainJobRequest();
~Personalizedtxt2imgAddModelTrainJobRequest();
std::string getBody() const;
void setBody(const std::string &body);
private:
std::string body_;
};
} // namespace Model
} // namespace AiContent
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGADDMODELTRAINJOBREQUEST_H_

View File

@@ -0,0 +1,84 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGADDMODELTRAINJOBRESULT_H_
#define ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGADDMODELTRAINJOBRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aicontent/AiContentExport.h>
namespace AlibabaCloud
{
namespace AiContent
{
namespace Model
{
class ALIBABACLOUD_AICONTENT_EXPORT Personalizedtxt2imgAddModelTrainJobResult : public ServiceResult
{
public:
struct Data
{
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;
};
Personalizedtxt2imgAddModelTrainJobResult();
explicit Personalizedtxt2imgAddModelTrainJobResult(const std::string &payload);
~Personalizedtxt2imgAddModelTrainJobResult();
std::string getRequestId()const;
int getHttpStatusCode()const;
Data getData()const;
std::string getErrMessage()const;
bool getSuccess()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
std::string requestId_;
int httpStatusCode_;
Data data_;
std::string errMessage_;
bool success_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGADDMODELTRAINJOBRESULT_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYIMAGEASSETREQUEST_H_
#define ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYIMAGEASSETREQUEST_H_
#include <alibabacloud/aicontent/AiContentExport.h>
#include <alibabacloud/core/RoaServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AiContent {
namespace Model {
class ALIBABACLOUD_AICONTENT_EXPORT Personalizedtxt2imgQueryImageAssetRequest : public RoaServiceRequest {
public:
Personalizedtxt2imgQueryImageAssetRequest();
~Personalizedtxt2imgQueryImageAssetRequest();
std::string getImageId() const;
void setImageId(const std::string &imageId);
std::string getModelId() const;
void setModelId(const std::string &modelId);
std::string getEncodeFormat() const;
void setEncodeFormat(const std::string &encodeFormat);
std::string getPromptId() const;
void setPromptId(const std::string &promptId);
private:
std::string imageId_;
std::string modelId_;
std::string encodeFormat_;
std::string promptId_;
};
} // namespace Model
} // namespace AiContent
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYIMAGEASSETREQUEST_H_

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYIMAGEASSETRESULT_H_
#define ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYIMAGEASSETRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aicontent/AiContentExport.h>
namespace AlibabaCloud
{
namespace AiContent
{
namespace Model
{
class ALIBABACLOUD_AICONTENT_EXPORT Personalizedtxt2imgQueryImageAssetResult : public ServiceResult
{
public:
Personalizedtxt2imgQueryImageAssetResult();
explicit Personalizedtxt2imgQueryImageAssetResult(const std::string &payload);
~Personalizedtxt2imgQueryImageAssetResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYIMAGEASSETRESULT_H_

View File

@@ -0,0 +1,42 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYINFERENCEJOBINFOREQUEST_H_
#define ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYINFERENCEJOBINFOREQUEST_H_
#include <alibabacloud/aicontent/AiContentExport.h>
#include <alibabacloud/core/RoaServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AiContent {
namespace Model {
class ALIBABACLOUD_AICONTENT_EXPORT Personalizedtxt2imgQueryInferenceJobInfoRequest : public RoaServiceRequest {
public:
Personalizedtxt2imgQueryInferenceJobInfoRequest();
~Personalizedtxt2imgQueryInferenceJobInfoRequest();
std::string getInferenceJobId() const;
void setInferenceJobId(const std::string &inferenceJobId);
private:
std::string inferenceJobId_;
};
} // namespace Model
} // namespace AiContent
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYINFERENCEJOBINFOREQUEST_H_

View File

@@ -0,0 +1,71 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYINFERENCEJOBINFORESULT_H_
#define ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYINFERENCEJOBINFORESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aicontent/AiContentExport.h>
namespace AlibabaCloud
{
namespace AiContent
{
namespace Model
{
class ALIBABACLOUD_AICONTENT_EXPORT Personalizedtxt2imgQueryInferenceJobInfoResult : public ServiceResult
{
public:
struct Data
{
std::string jobStatus;
double jobTrainProgress;
std::string createTime;
std::string id;
std::vector<std::string> resultImageUrl;
std::string promptId;
std::string modelId;
};
Personalizedtxt2imgQueryInferenceJobInfoResult();
explicit Personalizedtxt2imgQueryInferenceJobInfoResult(const std::string &payload);
~Personalizedtxt2imgQueryInferenceJobInfoResult();
std::string getRequestId()const;
int getHttpStatusCode()const;
Data getData()const;
std::string getErrMessage()const;
bool getSuccess()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
std::string requestId_;
int httpStatusCode_;
Data data_;
std::string errMessage_;
bool success_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYINFERENCEJOBINFORESULT_H_

View File

@@ -0,0 +1,39 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYMODELTRAINJOBLISTREQUEST_H_
#define ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYMODELTRAINJOBLISTREQUEST_H_
#include <alibabacloud/aicontent/AiContentExport.h>
#include <alibabacloud/core/RoaServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AiContent {
namespace Model {
class ALIBABACLOUD_AICONTENT_EXPORT Personalizedtxt2imgQueryModelTrainJobListRequest : public RoaServiceRequest {
public:
Personalizedtxt2imgQueryModelTrainJobListRequest();
~Personalizedtxt2imgQueryModelTrainJobListRequest();
private:
};
} // namespace Model
} // namespace AiContent
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYMODELTRAINJOBLISTREQUEST_H_

View File

@@ -0,0 +1,84 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYMODELTRAINJOBLISTRESULT_H_
#define ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYMODELTRAINJOBLISTRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aicontent/AiContentExport.h>
namespace AlibabaCloud
{
namespace AiContent
{
namespace Model
{
class ALIBABACLOUD_AICONTENT_EXPORT Personalizedtxt2imgQueryModelTrainJobListResult : public ServiceResult
{
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;
};
Personalizedtxt2imgQueryModelTrainJobListResult();
explicit Personalizedtxt2imgQueryModelTrainJobListResult(const std::string &payload);
~Personalizedtxt2imgQueryModelTrainJobListResult();
std::vector<DataItem> getdata()const;
std::string getRequestId()const;
int getHttpStatusCode()const;
std::string getErrMessage()const;
bool getSuccess()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
std::vector<DataItem> data_;
std::string requestId_;
int httpStatusCode_;
std::string errMessage_;
bool success_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYMODELTRAINJOBLISTRESULT_H_

View File

@@ -0,0 +1,42 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYMODELTRAINSTATUSREQUEST_H_
#define ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYMODELTRAINSTATUSREQUEST_H_
#include <alibabacloud/aicontent/AiContentExport.h>
#include <alibabacloud/core/RoaServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AiContent {
namespace Model {
class ALIBABACLOUD_AICONTENT_EXPORT Personalizedtxt2imgQueryModelTrainStatusRequest : public RoaServiceRequest {
public:
Personalizedtxt2imgQueryModelTrainStatusRequest();
~Personalizedtxt2imgQueryModelTrainStatusRequest();
std::string getModelId() const;
void setModelId(const std::string &modelId);
private:
std::string modelId_;
};
} // namespace Model
} // namespace AiContent
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYMODELTRAINSTATUSREQUEST_H_

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYMODELTRAINSTATUSRESULT_H_
#define ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYMODELTRAINSTATUSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aicontent/AiContentExport.h>
namespace AlibabaCloud
{
namespace AiContent
{
namespace Model
{
class ALIBABACLOUD_AICONTENT_EXPORT Personalizedtxt2imgQueryModelTrainStatusResult : public ServiceResult
{
public:
struct Data
{
std::string modelTrainStatus;
};
Personalizedtxt2imgQueryModelTrainStatusResult();
explicit Personalizedtxt2imgQueryModelTrainStatusResult(const std::string &payload);
~Personalizedtxt2imgQueryModelTrainStatusResult();
std::string getRequestId()const;
int getHttpStatusCode()const;
Data getData()const;
std::string getErrMessage()const;
bool getSuccess()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
std::string requestId_;
int httpStatusCode_;
Data data_;
std::string errMessage_;
bool success_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_AICONTENT_MODEL_PERSONALIZEDTXT2IMGQUERYMODELTRAINSTATUSRESULT_H_

View File

@@ -0,0 +1,305 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aicontent/AiContentClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::AiContent;
using namespace AlibabaCloud::AiContent::Model;
namespace
{
const std::string SERVICE_NAME = "AiContent";
}
AiContentClient::AiContentClient(const Credentials &credentials, const ClientConfiguration &configuration) :
RoaServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AiContentClient::AiContentClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RoaServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AiContentClient::AiContentClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RoaServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AiContentClient::~AiContentClient()
{}
AiContentClient::AliyunConsoleOpenApiQueryAliyunConsoleServcieListOutcome AiContentClient::aliyunConsoleOpenApiQueryAliyunConsoleServcieList(const AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AliyunConsoleOpenApiQueryAliyunConsoleServcieListOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AliyunConsoleOpenApiQueryAliyunConsoleServcieListOutcome(AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult(outcome.result()));
else
return AliyunConsoleOpenApiQueryAliyunConsoleServcieListOutcome(outcome.error());
}
void AiContentClient::aliyunConsoleOpenApiQueryAliyunConsoleServcieListAsync(const AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest& request, const AliyunConsoleOpenApiQueryAliyunConsoleServcieListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, aliyunConsoleOpenApiQueryAliyunConsoleServcieList(request), context);
};
asyncExecute(new Runnable(fn));
}
AiContentClient::AliyunConsoleOpenApiQueryAliyunConsoleServcieListOutcomeCallable AiContentClient::aliyunConsoleOpenApiQueryAliyunConsoleServcieListCallable(const AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AliyunConsoleOpenApiQueryAliyunConsoleServcieListOutcome()>>(
[this, request]()
{
return this->aliyunConsoleOpenApiQueryAliyunConsoleServcieList(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AiContentClient::Personalizedtxt2imgAddInferenceJobOutcome AiContentClient::personalizedtxt2imgAddInferenceJob(const Personalizedtxt2imgAddInferenceJobRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return Personalizedtxt2imgAddInferenceJobOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return Personalizedtxt2imgAddInferenceJobOutcome(Personalizedtxt2imgAddInferenceJobResult(outcome.result()));
else
return Personalizedtxt2imgAddInferenceJobOutcome(outcome.error());
}
void AiContentClient::personalizedtxt2imgAddInferenceJobAsync(const Personalizedtxt2imgAddInferenceJobRequest& request, const Personalizedtxt2imgAddInferenceJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, personalizedtxt2imgAddInferenceJob(request), context);
};
asyncExecute(new Runnable(fn));
}
AiContentClient::Personalizedtxt2imgAddInferenceJobOutcomeCallable AiContentClient::personalizedtxt2imgAddInferenceJobCallable(const Personalizedtxt2imgAddInferenceJobRequest &request) const
{
auto task = std::make_shared<std::packaged_task<Personalizedtxt2imgAddInferenceJobOutcome()>>(
[this, request]()
{
return this->personalizedtxt2imgAddInferenceJob(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AiContentClient::Personalizedtxt2imgAddModelTrainJobOutcome AiContentClient::personalizedtxt2imgAddModelTrainJob(const Personalizedtxt2imgAddModelTrainJobRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return Personalizedtxt2imgAddModelTrainJobOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return Personalizedtxt2imgAddModelTrainJobOutcome(Personalizedtxt2imgAddModelTrainJobResult(outcome.result()));
else
return Personalizedtxt2imgAddModelTrainJobOutcome(outcome.error());
}
void AiContentClient::personalizedtxt2imgAddModelTrainJobAsync(const Personalizedtxt2imgAddModelTrainJobRequest& request, const Personalizedtxt2imgAddModelTrainJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, personalizedtxt2imgAddModelTrainJob(request), context);
};
asyncExecute(new Runnable(fn));
}
AiContentClient::Personalizedtxt2imgAddModelTrainJobOutcomeCallable AiContentClient::personalizedtxt2imgAddModelTrainJobCallable(const Personalizedtxt2imgAddModelTrainJobRequest &request) const
{
auto task = std::make_shared<std::packaged_task<Personalizedtxt2imgAddModelTrainJobOutcome()>>(
[this, request]()
{
return this->personalizedtxt2imgAddModelTrainJob(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AiContentClient::Personalizedtxt2imgQueryImageAssetOutcome AiContentClient::personalizedtxt2imgQueryImageAsset(const Personalizedtxt2imgQueryImageAssetRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return Personalizedtxt2imgQueryImageAssetOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return Personalizedtxt2imgQueryImageAssetOutcome(Personalizedtxt2imgQueryImageAssetResult(outcome.result()));
else
return Personalizedtxt2imgQueryImageAssetOutcome(outcome.error());
}
void AiContentClient::personalizedtxt2imgQueryImageAssetAsync(const Personalizedtxt2imgQueryImageAssetRequest& request, const Personalizedtxt2imgQueryImageAssetAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, personalizedtxt2imgQueryImageAsset(request), context);
};
asyncExecute(new Runnable(fn));
}
AiContentClient::Personalizedtxt2imgQueryImageAssetOutcomeCallable AiContentClient::personalizedtxt2imgQueryImageAssetCallable(const Personalizedtxt2imgQueryImageAssetRequest &request) const
{
auto task = std::make_shared<std::packaged_task<Personalizedtxt2imgQueryImageAssetOutcome()>>(
[this, request]()
{
return this->personalizedtxt2imgQueryImageAsset(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AiContentClient::Personalizedtxt2imgQueryInferenceJobInfoOutcome AiContentClient::personalizedtxt2imgQueryInferenceJobInfo(const Personalizedtxt2imgQueryInferenceJobInfoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return Personalizedtxt2imgQueryInferenceJobInfoOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return Personalizedtxt2imgQueryInferenceJobInfoOutcome(Personalizedtxt2imgQueryInferenceJobInfoResult(outcome.result()));
else
return Personalizedtxt2imgQueryInferenceJobInfoOutcome(outcome.error());
}
void AiContentClient::personalizedtxt2imgQueryInferenceJobInfoAsync(const Personalizedtxt2imgQueryInferenceJobInfoRequest& request, const Personalizedtxt2imgQueryInferenceJobInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, personalizedtxt2imgQueryInferenceJobInfo(request), context);
};
asyncExecute(new Runnable(fn));
}
AiContentClient::Personalizedtxt2imgQueryInferenceJobInfoOutcomeCallable AiContentClient::personalizedtxt2imgQueryInferenceJobInfoCallable(const Personalizedtxt2imgQueryInferenceJobInfoRequest &request) const
{
auto task = std::make_shared<std::packaged_task<Personalizedtxt2imgQueryInferenceJobInfoOutcome()>>(
[this, request]()
{
return this->personalizedtxt2imgQueryInferenceJobInfo(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AiContentClient::Personalizedtxt2imgQueryModelTrainJobListOutcome AiContentClient::personalizedtxt2imgQueryModelTrainJobList(const Personalizedtxt2imgQueryModelTrainJobListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return Personalizedtxt2imgQueryModelTrainJobListOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return Personalizedtxt2imgQueryModelTrainJobListOutcome(Personalizedtxt2imgQueryModelTrainJobListResult(outcome.result()));
else
return Personalizedtxt2imgQueryModelTrainJobListOutcome(outcome.error());
}
void AiContentClient::personalizedtxt2imgQueryModelTrainJobListAsync(const Personalizedtxt2imgQueryModelTrainJobListRequest& request, const Personalizedtxt2imgQueryModelTrainJobListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, personalizedtxt2imgQueryModelTrainJobList(request), context);
};
asyncExecute(new Runnable(fn));
}
AiContentClient::Personalizedtxt2imgQueryModelTrainJobListOutcomeCallable AiContentClient::personalizedtxt2imgQueryModelTrainJobListCallable(const Personalizedtxt2imgQueryModelTrainJobListRequest &request) const
{
auto task = std::make_shared<std::packaged_task<Personalizedtxt2imgQueryModelTrainJobListOutcome()>>(
[this, request]()
{
return this->personalizedtxt2imgQueryModelTrainJobList(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AiContentClient::Personalizedtxt2imgQueryModelTrainStatusOutcome AiContentClient::personalizedtxt2imgQueryModelTrainStatus(const Personalizedtxt2imgQueryModelTrainStatusRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return Personalizedtxt2imgQueryModelTrainStatusOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return Personalizedtxt2imgQueryModelTrainStatusOutcome(Personalizedtxt2imgQueryModelTrainStatusResult(outcome.result()));
else
return Personalizedtxt2imgQueryModelTrainStatusOutcome(outcome.error());
}
void AiContentClient::personalizedtxt2imgQueryModelTrainStatusAsync(const Personalizedtxt2imgQueryModelTrainStatusRequest& request, const Personalizedtxt2imgQueryModelTrainStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, personalizedtxt2imgQueryModelTrainStatus(request), context);
};
asyncExecute(new Runnable(fn));
}
AiContentClient::Personalizedtxt2imgQueryModelTrainStatusOutcomeCallable AiContentClient::personalizedtxt2imgQueryModelTrainStatusCallable(const Personalizedtxt2imgQueryModelTrainStatusRequest &request) const
{
auto task = std::make_shared<std::packaged_task<Personalizedtxt2imgQueryModelTrainStatusOutcome()>>(
[this, request]()
{
return this->personalizedtxt2imgQueryModelTrainStatus(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,28 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aicontent/model/AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest.h>
using AlibabaCloud::AiContent::Model::AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest;
AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest::AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest()
: RoaServiceRequest("aicontent", "20240611") {
setResourcePath("/api/v1/aliyunconsole/queryAliyunConsoleServcieList"};
setMethod(HttpRequest::Method::Get);
}
AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest::~AliyunConsoleOpenApiQueryAliyunConsoleServcieListRequest() {}

View File

@@ -0,0 +1,98 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aicontent/model/AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AiContent;
using namespace AlibabaCloud::AiContent::Model;
AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult::AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult() :
ServiceResult()
{}
AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult::AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult::~AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult()
{}
void AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto alldataNode = value["data"]["dataItem"];
for (auto valuedatadataItem : alldataNode)
{
DataItem dataObject;
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())
requestId_ = value["requestId"].asString();
if(!value["success"].isNull())
success_ = value["success"].asString() == "true";
if(!value["errCode"].isNull())
errCode_ = value["errCode"].asString();
if(!value["errMessage"].isNull())
errMessage_ = value["errMessage"].asString();
if(!value["httpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["httpStatusCode"].asString());
}
std::vector<AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult::DataItem> AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult::getdata()const
{
return data_;
}
std::string AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult::getRequestId()const
{
return requestId_;
}
int AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult::getErrMessage()const
{
return errMessage_;
}
bool AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult::getSuccess()const
{
return success_;
}
std::string AliyunConsoleOpenApiQueryAliyunConsoleServcieListResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,37 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aicontent/model/Personalizedtxt2imgAddInferenceJobRequest.h>
using AlibabaCloud::AiContent::Model::Personalizedtxt2imgAddInferenceJobRequest;
Personalizedtxt2imgAddInferenceJobRequest::Personalizedtxt2imgAddInferenceJobRequest()
: RoaServiceRequest("aicontent", "20240611") {
setResourcePath("/api/v1/personalizedtxt2img/addInferenceJob"};
setMethod(HttpRequest::Method::Post);
}
Personalizedtxt2imgAddInferenceJobRequest::~Personalizedtxt2imgAddInferenceJobRequest() {}
std::string Personalizedtxt2imgAddInferenceJobRequest::getBody() const {
return body_;
}
void Personalizedtxt2imgAddInferenceJobRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("body"), body);
}

View File

@@ -0,0 +1,100 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aicontent/model/Personalizedtxt2imgAddInferenceJobResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AiContent;
using namespace AlibabaCloud::AiContent::Model;
Personalizedtxt2imgAddInferenceJobResult::Personalizedtxt2imgAddInferenceJobResult() :
ServiceResult()
{}
Personalizedtxt2imgAddInferenceJobResult::Personalizedtxt2imgAddInferenceJobResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
Personalizedtxt2imgAddInferenceJobResult::~Personalizedtxt2imgAddInferenceJobResult()
{}
void Personalizedtxt2imgAddInferenceJobResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].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())
success_ = value["success"].asString() == "true";
if(!value["errCode"].isNull())
errCode_ = value["errCode"].asString();
if(!value["errMessage"].isNull())
errMessage_ = value["errMessage"].asString();
if(!value["httpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["httpStatusCode"].asString());
}
std::string Personalizedtxt2imgAddInferenceJobResult::getRequestId()const
{
return requestId_;
}
int Personalizedtxt2imgAddInferenceJobResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
Personalizedtxt2imgAddInferenceJobResult::Data Personalizedtxt2imgAddInferenceJobResult::getData()const
{
return data_;
}
std::string Personalizedtxt2imgAddInferenceJobResult::getErrMessage()const
{
return errMessage_;
}
bool Personalizedtxt2imgAddInferenceJobResult::getSuccess()const
{
return success_;
}
std::string Personalizedtxt2imgAddInferenceJobResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,37 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aicontent/model/Personalizedtxt2imgAddModelTrainJobRequest.h>
using AlibabaCloud::AiContent::Model::Personalizedtxt2imgAddModelTrainJobRequest;
Personalizedtxt2imgAddModelTrainJobRequest::Personalizedtxt2imgAddModelTrainJobRequest()
: RoaServiceRequest("aicontent", "20240611") {
setResourcePath("/api/v1/personalizedtxt2img/addModelTrainJob"};
setMethod(HttpRequest::Method::Post);
}
Personalizedtxt2imgAddModelTrainJobRequest::~Personalizedtxt2imgAddModelTrainJobRequest() {}
std::string Personalizedtxt2imgAddModelTrainJobRequest::getBody() const {
return body_;
}
void Personalizedtxt2imgAddModelTrainJobRequest::setBody(const std::string &body) {
body_ = body;
setBodyParameter(std::string("body"), body);
}

View File

@@ -0,0 +1,125 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aicontent/model/Personalizedtxt2imgAddModelTrainJobResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AiContent;
using namespace AlibabaCloud::AiContent::Model;
Personalizedtxt2imgAddModelTrainJobResult::Personalizedtxt2imgAddModelTrainJobResult() :
ServiceResult()
{}
Personalizedtxt2imgAddModelTrainJobResult::Personalizedtxt2imgAddModelTrainJobResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
Personalizedtxt2imgAddModelTrainJobResult::~Personalizedtxt2imgAddModelTrainJobResult()
{}
void Personalizedtxt2imgAddModelTrainJobResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].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())
success_ = value["success"].asString() == "true";
if(!value["errCode"].isNull())
errCode_ = value["errCode"].asString();
if(!value["errMessage"].isNull())
errMessage_ = value["errMessage"].asString();
if(!value["httpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["httpStatusCode"].asString());
}
std::string Personalizedtxt2imgAddModelTrainJobResult::getRequestId()const
{
return requestId_;
}
int Personalizedtxt2imgAddModelTrainJobResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
Personalizedtxt2imgAddModelTrainJobResult::Data Personalizedtxt2imgAddModelTrainJobResult::getData()const
{
return data_;
}
std::string Personalizedtxt2imgAddModelTrainJobResult::getErrMessage()const
{
return errMessage_;
}
bool Personalizedtxt2imgAddModelTrainJobResult::getSuccess()const
{
return success_;
}
std::string Personalizedtxt2imgAddModelTrainJobResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,64 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aicontent/model/Personalizedtxt2imgQueryImageAssetRequest.h>
using AlibabaCloud::AiContent::Model::Personalizedtxt2imgQueryImageAssetRequest;
Personalizedtxt2imgQueryImageAssetRequest::Personalizedtxt2imgQueryImageAssetRequest()
: RoaServiceRequest("aicontent", "20240611") {
setResourcePath("/api/v1/personalizedtxt2img/queryImageAsset"};
setMethod(HttpRequest::Method::Get);
}
Personalizedtxt2imgQueryImageAssetRequest::~Personalizedtxt2imgQueryImageAssetRequest() {}
std::string Personalizedtxt2imgQueryImageAssetRequest::getImageId() const {
return imageId_;
}
void Personalizedtxt2imgQueryImageAssetRequest::setImageId(const std::string &imageId) {
imageId_ = imageId;
setParameter(std::string("imageId"), imageId);
}
std::string Personalizedtxt2imgQueryImageAssetRequest::getModelId() const {
return modelId_;
}
void Personalizedtxt2imgQueryImageAssetRequest::setModelId(const std::string &modelId) {
modelId_ = modelId;
setParameter(std::string("modelId"), modelId);
}
std::string Personalizedtxt2imgQueryImageAssetRequest::getEncodeFormat() const {
return encodeFormat_;
}
void Personalizedtxt2imgQueryImageAssetRequest::setEncodeFormat(const std::string &encodeFormat) {
encodeFormat_ = encodeFormat;
setParameter(std::string("encodeFormat"), encodeFormat);
}
std::string Personalizedtxt2imgQueryImageAssetRequest::getPromptId() const {
return promptId_;
}
void Personalizedtxt2imgQueryImageAssetRequest::setPromptId(const std::string &promptId) {
promptId_ = promptId;
setParameter(std::string("promptId"), promptId);
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aicontent/model/Personalizedtxt2imgQueryImageAssetResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AiContent;
using namespace AlibabaCloud::AiContent::Model;
Personalizedtxt2imgQueryImageAssetResult::Personalizedtxt2imgQueryImageAssetResult() :
ServiceResult()
{}
Personalizedtxt2imgQueryImageAssetResult::Personalizedtxt2imgQueryImageAssetResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
Personalizedtxt2imgQueryImageAssetResult::~Personalizedtxt2imgQueryImageAssetResult()
{}
void Personalizedtxt2imgQueryImageAssetResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,37 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aicontent/model/Personalizedtxt2imgQueryInferenceJobInfoRequest.h>
using AlibabaCloud::AiContent::Model::Personalizedtxt2imgQueryInferenceJobInfoRequest;
Personalizedtxt2imgQueryInferenceJobInfoRequest::Personalizedtxt2imgQueryInferenceJobInfoRequest()
: RoaServiceRequest("aicontent", "20240611") {
setResourcePath("/api/v1/personalizedtxt2img/queryInferenceJobInfo"};
setMethod(HttpRequest::Method::Get);
}
Personalizedtxt2imgQueryInferenceJobInfoRequest::~Personalizedtxt2imgQueryInferenceJobInfoRequest() {}
std::string Personalizedtxt2imgQueryInferenceJobInfoRequest::getInferenceJobId() const {
return inferenceJobId_;
}
void Personalizedtxt2imgQueryInferenceJobInfoRequest::setInferenceJobId(const std::string &inferenceJobId) {
inferenceJobId_ = inferenceJobId;
setParameter(std::string("inferenceJobId"), inferenceJobId);
}

View File

@@ -0,0 +1,100 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aicontent/model/Personalizedtxt2imgQueryInferenceJobInfoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AiContent;
using namespace AlibabaCloud::AiContent::Model;
Personalizedtxt2imgQueryInferenceJobInfoResult::Personalizedtxt2imgQueryInferenceJobInfoResult() :
ServiceResult()
{}
Personalizedtxt2imgQueryInferenceJobInfoResult::Personalizedtxt2imgQueryInferenceJobInfoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
Personalizedtxt2imgQueryInferenceJobInfoResult::~Personalizedtxt2imgQueryInferenceJobInfoResult()
{}
void Personalizedtxt2imgQueryInferenceJobInfoResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].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())
success_ = value["success"].asString() == "true";
if(!value["errCode"].isNull())
errCode_ = value["errCode"].asString();
if(!value["errMessage"].isNull())
errMessage_ = value["errMessage"].asString();
if(!value["httpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["httpStatusCode"].asString());
}
std::string Personalizedtxt2imgQueryInferenceJobInfoResult::getRequestId()const
{
return requestId_;
}
int Personalizedtxt2imgQueryInferenceJobInfoResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
Personalizedtxt2imgQueryInferenceJobInfoResult::Data Personalizedtxt2imgQueryInferenceJobInfoResult::getData()const
{
return data_;
}
std::string Personalizedtxt2imgQueryInferenceJobInfoResult::getErrMessage()const
{
return errMessage_;
}
bool Personalizedtxt2imgQueryInferenceJobInfoResult::getSuccess()const
{
return success_;
}
std::string Personalizedtxt2imgQueryInferenceJobInfoResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,28 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aicontent/model/Personalizedtxt2imgQueryModelTrainJobListRequest.h>
using AlibabaCloud::AiContent::Model::Personalizedtxt2imgQueryModelTrainJobListRequest;
Personalizedtxt2imgQueryModelTrainJobListRequest::Personalizedtxt2imgQueryModelTrainJobListRequest()
: RoaServiceRequest("aicontent", "20240611") {
setResourcePath("/api/v1/personalizedtxt2img/queryModelTrainJobList"};
setMethod(HttpRequest::Method::Get);
}
Personalizedtxt2imgQueryModelTrainJobListRequest::~Personalizedtxt2imgQueryModelTrainJobListRequest() {}

View File

@@ -0,0 +1,130 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aicontent/model/Personalizedtxt2imgQueryModelTrainJobListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AiContent;
using namespace AlibabaCloud::AiContent::Model;
Personalizedtxt2imgQueryModelTrainJobListResult::Personalizedtxt2imgQueryModelTrainJobListResult() :
ServiceResult()
{}
Personalizedtxt2imgQueryModelTrainJobListResult::Personalizedtxt2imgQueryModelTrainJobListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
Personalizedtxt2imgQueryModelTrainJobListResult::~Personalizedtxt2imgQueryModelTrainJobListResult()
{}
void Personalizedtxt2imgQueryModelTrainJobListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto alldataNode = value["data"]["dataItem"];
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());
data_.push_back(dataObject);
}
if(!value["requestId"].isNull())
requestId_ = value["requestId"].asString();
if(!value["success"].isNull())
success_ = value["success"].asString() == "true";
if(!value["errCode"].isNull())
errCode_ = value["errCode"].asString();
if(!value["errMessage"].isNull())
errMessage_ = value["errMessage"].asString();
if(!value["httpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["httpStatusCode"].asString());
}
std::vector<Personalizedtxt2imgQueryModelTrainJobListResult::DataItem> Personalizedtxt2imgQueryModelTrainJobListResult::getdata()const
{
return data_;
}
std::string Personalizedtxt2imgQueryModelTrainJobListResult::getRequestId()const
{
return requestId_;
}
int Personalizedtxt2imgQueryModelTrainJobListResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
std::string Personalizedtxt2imgQueryModelTrainJobListResult::getErrMessage()const
{
return errMessage_;
}
bool Personalizedtxt2imgQueryModelTrainJobListResult::getSuccess()const
{
return success_;
}
std::string Personalizedtxt2imgQueryModelTrainJobListResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,37 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aicontent/model/Personalizedtxt2imgQueryModelTrainStatusRequest.h>
using AlibabaCloud::AiContent::Model::Personalizedtxt2imgQueryModelTrainStatusRequest;
Personalizedtxt2imgQueryModelTrainStatusRequest::Personalizedtxt2imgQueryModelTrainStatusRequest()
: RoaServiceRequest("aicontent", "20240611") {
setResourcePath("/api/v1/personalizedtxt2img/queryModelTrainStatus"};
setMethod(HttpRequest::Method::Get);
}
Personalizedtxt2imgQueryModelTrainStatusRequest::~Personalizedtxt2imgQueryModelTrainStatusRequest() {}
std::string Personalizedtxt2imgQueryModelTrainStatusRequest::getModelId() const {
return modelId_;
}
void Personalizedtxt2imgQueryModelTrainStatusRequest::setModelId(const std::string &modelId) {
modelId_ = modelId;
setParameter(std::string("modelId"), modelId);
}

View File

@@ -0,0 +1,87 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aicontent/model/Personalizedtxt2imgQueryModelTrainStatusResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AiContent;
using namespace AlibabaCloud::AiContent::Model;
Personalizedtxt2imgQueryModelTrainStatusResult::Personalizedtxt2imgQueryModelTrainStatusResult() :
ServiceResult()
{}
Personalizedtxt2imgQueryModelTrainStatusResult::Personalizedtxt2imgQueryModelTrainStatusResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
Personalizedtxt2imgQueryModelTrainStatusResult::~Personalizedtxt2imgQueryModelTrainStatusResult()
{}
void Personalizedtxt2imgQueryModelTrainStatusResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["data"];
if(!dataNode["modelTrainStatus"].isNull())
data_.modelTrainStatus = dataNode["modelTrainStatus"].asString();
if(!value["requestId"].isNull())
requestId_ = value["requestId"].asString();
if(!value["success"].isNull())
success_ = value["success"].asString() == "true";
if(!value["errCode"].isNull())
errCode_ = value["errCode"].asString();
if(!value["errMessage"].isNull())
errMessage_ = value["errMessage"].asString();
if(!value["httpStatusCode"].isNull())
httpStatusCode_ = std::stoi(value["httpStatusCode"].asString());
}
std::string Personalizedtxt2imgQueryModelTrainStatusResult::getRequestId()const
{
return requestId_;
}
int Personalizedtxt2imgQueryModelTrainStatusResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
Personalizedtxt2imgQueryModelTrainStatusResult::Data Personalizedtxt2imgQueryModelTrainStatusResult::getData()const
{
return data_;
}
std::string Personalizedtxt2imgQueryModelTrainStatusResult::getErrMessage()const
{
return errMessage_;
}
bool Personalizedtxt2imgQueryModelTrainStatusResult::getSuccess()const
{
return success_;
}
std::string Personalizedtxt2imgQueryModelTrainStatusResult::getErrCode()const
{
return errCode_;
}

102
aimath/CMakeLists.txt Normal file
View File

@@ -0,0 +1,102 @@
#
# Copyright 2009-2017 Alibaba Cloud All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
set(aimath_public_header
include/alibabacloud/aimath/AIMathClient.h
include/alibabacloud/aimath/AIMathExport.h )
set(aimath_public_header_model
include/alibabacloud/aimath/model/GenAnalysisRequest.h
include/alibabacloud/aimath/model/GenAnalysisResult.h
include/alibabacloud/aimath/model/GenStepRequest.h
include/alibabacloud/aimath/model/GenStepResult.h
include/alibabacloud/aimath/model/GlobalConfirmRequest.h
include/alibabacloud/aimath/model/GlobalConfirmResult.h
include/alibabacloud/aimath/model/UpdateAnalysisRequest.h
include/alibabacloud/aimath/model/UpdateAnalysisResult.h
include/alibabacloud/aimath/model/UpdateStepRequest.h
include/alibabacloud/aimath/model/UpdateStepResult.h )
set(aimath_src
src/AIMathClient.cc
src/model/GenAnalysisRequest.cc
src/model/GenAnalysisResult.cc
src/model/GenStepRequest.cc
src/model/GenStepResult.cc
src/model/GlobalConfirmRequest.cc
src/model/GlobalConfirmResult.cc
src/model/UpdateAnalysisRequest.cc
src/model/UpdateAnalysisResult.cc
src/model/UpdateStepRequest.cc
src/model/UpdateStepResult.cc )
add_library(aimath ${LIB_TYPE}
${aimath_public_header}
${aimath_public_header_model}
${aimath_src})
set_target_properties(aimath
PROPERTIES
LINKER_LANGUAGE CXX
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}aimath
)
if(${LIB_TYPE} STREQUAL "SHARED")
set_target_properties(aimath
PROPERTIES
DEFINE_SYMBOL ALIBABACLOUD_AIMATH_LIBRARY)
endif()
target_include_directories(aimath
PRIVATE include
${CMAKE_SOURCE_DIR}/core/include
)
target_link_libraries(aimath
core)
if(CMAKE_HOST_WIN32)
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
set(jsoncpp_install_dir ${INSTALL_DIR})
add_dependencies(aimath
jsoncpp)
target_include_directories(aimath
PRIVATE ${jsoncpp_install_dir}/include)
target_link_libraries(aimath
${jsoncpp_install_dir}/lib/jsoncpp.lib)
set_target_properties(aimath
PROPERTIES
COMPILE_OPTIONS "/bigobj")
else()
target_include_directories(aimath
PRIVATE /usr/include/jsoncpp)
target_link_libraries(aimath
jsoncpp)
endif()
install(FILES ${aimath_public_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/aimath)
install(FILES ${aimath_public_header_model}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/aimath/model)
install(TARGETS aimath
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View File

@@ -0,0 +1,86 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_AIMATHCLIENT_H_
#define ALIBABACLOUD_AIMATH_AIMATHCLIENT_H_
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include "AIMathExport.h"
#include "model/GenAnalysisRequest.h"
#include "model/GenAnalysisResult.h"
#include "model/GenStepRequest.h"
#include "model/GenStepResult.h"
#include "model/GlobalConfirmRequest.h"
#include "model/GlobalConfirmResult.h"
#include "model/UpdateAnalysisRequest.h"
#include "model/UpdateAnalysisResult.h"
#include "model/UpdateStepRequest.h"
#include "model/UpdateStepResult.h"
namespace AlibabaCloud
{
namespace AIMath
{
class ALIBABACLOUD_AIMATH_EXPORT AIMathClient : public RpcServiceClient
{
public:
typedef Outcome<Error, Model::GenAnalysisResult> GenAnalysisOutcome;
typedef std::future<GenAnalysisOutcome> GenAnalysisOutcomeCallable;
typedef std::function<void(const AIMathClient*, const Model::GenAnalysisRequest&, const GenAnalysisOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GenAnalysisAsyncHandler;
typedef Outcome<Error, Model::GenStepResult> GenStepOutcome;
typedef std::future<GenStepOutcome> GenStepOutcomeCallable;
typedef std::function<void(const AIMathClient*, const Model::GenStepRequest&, const GenStepOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GenStepAsyncHandler;
typedef Outcome<Error, Model::GlobalConfirmResult> GlobalConfirmOutcome;
typedef std::future<GlobalConfirmOutcome> GlobalConfirmOutcomeCallable;
typedef std::function<void(const AIMathClient*, const Model::GlobalConfirmRequest&, const GlobalConfirmOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GlobalConfirmAsyncHandler;
typedef Outcome<Error, Model::UpdateAnalysisResult> UpdateAnalysisOutcome;
typedef std::future<UpdateAnalysisOutcome> UpdateAnalysisOutcomeCallable;
typedef std::function<void(const AIMathClient*, const Model::UpdateAnalysisRequest&, const UpdateAnalysisOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateAnalysisAsyncHandler;
typedef Outcome<Error, Model::UpdateStepResult> UpdateStepOutcome;
typedef std::future<UpdateStepOutcome> UpdateStepOutcomeCallable;
typedef std::function<void(const AIMathClient*, const Model::UpdateStepRequest&, const UpdateStepOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateStepAsyncHandler;
AIMathClient(const Credentials &credentials, const ClientConfiguration &configuration);
AIMathClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
AIMathClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~AIMathClient();
GenAnalysisOutcome genAnalysis(const Model::GenAnalysisRequest &request)const;
void genAnalysisAsync(const Model::GenAnalysisRequest& request, const GenAnalysisAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GenAnalysisOutcomeCallable genAnalysisCallable(const Model::GenAnalysisRequest& request) const;
GenStepOutcome genStep(const Model::GenStepRequest &request)const;
void genStepAsync(const Model::GenStepRequest& request, const GenStepAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GenStepOutcomeCallable genStepCallable(const Model::GenStepRequest& request) const;
GlobalConfirmOutcome globalConfirm(const Model::GlobalConfirmRequest &request)const;
void globalConfirmAsync(const Model::GlobalConfirmRequest& request, const GlobalConfirmAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GlobalConfirmOutcomeCallable globalConfirmCallable(const Model::GlobalConfirmRequest& request) const;
UpdateAnalysisOutcome updateAnalysis(const Model::UpdateAnalysisRequest &request)const;
void updateAnalysisAsync(const Model::UpdateAnalysisRequest& request, const UpdateAnalysisAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpdateAnalysisOutcomeCallable updateAnalysisCallable(const Model::UpdateAnalysisRequest& request) const;
UpdateStepOutcome updateStep(const Model::UpdateStepRequest &request)const;
void updateStepAsync(const Model::UpdateStepRequest& request, const UpdateStepAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpdateStepOutcomeCallable updateStepCallable(const Model::UpdateStepRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_AIMATH_AIMATHCLIENT_H_

View File

@@ -0,0 +1,32 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_AIMATHEXPORT_H_
#define ALIBABACLOUD_AIMATH_AIMATHEXPORT_H_
#include <alibabacloud/core/Global.h>
#if defined(ALIBABACLOUD_SHARED)
# if defined(ALIBABACLOUD_AIMATH_LIBRARY)
# define ALIBABACLOUD_AIMATH_EXPORT ALIBABACLOUD_DECL_EXPORT
# else
# define ALIBABACLOUD_AIMATH_EXPORT ALIBABACLOUD_DECL_IMPORT
# endif
#else
# define ALIBABACLOUD_AIMATH_EXPORT
#endif
#endif // !ALIBABACLOUD_AIMATH_AIMATHEXPORT_H_

View File

@@ -0,0 +1,42 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_GENANALYSISREQUEST_H_
#define ALIBABACLOUD_AIMATH_MODEL_GENANALYSISREQUEST_H_
#include <alibabacloud/aimath/AIMathExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AIMath {
namespace Model {
class ALIBABACLOUD_AIMATH_EXPORT GenAnalysisRequest : public RpcServiceRequest {
public:
GenAnalysisRequest();
~GenAnalysisRequest();
std::string getExerciseContent() const;
void setExerciseContent(const std::string &exerciseContent);
private:
std::string exerciseContent_;
};
} // namespace Model
} // namespace AIMath
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AIMATH_MODEL_GENANALYSISREQUEST_H_

View File

@@ -0,0 +1,57 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_GENANALYSISRESULT_H_
#define ALIBABACLOUD_AIMATH_MODEL_GENANALYSISRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aimath/AIMathExport.h>
namespace AlibabaCloud
{
namespace AIMath
{
namespace Model
{
class ALIBABACLOUD_AIMATH_EXPORT GenAnalysisResult : public ServiceResult
{
public:
GenAnalysisResult();
explicit GenAnalysisResult(const std::string &payload);
~GenAnalysisResult();
std::string getEventType()const;
std::string getErrMsg()const;
std::string getContent()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
std::string eventType_;
std::string errMsg_;
std::string content_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_AIMATH_MODEL_GENANALYSISRESULT_H_

View File

@@ -0,0 +1,42 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_GENSTEPREQUEST_H_
#define ALIBABACLOUD_AIMATH_MODEL_GENSTEPREQUEST_H_
#include <alibabacloud/aimath/AIMathExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AIMath {
namespace Model {
class ALIBABACLOUD_AIMATH_EXPORT GenStepRequest : public RpcServiceRequest {
public:
GenStepRequest();
~GenStepRequest();
std::string getExerciseCode() const;
void setExerciseCode(const std::string &exerciseCode);
private:
std::string exerciseCode_;
};
} // namespace Model
} // namespace AIMath
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AIMATH_MODEL_GENSTEPREQUEST_H_

View File

@@ -0,0 +1,57 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_GENSTEPRESULT_H_
#define ALIBABACLOUD_AIMATH_MODEL_GENSTEPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aimath/AIMathExport.h>
namespace AlibabaCloud
{
namespace AIMath
{
namespace Model
{
class ALIBABACLOUD_AIMATH_EXPORT GenStepResult : public ServiceResult
{
public:
GenStepResult();
explicit GenStepResult(const std::string &payload);
~GenStepResult();
std::string getEventType()const;
std::string getErrMsg()const;
std::string getContent()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
std::string eventType_;
std::string errMsg_;
std::string content_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_AIMATH_MODEL_GENSTEPRESULT_H_

View File

@@ -0,0 +1,45 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMREQUEST_H_
#define ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMREQUEST_H_
#include <alibabacloud/aimath/AIMathExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AIMath {
namespace Model {
class ALIBABACLOUD_AIMATH_EXPORT GlobalConfirmRequest : public RpcServiceRequest {
public:
GlobalConfirmRequest();
~GlobalConfirmRequest();
std::string getTag() const;
void setTag(const std::string &tag);
std::string getExerciseCode() const;
void setExerciseCode(const std::string &exerciseCode);
private:
std::string tag_;
std::string exerciseCode_;
};
} // namespace Model
} // namespace AIMath
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMRESULT_H_
#define ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aimath/AIMathExport.h>
namespace AlibabaCloud
{
namespace AIMath
{
namespace Model
{
class ALIBABACLOUD_AIMATH_EXPORT GlobalConfirmResult : public ServiceResult
{
public:
GlobalConfirmResult();
explicit GlobalConfirmResult(const std::string &payload);
~GlobalConfirmResult();
std::string getErrMsg()const;
bool getSuccess()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
std::string errMsg_;
bool success_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_AIMATH_MODEL_GLOBALCONFIRMRESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISREQUEST_H_
#define ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISREQUEST_H_
#include <alibabacloud/aimath/AIMathExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AIMath {
namespace Model {
class ALIBABACLOUD_AIMATH_EXPORT UpdateAnalysisRequest : public RpcServiceRequest {
public:
UpdateAnalysisRequest();
~UpdateAnalysisRequest();
std::string getContent() const;
void setContent(const std::string &content);
std::string getContentCode() const;
void setContentCode(const std::string &contentCode);
std::string getExerciseCode() const;
void setExerciseCode(const std::string &exerciseCode);
private:
std::string content_;
std::string contentCode_;
std::string exerciseCode_;
};
} // namespace Model
} // namespace AIMath
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISRESULT_H_
#define ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aimath/AIMathExport.h>
namespace AlibabaCloud
{
namespace AIMath
{
namespace Model
{
class ALIBABACLOUD_AIMATH_EXPORT UpdateAnalysisResult : public ServiceResult
{
public:
UpdateAnalysisResult();
explicit UpdateAnalysisResult(const std::string &payload);
~UpdateAnalysisResult();
std::string getErrMsg()const;
bool getSuccess()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
std::string errMsg_;
bool success_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_AIMATH_MODEL_UPDATEANALYSISRESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPREQUEST_H_
#define ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPREQUEST_H_
#include <alibabacloud/aimath/AIMathExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AIMath {
namespace Model {
class ALIBABACLOUD_AIMATH_EXPORT UpdateStepRequest : public RpcServiceRequest {
public:
UpdateStepRequest();
~UpdateStepRequest();
std::string getContent() const;
void setContent(const std::string &content);
std::string getContentCode() const;
void setContentCode(const std::string &contentCode);
std::string getExerciseCode() const;
void setExerciseCode(const std::string &exerciseCode);
private:
std::string content_;
std::string contentCode_;
std::string exerciseCode_;
};
} // namespace Model
} // namespace AIMath
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPRESULT_H_
#define ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aimath/AIMathExport.h>
namespace AlibabaCloud
{
namespace AIMath
{
namespace Model
{
class ALIBABACLOUD_AIMATH_EXPORT UpdateStepResult : public ServiceResult
{
public:
UpdateStepResult();
explicit UpdateStepResult(const std::string &payload);
~UpdateStepResult();
std::string getErrMsg()const;
bool getSuccess()const;
std::string getErrCode()const;
protected:
void parse(const std::string &payload);
private:
std::string errMsg_;
bool success_;
std::string errCode_;
};
}
}
}
#endif // !ALIBABACLOUD_AIMATH_MODEL_UPDATESTEPRESULT_H_

233
aimath/src/AIMathClient.cc Normal file
View File

@@ -0,0 +1,233 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/AIMathClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::AIMath;
using namespace AlibabaCloud::AIMath::Model;
namespace
{
const std::string SERVICE_NAME = "AIMath";
}
AIMathClient::AIMathClient(const Credentials &credentials, const ClientConfiguration &configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AIMathClient::AIMathClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AIMathClient::AIMathClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AIMathClient::~AIMathClient()
{}
AIMathClient::GenAnalysisOutcome AIMathClient::genAnalysis(const GenAnalysisRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GenAnalysisOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GenAnalysisOutcome(GenAnalysisResult(outcome.result()));
else
return GenAnalysisOutcome(outcome.error());
}
void AIMathClient::genAnalysisAsync(const GenAnalysisRequest& request, const GenAnalysisAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, genAnalysis(request), context);
};
asyncExecute(new Runnable(fn));
}
AIMathClient::GenAnalysisOutcomeCallable AIMathClient::genAnalysisCallable(const GenAnalysisRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GenAnalysisOutcome()>>(
[this, request]()
{
return this->genAnalysis(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AIMathClient::GenStepOutcome AIMathClient::genStep(const GenStepRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GenStepOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GenStepOutcome(GenStepResult(outcome.result()));
else
return GenStepOutcome(outcome.error());
}
void AIMathClient::genStepAsync(const GenStepRequest& request, const GenStepAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, genStep(request), context);
};
asyncExecute(new Runnable(fn));
}
AIMathClient::GenStepOutcomeCallable AIMathClient::genStepCallable(const GenStepRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GenStepOutcome()>>(
[this, request]()
{
return this->genStep(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AIMathClient::GlobalConfirmOutcome AIMathClient::globalConfirm(const GlobalConfirmRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GlobalConfirmOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GlobalConfirmOutcome(GlobalConfirmResult(outcome.result()));
else
return GlobalConfirmOutcome(outcome.error());
}
void AIMathClient::globalConfirmAsync(const GlobalConfirmRequest& request, const GlobalConfirmAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, globalConfirm(request), context);
};
asyncExecute(new Runnable(fn));
}
AIMathClient::GlobalConfirmOutcomeCallable AIMathClient::globalConfirmCallable(const GlobalConfirmRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GlobalConfirmOutcome()>>(
[this, request]()
{
return this->globalConfirm(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AIMathClient::UpdateAnalysisOutcome AIMathClient::updateAnalysis(const UpdateAnalysisRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateAnalysisOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateAnalysisOutcome(UpdateAnalysisResult(outcome.result()));
else
return UpdateAnalysisOutcome(outcome.error());
}
void AIMathClient::updateAnalysisAsync(const UpdateAnalysisRequest& request, const UpdateAnalysisAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateAnalysis(request), context);
};
asyncExecute(new Runnable(fn));
}
AIMathClient::UpdateAnalysisOutcomeCallable AIMathClient::updateAnalysisCallable(const UpdateAnalysisRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateAnalysisOutcome()>>(
[this, request]()
{
return this->updateAnalysis(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AIMathClient::UpdateStepOutcome AIMathClient::updateStep(const UpdateStepRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateStepOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateStepOutcome(UpdateStepResult(outcome.result()));
else
return UpdateStepOutcome(outcome.error());
}
void AIMathClient::updateStepAsync(const UpdateStepRequest& request, const UpdateStepAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateStep(request), context);
};
asyncExecute(new Runnable(fn));
}
AIMathClient::UpdateStepOutcomeCallable AIMathClient::updateStepCallable(const UpdateStepRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateStepOutcome()>>(
[this, request]()
{
return this->updateStep(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,36 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/GenAnalysisRequest.h>
using AlibabaCloud::AIMath::Model::GenAnalysisRequest;
GenAnalysisRequest::GenAnalysisRequest()
: RpcServiceRequest("aimath", "2024-11-14", "GenAnalysis") {
setMethod(HttpRequest::Method::Post);
}
GenAnalysisRequest::~GenAnalysisRequest() {}
std::string GenAnalysisRequest::getExerciseContent() const {
return exerciseContent_;
}
void GenAnalysisRequest::setExerciseContent(const std::string &exerciseContent) {
exerciseContent_ = exerciseContent;
setBodyParameter(std::string("ExerciseContent"), exerciseContent);
}

View File

@@ -0,0 +1,72 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/GenAnalysisResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AIMath;
using namespace AlibabaCloud::AIMath::Model;
GenAnalysisResult::GenAnalysisResult() :
ServiceResult()
{}
GenAnalysisResult::GenAnalysisResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GenAnalysisResult::~GenAnalysisResult()
{}
void GenAnalysisResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["EventType"].isNull())
eventType_ = value["EventType"].asString();
if(!value["Content"].isNull())
content_ = value["Content"].asString();
if(!value["ErrCode"].isNull())
errCode_ = value["ErrCode"].asString();
if(!value["ErrMsg"].isNull())
errMsg_ = value["ErrMsg"].asString();
}
std::string GenAnalysisResult::getEventType()const
{
return eventType_;
}
std::string GenAnalysisResult::getErrMsg()const
{
return errMsg_;
}
std::string GenAnalysisResult::getContent()const
{
return content_;
}
std::string GenAnalysisResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,36 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/GenStepRequest.h>
using AlibabaCloud::AIMath::Model::GenStepRequest;
GenStepRequest::GenStepRequest()
: RpcServiceRequest("aimath", "2024-11-14", "GenStep") {
setMethod(HttpRequest::Method::Post);
}
GenStepRequest::~GenStepRequest() {}
std::string GenStepRequest::getExerciseCode() const {
return exerciseCode_;
}
void GenStepRequest::setExerciseCode(const std::string &exerciseCode) {
exerciseCode_ = exerciseCode;
setBodyParameter(std::string("ExerciseCode"), exerciseCode);
}

View File

@@ -0,0 +1,72 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/GenStepResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AIMath;
using namespace AlibabaCloud::AIMath::Model;
GenStepResult::GenStepResult() :
ServiceResult()
{}
GenStepResult::GenStepResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GenStepResult::~GenStepResult()
{}
void GenStepResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["EventType"].isNull())
eventType_ = value["EventType"].asString();
if(!value["Content"].isNull())
content_ = value["Content"].asString();
if(!value["ErrCode"].isNull())
errCode_ = value["ErrCode"].asString();
if(!value["ErrMsg"].isNull())
errMsg_ = value["ErrMsg"].asString();
}
std::string GenStepResult::getEventType()const
{
return eventType_;
}
std::string GenStepResult::getErrMsg()const
{
return errMsg_;
}
std::string GenStepResult::getContent()const
{
return content_;
}
std::string GenStepResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,45 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/GlobalConfirmRequest.h>
using AlibabaCloud::AIMath::Model::GlobalConfirmRequest;
GlobalConfirmRequest::GlobalConfirmRequest()
: RpcServiceRequest("aimath", "2024-11-14", "GlobalConfirm") {
setMethod(HttpRequest::Method::Post);
}
GlobalConfirmRequest::~GlobalConfirmRequest() {}
std::string GlobalConfirmRequest::getTag() const {
return tag_;
}
void GlobalConfirmRequest::setTag(const std::string &tag) {
tag_ = tag;
setBodyParameter(std::string("Tag"), tag);
}
std::string GlobalConfirmRequest::getExerciseCode() const {
return exerciseCode_;
}
void GlobalConfirmRequest::setExerciseCode(const std::string &exerciseCode) {
exerciseCode_ = exerciseCode;
setBodyParameter(std::string("ExerciseCode"), exerciseCode);
}

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/GlobalConfirmResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AIMath;
using namespace AlibabaCloud::AIMath::Model;
GlobalConfirmResult::GlobalConfirmResult() :
ServiceResult()
{}
GlobalConfirmResult::GlobalConfirmResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GlobalConfirmResult::~GlobalConfirmResult()
{}
void GlobalConfirmResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrCode"].isNull())
errCode_ = value["ErrCode"].asString();
if(!value["ErrMsg"].isNull())
errMsg_ = value["ErrMsg"].asString();
}
std::string GlobalConfirmResult::getErrMsg()const
{
return errMsg_;
}
bool GlobalConfirmResult::getSuccess()const
{
return success_;
}
std::string GlobalConfirmResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/UpdateAnalysisRequest.h>
using AlibabaCloud::AIMath::Model::UpdateAnalysisRequest;
UpdateAnalysisRequest::UpdateAnalysisRequest()
: RpcServiceRequest("aimath", "2024-11-14", "UpdateAnalysis") {
setMethod(HttpRequest::Method::Post);
}
UpdateAnalysisRequest::~UpdateAnalysisRequest() {}
std::string UpdateAnalysisRequest::getContent() const {
return content_;
}
void UpdateAnalysisRequest::setContent(const std::string &content) {
content_ = content;
setBodyParameter(std::string("Content"), content);
}
std::string UpdateAnalysisRequest::getContentCode() const {
return contentCode_;
}
void UpdateAnalysisRequest::setContentCode(const std::string &contentCode) {
contentCode_ = contentCode;
setBodyParameter(std::string("ContentCode"), contentCode);
}
std::string UpdateAnalysisRequest::getExerciseCode() const {
return exerciseCode_;
}
void UpdateAnalysisRequest::setExerciseCode(const std::string &exerciseCode) {
exerciseCode_ = exerciseCode;
setBodyParameter(std::string("ExerciseCode"), exerciseCode);
}

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/UpdateAnalysisResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AIMath;
using namespace AlibabaCloud::AIMath::Model;
UpdateAnalysisResult::UpdateAnalysisResult() :
ServiceResult()
{}
UpdateAnalysisResult::UpdateAnalysisResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateAnalysisResult::~UpdateAnalysisResult()
{}
void UpdateAnalysisResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrCode"].isNull())
errCode_ = value["ErrCode"].asString();
if(!value["ErrMsg"].isNull())
errMsg_ = value["ErrMsg"].asString();
}
std::string UpdateAnalysisResult::getErrMsg()const
{
return errMsg_;
}
bool UpdateAnalysisResult::getSuccess()const
{
return success_;
}
std::string UpdateAnalysisResult::getErrCode()const
{
return errCode_;
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/UpdateStepRequest.h>
using AlibabaCloud::AIMath::Model::UpdateStepRequest;
UpdateStepRequest::UpdateStepRequest()
: RpcServiceRequest("aimath", "2024-11-14", "UpdateStep") {
setMethod(HttpRequest::Method::Post);
}
UpdateStepRequest::~UpdateStepRequest() {}
std::string UpdateStepRequest::getContent() const {
return content_;
}
void UpdateStepRequest::setContent(const std::string &content) {
content_ = content;
setBodyParameter(std::string("Content"), content);
}
std::string UpdateStepRequest::getContentCode() const {
return contentCode_;
}
void UpdateStepRequest::setContentCode(const std::string &contentCode) {
contentCode_ = contentCode;
setBodyParameter(std::string("ContentCode"), contentCode);
}
std::string UpdateStepRequest::getExerciseCode() const {
return exerciseCode_;
}
void UpdateStepRequest::setExerciseCode(const std::string &exerciseCode) {
exerciseCode_ = exerciseCode;
setBodyParameter(std::string("ExerciseCode"), exerciseCode);
}

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aimath/model/UpdateStepResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AIMath;
using namespace AlibabaCloud::AIMath::Model;
UpdateStepResult::UpdateStepResult() :
ServiceResult()
{}
UpdateStepResult::UpdateStepResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateStepResult::~UpdateStepResult()
{}
void UpdateStepResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrCode"].isNull())
errCode_ = value["ErrCode"].asString();
if(!value["ErrMsg"].isNull())
errMsg_ = value["ErrMsg"].asString();
}
std::string UpdateStepResult::getErrMsg()const
{
return errMsg_;
}
bool UpdateStepResult::getSuccess()const
{
return success_;
}
std::string UpdateStepResult::getErrCode()const
{
return errCode_;
}

90
aipodcast/CMakeLists.txt Normal file
View File

@@ -0,0 +1,90 @@
#
# Copyright 2009-2017 Alibaba Cloud All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
set(aipodcast_public_header
include/alibabacloud/aipodcast/AIPodcastClient.h
include/alibabacloud/aipodcast/AIPodcastExport.h )
set(aipodcast_public_header_model
include/alibabacloud/aipodcast/model/PodcastTaskResultQueryRequest.h
include/alibabacloud/aipodcast/model/PodcastTaskResultQueryResult.h
include/alibabacloud/aipodcast/model/PodcastTaskSubmitRequest.h
include/alibabacloud/aipodcast/model/PodcastTaskSubmitResult.h )
set(aipodcast_src
src/AIPodcastClient.cc
src/model/PodcastTaskResultQueryRequest.cc
src/model/PodcastTaskResultQueryResult.cc
src/model/PodcastTaskSubmitRequest.cc
src/model/PodcastTaskSubmitResult.cc )
add_library(aipodcast ${LIB_TYPE}
${aipodcast_public_header}
${aipodcast_public_header_model}
${aipodcast_src})
set_target_properties(aipodcast
PROPERTIES
LINKER_LANGUAGE CXX
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}aipodcast
)
if(${LIB_TYPE} STREQUAL "SHARED")
set_target_properties(aipodcast
PROPERTIES
DEFINE_SYMBOL ALIBABACLOUD_AIPODCAST_LIBRARY)
endif()
target_include_directories(aipodcast
PRIVATE include
${CMAKE_SOURCE_DIR}/core/include
)
target_link_libraries(aipodcast
core)
if(CMAKE_HOST_WIN32)
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
set(jsoncpp_install_dir ${INSTALL_DIR})
add_dependencies(aipodcast
jsoncpp)
target_include_directories(aipodcast
PRIVATE ${jsoncpp_install_dir}/include)
target_link_libraries(aipodcast
${jsoncpp_install_dir}/lib/jsoncpp.lib)
set_target_properties(aipodcast
PROPERTIES
COMPILE_OPTIONS "/bigobj")
else()
target_include_directories(aipodcast
PRIVATE /usr/include/jsoncpp)
target_link_libraries(aipodcast
jsoncpp)
endif()
install(FILES ${aipodcast_public_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/aipodcast)
install(FILES ${aipodcast_public_header_model}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/aipodcast/model)
install(TARGETS aipodcast
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIPODCAST_AIPODCASTCLIENT_H_
#define ALIBABACLOUD_AIPODCAST_AIPODCASTCLIENT_H_
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RoaServiceClient.h>
#include "AIPodcastExport.h"
#include "model/PodcastTaskResultQueryRequest.h"
#include "model/PodcastTaskResultQueryResult.h"
#include "model/PodcastTaskSubmitRequest.h"
#include "model/PodcastTaskSubmitResult.h"
namespace AlibabaCloud
{
namespace AIPodcast
{
class ALIBABACLOUD_AIPODCAST_EXPORT AIPodcastClient : public RoaServiceClient
{
public:
typedef Outcome<Error, Model::PodcastTaskResultQueryResult> PodcastTaskResultQueryOutcome;
typedef std::future<PodcastTaskResultQueryOutcome> PodcastTaskResultQueryOutcomeCallable;
typedef std::function<void(const AIPodcastClient*, const Model::PodcastTaskResultQueryRequest&, const PodcastTaskResultQueryOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> PodcastTaskResultQueryAsyncHandler;
typedef Outcome<Error, Model::PodcastTaskSubmitResult> PodcastTaskSubmitOutcome;
typedef std::future<PodcastTaskSubmitOutcome> PodcastTaskSubmitOutcomeCallable;
typedef std::function<void(const AIPodcastClient*, const Model::PodcastTaskSubmitRequest&, const PodcastTaskSubmitOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> PodcastTaskSubmitAsyncHandler;
AIPodcastClient(const Credentials &credentials, const ClientConfiguration &configuration);
AIPodcastClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
AIPodcastClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~AIPodcastClient();
PodcastTaskResultQueryOutcome podcastTaskResultQuery(const Model::PodcastTaskResultQueryRequest &request)const;
void podcastTaskResultQueryAsync(const Model::PodcastTaskResultQueryRequest& request, const PodcastTaskResultQueryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
PodcastTaskResultQueryOutcomeCallable podcastTaskResultQueryCallable(const Model::PodcastTaskResultQueryRequest& request) const;
PodcastTaskSubmitOutcome podcastTaskSubmit(const Model::PodcastTaskSubmitRequest &request)const;
void podcastTaskSubmitAsync(const Model::PodcastTaskSubmitRequest& request, const PodcastTaskSubmitAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
PodcastTaskSubmitOutcomeCallable podcastTaskSubmitCallable(const Model::PodcastTaskSubmitRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_AIPODCAST_AIPODCASTCLIENT_H_

View File

@@ -0,0 +1,32 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIPODCAST_AIPODCASTEXPORT_H_
#define ALIBABACLOUD_AIPODCAST_AIPODCASTEXPORT_H_
#include <alibabacloud/core/Global.h>
#if defined(ALIBABACLOUD_SHARED)
# if defined(ALIBABACLOUD_AIPODCAST_LIBRARY)
# define ALIBABACLOUD_AIPODCAST_EXPORT ALIBABACLOUD_DECL_EXPORT
# else
# define ALIBABACLOUD_AIPODCAST_EXPORT ALIBABACLOUD_DECL_IMPORT
# endif
#else
# define ALIBABACLOUD_AIPODCAST_EXPORT
#endif
#endif // !ALIBABACLOUD_AIPODCAST_AIPODCASTEXPORT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKRESULTQUERYREQUEST_H_
#define ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKRESULTQUERYREQUEST_H_
#include <alibabacloud/aipodcast/AIPodcastExport.h>
#include <alibabacloud/core/RoaServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AIPodcast {
namespace Model {
class ALIBABACLOUD_AIPODCAST_EXPORT PodcastTaskResultQueryRequest : public RoaServiceRequest {
public:
PodcastTaskResultQueryRequest();
~PodcastTaskResultQueryRequest();
std::string getAppId() const;
void setAppId(const std::string &appId);
std::string getTaskId() const;
void setTaskId(const std::string &taskId);
std::string getWorkspaceId() const;
void setWorkspaceId(const std::string &workspaceId);
private:
std::string appId_;
std::string taskId_;
std::string workspaceId_;
};
} // namespace Model
} // namespace AIPodcast
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKRESULTQUERYREQUEST_H_

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKRESULTQUERYRESULT_H_
#define ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKRESULTQUERYRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aipodcast/AIPodcastExport.h>
namespace AlibabaCloud
{
namespace AIPodcast
{
namespace Model
{
class ALIBABACLOUD_AIPODCAST_EXPORT PodcastTaskResultQueryResult : public ServiceResult
{
public:
PodcastTaskResultQueryResult();
explicit PodcastTaskResultQueryResult(const std::string &payload);
~PodcastTaskResultQueryResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKRESULTQUERYRESULT_H_

View File

@@ -0,0 +1,69 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKSUBMITREQUEST_H_
#define ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKSUBMITREQUEST_H_
#include <alibabacloud/aipodcast/AIPodcastExport.h>
#include <alibabacloud/core/RoaServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace AIPodcast {
namespace Model {
class ALIBABACLOUD_AIPODCAST_EXPORT PodcastTaskSubmitRequest : public RoaServiceRequest {
public:
PodcastTaskSubmitRequest();
~PodcastTaskSubmitRequest();
std::string getAtmosphere() const;
void setAtmosphere(const std::string &atmosphere);
std::string getSourceLang() const;
void setSourceLang(const std::string &sourceLang);
int getCounts() const;
void setCounts(int counts);
std::vector<std::string> getFileUrls() const;
void setFileUrls(const std::vector<std::string> &fileUrls);
std::string getText() const;
void setText(const std::string &text);
std::vector<std::string> getVoices() const;
void setVoices(const std::vector<std::string> &voices);
std::string getAppId() const;
void setAppId(const std::string &appId);
std::string getTopic() const;
void setTopic(const std::string &topic);
std::string getStyle() const;
void setStyle(const std::string &style);
std::string getWorkspaceId() const;
void setWorkspaceId(const std::string &workspaceId);
private:
std::string atmosphere_;
std::string sourceLang_;
int counts_;
std::vector<std::string> fileUrls_;
std::string text_;
std::vector<std::string> voices_;
std::string appId_;
std::string topic_;
std::string style_;
std::string workspaceId_;
};
} // namespace Model
} // namespace AIPodcast
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKSUBMITREQUEST_H_

View File

@@ -0,0 +1,66 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKSUBMITRESULT_H_
#define ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKSUBMITRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/aipodcast/AIPodcastExport.h>
namespace AlibabaCloud
{
namespace AIPodcast
{
namespace Model
{
class ALIBABACLOUD_AIPODCAST_EXPORT PodcastTaskSubmitResult : public ServiceResult
{
public:
struct Data
{
std::string taskId;
std::string taskStatus;
};
PodcastTaskSubmitResult();
explicit PodcastTaskSubmitResult(const std::string &payload);
~PodcastTaskSubmitResult();
std::string getMessage()const;
std::string getRequestId()const;
std::string getHttpStatusCode()const;
Data getData()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::string requestId_;
std::string httpStatusCode_;
Data data_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_AIPODCAST_MODEL_PODCASTTASKSUBMITRESULT_H_

View File

@@ -0,0 +1,125 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aipodcast/AIPodcastClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::AIPodcast;
using namespace AlibabaCloud::AIPodcast::Model;
namespace
{
const std::string SERVICE_NAME = "AIPodcast";
}
AIPodcastClient::AIPodcastClient(const Credentials &credentials, const ClientConfiguration &configuration) :
RoaServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AIPodcastClient::AIPodcastClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RoaServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AIPodcastClient::AIPodcastClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RoaServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
AIPodcastClient::~AIPodcastClient()
{}
AIPodcastClient::PodcastTaskResultQueryOutcome AIPodcastClient::podcastTaskResultQuery(const PodcastTaskResultQueryRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return PodcastTaskResultQueryOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return PodcastTaskResultQueryOutcome(PodcastTaskResultQueryResult(outcome.result()));
else
return PodcastTaskResultQueryOutcome(outcome.error());
}
void AIPodcastClient::podcastTaskResultQueryAsync(const PodcastTaskResultQueryRequest& request, const PodcastTaskResultQueryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, podcastTaskResultQuery(request), context);
};
asyncExecute(new Runnable(fn));
}
AIPodcastClient::PodcastTaskResultQueryOutcomeCallable AIPodcastClient::podcastTaskResultQueryCallable(const PodcastTaskResultQueryRequest &request) const
{
auto task = std::make_shared<std::packaged_task<PodcastTaskResultQueryOutcome()>>(
[this, request]()
{
return this->podcastTaskResultQuery(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AIPodcastClient::PodcastTaskSubmitOutcome AIPodcastClient::podcastTaskSubmit(const PodcastTaskSubmitRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return PodcastTaskSubmitOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return PodcastTaskSubmitOutcome(PodcastTaskSubmitResult(outcome.result()));
else
return PodcastTaskSubmitOutcome(outcome.error());
}
void AIPodcastClient::podcastTaskSubmitAsync(const PodcastTaskSubmitRequest& request, const PodcastTaskSubmitAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, podcastTaskSubmit(request), context);
};
asyncExecute(new Runnable(fn));
}
AIPodcastClient::PodcastTaskSubmitOutcomeCallable AIPodcastClient::podcastTaskSubmitCallable(const PodcastTaskSubmitRequest &request) const
{
auto task = std::make_shared<std::packaged_task<PodcastTaskSubmitOutcome()>>(
[this, request]()
{
return this->podcastTaskSubmit(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aipodcast/model/PodcastTaskResultQueryRequest.h>
using AlibabaCloud::AIPodcast::Model::PodcastTaskResultQueryRequest;
PodcastTaskResultQueryRequest::PodcastTaskResultQueryRequest()
: RoaServiceRequest("aipodcast", "2025-02-28") {
setResourcePath("/podcast/task"};
setMethod(HttpRequest::Method::Post);
}
PodcastTaskResultQueryRequest::~PodcastTaskResultQueryRequest() {}
std::string PodcastTaskResultQueryRequest::getAppId() const {
return appId_;
}
void PodcastTaskResultQueryRequest::setAppId(const std::string &appId) {
appId_ = appId;
setBodyParameter(std::string("appId"), appId);
}
std::string PodcastTaskResultQueryRequest::getTaskId() const {
return taskId_;
}
void PodcastTaskResultQueryRequest::setTaskId(const std::string &taskId) {
taskId_ = taskId;
setBodyParameter(std::string("taskId"), taskId);
}
std::string PodcastTaskResultQueryRequest::getWorkspaceId() const {
return workspaceId_;
}
void PodcastTaskResultQueryRequest::setWorkspaceId(const std::string &workspaceId) {
workspaceId_ = workspaceId;
setBodyParameter(std::string("workspaceId"), workspaceId);
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aipodcast/model/PodcastTaskResultQueryResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AIPodcast;
using namespace AlibabaCloud::AIPodcast::Model;
PodcastTaskResultQueryResult::PodcastTaskResultQueryResult() :
ServiceResult()
{}
PodcastTaskResultQueryResult::PodcastTaskResultQueryResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
PodcastTaskResultQueryResult::~PodcastTaskResultQueryResult()
{}
void PodcastTaskResultQueryResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,122 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aipodcast/model/PodcastTaskSubmitRequest.h>
using AlibabaCloud::AIPodcast::Model::PodcastTaskSubmitRequest;
PodcastTaskSubmitRequest::PodcastTaskSubmitRequest()
: RoaServiceRequest("aipodcast", "2025-02-28") {
setResourcePath("/podcast/task/submit"};
setMethod(HttpRequest::Method::Post);
}
PodcastTaskSubmitRequest::~PodcastTaskSubmitRequest() {}
std::string PodcastTaskSubmitRequest::getAtmosphere() const {
return atmosphere_;
}
void PodcastTaskSubmitRequest::setAtmosphere(const std::string &atmosphere) {
atmosphere_ = atmosphere;
setBodyParameter(std::string("atmosphere"), atmosphere);
}
std::string PodcastTaskSubmitRequest::getSourceLang() const {
return sourceLang_;
}
void PodcastTaskSubmitRequest::setSourceLang(const std::string &sourceLang) {
sourceLang_ = sourceLang;
setBodyParameter(std::string("sourceLang"), sourceLang);
}
int PodcastTaskSubmitRequest::getCounts() const {
return counts_;
}
void PodcastTaskSubmitRequest::setCounts(int counts) {
counts_ = counts;
setBodyParameter(std::string("counts"), std::to_string(counts));
}
std::vector<PodcastTaskSubmitRequest::std::string> PodcastTaskSubmitRequest::getFileUrls() const {
return fileUrls_;
}
void PodcastTaskSubmitRequest::setFileUrls(const std::vector<PodcastTaskSubmitRequest::std::string> &fileUrls) {
fileUrls_ = fileUrls;
for(int dep1 = 0; dep1 != fileUrls.size(); dep1++) {
setBodyParameter(std::string("fileUrls") + "." + std::to_string(dep1 + 1), fileUrls[dep1]);
}
}
std::string PodcastTaskSubmitRequest::getText() const {
return text_;
}
void PodcastTaskSubmitRequest::setText(const std::string &text) {
text_ = text;
setBodyParameter(std::string("text"), text);
}
std::vector<PodcastTaskSubmitRequest::std::string> PodcastTaskSubmitRequest::getVoices() const {
return voices_;
}
void PodcastTaskSubmitRequest::setVoices(const std::vector<PodcastTaskSubmitRequest::std::string> &voices) {
voices_ = voices;
for(int dep1 = 0; dep1 != voices.size(); dep1++) {
setBodyParameter(std::string("voices") + "." + std::to_string(dep1 + 1), voices[dep1]);
}
}
std::string PodcastTaskSubmitRequest::getAppId() const {
return appId_;
}
void PodcastTaskSubmitRequest::setAppId(const std::string &appId) {
appId_ = appId;
setBodyParameter(std::string("appId"), appId);
}
std::string PodcastTaskSubmitRequest::getTopic() const {
return topic_;
}
void PodcastTaskSubmitRequest::setTopic(const std::string &topic) {
topic_ = topic;
setBodyParameter(std::string("topic"), topic);
}
std::string PodcastTaskSubmitRequest::getStyle() const {
return style_;
}
void PodcastTaskSubmitRequest::setStyle(const std::string &style) {
style_ = style;
setBodyParameter(std::string("style"), style);
}
std::string PodcastTaskSubmitRequest::getWorkspaceId() const {
return workspaceId_;
}
void PodcastTaskSubmitRequest::setWorkspaceId(const std::string &workspaceId) {
workspaceId_ = workspaceId;
setBodyParameter(std::string("workspaceId"), workspaceId);
}

View File

@@ -0,0 +1,89 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/aipodcast/model/PodcastTaskSubmitResult.h>
#include <json/json.h>
using namespace AlibabaCloud::AIPodcast;
using namespace AlibabaCloud::AIPodcast::Model;
PodcastTaskSubmitResult::PodcastTaskSubmitResult() :
ServiceResult()
{}
PodcastTaskSubmitResult::PodcastTaskSubmitResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
PodcastTaskSubmitResult::~PodcastTaskSubmitResult()
{}
void PodcastTaskSubmitResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["data"];
if(!dataNode["taskId"].isNull())
data_.taskId = dataNode["taskId"].asString();
if(!dataNode["taskStatus"].isNull())
data_.taskStatus = dataNode["taskStatus"].asString();
if(!value["code"].isNull())
code_ = value["code"].asString();
if(!value["message"].isNull())
message_ = value["message"].asString();
if(!value["requestId"].isNull())
requestId_ = value["requestId"].asString();
if(!value["success"].isNull())
success_ = value["success"].asString() == "true";
if(!value["httpStatusCode"].isNull())
httpStatusCode_ = value["httpStatusCode"].asString();
}
std::string PodcastTaskSubmitResult::getMessage()const
{
return message_;
}
std::string PodcastTaskSubmitResult::getRequestId()const
{
return requestId_;
}
std::string PodcastTaskSubmitResult::getHttpStatusCode()const
{
return httpStatusCode_;
}
PodcastTaskSubmitResult::Data PodcastTaskSubmitResult::getData()const
{
return data_;
}
std::string PodcastTaskSubmitResult::getCode()const
{
return code_;
}
bool PodcastTaskSubmitResult::getSuccess()const
{
return success_;
}

View File

@@ -33,6 +33,8 @@ set(alb_public_header_model
include/alibabacloud/alb/model/AssociateAdditionalCertificatesWithListenerResult.h
include/alibabacloud/alb/model/AttachCommonBandwidthPackageToLoadBalancerRequest.h
include/alibabacloud/alb/model/AttachCommonBandwidthPackageToLoadBalancerResult.h
include/alibabacloud/alb/model/CancelShiftLoadBalancerZonesRequest.h
include/alibabacloud/alb/model/CancelShiftLoadBalancerZonesResult.h
include/alibabacloud/alb/model/CreateAScriptsRequest.h
include/alibabacloud/alb/model/CreateAScriptsResult.h
include/alibabacloud/alb/model/CreateAclRequest.h
@@ -135,6 +137,10 @@ set(alb_public_header_model
include/alibabacloud/alb/model/ListTagResourcesResult.h
include/alibabacloud/alb/model/ListTagValuesRequest.h
include/alibabacloud/alb/model/ListTagValuesResult.h
include/alibabacloud/alb/model/LoadBalancerJoinSecurityGroupRequest.h
include/alibabacloud/alb/model/LoadBalancerJoinSecurityGroupResult.h
include/alibabacloud/alb/model/LoadBalancerLeaveSecurityGroupRequest.h
include/alibabacloud/alb/model/LoadBalancerLeaveSecurityGroupResult.h
include/alibabacloud/alb/model/MoveResourceGroupRequest.h
include/alibabacloud/alb/model/MoveResourceGroupResult.h
include/alibabacloud/alb/model/RemoveEntriesFromAclRequest.h
@@ -145,6 +151,8 @@ set(alb_public_header_model
include/alibabacloud/alb/model/ReplaceServersInServerGroupResult.h
include/alibabacloud/alb/model/StartListenerRequest.h
include/alibabacloud/alb/model/StartListenerResult.h
include/alibabacloud/alb/model/StartShiftLoadBalancerZonesRequest.h
include/alibabacloud/alb/model/StartShiftLoadBalancerZonesResult.h
include/alibabacloud/alb/model/StopListenerRequest.h
include/alibabacloud/alb/model/StopListenerResult.h
include/alibabacloud/alb/model/TagResourcesRequest.h
@@ -194,6 +202,8 @@ set(alb_src
src/model/AssociateAdditionalCertificatesWithListenerResult.cc
src/model/AttachCommonBandwidthPackageToLoadBalancerRequest.cc
src/model/AttachCommonBandwidthPackageToLoadBalancerResult.cc
src/model/CancelShiftLoadBalancerZonesRequest.cc
src/model/CancelShiftLoadBalancerZonesResult.cc
src/model/CreateAScriptsRequest.cc
src/model/CreateAScriptsResult.cc
src/model/CreateAclRequest.cc
@@ -296,6 +306,10 @@ set(alb_src
src/model/ListTagResourcesResult.cc
src/model/ListTagValuesRequest.cc
src/model/ListTagValuesResult.cc
src/model/LoadBalancerJoinSecurityGroupRequest.cc
src/model/LoadBalancerJoinSecurityGroupResult.cc
src/model/LoadBalancerLeaveSecurityGroupRequest.cc
src/model/LoadBalancerLeaveSecurityGroupResult.cc
src/model/MoveResourceGroupRequest.cc
src/model/MoveResourceGroupResult.cc
src/model/RemoveEntriesFromAclRequest.cc
@@ -306,6 +320,8 @@ set(alb_src
src/model/ReplaceServersInServerGroupResult.cc
src/model/StartListenerRequest.cc
src/model/StartListenerResult.cc
src/model/StartShiftLoadBalancerZonesRequest.cc
src/model/StartShiftLoadBalancerZonesResult.cc
src/model/StopListenerRequest.cc
src/model/StopListenerResult.cc
src/model/TagResourcesRequest.cc

View File

@@ -34,6 +34,8 @@
#include "model/AssociateAdditionalCertificatesWithListenerResult.h"
#include "model/AttachCommonBandwidthPackageToLoadBalancerRequest.h"
#include "model/AttachCommonBandwidthPackageToLoadBalancerResult.h"
#include "model/CancelShiftLoadBalancerZonesRequest.h"
#include "model/CancelShiftLoadBalancerZonesResult.h"
#include "model/CreateAScriptsRequest.h"
#include "model/CreateAScriptsResult.h"
#include "model/CreateAclRequest.h"
@@ -136,6 +138,10 @@
#include "model/ListTagResourcesResult.h"
#include "model/ListTagValuesRequest.h"
#include "model/ListTagValuesResult.h"
#include "model/LoadBalancerJoinSecurityGroupRequest.h"
#include "model/LoadBalancerJoinSecurityGroupResult.h"
#include "model/LoadBalancerLeaveSecurityGroupRequest.h"
#include "model/LoadBalancerLeaveSecurityGroupResult.h"
#include "model/MoveResourceGroupRequest.h"
#include "model/MoveResourceGroupResult.h"
#include "model/RemoveEntriesFromAclRequest.h"
@@ -146,6 +152,8 @@
#include "model/ReplaceServersInServerGroupResult.h"
#include "model/StartListenerRequest.h"
#include "model/StartListenerResult.h"
#include "model/StartShiftLoadBalancerZonesRequest.h"
#include "model/StartShiftLoadBalancerZonesResult.h"
#include "model/StopListenerRequest.h"
#include "model/StopListenerResult.h"
#include "model/TagResourcesRequest.h"
@@ -207,6 +215,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::AttachCommonBandwidthPackageToLoadBalancerResult> AttachCommonBandwidthPackageToLoadBalancerOutcome;
typedef std::future<AttachCommonBandwidthPackageToLoadBalancerOutcome> AttachCommonBandwidthPackageToLoadBalancerOutcomeCallable;
typedef std::function<void(const AlbClient*, const Model::AttachCommonBandwidthPackageToLoadBalancerRequest&, const AttachCommonBandwidthPackageToLoadBalancerOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AttachCommonBandwidthPackageToLoadBalancerAsyncHandler;
typedef Outcome<Error, Model::CancelShiftLoadBalancerZonesResult> CancelShiftLoadBalancerZonesOutcome;
typedef std::future<CancelShiftLoadBalancerZonesOutcome> CancelShiftLoadBalancerZonesOutcomeCallable;
typedef std::function<void(const AlbClient*, const Model::CancelShiftLoadBalancerZonesRequest&, const CancelShiftLoadBalancerZonesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CancelShiftLoadBalancerZonesAsyncHandler;
typedef Outcome<Error, Model::CreateAScriptsResult> CreateAScriptsOutcome;
typedef std::future<CreateAScriptsOutcome> CreateAScriptsOutcomeCallable;
typedef std::function<void(const AlbClient*, const Model::CreateAScriptsRequest&, const CreateAScriptsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateAScriptsAsyncHandler;
@@ -360,6 +371,12 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ListTagValuesResult> ListTagValuesOutcome;
typedef std::future<ListTagValuesOutcome> ListTagValuesOutcomeCallable;
typedef std::function<void(const AlbClient*, const Model::ListTagValuesRequest&, const ListTagValuesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTagValuesAsyncHandler;
typedef Outcome<Error, Model::LoadBalancerJoinSecurityGroupResult> LoadBalancerJoinSecurityGroupOutcome;
typedef std::future<LoadBalancerJoinSecurityGroupOutcome> LoadBalancerJoinSecurityGroupOutcomeCallable;
typedef std::function<void(const AlbClient*, const Model::LoadBalancerJoinSecurityGroupRequest&, const LoadBalancerJoinSecurityGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> LoadBalancerJoinSecurityGroupAsyncHandler;
typedef Outcome<Error, Model::LoadBalancerLeaveSecurityGroupResult> LoadBalancerLeaveSecurityGroupOutcome;
typedef std::future<LoadBalancerLeaveSecurityGroupOutcome> LoadBalancerLeaveSecurityGroupOutcomeCallable;
typedef std::function<void(const AlbClient*, const Model::LoadBalancerLeaveSecurityGroupRequest&, const LoadBalancerLeaveSecurityGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> LoadBalancerLeaveSecurityGroupAsyncHandler;
typedef Outcome<Error, Model::MoveResourceGroupResult> MoveResourceGroupOutcome;
typedef std::future<MoveResourceGroupOutcome> MoveResourceGroupOutcomeCallable;
typedef std::function<void(const AlbClient*, const Model::MoveResourceGroupRequest&, const MoveResourceGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoveResourceGroupAsyncHandler;
@@ -375,6 +392,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::StartListenerResult> StartListenerOutcome;
typedef std::future<StartListenerOutcome> StartListenerOutcomeCallable;
typedef std::function<void(const AlbClient*, const Model::StartListenerRequest&, const StartListenerOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StartListenerAsyncHandler;
typedef Outcome<Error, Model::StartShiftLoadBalancerZonesResult> StartShiftLoadBalancerZonesOutcome;
typedef std::future<StartShiftLoadBalancerZonesOutcome> StartShiftLoadBalancerZonesOutcomeCallable;
typedef std::function<void(const AlbClient*, const Model::StartShiftLoadBalancerZonesRequest&, const StartShiftLoadBalancerZonesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StartShiftLoadBalancerZonesAsyncHandler;
typedef Outcome<Error, Model::StopListenerResult> StopListenerOutcome;
typedef std::future<StopListenerOutcome> StopListenerOutcomeCallable;
typedef std::function<void(const AlbClient*, const Model::StopListenerRequest&, const StopListenerOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StopListenerAsyncHandler;
@@ -449,6 +469,9 @@ namespace AlibabaCloud
AttachCommonBandwidthPackageToLoadBalancerOutcome attachCommonBandwidthPackageToLoadBalancer(const Model::AttachCommonBandwidthPackageToLoadBalancerRequest &request)const;
void attachCommonBandwidthPackageToLoadBalancerAsync(const Model::AttachCommonBandwidthPackageToLoadBalancerRequest& request, const AttachCommonBandwidthPackageToLoadBalancerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AttachCommonBandwidthPackageToLoadBalancerOutcomeCallable attachCommonBandwidthPackageToLoadBalancerCallable(const Model::AttachCommonBandwidthPackageToLoadBalancerRequest& request) const;
CancelShiftLoadBalancerZonesOutcome cancelShiftLoadBalancerZones(const Model::CancelShiftLoadBalancerZonesRequest &request)const;
void cancelShiftLoadBalancerZonesAsync(const Model::CancelShiftLoadBalancerZonesRequest& request, const CancelShiftLoadBalancerZonesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CancelShiftLoadBalancerZonesOutcomeCallable cancelShiftLoadBalancerZonesCallable(const Model::CancelShiftLoadBalancerZonesRequest& request) const;
CreateAScriptsOutcome createAScripts(const Model::CreateAScriptsRequest &request)const;
void createAScriptsAsync(const Model::CreateAScriptsRequest& request, const CreateAScriptsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateAScriptsOutcomeCallable createAScriptsCallable(const Model::CreateAScriptsRequest& request) const;
@@ -602,6 +625,12 @@ namespace AlibabaCloud
ListTagValuesOutcome listTagValues(const Model::ListTagValuesRequest &request)const;
void listTagValuesAsync(const Model::ListTagValuesRequest& request, const ListTagValuesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListTagValuesOutcomeCallable listTagValuesCallable(const Model::ListTagValuesRequest& request) const;
LoadBalancerJoinSecurityGroupOutcome loadBalancerJoinSecurityGroup(const Model::LoadBalancerJoinSecurityGroupRequest &request)const;
void loadBalancerJoinSecurityGroupAsync(const Model::LoadBalancerJoinSecurityGroupRequest& request, const LoadBalancerJoinSecurityGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
LoadBalancerJoinSecurityGroupOutcomeCallable loadBalancerJoinSecurityGroupCallable(const Model::LoadBalancerJoinSecurityGroupRequest& request) const;
LoadBalancerLeaveSecurityGroupOutcome loadBalancerLeaveSecurityGroup(const Model::LoadBalancerLeaveSecurityGroupRequest &request)const;
void loadBalancerLeaveSecurityGroupAsync(const Model::LoadBalancerLeaveSecurityGroupRequest& request, const LoadBalancerLeaveSecurityGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
LoadBalancerLeaveSecurityGroupOutcomeCallable loadBalancerLeaveSecurityGroupCallable(const Model::LoadBalancerLeaveSecurityGroupRequest& request) const;
MoveResourceGroupOutcome moveResourceGroup(const Model::MoveResourceGroupRequest &request)const;
void moveResourceGroupAsync(const Model::MoveResourceGroupRequest& request, const MoveResourceGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoveResourceGroupOutcomeCallable moveResourceGroupCallable(const Model::MoveResourceGroupRequest& request) const;
@@ -617,6 +646,9 @@ namespace AlibabaCloud
StartListenerOutcome startListener(const Model::StartListenerRequest &request)const;
void startListenerAsync(const Model::StartListenerRequest& request, const StartListenerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
StartListenerOutcomeCallable startListenerCallable(const Model::StartListenerRequest& request) const;
StartShiftLoadBalancerZonesOutcome startShiftLoadBalancerZones(const Model::StartShiftLoadBalancerZonesRequest &request)const;
void startShiftLoadBalancerZonesAsync(const Model::StartShiftLoadBalancerZonesRequest& request, const StartShiftLoadBalancerZonesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
StartShiftLoadBalancerZonesOutcomeCallable startShiftLoadBalancerZonesCallable(const Model::StartShiftLoadBalancerZonesRequest& request) const;
StopListenerOutcome stopListener(const Model::StopListenerRequest &request)const;
void stopListenerAsync(const Model::StopListenerRequest& request, const StopListenerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
StopListenerOutcomeCallable stopListenerCallable(const Model::StopListenerRequest& request) const;

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ALB_MODEL_CANCELSHIFTLOADBALANCERZONESREQUEST_H_
#define ALIBABACLOUD_ALB_MODEL_CANCELSHIFTLOADBALANCERZONESREQUEST_H_
#include <alibabacloud/alb/AlbExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace Alb {
namespace Model {
class ALIBABACLOUD_ALB_EXPORT CancelShiftLoadBalancerZonesRequest : public RpcServiceRequest {
public:
struct ZoneMappings {
std::string vSwitchId;
std::string zoneId;
};
CancelShiftLoadBalancerZonesRequest();
~CancelShiftLoadBalancerZonesRequest();
std::string getClientToken() const;
void setClientToken(const std::string &clientToken);
bool getDryRun() const;
void setDryRun(bool dryRun);
std::vector<ZoneMappings> getZoneMappings() const;
void setZoneMappings(const std::vector<ZoneMappings> &zoneMappings);
std::string getLoadBalancerId() const;
void setLoadBalancerId(const std::string &loadBalancerId);
private:
std::string clientToken_;
bool dryRun_;
std::vector<ZoneMappings> zoneMappings_;
std::string loadBalancerId_;
};
} // namespace Model
} // namespace Alb
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_ALB_MODEL_CANCELSHIFTLOADBALANCERZONESREQUEST_H_

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_ALB_MODEL_CANCELSHIFTLOADBALANCERZONESRESULT_H_
#define ALIBABACLOUD_ALB_MODEL_CANCELSHIFTLOADBALANCERZONESRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/alb/AlbExport.h>
namespace AlibabaCloud
{
namespace Alb
{
namespace Model
{
class ALIBABACLOUD_ALB_EXPORT CancelShiftLoadBalancerZonesResult : public ServiceResult
{
public:
CancelShiftLoadBalancerZonesResult();
explicit CancelShiftLoadBalancerZonesResult(const std::string &payload);
~CancelShiftLoadBalancerZonesResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_ALB_MODEL_CANCELSHIFTLOADBALANCERZONESRESULT_H_

View File

@@ -28,6 +28,10 @@ namespace Alb {
namespace Model {
class ALIBABACLOUD_ALB_EXPORT CreateAclRequest : public RpcServiceRequest {
public:
struct Tag {
std::string value;
std::string key;
};
CreateAclRequest();
~CreateAclRequest();
std::string getAclName() const;
@@ -38,6 +42,8 @@ public:
void setAddressIpVersion(const std::string &addressIpVersion);
std::string getResourceGroupId() const;
void setResourceGroupId(const std::string &resourceGroupId);
std::vector<Tag> getTag() const;
void setTag(const std::vector<Tag> &tag);
bool getDryRun() const;
void setDryRun(bool dryRun);
@@ -46,6 +52,7 @@ private:
std::string clientToken_;
std::string addressIpVersion_;
std::string resourceGroupId_;
std::vector<Tag> tag_;
bool dryRun_;
};
} // namespace Model

Some files were not shown because too many files have changed in this diff Show More