Compare commits
8 Commits
OnsMqtt-pa
...
OutboundBo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee902a7f28 | ||
|
|
fb12252d2d | ||
|
|
6e4fea5ea2 | ||
|
|
1b54ddd725 | ||
|
|
6e5ba8761d | ||
|
|
e71ef9a243 | ||
|
|
17af8569c4 | ||
|
|
4c3be7ed7c |
24
CHANGELOG
24
CHANGELOG
@@ -1,3 +1,27 @@
|
||||
2021-02-04 Version: patch
|
||||
- Supported scheduler for outbound call.
|
||||
|
||||
2021-02-04 Version: patch
|
||||
- Supported console.
|
||||
|
||||
2021-02-04 Version: patch
|
||||
- Supported console.
|
||||
|
||||
2021-02-04 Version: patch
|
||||
- Update TaggingImage.
|
||||
|
||||
2021-02-03 Version: patch
|
||||
- After normalizing the API group name, regenerate the SDK.
|
||||
|
||||
2021-02-03 Version: patch
|
||||
- Add ModifyAuditLogConfig API.
|
||||
|
||||
2021-02-02 Version: patch
|
||||
- Add.
|
||||
|
||||
2021-02-02 Version: patch
|
||||
- CreateShardingDBInstance add ReadOnlyReplicas in ReplicaSet.
|
||||
|
||||
2021-02-01 Version: patch
|
||||
- Support device credential for mqtt.
|
||||
|
||||
|
||||
@@ -89,8 +89,6 @@ set(dds_public_header_model
|
||||
include/alibabacloud/dds/model/DescribeDedicatedClusterInstanceListResult.h
|
||||
include/alibabacloud/dds/model/DescribeErrorLogRecordsRequest.h
|
||||
include/alibabacloud/dds/model/DescribeErrorLogRecordsResult.h
|
||||
include/alibabacloud/dds/model/DescribeIndexRecommendationRequest.h
|
||||
include/alibabacloud/dds/model/DescribeIndexRecommendationResult.h
|
||||
include/alibabacloud/dds/model/DescribeInstanceAutoRenewalAttributeRequest.h
|
||||
include/alibabacloud/dds/model/DescribeInstanceAutoRenewalAttributeResult.h
|
||||
include/alibabacloud/dds/model/DescribeKernelReleaseNotesRequest.h
|
||||
@@ -270,8 +268,6 @@ set(dds_src
|
||||
src/model/DescribeDedicatedClusterInstanceListResult.cc
|
||||
src/model/DescribeErrorLogRecordsRequest.cc
|
||||
src/model/DescribeErrorLogRecordsResult.cc
|
||||
src/model/DescribeIndexRecommendationRequest.cc
|
||||
src/model/DescribeIndexRecommendationResult.cc
|
||||
src/model/DescribeInstanceAutoRenewalAttributeRequest.cc
|
||||
src/model/DescribeInstanceAutoRenewalAttributeResult.cc
|
||||
src/model/DescribeKernelReleaseNotesRequest.cc
|
||||
|
||||
@@ -90,8 +90,6 @@
|
||||
#include "model/DescribeDedicatedClusterInstanceListResult.h"
|
||||
#include "model/DescribeErrorLogRecordsRequest.h"
|
||||
#include "model/DescribeErrorLogRecordsResult.h"
|
||||
#include "model/DescribeIndexRecommendationRequest.h"
|
||||
#include "model/DescribeIndexRecommendationResult.h"
|
||||
#include "model/DescribeInstanceAutoRenewalAttributeRequest.h"
|
||||
#include "model/DescribeInstanceAutoRenewalAttributeResult.h"
|
||||
#include "model/DescribeKernelReleaseNotesRequest.h"
|
||||
@@ -311,9 +309,6 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DescribeErrorLogRecordsResult> DescribeErrorLogRecordsOutcome;
|
||||
typedef std::future<DescribeErrorLogRecordsOutcome> DescribeErrorLogRecordsOutcomeCallable;
|
||||
typedef std::function<void(const DdsClient*, const Model::DescribeErrorLogRecordsRequest&, const DescribeErrorLogRecordsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeErrorLogRecordsAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeIndexRecommendationResult> DescribeIndexRecommendationOutcome;
|
||||
typedef std::future<DescribeIndexRecommendationOutcome> DescribeIndexRecommendationOutcomeCallable;
|
||||
typedef std::function<void(const DdsClient*, const Model::DescribeIndexRecommendationRequest&, const DescribeIndexRecommendationOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeIndexRecommendationAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeInstanceAutoRenewalAttributeResult> DescribeInstanceAutoRenewalAttributeOutcome;
|
||||
typedef std::future<DescribeInstanceAutoRenewalAttributeOutcome> DescribeInstanceAutoRenewalAttributeOutcomeCallable;
|
||||
typedef std::function<void(const DdsClient*, const Model::DescribeInstanceAutoRenewalAttributeRequest&, const DescribeInstanceAutoRenewalAttributeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeInstanceAutoRenewalAttributeAsyncHandler;
|
||||
@@ -583,9 +578,6 @@ namespace AlibabaCloud
|
||||
DescribeErrorLogRecordsOutcome describeErrorLogRecords(const Model::DescribeErrorLogRecordsRequest &request)const;
|
||||
void describeErrorLogRecordsAsync(const Model::DescribeErrorLogRecordsRequest& request, const DescribeErrorLogRecordsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeErrorLogRecordsOutcomeCallable describeErrorLogRecordsCallable(const Model::DescribeErrorLogRecordsRequest& request) const;
|
||||
DescribeIndexRecommendationOutcome describeIndexRecommendation(const Model::DescribeIndexRecommendationRequest &request)const;
|
||||
void describeIndexRecommendationAsync(const Model::DescribeIndexRecommendationRequest& request, const DescribeIndexRecommendationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeIndexRecommendationOutcomeCallable describeIndexRecommendationCallable(const Model::DescribeIndexRecommendationRequest& request) const;
|
||||
DescribeInstanceAutoRenewalAttributeOutcome describeInstanceAutoRenewalAttribute(const Model::DescribeInstanceAutoRenewalAttributeRequest &request)const;
|
||||
void describeInstanceAutoRenewalAttributeAsync(const Model::DescribeInstanceAutoRenewalAttributeRequest& request, const DescribeInstanceAutoRenewalAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeInstanceAutoRenewalAttributeOutcomeCallable describeInstanceAutoRenewalAttributeCallable(const Model::DescribeInstanceAutoRenewalAttributeRequest& request) const;
|
||||
|
||||
@@ -41,6 +41,8 @@ namespace AlibabaCloud
|
||||
void setNodeType(const std::string& nodeType);
|
||||
std::string getClientToken()const;
|
||||
void setClientToken(const std::string& clientToken);
|
||||
int getReadonlyReplicas()const;
|
||||
void setReadonlyReplicas(int readonlyReplicas);
|
||||
std::string getNodeClass()const;
|
||||
void setNodeClass(const std::string& nodeClass);
|
||||
std::string getAccessKeyId()const;
|
||||
@@ -66,6 +68,7 @@ namespace AlibabaCloud
|
||||
long resourceOwnerId_;
|
||||
std::string nodeType_;
|
||||
std::string clientToken_;
|
||||
int readonlyReplicas_;
|
||||
std::string nodeClass_;
|
||||
std::string accessKeyId_;
|
||||
std::string securityToken_;
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace AlibabaCloud
|
||||
public:
|
||||
struct ReplicaSet
|
||||
{
|
||||
int readonlyReplicas;
|
||||
int storage;
|
||||
std::string _class;
|
||||
};
|
||||
@@ -84,12 +85,12 @@ namespace AlibabaCloud
|
||||
void setConfigServer(const std::vector<ConfigServer>& configServer);
|
||||
long getOwnerId()const;
|
||||
void setOwnerId(long ownerId);
|
||||
std::vector<Mongos> getMongos()const;
|
||||
void setMongos(const std::vector<Mongos>& mongos);
|
||||
std::string getSecurityIPList()const;
|
||||
void setSecurityIPList(const std::string& securityIPList);
|
||||
std::string getVSwitchId()const;
|
||||
void setVSwitchId(const std::string& vSwitchId);
|
||||
std::vector<Mongos> getMongos()const;
|
||||
void setMongos(const std::vector<Mongos>& mongos);
|
||||
std::string getAccountPassword()const;
|
||||
void setAccountPassword(const std::string& accountPassword);
|
||||
std::string getAutoRenew()const;
|
||||
@@ -121,9 +122,9 @@ namespace AlibabaCloud
|
||||
std::string ownerAccount_;
|
||||
std::vector<ConfigServer> configServer_;
|
||||
long ownerId_;
|
||||
std::vector<Mongos> mongos_;
|
||||
std::string securityIPList_;
|
||||
std::string vSwitchId_;
|
||||
std::vector<Mongos> mongos_;
|
||||
std::string accountPassword_;
|
||||
std::string autoRenew_;
|
||||
std::string vpcId_;
|
||||
|
||||
@@ -51,10 +51,11 @@ namespace AlibabaCloud
|
||||
{
|
||||
std::string nodeClass;
|
||||
std::string nodeDescription;
|
||||
int readonlyReplicas;
|
||||
int maxConnections;
|
||||
int port;
|
||||
std::string nodeId;
|
||||
int nodeStorage;
|
||||
std::string nodeId;
|
||||
std::string connectString;
|
||||
int maxIOPS;
|
||||
};
|
||||
@@ -64,26 +65,26 @@ namespace AlibabaCloud
|
||||
std::string nodeDescription;
|
||||
int maxConnections;
|
||||
int port;
|
||||
std::string nodeId;
|
||||
int nodeStorage;
|
||||
std::string nodeId;
|
||||
std::string connectString;
|
||||
int maxIOPS;
|
||||
};
|
||||
struct ReplicaSet
|
||||
{
|
||||
std::string replicaSetRole;
|
||||
std::string connectionDomain;
|
||||
std::string vPCCloudInstanceId;
|
||||
std::string connectionPort;
|
||||
std::string vPCId;
|
||||
std::string networkType;
|
||||
std::string vSwitchId;
|
||||
};
|
||||
struct Tag
|
||||
{
|
||||
std::string value;
|
||||
std::string key;
|
||||
};
|
||||
struct ReplicaSet
|
||||
{
|
||||
std::string connectionDomain;
|
||||
std::string replicaSetRole;
|
||||
std::string vPCCloudInstanceId;
|
||||
std::string vPCId;
|
||||
std::string connectionPort;
|
||||
std::string networkType;
|
||||
std::string vSwitchId;
|
||||
};
|
||||
std::string vPCCloudInstanceIds;
|
||||
std::string resourceGroupId;
|
||||
std::string dBInstanceType;
|
||||
@@ -97,27 +98,27 @@ namespace AlibabaCloud
|
||||
int dBInstanceStorage;
|
||||
std::string lastDowngradeTime;
|
||||
std::vector<DBInstance::Tag> tags;
|
||||
std::string dBInstanceDescription;
|
||||
std::string engine;
|
||||
std::string maintainStartTime;
|
||||
std::string dBInstanceDescription;
|
||||
std::string replacateId;
|
||||
bool dBInstanceReleaseProtection;
|
||||
std::string engineVersion;
|
||||
std::string zoneId;
|
||||
std::string dBInstanceStatus;
|
||||
std::string replicationFactor;
|
||||
std::string readonlyReplicas;
|
||||
int maxConnections;
|
||||
std::string zoneId;
|
||||
std::string dBInstanceStatus;
|
||||
std::string dBInstanceClass;
|
||||
std::string vPCId;
|
||||
std::string vSwitchId;
|
||||
std::vector<DBInstance::ShardAttribute> shardList;
|
||||
std::string lockMode;
|
||||
int maxIOPS;
|
||||
std::string chargeType;
|
||||
std::string currentKernelVersion;
|
||||
std::string protocolType;
|
||||
std::string vpcAuthMode;
|
||||
std::string chargeType;
|
||||
std::string creationTime;
|
||||
std::vector<DBInstance::ConfigserverAttribute> configserverList;
|
||||
std::string regionId;
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace AlibabaCloud
|
||||
{
|
||||
std::string nodeClass;
|
||||
std::string nodeDescription;
|
||||
int readonlyReplicas;
|
||||
std::string nodeId;
|
||||
int nodeStorage;
|
||||
};
|
||||
@@ -53,10 +54,10 @@ namespace AlibabaCloud
|
||||
std::string key;
|
||||
};
|
||||
std::string engineVersion;
|
||||
std::string resourceGroupId;
|
||||
std::string zoneId;
|
||||
std::string dBInstanceStatus;
|
||||
std::string replicationFactor;
|
||||
std::string zoneId;
|
||||
std::string resourceGroupId;
|
||||
std::string dBInstanceStatus;
|
||||
std::string dBInstanceClass;
|
||||
std::string destroyTime;
|
||||
std::vector<DBInstance::ShardAttribute> shardList;
|
||||
@@ -64,9 +65,9 @@ namespace AlibabaCloud
|
||||
std::string lockMode;
|
||||
std::vector<DBInstance::MongosAttribute> mongosList;
|
||||
std::string dBInstanceId;
|
||||
std::string chargeType;
|
||||
std::string networkType;
|
||||
std::string vpcAuthMode;
|
||||
std::string chargeType;
|
||||
int dBInstanceStorage;
|
||||
std::string lastDowngradeTime;
|
||||
std::string creationTime;
|
||||
@@ -74,8 +75,8 @@ namespace AlibabaCloud
|
||||
std::string expireTime;
|
||||
std::string kindCode;
|
||||
std::vector<DBInstance::Tag> tags;
|
||||
std::string dBInstanceDescription;
|
||||
std::string engine;
|
||||
std::string dBInstanceDescription;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
* 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_DDS_MODEL_DESCRIBEINDEXRECOMMENDATIONRESULT_H_
|
||||
#define ALIBABACLOUD_DDS_MODEL_DESCRIBEINDEXRECOMMENDATIONRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/dds/DdsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Dds
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DDS_EXPORT DescribeIndexRecommendationResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Analyzation
|
||||
{
|
||||
struct Recommendation
|
||||
{
|
||||
std::string recmdType;
|
||||
std::string content;
|
||||
};
|
||||
long averageReturnRowCount;
|
||||
std::string query;
|
||||
long totalExecutionTime;
|
||||
std::vector<std::string> indexCombines;
|
||||
long averageDocsExaminedCount;
|
||||
std::string _namespace;
|
||||
std::string operation;
|
||||
long count;
|
||||
std::vector<Analyzation::Recommendation> indexRecommendations;
|
||||
long averageKeysExaminedCount;
|
||||
std::string executionPlan;
|
||||
std::string inMemorySort;
|
||||
std::string database;
|
||||
std::string lastExecutionTime;
|
||||
std::string sort;
|
||||
long averageExecutionTime;
|
||||
};
|
||||
|
||||
|
||||
DescribeIndexRecommendationResult();
|
||||
explicit DescribeIndexRecommendationResult(const std::string &payload);
|
||||
~DescribeIndexRecommendationResult();
|
||||
int getTotalRecordCount()const;
|
||||
int getPageRecordCount()const;
|
||||
std::vector<Analyzation> getAnalyzations()const;
|
||||
int getPageNumber()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
int totalRecordCount_;
|
||||
int pageRecordCount_;
|
||||
std::vector<Analyzation> analyzations_;
|
||||
int pageNumber_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DDS_MODEL_DESCRIBEINDEXRECOMMENDATIONRESULT_H_
|
||||
@@ -37,16 +37,16 @@ namespace AlibabaCloud
|
||||
|
||||
long getResourceOwnerId()const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getPageNumber()const;
|
||||
void setPageNumber(const std::string& pageNumber);
|
||||
long getPageNumber()const;
|
||||
void setPageNumber(long pageNumber);
|
||||
std::string getAccessKeyId()const;
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
std::string getSecurityToken()const;
|
||||
void setSecurityToken(const std::string& securityToken);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getPageSize()const;
|
||||
void setPageSize(const std::string& pageSize);
|
||||
long getPageSize()const;
|
||||
void setPageSize(long pageSize);
|
||||
std::string getDBInstanceId()const;
|
||||
void setDBInstanceId(const std::string& dBInstanceId);
|
||||
std::string getResourceOwnerAccount()const;
|
||||
@@ -60,11 +60,11 @@ namespace AlibabaCloud
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string pageNumber_;
|
||||
long pageNumber_;
|
||||
std::string accessKeyId_;
|
||||
std::string securityToken_;
|
||||
std::string regionId_;
|
||||
std::string pageSize_;
|
||||
long pageSize_;
|
||||
std::string dBInstanceId_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string ownerAccount_;
|
||||
|
||||
@@ -48,12 +48,6 @@ namespace AlibabaCloud
|
||||
std::string originalAmount;
|
||||
std::string discountAmount;
|
||||
};
|
||||
struct Rule
|
||||
{
|
||||
long ruleDescId;
|
||||
std::string title;
|
||||
std::string name;
|
||||
};
|
||||
struct SubOrder
|
||||
{
|
||||
std::string instanceId;
|
||||
@@ -62,6 +56,12 @@ namespace AlibabaCloud
|
||||
std::string originalAmount;
|
||||
std::string discountAmount;
|
||||
};
|
||||
struct Rule
|
||||
{
|
||||
long ruleDescId;
|
||||
std::string title;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
|
||||
DescribePriceResult();
|
||||
|
||||
@@ -37,6 +37,8 @@ namespace AlibabaCloud
|
||||
|
||||
long getResourceOwnerId()const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getRoleId()const;
|
||||
void setRoleId(const std::string& roleId);
|
||||
std::string getStartTime()const;
|
||||
void setStartTime(const std::string& startTime);
|
||||
int getPageNumber()const;
|
||||
@@ -70,6 +72,7 @@ namespace AlibabaCloud
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string roleId_;
|
||||
std::string startTime_;
|
||||
int pageNumber_;
|
||||
std::string accessKeyId_;
|
||||
|
||||
@@ -40,10 +40,10 @@ namespace AlibabaCloud
|
||||
long returnRowCounts;
|
||||
std::string dBName;
|
||||
long keysExamined;
|
||||
std::string hostAddress;
|
||||
long docsExamined;
|
||||
std::string sQLText;
|
||||
std::string hostAddress;
|
||||
std::string accountName;
|
||||
std::string sQLText;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ namespace AlibabaCloud
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getClientToken()const;
|
||||
void setClientToken(const std::string& clientToken);
|
||||
int getReadonlyReplicas()const;
|
||||
void setReadonlyReplicas(int readonlyReplicas);
|
||||
std::string getNodeClass()const;
|
||||
void setNodeClass(const std::string& nodeClass);
|
||||
std::string getAccessKeyId()const;
|
||||
@@ -69,6 +71,7 @@ namespace AlibabaCloud
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string clientToken_;
|
||||
int readonlyReplicas_;
|
||||
std::string nodeClass_;
|
||||
std::string accessKeyId_;
|
||||
std::string securityToken_;
|
||||
|
||||
@@ -1275,42 +1275,6 @@ DdsClient::DescribeErrorLogRecordsOutcomeCallable DdsClient::describeErrorLogRec
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DdsClient::DescribeIndexRecommendationOutcome DdsClient::describeIndexRecommendation(const DescribeIndexRecommendationRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeIndexRecommendationOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeIndexRecommendationOutcome(DescribeIndexRecommendationResult(outcome.result()));
|
||||
else
|
||||
return DescribeIndexRecommendationOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DdsClient::describeIndexRecommendationAsync(const DescribeIndexRecommendationRequest& request, const DescribeIndexRecommendationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeIndexRecommendation(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DdsClient::DescribeIndexRecommendationOutcomeCallable DdsClient::describeIndexRecommendationCallable(const DescribeIndexRecommendationRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeIndexRecommendationOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeIndexRecommendation(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DdsClient::DescribeInstanceAutoRenewalAttributeOutcome DdsClient::describeInstanceAutoRenewalAttribute(const DescribeInstanceAutoRenewalAttributeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -39,10 +39,10 @@ void CreateDBInstanceResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["OrderId"].isNull())
|
||||
orderId_ = value["OrderId"].asString();
|
||||
if(!value["DBInstanceId"].isNull())
|
||||
dBInstanceId_ = value["DBInstanceId"].asString();
|
||||
if(!value["OrderId"].isNull())
|
||||
orderId_ = value["OrderId"].asString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,17 @@ void CreateNodeRequest::setClientToken(const std::string& clientToken)
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
int CreateNodeRequest::getReadonlyReplicas()const
|
||||
{
|
||||
return readonlyReplicas_;
|
||||
}
|
||||
|
||||
void CreateNodeRequest::setReadonlyReplicas(int readonlyReplicas)
|
||||
{
|
||||
readonlyReplicas_ = readonlyReplicas;
|
||||
setParameter("ReadonlyReplicas", std::to_string(readonlyReplicas));
|
||||
}
|
||||
|
||||
std::string CreateNodeRequest::getNodeClass()const
|
||||
{
|
||||
return nodeClass_;
|
||||
|
||||
@@ -39,10 +39,10 @@ void CreateNodeResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["OrderId"].isNull())
|
||||
orderId_ = value["OrderId"].asString();
|
||||
if(!value["NodeId"].isNull())
|
||||
nodeId_ = value["NodeId"].asString();
|
||||
if(!value["OrderId"].isNull())
|
||||
orderId_ = value["OrderId"].asString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ void CreateShardingDBInstanceRequest::setReplicaSet(const std::vector<ReplicaSet
|
||||
for(int dep1 = 0; dep1!= replicaSet.size(); dep1++) {
|
||||
auto replicaSetObj = replicaSet.at(dep1);
|
||||
std::string replicaSetObjStr = "ReplicaSet." + std::to_string(dep1 + 1);
|
||||
setParameter(replicaSetObjStr + ".ReadonlyReplicas", std::to_string(replicaSetObj.readonlyReplicas));
|
||||
setParameter(replicaSetObjStr + ".Storage", std::to_string(replicaSetObj.storage));
|
||||
setParameter(replicaSetObjStr + "._Class", replicaSetObj._class);
|
||||
}
|
||||
@@ -224,21 +225,6 @@ void CreateShardingDBInstanceRequest::setOwnerId(long ownerId)
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::vector<CreateShardingDBInstanceRequest::Mongos> CreateShardingDBInstanceRequest::getMongos()const
|
||||
{
|
||||
return mongos_;
|
||||
}
|
||||
|
||||
void CreateShardingDBInstanceRequest::setMongos(const std::vector<Mongos>& mongos)
|
||||
{
|
||||
mongos_ = mongos;
|
||||
for(int dep1 = 0; dep1!= mongos.size(); dep1++) {
|
||||
auto mongosObj = mongos.at(dep1);
|
||||
std::string mongosObjStr = "Mongos." + std::to_string(dep1 + 1);
|
||||
setParameter(mongosObjStr + "._Class", mongosObj._class);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateShardingDBInstanceRequest::getSecurityIPList()const
|
||||
{
|
||||
return securityIPList_;
|
||||
@@ -261,6 +247,21 @@ void CreateShardingDBInstanceRequest::setVSwitchId(const std::string& vSwitchId)
|
||||
setParameter("VSwitchId", vSwitchId);
|
||||
}
|
||||
|
||||
std::vector<CreateShardingDBInstanceRequest::Mongos> CreateShardingDBInstanceRequest::getMongos()const
|
||||
{
|
||||
return mongos_;
|
||||
}
|
||||
|
||||
void CreateShardingDBInstanceRequest::setMongos(const std::vector<Mongos>& mongos)
|
||||
{
|
||||
mongos_ = mongos;
|
||||
for(int dep1 = 0; dep1!= mongos.size(); dep1++) {
|
||||
auto mongosObj = mongos.at(dep1);
|
||||
std::string mongosObjStr = "Mongos." + std::to_string(dep1 + 1);
|
||||
setParameter(mongosObjStr + "._Class", mongosObj._class);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateShardingDBInstanceRequest::getAccountPassword()const
|
||||
{
|
||||
return accountPassword_;
|
||||
|
||||
@@ -43,174 +43,176 @@ void DescribeDBInstanceAttributeResult::parse(const std::string &payload)
|
||||
for (auto valueDBInstancesDBInstance : allDBInstancesNode)
|
||||
{
|
||||
DBInstance dBInstancesObject;
|
||||
if(!valueDBInstancesDBInstance["ResourceGroupId"].isNull())
|
||||
dBInstancesObject.resourceGroupId = valueDBInstancesDBInstance["ResourceGroupId"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceId"].isNull())
|
||||
dBInstancesObject.dBInstanceId = valueDBInstancesDBInstance["DBInstanceId"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceDescription"].isNull())
|
||||
dBInstancesObject.dBInstanceDescription = valueDBInstancesDBInstance["DBInstanceDescription"].asString();
|
||||
if(!valueDBInstancesDBInstance["RegionId"].isNull())
|
||||
dBInstancesObject.regionId = valueDBInstancesDBInstance["RegionId"].asString();
|
||||
if(!valueDBInstancesDBInstance["ZoneId"].isNull())
|
||||
dBInstancesObject.zoneId = valueDBInstancesDBInstance["ZoneId"].asString();
|
||||
if(!valueDBInstancesDBInstance["Engine"].isNull())
|
||||
dBInstancesObject.engine = valueDBInstancesDBInstance["Engine"].asString();
|
||||
if(!valueDBInstancesDBInstance["EngineVersion"].isNull())
|
||||
dBInstancesObject.engineVersion = valueDBInstancesDBInstance["EngineVersion"].asString();
|
||||
if(!valueDBInstancesDBInstance["StorageEngine"].isNull())
|
||||
dBInstancesObject.storageEngine = valueDBInstancesDBInstance["StorageEngine"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceClass"].isNull())
|
||||
dBInstancesObject.dBInstanceClass = valueDBInstancesDBInstance["DBInstanceClass"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceStorage"].isNull())
|
||||
dBInstancesObject.dBInstanceStorage = std::stoi(valueDBInstancesDBInstance["DBInstanceStorage"].asString());
|
||||
if(!valueDBInstancesDBInstance["ReplacateId"].isNull())
|
||||
dBInstancesObject.replacateId = valueDBInstancesDBInstance["ReplacateId"].asString();
|
||||
if(!valueDBInstancesDBInstance["VPCId"].isNull())
|
||||
dBInstancesObject.vPCId = valueDBInstancesDBInstance["VPCId"].asString();
|
||||
if(!valueDBInstancesDBInstance["VSwitchId"].isNull())
|
||||
dBInstancesObject.vSwitchId = valueDBInstancesDBInstance["VSwitchId"].asString();
|
||||
if(!valueDBInstancesDBInstance["VPCCloudInstanceIds"].isNull())
|
||||
dBInstancesObject.vPCCloudInstanceIds = valueDBInstancesDBInstance["VPCCloudInstanceIds"].asString();
|
||||
if(!valueDBInstancesDBInstance["KindCode"].isNull())
|
||||
dBInstancesObject.kindCode = valueDBInstancesDBInstance["KindCode"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceStatus"].isNull())
|
||||
dBInstancesObject.dBInstanceStatus = valueDBInstancesDBInstance["DBInstanceStatus"].asString();
|
||||
if(!valueDBInstancesDBInstance["LockMode"].isNull())
|
||||
dBInstancesObject.lockMode = valueDBInstancesDBInstance["LockMode"].asString();
|
||||
if(!valueDBInstancesDBInstance["ChargeType"].isNull())
|
||||
dBInstancesObject.chargeType = valueDBInstancesDBInstance["ChargeType"].asString();
|
||||
if(!valueDBInstancesDBInstance["CreationTime"].isNull())
|
||||
dBInstancesObject.creationTime = valueDBInstancesDBInstance["CreationTime"].asString();
|
||||
if(!valueDBInstancesDBInstance["ReplicaSetName"].isNull())
|
||||
dBInstancesObject.replicaSetName = valueDBInstancesDBInstance["ReplicaSetName"].asString();
|
||||
if(!valueDBInstancesDBInstance["NetworkType"].isNull())
|
||||
dBInstancesObject.networkType = valueDBInstancesDBInstance["NetworkType"].asString();
|
||||
if(!valueDBInstancesDBInstance["ExpireTime"].isNull())
|
||||
dBInstancesObject.expireTime = valueDBInstancesDBInstance["ExpireTime"].asString();
|
||||
if(!valueDBInstancesDBInstance["MaintainStartTime"].isNull())
|
||||
dBInstancesObject.maintainStartTime = valueDBInstancesDBInstance["MaintainStartTime"].asString();
|
||||
if(!valueDBInstancesDBInstance["MaintainEndTime"].isNull())
|
||||
dBInstancesObject.maintainEndTime = valueDBInstancesDBInstance["MaintainEndTime"].asString();
|
||||
if(!valueDBInstancesDBInstance["ResourceGroupId"].isNull())
|
||||
dBInstancesObject.resourceGroupId = valueDBInstancesDBInstance["ResourceGroupId"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceType"].isNull())
|
||||
dBInstancesObject.dBInstanceType = valueDBInstancesDBInstance["DBInstanceType"].asString();
|
||||
if(!valueDBInstancesDBInstance["ReplicaSetName"].isNull())
|
||||
dBInstancesObject.replicaSetName = valueDBInstancesDBInstance["ReplicaSetName"].asString();
|
||||
if(!valueDBInstancesDBInstance["StorageEngine"].isNull())
|
||||
dBInstancesObject.storageEngine = valueDBInstancesDBInstance["StorageEngine"].asString();
|
||||
if(!valueDBInstancesDBInstance["MaintainEndTime"].isNull())
|
||||
dBInstancesObject.maintainEndTime = valueDBInstancesDBInstance["MaintainEndTime"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceId"].isNull())
|
||||
dBInstancesObject.dBInstanceId = valueDBInstancesDBInstance["DBInstanceId"].asString();
|
||||
if(!valueDBInstancesDBInstance["NetworkType"].isNull())
|
||||
dBInstancesObject.networkType = valueDBInstancesDBInstance["NetworkType"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceStorage"].isNull())
|
||||
dBInstancesObject.dBInstanceStorage = std::stoi(valueDBInstancesDBInstance["DBInstanceStorage"].asString());
|
||||
if(!valueDBInstancesDBInstance["LastDowngradeTime"].isNull())
|
||||
dBInstancesObject.lastDowngradeTime = valueDBInstancesDBInstance["LastDowngradeTime"].asString();
|
||||
if(!valueDBInstancesDBInstance["Engine"].isNull())
|
||||
dBInstancesObject.engine = valueDBInstancesDBInstance["Engine"].asString();
|
||||
if(!valueDBInstancesDBInstance["MaintainStartTime"].isNull())
|
||||
dBInstancesObject.maintainStartTime = valueDBInstancesDBInstance["MaintainStartTime"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceDescription"].isNull())
|
||||
dBInstancesObject.dBInstanceDescription = valueDBInstancesDBInstance["DBInstanceDescription"].asString();
|
||||
if(!valueDBInstancesDBInstance["ReplacateId"].isNull())
|
||||
dBInstancesObject.replacateId = valueDBInstancesDBInstance["ReplacateId"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceReleaseProtection"].isNull())
|
||||
dBInstancesObject.dBInstanceReleaseProtection = valueDBInstancesDBInstance["DBInstanceReleaseProtection"].asString() == "true";
|
||||
if(!valueDBInstancesDBInstance["EngineVersion"].isNull())
|
||||
dBInstancesObject.engineVersion = valueDBInstancesDBInstance["EngineVersion"].asString();
|
||||
if(!valueDBInstancesDBInstance["ReplicationFactor"].isNull())
|
||||
dBInstancesObject.replicationFactor = valueDBInstancesDBInstance["ReplicationFactor"].asString();
|
||||
if(!valueDBInstancesDBInstance["ReadonlyReplicas"].isNull())
|
||||
dBInstancesObject.readonlyReplicas = valueDBInstancesDBInstance["ReadonlyReplicas"].asString();
|
||||
if(!valueDBInstancesDBInstance["MaxIOPS"].isNull())
|
||||
dBInstancesObject.maxIOPS = std::stoi(valueDBInstancesDBInstance["MaxIOPS"].asString());
|
||||
if(!valueDBInstancesDBInstance["MaxConnections"].isNull())
|
||||
dBInstancesObject.maxConnections = std::stoi(valueDBInstancesDBInstance["MaxConnections"].asString());
|
||||
if(!valueDBInstancesDBInstance["ZoneId"].isNull())
|
||||
dBInstancesObject.zoneId = valueDBInstancesDBInstance["ZoneId"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceStatus"].isNull())
|
||||
dBInstancesObject.dBInstanceStatus = valueDBInstancesDBInstance["DBInstanceStatus"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceClass"].isNull())
|
||||
dBInstancesObject.dBInstanceClass = valueDBInstancesDBInstance["DBInstanceClass"].asString();
|
||||
if(!valueDBInstancesDBInstance["VPCId"].isNull())
|
||||
dBInstancesObject.vPCId = valueDBInstancesDBInstance["VPCId"].asString();
|
||||
if(!valueDBInstancesDBInstance["VSwitchId"].isNull())
|
||||
dBInstancesObject.vSwitchId = valueDBInstancesDBInstance["VSwitchId"].asString();
|
||||
if(!valueDBInstancesDBInstance["LockMode"].isNull())
|
||||
dBInstancesObject.lockMode = valueDBInstancesDBInstance["LockMode"].asString();
|
||||
if(!valueDBInstancesDBInstance["MaxIOPS"].isNull())
|
||||
dBInstancesObject.maxIOPS = std::stoi(valueDBInstancesDBInstance["MaxIOPS"].asString());
|
||||
if(!valueDBInstancesDBInstance["CurrentKernelVersion"].isNull())
|
||||
dBInstancesObject.currentKernelVersion = valueDBInstancesDBInstance["CurrentKernelVersion"].asString();
|
||||
if(!valueDBInstancesDBInstance["ProtocolType"].isNull())
|
||||
dBInstancesObject.protocolType = valueDBInstancesDBInstance["ProtocolType"].asString();
|
||||
if(!valueDBInstancesDBInstance["VpcAuthMode"].isNull())
|
||||
dBInstancesObject.vpcAuthMode = valueDBInstancesDBInstance["VpcAuthMode"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceReleaseProtection"].isNull())
|
||||
dBInstancesObject.dBInstanceReleaseProtection = valueDBInstancesDBInstance["DBInstanceReleaseProtection"].asString() == "true";
|
||||
if(!valueDBInstancesDBInstance["ChargeType"].isNull())
|
||||
dBInstancesObject.chargeType = valueDBInstancesDBInstance["ChargeType"].asString();
|
||||
if(!valueDBInstancesDBInstance["CreationTime"].isNull())
|
||||
dBInstancesObject.creationTime = valueDBInstancesDBInstance["CreationTime"].asString();
|
||||
if(!valueDBInstancesDBInstance["RegionId"].isNull())
|
||||
dBInstancesObject.regionId = valueDBInstancesDBInstance["RegionId"].asString();
|
||||
if(!valueDBInstancesDBInstance["ExpireTime"].isNull())
|
||||
dBInstancesObject.expireTime = valueDBInstancesDBInstance["ExpireTime"].asString();
|
||||
if(!valueDBInstancesDBInstance["KindCode"].isNull())
|
||||
dBInstancesObject.kindCode = valueDBInstancesDBInstance["KindCode"].asString();
|
||||
auto allMongosListNode = valueDBInstancesDBInstance["MongosList"]["MongosAttribute"];
|
||||
for (auto valueDBInstancesDBInstanceMongosListMongosAttribute : allMongosListNode)
|
||||
{
|
||||
DBInstance::MongosAttribute mongosListObject;
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["NodeId"].isNull())
|
||||
mongosListObject.nodeId = valueDBInstancesDBInstanceMongosListMongosAttribute["NodeId"].asString();
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["NodeDescription"].isNull())
|
||||
mongosListObject.nodeDescription = valueDBInstancesDBInstanceMongosListMongosAttribute["NodeDescription"].asString();
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["NodeClass"].isNull())
|
||||
mongosListObject.nodeClass = valueDBInstancesDBInstanceMongosListMongosAttribute["NodeClass"].asString();
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["ConnectSting"].isNull())
|
||||
mongosListObject.connectSting = valueDBInstancesDBInstanceMongosListMongosAttribute["ConnectSting"].asString();
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["MaxIOPS"].isNull())
|
||||
mongosListObject.maxIOPS = std::stoi(valueDBInstancesDBInstanceMongosListMongosAttribute["MaxIOPS"].asString());
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["NodeClass"].isNull())
|
||||
mongosListObject.nodeClass = valueDBInstancesDBInstanceMongosListMongosAttribute["NodeClass"].asString();
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["NodeDescription"].isNull())
|
||||
mongosListObject.nodeDescription = valueDBInstancesDBInstanceMongosListMongosAttribute["NodeDescription"].asString();
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["MaxConnections"].isNull())
|
||||
mongosListObject.maxConnections = std::stoi(valueDBInstancesDBInstanceMongosListMongosAttribute["MaxConnections"].asString());
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["Port"].isNull())
|
||||
mongosListObject.port = std::stoi(valueDBInstancesDBInstanceMongosListMongosAttribute["Port"].asString());
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["VpcCloudInstanceId"].isNull())
|
||||
mongosListObject.vpcCloudInstanceId = valueDBInstancesDBInstanceMongosListMongosAttribute["VpcCloudInstanceId"].asString();
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["VPCId"].isNull())
|
||||
mongosListObject.vPCId = valueDBInstancesDBInstanceMongosListMongosAttribute["VPCId"].asString();
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["Port"].isNull())
|
||||
mongosListObject.port = std::stoi(valueDBInstancesDBInstanceMongosListMongosAttribute["Port"].asString());
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["VSwitchId"].isNull())
|
||||
mongosListObject.vSwitchId = valueDBInstancesDBInstanceMongosListMongosAttribute["VSwitchId"].asString();
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["NodeId"].isNull())
|
||||
mongosListObject.nodeId = valueDBInstancesDBInstanceMongosListMongosAttribute["NodeId"].asString();
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["VpcCloudInstanceId"].isNull())
|
||||
mongosListObject.vpcCloudInstanceId = valueDBInstancesDBInstanceMongosListMongosAttribute["VpcCloudInstanceId"].asString();
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["MaxIOPS"].isNull())
|
||||
mongosListObject.maxIOPS = std::stoi(valueDBInstancesDBInstanceMongosListMongosAttribute["MaxIOPS"].asString());
|
||||
dBInstancesObject.mongosList.push_back(mongosListObject);
|
||||
}
|
||||
auto allShardListNode = valueDBInstancesDBInstance["ShardList"]["ShardAttribute"];
|
||||
for (auto valueDBInstancesDBInstanceShardListShardAttribute : allShardListNode)
|
||||
{
|
||||
DBInstance::ShardAttribute shardListObject;
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["NodeId"].isNull())
|
||||
shardListObject.nodeId = valueDBInstancesDBInstanceShardListShardAttribute["NodeId"].asString();
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["NodeDescription"].isNull())
|
||||
shardListObject.nodeDescription = valueDBInstancesDBInstanceShardListShardAttribute["NodeDescription"].asString();
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["NodeClass"].isNull())
|
||||
shardListObject.nodeClass = valueDBInstancesDBInstanceShardListShardAttribute["NodeClass"].asString();
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["NodeStorage"].isNull())
|
||||
shardListObject.nodeStorage = std::stoi(valueDBInstancesDBInstanceShardListShardAttribute["NodeStorage"].asString());
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["MaxIOPS"].isNull())
|
||||
shardListObject.maxIOPS = std::stoi(valueDBInstancesDBInstanceShardListShardAttribute["MaxIOPS"].asString());
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["NodeDescription"].isNull())
|
||||
shardListObject.nodeDescription = valueDBInstancesDBInstanceShardListShardAttribute["NodeDescription"].asString();
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["ReadonlyReplicas"].isNull())
|
||||
shardListObject.readonlyReplicas = std::stoi(valueDBInstancesDBInstanceShardListShardAttribute["ReadonlyReplicas"].asString());
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["MaxConnections"].isNull())
|
||||
shardListObject.maxConnections = std::stoi(valueDBInstancesDBInstanceShardListShardAttribute["MaxConnections"].asString());
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["ConnectString"].isNull())
|
||||
shardListObject.connectString = valueDBInstancesDBInstanceShardListShardAttribute["ConnectString"].asString();
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["Port"].isNull())
|
||||
shardListObject.port = std::stoi(valueDBInstancesDBInstanceShardListShardAttribute["Port"].asString());
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["NodeStorage"].isNull())
|
||||
shardListObject.nodeStorage = std::stoi(valueDBInstancesDBInstanceShardListShardAttribute["NodeStorage"].asString());
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["NodeId"].isNull())
|
||||
shardListObject.nodeId = valueDBInstancesDBInstanceShardListShardAttribute["NodeId"].asString();
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["ConnectString"].isNull())
|
||||
shardListObject.connectString = valueDBInstancesDBInstanceShardListShardAttribute["ConnectString"].asString();
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["MaxIOPS"].isNull())
|
||||
shardListObject.maxIOPS = std::stoi(valueDBInstancesDBInstanceShardListShardAttribute["MaxIOPS"].asString());
|
||||
dBInstancesObject.shardList.push_back(shardListObject);
|
||||
}
|
||||
auto allConfigserverListNode = valueDBInstancesDBInstance["ConfigserverList"]["ConfigserverAttribute"];
|
||||
for (auto valueDBInstancesDBInstanceConfigserverListConfigserverAttribute : allConfigserverListNode)
|
||||
{
|
||||
DBInstance::ConfigserverAttribute configserverListObject;
|
||||
if(!valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["NodeId"].isNull())
|
||||
configserverListObject.nodeId = valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["NodeId"].asString();
|
||||
if(!valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["NodeDescription"].isNull())
|
||||
configserverListObject.nodeDescription = valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["NodeDescription"].asString();
|
||||
if(!valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["NodeClass"].isNull())
|
||||
configserverListObject.nodeClass = valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["NodeClass"].asString();
|
||||
if(!valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["NodeStorage"].isNull())
|
||||
configserverListObject.nodeStorage = std::stoi(valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["NodeStorage"].asString());
|
||||
if(!valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["MaxIOPS"].isNull())
|
||||
configserverListObject.maxIOPS = std::stoi(valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["MaxIOPS"].asString());
|
||||
if(!valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["NodeDescription"].isNull())
|
||||
configserverListObject.nodeDescription = valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["NodeDescription"].asString();
|
||||
if(!valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["MaxConnections"].isNull())
|
||||
configserverListObject.maxConnections = std::stoi(valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["MaxConnections"].asString());
|
||||
if(!valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["ConnectString"].isNull())
|
||||
configserverListObject.connectString = valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["ConnectString"].asString();
|
||||
if(!valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["Port"].isNull())
|
||||
configserverListObject.port = std::stoi(valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["Port"].asString());
|
||||
if(!valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["NodeStorage"].isNull())
|
||||
configserverListObject.nodeStorage = std::stoi(valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["NodeStorage"].asString());
|
||||
if(!valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["NodeId"].isNull())
|
||||
configserverListObject.nodeId = valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["NodeId"].asString();
|
||||
if(!valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["ConnectString"].isNull())
|
||||
configserverListObject.connectString = valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["ConnectString"].asString();
|
||||
if(!valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["MaxIOPS"].isNull())
|
||||
configserverListObject.maxIOPS = std::stoi(valueDBInstancesDBInstanceConfigserverListConfigserverAttribute["MaxIOPS"].asString());
|
||||
dBInstancesObject.configserverList.push_back(configserverListObject);
|
||||
}
|
||||
auto allReplicaSetsNode = valueDBInstancesDBInstance["ReplicaSets"]["ReplicaSet"];
|
||||
for (auto valueDBInstancesDBInstanceReplicaSetsReplicaSet : allReplicaSetsNode)
|
||||
{
|
||||
DBInstance::ReplicaSet replicaSetsObject;
|
||||
if(!valueDBInstancesDBInstanceReplicaSetsReplicaSet["ReplicaSetRole"].isNull())
|
||||
replicaSetsObject.replicaSetRole = valueDBInstancesDBInstanceReplicaSetsReplicaSet["ReplicaSetRole"].asString();
|
||||
if(!valueDBInstancesDBInstanceReplicaSetsReplicaSet["ConnectionDomain"].isNull())
|
||||
replicaSetsObject.connectionDomain = valueDBInstancesDBInstanceReplicaSetsReplicaSet["ConnectionDomain"].asString();
|
||||
if(!valueDBInstancesDBInstanceReplicaSetsReplicaSet["ConnectionPort"].isNull())
|
||||
replicaSetsObject.connectionPort = valueDBInstancesDBInstanceReplicaSetsReplicaSet["ConnectionPort"].asString();
|
||||
if(!valueDBInstancesDBInstanceReplicaSetsReplicaSet["VPCCloudInstanceId"].isNull())
|
||||
replicaSetsObject.vPCCloudInstanceId = valueDBInstancesDBInstanceReplicaSetsReplicaSet["VPCCloudInstanceId"].asString();
|
||||
if(!valueDBInstancesDBInstanceReplicaSetsReplicaSet["VPCId"].isNull())
|
||||
replicaSetsObject.vPCId = valueDBInstancesDBInstanceReplicaSetsReplicaSet["VPCId"].asString();
|
||||
if(!valueDBInstancesDBInstanceReplicaSetsReplicaSet["VSwitchId"].isNull())
|
||||
replicaSetsObject.vSwitchId = valueDBInstancesDBInstanceReplicaSetsReplicaSet["VSwitchId"].asString();
|
||||
if(!valueDBInstancesDBInstanceReplicaSetsReplicaSet["NetworkType"].isNull())
|
||||
replicaSetsObject.networkType = valueDBInstancesDBInstanceReplicaSetsReplicaSet["NetworkType"].asString();
|
||||
dBInstancesObject.replicaSets.push_back(replicaSetsObject);
|
||||
}
|
||||
auto allTagsNode = valueDBInstancesDBInstance["Tags"]["Tag"];
|
||||
for (auto valueDBInstancesDBInstanceTagsTag : allTagsNode)
|
||||
{
|
||||
DBInstance::Tag tagsObject;
|
||||
if(!valueDBInstancesDBInstanceTagsTag["Key"].isNull())
|
||||
tagsObject.key = valueDBInstancesDBInstanceTagsTag["Key"].asString();
|
||||
if(!valueDBInstancesDBInstanceTagsTag["Value"].isNull())
|
||||
tagsObject.value = valueDBInstancesDBInstanceTagsTag["Value"].asString();
|
||||
if(!valueDBInstancesDBInstanceTagsTag["Key"].isNull())
|
||||
tagsObject.key = valueDBInstancesDBInstanceTagsTag["Key"].asString();
|
||||
dBInstancesObject.tags.push_back(tagsObject);
|
||||
}
|
||||
auto allReplicaSetsNode = valueDBInstancesDBInstance["ReplicaSets"]["ReplicaSet"];
|
||||
for (auto valueDBInstancesDBInstanceReplicaSetsReplicaSet : allReplicaSetsNode)
|
||||
{
|
||||
DBInstance::ReplicaSet replicaSetsObject;
|
||||
if(!valueDBInstancesDBInstanceReplicaSetsReplicaSet["ConnectionDomain"].isNull())
|
||||
replicaSetsObject.connectionDomain = valueDBInstancesDBInstanceReplicaSetsReplicaSet["ConnectionDomain"].asString();
|
||||
if(!valueDBInstancesDBInstanceReplicaSetsReplicaSet["ReplicaSetRole"].isNull())
|
||||
replicaSetsObject.replicaSetRole = valueDBInstancesDBInstanceReplicaSetsReplicaSet["ReplicaSetRole"].asString();
|
||||
if(!valueDBInstancesDBInstanceReplicaSetsReplicaSet["VPCCloudInstanceId"].isNull())
|
||||
replicaSetsObject.vPCCloudInstanceId = valueDBInstancesDBInstanceReplicaSetsReplicaSet["VPCCloudInstanceId"].asString();
|
||||
if(!valueDBInstancesDBInstanceReplicaSetsReplicaSet["VPCId"].isNull())
|
||||
replicaSetsObject.vPCId = valueDBInstancesDBInstanceReplicaSetsReplicaSet["VPCId"].asString();
|
||||
if(!valueDBInstancesDBInstanceReplicaSetsReplicaSet["ConnectionPort"].isNull())
|
||||
replicaSetsObject.connectionPort = valueDBInstancesDBInstanceReplicaSetsReplicaSet["ConnectionPort"].asString();
|
||||
if(!valueDBInstancesDBInstanceReplicaSetsReplicaSet["NetworkType"].isNull())
|
||||
replicaSetsObject.networkType = valueDBInstancesDBInstanceReplicaSetsReplicaSet["NetworkType"].asString();
|
||||
if(!valueDBInstancesDBInstanceReplicaSetsReplicaSet["VSwitchId"].isNull())
|
||||
replicaSetsObject.vSwitchId = valueDBInstancesDBInstanceReplicaSetsReplicaSet["VSwitchId"].asString();
|
||||
dBInstancesObject.replicaSets.push_back(replicaSetsObject);
|
||||
}
|
||||
dBInstances_.push_back(dBInstancesObject);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,70 +43,72 @@ void DescribeDBInstancesResult::parse(const std::string &payload)
|
||||
for (auto valueDBInstancesDBInstance : allDBInstancesNode)
|
||||
{
|
||||
DBInstance dBInstancesObject;
|
||||
if(!valueDBInstancesDBInstance["ResourceGroupId"].isNull())
|
||||
dBInstancesObject.resourceGroupId = valueDBInstancesDBInstance["ResourceGroupId"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceId"].isNull())
|
||||
dBInstancesObject.dBInstanceId = valueDBInstancesDBInstance["DBInstanceId"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceDescription"].isNull())
|
||||
dBInstancesObject.dBInstanceDescription = valueDBInstancesDBInstance["DBInstanceDescription"].asString();
|
||||
if(!valueDBInstancesDBInstance["RegionId"].isNull())
|
||||
dBInstancesObject.regionId = valueDBInstancesDBInstance["RegionId"].asString();
|
||||
if(!valueDBInstancesDBInstance["ZoneId"].isNull())
|
||||
dBInstancesObject.zoneId = valueDBInstancesDBInstance["ZoneId"].asString();
|
||||
if(!valueDBInstancesDBInstance["Engine"].isNull())
|
||||
dBInstancesObject.engine = valueDBInstancesDBInstance["Engine"].asString();
|
||||
if(!valueDBInstancesDBInstance["EngineVersion"].isNull())
|
||||
dBInstancesObject.engineVersion = valueDBInstancesDBInstance["EngineVersion"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceClass"].isNull())
|
||||
dBInstancesObject.dBInstanceClass = valueDBInstancesDBInstance["DBInstanceClass"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceStorage"].isNull())
|
||||
dBInstancesObject.dBInstanceStorage = std::stoi(valueDBInstancesDBInstance["DBInstanceStorage"].asString());
|
||||
if(!valueDBInstancesDBInstance["KindCode"].isNull())
|
||||
dBInstancesObject.kindCode = valueDBInstancesDBInstance["KindCode"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceStatus"].isNull())
|
||||
dBInstancesObject.dBInstanceStatus = valueDBInstancesDBInstance["DBInstanceStatus"].asString();
|
||||
if(!valueDBInstancesDBInstance["LockMode"].isNull())
|
||||
dBInstancesObject.lockMode = valueDBInstancesDBInstance["LockMode"].asString();
|
||||
if(!valueDBInstancesDBInstance["ChargeType"].isNull())
|
||||
dBInstancesObject.chargeType = valueDBInstancesDBInstance["ChargeType"].asString();
|
||||
if(!valueDBInstancesDBInstance["NetworkType"].isNull())
|
||||
dBInstancesObject.networkType = valueDBInstancesDBInstance["NetworkType"].asString();
|
||||
if(!valueDBInstancesDBInstance["CreationTime"].isNull())
|
||||
dBInstancesObject.creationTime = valueDBInstancesDBInstance["CreationTime"].asString();
|
||||
if(!valueDBInstancesDBInstance["ExpireTime"].isNull())
|
||||
dBInstancesObject.expireTime = valueDBInstancesDBInstance["ExpireTime"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceType"].isNull())
|
||||
dBInstancesObject.dBInstanceType = valueDBInstancesDBInstance["DBInstanceType"].asString();
|
||||
if(!valueDBInstancesDBInstance["LastDowngradeTime"].isNull())
|
||||
dBInstancesObject.lastDowngradeTime = valueDBInstancesDBInstance["LastDowngradeTime"].asString();
|
||||
if(!valueDBInstancesDBInstance["ReplicationFactor"].isNull())
|
||||
dBInstancesObject.replicationFactor = valueDBInstancesDBInstance["ReplicationFactor"].asString();
|
||||
if(!valueDBInstancesDBInstance["ZoneId"].isNull())
|
||||
dBInstancesObject.zoneId = valueDBInstancesDBInstance["ZoneId"].asString();
|
||||
if(!valueDBInstancesDBInstance["ResourceGroupId"].isNull())
|
||||
dBInstancesObject.resourceGroupId = valueDBInstancesDBInstance["ResourceGroupId"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceStatus"].isNull())
|
||||
dBInstancesObject.dBInstanceStatus = valueDBInstancesDBInstance["DBInstanceStatus"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceClass"].isNull())
|
||||
dBInstancesObject.dBInstanceClass = valueDBInstancesDBInstance["DBInstanceClass"].asString();
|
||||
if(!valueDBInstancesDBInstance["DestroyTime"].isNull())
|
||||
dBInstancesObject.destroyTime = valueDBInstancesDBInstance["DestroyTime"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceType"].isNull())
|
||||
dBInstancesObject.dBInstanceType = valueDBInstancesDBInstance["DBInstanceType"].asString();
|
||||
if(!valueDBInstancesDBInstance["LockMode"].isNull())
|
||||
dBInstancesObject.lockMode = valueDBInstancesDBInstance["LockMode"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceId"].isNull())
|
||||
dBInstancesObject.dBInstanceId = valueDBInstancesDBInstance["DBInstanceId"].asString();
|
||||
if(!valueDBInstancesDBInstance["NetworkType"].isNull())
|
||||
dBInstancesObject.networkType = valueDBInstancesDBInstance["NetworkType"].asString();
|
||||
if(!valueDBInstancesDBInstance["VpcAuthMode"].isNull())
|
||||
dBInstancesObject.vpcAuthMode = valueDBInstancesDBInstance["VpcAuthMode"].asString();
|
||||
if(!valueDBInstancesDBInstance["ChargeType"].isNull())
|
||||
dBInstancesObject.chargeType = valueDBInstancesDBInstance["ChargeType"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceStorage"].isNull())
|
||||
dBInstancesObject.dBInstanceStorage = std::stoi(valueDBInstancesDBInstance["DBInstanceStorage"].asString());
|
||||
if(!valueDBInstancesDBInstance["LastDowngradeTime"].isNull())
|
||||
dBInstancesObject.lastDowngradeTime = valueDBInstancesDBInstance["LastDowngradeTime"].asString();
|
||||
if(!valueDBInstancesDBInstance["CreationTime"].isNull())
|
||||
dBInstancesObject.creationTime = valueDBInstancesDBInstance["CreationTime"].asString();
|
||||
if(!valueDBInstancesDBInstance["RegionId"].isNull())
|
||||
dBInstancesObject.regionId = valueDBInstancesDBInstance["RegionId"].asString();
|
||||
if(!valueDBInstancesDBInstance["ExpireTime"].isNull())
|
||||
dBInstancesObject.expireTime = valueDBInstancesDBInstance["ExpireTime"].asString();
|
||||
if(!valueDBInstancesDBInstance["KindCode"].isNull())
|
||||
dBInstancesObject.kindCode = valueDBInstancesDBInstance["KindCode"].asString();
|
||||
if(!valueDBInstancesDBInstance["Engine"].isNull())
|
||||
dBInstancesObject.engine = valueDBInstancesDBInstance["Engine"].asString();
|
||||
if(!valueDBInstancesDBInstance["DBInstanceDescription"].isNull())
|
||||
dBInstancesObject.dBInstanceDescription = valueDBInstancesDBInstance["DBInstanceDescription"].asString();
|
||||
auto allMongosListNode = valueDBInstancesDBInstance["MongosList"]["MongosAttribute"];
|
||||
for (auto valueDBInstancesDBInstanceMongosListMongosAttribute : allMongosListNode)
|
||||
{
|
||||
DBInstance::MongosAttribute mongosListObject;
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["NodeId"].isNull())
|
||||
mongosListObject.nodeId = valueDBInstancesDBInstanceMongosListMongosAttribute["NodeId"].asString();
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["NodeDescription"].isNull())
|
||||
mongosListObject.nodeDescription = valueDBInstancesDBInstanceMongosListMongosAttribute["NodeDescription"].asString();
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["NodeClass"].isNull())
|
||||
mongosListObject.nodeClass = valueDBInstancesDBInstanceMongosListMongosAttribute["NodeClass"].asString();
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["NodeDescription"].isNull())
|
||||
mongosListObject.nodeDescription = valueDBInstancesDBInstanceMongosListMongosAttribute["NodeDescription"].asString();
|
||||
if(!valueDBInstancesDBInstanceMongosListMongosAttribute["NodeId"].isNull())
|
||||
mongosListObject.nodeId = valueDBInstancesDBInstanceMongosListMongosAttribute["NodeId"].asString();
|
||||
dBInstancesObject.mongosList.push_back(mongosListObject);
|
||||
}
|
||||
auto allShardListNode = valueDBInstancesDBInstance["ShardList"]["ShardAttribute"];
|
||||
for (auto valueDBInstancesDBInstanceShardListShardAttribute : allShardListNode)
|
||||
{
|
||||
DBInstance::ShardAttribute shardListObject;
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["NodeId"].isNull())
|
||||
shardListObject.nodeId = valueDBInstancesDBInstanceShardListShardAttribute["NodeId"].asString();
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["NodeDescription"].isNull())
|
||||
shardListObject.nodeDescription = valueDBInstancesDBInstanceShardListShardAttribute["NodeDescription"].asString();
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["NodeClass"].isNull())
|
||||
shardListObject.nodeClass = valueDBInstancesDBInstanceShardListShardAttribute["NodeClass"].asString();
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["NodeDescription"].isNull())
|
||||
shardListObject.nodeDescription = valueDBInstancesDBInstanceShardListShardAttribute["NodeDescription"].asString();
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["ReadonlyReplicas"].isNull())
|
||||
shardListObject.readonlyReplicas = std::stoi(valueDBInstancesDBInstanceShardListShardAttribute["ReadonlyReplicas"].asString());
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["NodeId"].isNull())
|
||||
shardListObject.nodeId = valueDBInstancesDBInstanceShardListShardAttribute["NodeId"].asString();
|
||||
if(!valueDBInstancesDBInstanceShardListShardAttribute["NodeStorage"].isNull())
|
||||
shardListObject.nodeStorage = std::stoi(valueDBInstancesDBInstanceShardListShardAttribute["NodeStorage"].asString());
|
||||
dBInstancesObject.shardList.push_back(shardListObject);
|
||||
@@ -115,20 +117,20 @@ void DescribeDBInstancesResult::parse(const std::string &payload)
|
||||
for (auto valueDBInstancesDBInstanceTagsTag : allTagsNode)
|
||||
{
|
||||
DBInstance::Tag tagsObject;
|
||||
if(!valueDBInstancesDBInstanceTagsTag["Key"].isNull())
|
||||
tagsObject.key = valueDBInstancesDBInstanceTagsTag["Key"].asString();
|
||||
if(!valueDBInstancesDBInstanceTagsTag["Value"].isNull())
|
||||
tagsObject.value = valueDBInstancesDBInstanceTagsTag["Value"].asString();
|
||||
if(!valueDBInstancesDBInstanceTagsTag["Key"].isNull())
|
||||
tagsObject.key = valueDBInstancesDBInstanceTagsTag["Key"].asString();
|
||||
dBInstancesObject.tags.push_back(tagsObject);
|
||||
}
|
||||
dBInstances_.push_back(dBInstancesObject);
|
||||
}
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -43,26 +43,26 @@ void DescribeErrorLogRecordsResult::parse(const std::string &payload)
|
||||
for (auto valueItemsLogRecords : allItemsNode)
|
||||
{
|
||||
LogRecords itemsObject;
|
||||
if(!valueItemsLogRecords["Id"].isNull())
|
||||
itemsObject.id = std::stoi(valueItemsLogRecords["Id"].asString());
|
||||
if(!valueItemsLogRecords["CreateTime"].isNull())
|
||||
itemsObject.createTime = valueItemsLogRecords["CreateTime"].asString();
|
||||
if(!valueItemsLogRecords["Category"].isNull())
|
||||
itemsObject.category = valueItemsLogRecords["Category"].asString();
|
||||
if(!valueItemsLogRecords["ConnInfo"].isNull())
|
||||
itemsObject.connInfo = valueItemsLogRecords["ConnInfo"].asString();
|
||||
if(!valueItemsLogRecords["Category"].isNull())
|
||||
itemsObject.category = valueItemsLogRecords["Category"].asString();
|
||||
if(!valueItemsLogRecords["Content"].isNull())
|
||||
itemsObject.content = valueItemsLogRecords["Content"].asString();
|
||||
if(!valueItemsLogRecords["CreateTime"].isNull())
|
||||
itemsObject.createTime = valueItemsLogRecords["CreateTime"].asString();
|
||||
if(!valueItemsLogRecords["Id"].isNull())
|
||||
itemsObject.id = std::stoi(valueItemsLogRecords["Id"].asString());
|
||||
items_.push_back(itemsObject);
|
||||
}
|
||||
if(!value["Engine"].isNull())
|
||||
engine_ = value["Engine"].asString();
|
||||
if(!value["TotalRecordCount"].isNull())
|
||||
totalRecordCount_ = std::stoi(value["TotalRecordCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageRecordCount"].isNull())
|
||||
pageRecordCount_ = std::stoi(value["PageRecordCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["Engine"].isNull())
|
||||
engine_ = value["Engine"].asString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,205 +0,0 @@
|
||||
/*
|
||||
* 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/dds/model/DescribeIndexRecommendationRequest.h>
|
||||
|
||||
using AlibabaCloud::Dds::Model::DescribeIndexRecommendationRequest;
|
||||
|
||||
DescribeIndexRecommendationRequest::DescribeIndexRecommendationRequest() :
|
||||
RpcServiceRequest("dds", "2015-12-01", "DescribeIndexRecommendation")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeIndexRecommendationRequest::~DescribeIndexRecommendationRequest()
|
||||
{}
|
||||
|
||||
long DescribeIndexRecommendationRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeIndexRecommendationRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeIndexRecommendationRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void DescribeIndexRecommendationRequest::setStartTime(const std::string& startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", startTime);
|
||||
}
|
||||
|
||||
int DescribeIndexRecommendationRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeIndexRecommendationRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string DescribeIndexRecommendationRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void DescribeIndexRecommendationRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string DescribeIndexRecommendationRequest::getDatabase()const
|
||||
{
|
||||
return database_;
|
||||
}
|
||||
|
||||
void DescribeIndexRecommendationRequest::setDatabase(const std::string& database)
|
||||
{
|
||||
database_ = database;
|
||||
setParameter("Database", database);
|
||||
}
|
||||
|
||||
std::string DescribeIndexRecommendationRequest::getSecurityToken()const
|
||||
{
|
||||
return securityToken_;
|
||||
}
|
||||
|
||||
void DescribeIndexRecommendationRequest::setSecurityToken(const std::string& securityToken)
|
||||
{
|
||||
securityToken_ = securityToken;
|
||||
setParameter("SecurityToken", securityToken);
|
||||
}
|
||||
|
||||
int DescribeIndexRecommendationRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeIndexRecommendationRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeIndexRecommendationRequest::getNodeId()const
|
||||
{
|
||||
return nodeId_;
|
||||
}
|
||||
|
||||
void DescribeIndexRecommendationRequest::setNodeId(const std::string& nodeId)
|
||||
{
|
||||
nodeId_ = nodeId;
|
||||
setParameter("NodeId", nodeId);
|
||||
}
|
||||
|
||||
std::string DescribeIndexRecommendationRequest::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void DescribeIndexRecommendationRequest::setTaskId(const std::string& taskId)
|
||||
{
|
||||
taskId_ = taskId;
|
||||
setParameter("TaskId", taskId);
|
||||
}
|
||||
|
||||
std::string DescribeIndexRecommendationRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void DescribeIndexRecommendationRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string DescribeIndexRecommendationRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void DescribeIndexRecommendationRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
std::string DescribeIndexRecommendationRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void DescribeIndexRecommendationRequest::setEndTime(const std::string& endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", endTime);
|
||||
}
|
||||
|
||||
std::string DescribeIndexRecommendationRequest::getCollection()const
|
||||
{
|
||||
return collection_;
|
||||
}
|
||||
|
||||
void DescribeIndexRecommendationRequest::setCollection(const std::string& collection)
|
||||
{
|
||||
collection_ = collection;
|
||||
setParameter("Collection", collection);
|
||||
}
|
||||
|
||||
std::string DescribeIndexRecommendationRequest::getOperationType()const
|
||||
{
|
||||
return operationType_;
|
||||
}
|
||||
|
||||
void DescribeIndexRecommendationRequest::setOperationType(const std::string& operationType)
|
||||
{
|
||||
operationType_ = operationType;
|
||||
setParameter("OperationType", operationType);
|
||||
}
|
||||
|
||||
long DescribeIndexRecommendationRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void DescribeIndexRecommendationRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string DescribeIndexRecommendationRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void DescribeIndexRecommendationRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
/*
|
||||
* 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/dds/model/DescribeIndexRecommendationResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dds;
|
||||
using namespace AlibabaCloud::Dds::Model;
|
||||
|
||||
DescribeIndexRecommendationResult::DescribeIndexRecommendationResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeIndexRecommendationResult::DescribeIndexRecommendationResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeIndexRecommendationResult::~DescribeIndexRecommendationResult()
|
||||
{}
|
||||
|
||||
void DescribeIndexRecommendationResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allAnalyzationsNode = value["Analyzations"]["Analyzation"];
|
||||
for (auto valueAnalyzationsAnalyzation : allAnalyzationsNode)
|
||||
{
|
||||
Analyzation analyzationsObject;
|
||||
if(!valueAnalyzationsAnalyzation["Database"].isNull())
|
||||
analyzationsObject.database = valueAnalyzationsAnalyzation["Database"].asString();
|
||||
if(!valueAnalyzationsAnalyzation["Namespace"].isNull())
|
||||
analyzationsObject._namespace = valueAnalyzationsAnalyzation["Namespace"].asString();
|
||||
if(!valueAnalyzationsAnalyzation["Operation"].isNull())
|
||||
analyzationsObject.operation = valueAnalyzationsAnalyzation["Operation"].asString();
|
||||
if(!valueAnalyzationsAnalyzation["Query"].isNull())
|
||||
analyzationsObject.query = valueAnalyzationsAnalyzation["Query"].asString();
|
||||
if(!valueAnalyzationsAnalyzation["Sort"].isNull())
|
||||
analyzationsObject.sort = valueAnalyzationsAnalyzation["Sort"].asString();
|
||||
if(!valueAnalyzationsAnalyzation["Count"].isNull())
|
||||
analyzationsObject.count = std::stol(valueAnalyzationsAnalyzation["Count"].asString());
|
||||
if(!valueAnalyzationsAnalyzation["TotalExecutionTime"].isNull())
|
||||
analyzationsObject.totalExecutionTime = std::stol(valueAnalyzationsAnalyzation["TotalExecutionTime"].asString());
|
||||
if(!valueAnalyzationsAnalyzation["AverageExecutionTime"].isNull())
|
||||
analyzationsObject.averageExecutionTime = std::stol(valueAnalyzationsAnalyzation["AverageExecutionTime"].asString());
|
||||
if(!valueAnalyzationsAnalyzation["AverageReturnRowCount"].isNull())
|
||||
analyzationsObject.averageReturnRowCount = std::stol(valueAnalyzationsAnalyzation["AverageReturnRowCount"].asString());
|
||||
if(!valueAnalyzationsAnalyzation["AverageDocsExaminedCount"].isNull())
|
||||
analyzationsObject.averageDocsExaminedCount = std::stol(valueAnalyzationsAnalyzation["AverageDocsExaminedCount"].asString());
|
||||
if(!valueAnalyzationsAnalyzation["AverageKeysExaminedCount"].isNull())
|
||||
analyzationsObject.averageKeysExaminedCount = std::stol(valueAnalyzationsAnalyzation["AverageKeysExaminedCount"].asString());
|
||||
if(!valueAnalyzationsAnalyzation["InMemorySort"].isNull())
|
||||
analyzationsObject.inMemorySort = valueAnalyzationsAnalyzation["InMemorySort"].asString();
|
||||
if(!valueAnalyzationsAnalyzation["LastExecutionTime"].isNull())
|
||||
analyzationsObject.lastExecutionTime = valueAnalyzationsAnalyzation["LastExecutionTime"].asString();
|
||||
if(!valueAnalyzationsAnalyzation["ExecutionPlan"].isNull())
|
||||
analyzationsObject.executionPlan = valueAnalyzationsAnalyzation["ExecutionPlan"].asString();
|
||||
auto allIndexRecommendationsNode = valueAnalyzationsAnalyzation["IndexRecommendations"]["Recommendation"];
|
||||
for (auto valueAnalyzationsAnalyzationIndexRecommendationsRecommendation : allIndexRecommendationsNode)
|
||||
{
|
||||
Analyzation::Recommendation indexRecommendationsObject;
|
||||
if(!valueAnalyzationsAnalyzationIndexRecommendationsRecommendation["RecmdType"].isNull())
|
||||
indexRecommendationsObject.recmdType = valueAnalyzationsAnalyzationIndexRecommendationsRecommendation["RecmdType"].asString();
|
||||
if(!valueAnalyzationsAnalyzationIndexRecommendationsRecommendation["Content"].isNull())
|
||||
indexRecommendationsObject.content = valueAnalyzationsAnalyzationIndexRecommendationsRecommendation["Content"].asString();
|
||||
analyzationsObject.indexRecommendations.push_back(indexRecommendationsObject);
|
||||
}
|
||||
auto allIndexCombines = value["IndexCombines"]["IndexCombine"];
|
||||
for (auto value : allIndexCombines)
|
||||
analyzationsObject.indexCombines.push_back(value.asString());
|
||||
analyzations_.push_back(analyzationsObject);
|
||||
}
|
||||
if(!value["TotalRecordCount"].isNull())
|
||||
totalRecordCount_ = std::stoi(value["TotalRecordCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageRecordCount"].isNull())
|
||||
pageRecordCount_ = std::stoi(value["PageRecordCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
int DescribeIndexRecommendationResult::getTotalRecordCount()const
|
||||
{
|
||||
return totalRecordCount_;
|
||||
}
|
||||
|
||||
int DescribeIndexRecommendationResult::getPageRecordCount()const
|
||||
{
|
||||
return pageRecordCount_;
|
||||
}
|
||||
|
||||
std::vector<DescribeIndexRecommendationResult::Analyzation> DescribeIndexRecommendationResult::getAnalyzations()const
|
||||
{
|
||||
return analyzations_;
|
||||
}
|
||||
|
||||
int DescribeIndexRecommendationResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
@@ -38,15 +38,15 @@ void DescribeInstanceAutoRenewalAttributeRequest::setResourceOwnerId(long resour
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeInstanceAutoRenewalAttributeRequest::getPageNumber()const
|
||||
long DescribeInstanceAutoRenewalAttributeRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeInstanceAutoRenewalAttributeRequest::setPageNumber(const std::string& pageNumber)
|
||||
void DescribeInstanceAutoRenewalAttributeRequest::setPageNumber(long pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", pageNumber);
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string DescribeInstanceAutoRenewalAttributeRequest::getAccessKeyId()const
|
||||
@@ -82,15 +82,15 @@ void DescribeInstanceAutoRenewalAttributeRequest::setRegionId(const std::string&
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string DescribeInstanceAutoRenewalAttributeRequest::getPageSize()const
|
||||
long DescribeInstanceAutoRenewalAttributeRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeInstanceAutoRenewalAttributeRequest::setPageSize(const std::string& pageSize)
|
||||
void DescribeInstanceAutoRenewalAttributeRequest::setPageSize(long pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", pageSize);
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeInstanceAutoRenewalAttributeRequest::getDBInstanceId()const
|
||||
|
||||
@@ -43,24 +43,24 @@ void DescribeInstanceAutoRenewalAttributeResult::parse(const std::string &payloa
|
||||
for (auto valueItemsItem : allItemsNode)
|
||||
{
|
||||
Item itemsObject;
|
||||
if(!valueItemsItem["DbInstanceId"].isNull())
|
||||
itemsObject.dbInstanceId = valueItemsItem["DbInstanceId"].asString();
|
||||
if(!valueItemsItem["RegionId"].isNull())
|
||||
itemsObject.regionId = valueItemsItem["RegionId"].asString();
|
||||
if(!valueItemsItem["Duration"].isNull())
|
||||
itemsObject.duration = valueItemsItem["Duration"].asString();
|
||||
if(!valueItemsItem["AutoRenew"].isNull())
|
||||
itemsObject.autoRenew = valueItemsItem["AutoRenew"].asString();
|
||||
if(!valueItemsItem["DBInstanceType"].isNull())
|
||||
itemsObject.dBInstanceType = valueItemsItem["DBInstanceType"].asString();
|
||||
if(!valueItemsItem["Duration"].isNull())
|
||||
itemsObject.duration = valueItemsItem["Duration"].asString();
|
||||
if(!valueItemsItem["RegionId"].isNull())
|
||||
itemsObject.regionId = valueItemsItem["RegionId"].asString();
|
||||
if(!valueItemsItem["DbInstanceId"].isNull())
|
||||
itemsObject.dbInstanceId = valueItemsItem["DbInstanceId"].asString();
|
||||
items_.push_back(itemsObject);
|
||||
}
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageRecordCount"].isNull())
|
||||
pageRecordCount_ = std::stoi(value["PageRecordCount"].asString());
|
||||
if(!value["ItemsNumbers"].isNull())
|
||||
itemsNumbers_ = std::stoi(value["ItemsNumbers"].asString());
|
||||
if(!value["PageRecordCount"].isNull())
|
||||
pageRecordCount_ = std::stoi(value["PageRecordCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -39,56 +39,56 @@ void DescribePriceResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allSubOrdersNode = value["SubOrders"]["SubOrder"];
|
||||
for (auto valueSubOrdersSubOrder : allSubOrdersNode)
|
||||
{
|
||||
SubOrder subOrdersObject;
|
||||
if(!valueSubOrdersSubOrder["InstanceId"].isNull())
|
||||
subOrdersObject.instanceId = valueSubOrdersSubOrder["InstanceId"].asString();
|
||||
if(!valueSubOrdersSubOrder["TradeAmount"].isNull())
|
||||
subOrdersObject.tradeAmount = valueSubOrdersSubOrder["TradeAmount"].asString();
|
||||
if(!valueSubOrdersSubOrder["OriginalAmount"].isNull())
|
||||
subOrdersObject.originalAmount = valueSubOrdersSubOrder["OriginalAmount"].asString();
|
||||
if(!valueSubOrdersSubOrder["DiscountAmount"].isNull())
|
||||
subOrdersObject.discountAmount = valueSubOrdersSubOrder["DiscountAmount"].asString();
|
||||
auto allRuleIds = value["RuleIds"]["RuleId"];
|
||||
for (auto value : allRuleIds)
|
||||
subOrdersObject.ruleIds.push_back(value.asString());
|
||||
subOrders_.push_back(subOrdersObject);
|
||||
}
|
||||
auto allRulesNode = value["Rules"]["Rule"];
|
||||
for (auto valueRulesRule : allRulesNode)
|
||||
{
|
||||
Rule rulesObject;
|
||||
if(!valueRulesRule["RuleDescId"].isNull())
|
||||
rulesObject.ruleDescId = std::stol(valueRulesRule["RuleDescId"].asString());
|
||||
if(!valueRulesRule["Name"].isNull())
|
||||
rulesObject.name = valueRulesRule["Name"].asString();
|
||||
if(!valueRulesRule["Title"].isNull())
|
||||
rulesObject.title = valueRulesRule["Title"].asString();
|
||||
if(!valueRulesRule["Name"].isNull())
|
||||
rulesObject.name = valueRulesRule["Name"].asString();
|
||||
rules_.push_back(rulesObject);
|
||||
}
|
||||
auto allSubOrdersNode = value["SubOrders"]["SubOrder"];
|
||||
for (auto valueSubOrdersSubOrder : allSubOrdersNode)
|
||||
{
|
||||
SubOrder subOrdersObject;
|
||||
if(!valueSubOrdersSubOrder["OriginalAmount"].isNull())
|
||||
subOrdersObject.originalAmount = valueSubOrdersSubOrder["OriginalAmount"].asString();
|
||||
if(!valueSubOrdersSubOrder["TradeAmount"].isNull())
|
||||
subOrdersObject.tradeAmount = valueSubOrdersSubOrder["TradeAmount"].asString();
|
||||
if(!valueSubOrdersSubOrder["DiscountAmount"].isNull())
|
||||
subOrdersObject.discountAmount = valueSubOrdersSubOrder["DiscountAmount"].asString();
|
||||
if(!valueSubOrdersSubOrder["InstanceId"].isNull())
|
||||
subOrdersObject.instanceId = valueSubOrdersSubOrder["InstanceId"].asString();
|
||||
auto allRuleIds = value["RuleIds"]["RuleId"];
|
||||
for (auto value : allRuleIds)
|
||||
subOrdersObject.ruleIds.push_back(value.asString());
|
||||
subOrders_.push_back(subOrdersObject);
|
||||
}
|
||||
auto orderNode = value["Order"];
|
||||
if(!orderNode["OriginalAmount"].isNull())
|
||||
order_.originalAmount = orderNode["OriginalAmount"].asString();
|
||||
if(!orderNode["TradeAmount"].isNull())
|
||||
order_.tradeAmount = orderNode["TradeAmount"].asString();
|
||||
if(!orderNode["DiscountAmount"].isNull())
|
||||
order_.discountAmount = orderNode["DiscountAmount"].asString();
|
||||
if(!orderNode["Currency"].isNull())
|
||||
order_.currency = orderNode["Currency"].asString();
|
||||
if(!orderNode["TradeAmount"].isNull())
|
||||
order_.tradeAmount = orderNode["TradeAmount"].asString();
|
||||
if(!orderNode["OriginalAmount"].isNull())
|
||||
order_.originalAmount = orderNode["OriginalAmount"].asString();
|
||||
if(!orderNode["DiscountAmount"].isNull())
|
||||
order_.discountAmount = orderNode["DiscountAmount"].asString();
|
||||
auto allCouponsNode = orderNode["Coupons"]["Coupon"];
|
||||
for (auto orderNodeCouponsCoupon : allCouponsNode)
|
||||
{
|
||||
Order::Coupon couponObject;
|
||||
if(!orderNodeCouponsCoupon["CouponNo"].isNull())
|
||||
couponObject.couponNo = orderNodeCouponsCoupon["CouponNo"].asString();
|
||||
if(!orderNodeCouponsCoupon["Name"].isNull())
|
||||
couponObject.name = orderNodeCouponsCoupon["Name"].asString();
|
||||
if(!orderNodeCouponsCoupon["Description"].isNull())
|
||||
couponObject.description = orderNodeCouponsCoupon["Description"].asString();
|
||||
if(!orderNodeCouponsCoupon["IsSelected"].isNull())
|
||||
couponObject.isSelected = orderNodeCouponsCoupon["IsSelected"].asString();
|
||||
if(!orderNodeCouponsCoupon["Name"].isNull())
|
||||
couponObject.name = orderNodeCouponsCoupon["Name"].asString();
|
||||
order_.coupons.push_back(couponObject);
|
||||
}
|
||||
auto allRuleIds1 = orderNode["RuleIds"]["RuleId"];
|
||||
|
||||
@@ -38,6 +38,17 @@ void DescribeRunningLogRecordsRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeRunningLogRecordsRequest::getRoleId()const
|
||||
{
|
||||
return roleId_;
|
||||
}
|
||||
|
||||
void DescribeRunningLogRecordsRequest::setRoleId(const std::string& roleId)
|
||||
{
|
||||
roleId_ = roleId;
|
||||
setParameter("RoleId", roleId);
|
||||
}
|
||||
|
||||
std::string DescribeRunningLogRecordsRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
|
||||
@@ -43,26 +43,26 @@ void DescribeRunningLogRecordsResult::parse(const std::string &payload)
|
||||
for (auto valueItemsLogRecords : allItemsNode)
|
||||
{
|
||||
LogRecords itemsObject;
|
||||
if(!valueItemsLogRecords["Id"].isNull())
|
||||
itemsObject.id = std::stoi(valueItemsLogRecords["Id"].asString());
|
||||
if(!valueItemsLogRecords["CreateTime"].isNull())
|
||||
itemsObject.createTime = valueItemsLogRecords["CreateTime"].asString();
|
||||
if(!valueItemsLogRecords["Category"].isNull())
|
||||
itemsObject.category = valueItemsLogRecords["Category"].asString();
|
||||
if(!valueItemsLogRecords["ConnInfo"].isNull())
|
||||
itemsObject.connInfo = valueItemsLogRecords["ConnInfo"].asString();
|
||||
if(!valueItemsLogRecords["Category"].isNull())
|
||||
itemsObject.category = valueItemsLogRecords["Category"].asString();
|
||||
if(!valueItemsLogRecords["Content"].isNull())
|
||||
itemsObject.content = valueItemsLogRecords["Content"].asString();
|
||||
if(!valueItemsLogRecords["CreateTime"].isNull())
|
||||
itemsObject.createTime = valueItemsLogRecords["CreateTime"].asString();
|
||||
if(!valueItemsLogRecords["Id"].isNull())
|
||||
itemsObject.id = std::stoi(valueItemsLogRecords["Id"].asString());
|
||||
items_.push_back(itemsObject);
|
||||
}
|
||||
if(!value["Engine"].isNull())
|
||||
engine_ = value["Engine"].asString();
|
||||
if(!value["TotalRecordCount"].isNull())
|
||||
totalRecordCount_ = std::stoi(value["TotalRecordCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageRecordCount"].isNull())
|
||||
pageRecordCount_ = std::stoi(value["PageRecordCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["Engine"].isNull())
|
||||
engine_ = value["Engine"].asString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -43,36 +43,36 @@ void DescribeSlowLogRecordsResult::parse(const std::string &payload)
|
||||
for (auto valueItemsLogRecords : allItemsNode)
|
||||
{
|
||||
LogRecords itemsObject;
|
||||
if(!valueItemsLogRecords["HostAddress"].isNull())
|
||||
itemsObject.hostAddress = valueItemsLogRecords["HostAddress"].asString();
|
||||
if(!valueItemsLogRecords["DBName"].isNull())
|
||||
itemsObject.dBName = valueItemsLogRecords["DBName"].asString();
|
||||
if(!valueItemsLogRecords["SQLText"].isNull())
|
||||
itemsObject.sQLText = valueItemsLogRecords["SQLText"].asString();
|
||||
if(!valueItemsLogRecords["QueryTimes"].isNull())
|
||||
itemsObject.queryTimes = valueItemsLogRecords["QueryTimes"].asString();
|
||||
if(!valueItemsLogRecords["DocsExamined"].isNull())
|
||||
itemsObject.docsExamined = std::stol(valueItemsLogRecords["DocsExamined"].asString());
|
||||
if(!valueItemsLogRecords["KeysExamined"].isNull())
|
||||
itemsObject.keysExamined = std::stol(valueItemsLogRecords["KeysExamined"].asString());
|
||||
if(!valueItemsLogRecords["ReturnRowCounts"].isNull())
|
||||
itemsObject.returnRowCounts = std::stol(valueItemsLogRecords["ReturnRowCounts"].asString());
|
||||
if(!valueItemsLogRecords["ExecutionStartTime"].isNull())
|
||||
itemsObject.executionStartTime = valueItemsLogRecords["ExecutionStartTime"].asString();
|
||||
if(!valueItemsLogRecords["AccountName"].isNull())
|
||||
itemsObject.accountName = valueItemsLogRecords["AccountName"].asString();
|
||||
if(!valueItemsLogRecords["TableName"].isNull())
|
||||
itemsObject.tableName = valueItemsLogRecords["TableName"].asString();
|
||||
if(!valueItemsLogRecords["QueryTimes"].isNull())
|
||||
itemsObject.queryTimes = valueItemsLogRecords["QueryTimes"].asString();
|
||||
if(!valueItemsLogRecords["ExecutionStartTime"].isNull())
|
||||
itemsObject.executionStartTime = valueItemsLogRecords["ExecutionStartTime"].asString();
|
||||
if(!valueItemsLogRecords["ReturnRowCounts"].isNull())
|
||||
itemsObject.returnRowCounts = std::stol(valueItemsLogRecords["ReturnRowCounts"].asString());
|
||||
if(!valueItemsLogRecords["DBName"].isNull())
|
||||
itemsObject.dBName = valueItemsLogRecords["DBName"].asString();
|
||||
if(!valueItemsLogRecords["KeysExamined"].isNull())
|
||||
itemsObject.keysExamined = std::stol(valueItemsLogRecords["KeysExamined"].asString());
|
||||
if(!valueItemsLogRecords["DocsExamined"].isNull())
|
||||
itemsObject.docsExamined = std::stol(valueItemsLogRecords["DocsExamined"].asString());
|
||||
if(!valueItemsLogRecords["HostAddress"].isNull())
|
||||
itemsObject.hostAddress = valueItemsLogRecords["HostAddress"].asString();
|
||||
if(!valueItemsLogRecords["AccountName"].isNull())
|
||||
itemsObject.accountName = valueItemsLogRecords["AccountName"].asString();
|
||||
if(!valueItemsLogRecords["SQLText"].isNull())
|
||||
itemsObject.sQLText = valueItemsLogRecords["SQLText"].asString();
|
||||
items_.push_back(itemsObject);
|
||||
}
|
||||
if(!value["Engine"].isNull())
|
||||
engine_ = value["Engine"].asString();
|
||||
if(!value["TotalRecordCount"].isNull())
|
||||
totalRecordCount_ = std::stoi(value["TotalRecordCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageRecordCount"].isNull())
|
||||
pageRecordCount_ = std::stoi(value["PageRecordCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["Engine"].isNull())
|
||||
engine_ = value["Engine"].asString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,17 @@ void ModifyNodeSpecRequest::setClientToken(const std::string& clientToken)
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
int ModifyNodeSpecRequest::getReadonlyReplicas()const
|
||||
{
|
||||
return readonlyReplicas_;
|
||||
}
|
||||
|
||||
void ModifyNodeSpecRequest::setReadonlyReplicas(int readonlyReplicas)
|
||||
{
|
||||
readonlyReplicas_ = readonlyReplicas;
|
||||
setParameter("ReadonlyReplicas", std::to_string(readonlyReplicas));
|
||||
}
|
||||
|
||||
std::string ModifyNodeSpecRequest::getNodeClass()const
|
||||
{
|
||||
return nodeClass_;
|
||||
|
||||
@@ -36,7 +36,9 @@ set(eais_public_header_model
|
||||
include/alibabacloud/eais/model/DescribeRegionsRequest.h
|
||||
include/alibabacloud/eais/model/DescribeRegionsResult.h
|
||||
include/alibabacloud/eais/model/DetachEaiRequest.h
|
||||
include/alibabacloud/eais/model/DetachEaiResult.h )
|
||||
include/alibabacloud/eais/model/DetachEaiResult.h
|
||||
include/alibabacloud/eais/model/GetPrivateIpRequest.h
|
||||
include/alibabacloud/eais/model/GetPrivateIpResult.h )
|
||||
|
||||
set(eais_src
|
||||
src/EaisClient.cc
|
||||
@@ -55,7 +57,9 @@ set(eais_src
|
||||
src/model/DescribeRegionsRequest.cc
|
||||
src/model/DescribeRegionsResult.cc
|
||||
src/model/DetachEaiRequest.cc
|
||||
src/model/DetachEaiResult.cc )
|
||||
src/model/DetachEaiResult.cc
|
||||
src/model/GetPrivateIpRequest.cc
|
||||
src/model/GetPrivateIpResult.cc )
|
||||
|
||||
add_library(eais ${LIB_TYPE}
|
||||
${eais_public_header}
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
#include "model/DescribeRegionsResult.h"
|
||||
#include "model/DetachEaiRequest.h"
|
||||
#include "model/DetachEaiResult.h"
|
||||
#include "model/GetPrivateIpRequest.h"
|
||||
#include "model/GetPrivateIpResult.h"
|
||||
|
||||
|
||||
namespace AlibabaCloud
|
||||
@@ -71,6 +73,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DetachEaiResult> DetachEaiOutcome;
|
||||
typedef std::future<DetachEaiOutcome> DetachEaiOutcomeCallable;
|
||||
typedef std::function<void(const EaisClient*, const Model::DetachEaiRequest&, const DetachEaiOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetachEaiAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetPrivateIpResult> GetPrivateIpOutcome;
|
||||
typedef std::future<GetPrivateIpOutcome> GetPrivateIpOutcomeCallable;
|
||||
typedef std::function<void(const EaisClient*, const Model::GetPrivateIpRequest&, const GetPrivateIpOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetPrivateIpAsyncHandler;
|
||||
|
||||
EaisClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
EaisClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
@@ -100,6 +105,9 @@ namespace AlibabaCloud
|
||||
DetachEaiOutcome detachEai(const Model::DetachEaiRequest &request)const;
|
||||
void detachEaiAsync(const Model::DetachEaiRequest& request, const DetachEaiAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DetachEaiOutcomeCallable detachEaiCallable(const Model::DetachEaiRequest& request) const;
|
||||
GetPrivateIpOutcome getPrivateIp(const Model::GetPrivateIpRequest &request)const;
|
||||
void getPrivateIpAsync(const Model::GetPrivateIpRequest& request, const GetPrivateIpAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetPrivateIpOutcomeCallable getPrivateIpCallable(const Model::GetPrivateIpRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
|
||||
51
eais/include/alibabacloud/eais/model/GetPrivateIpRequest.h
Normal file
51
eais/include/alibabacloud/eais/model/GetPrivateIpRequest.h
Normal 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_EAIS_MODEL_GETPRIVATEIPREQUEST_H_
|
||||
#define ALIBABACLOUD_EAIS_MODEL_GETPRIVATEIPREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/eais/EaisExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Eais
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_EAIS_EXPORT GetPrivateIpRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
GetPrivateIpRequest();
|
||||
~GetPrivateIpRequest();
|
||||
|
||||
std::string getClientInstanceId()const;
|
||||
void setClientInstanceId(const std::string& clientInstanceId);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
|
||||
private:
|
||||
std::string clientInstanceId_;
|
||||
std::string regionId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_EAIS_MODEL_GETPRIVATEIPREQUEST_H_
|
||||
51
eais/include/alibabacloud/eais/model/GetPrivateIpResult.h
Normal file
51
eais/include/alibabacloud/eais/model/GetPrivateIpResult.h
Normal 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_EAIS_MODEL_GETPRIVATEIPRESULT_H_
|
||||
#define ALIBABACLOUD_EAIS_MODEL_GETPRIVATEIPRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/eais/EaisExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Eais
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_EAIS_EXPORT GetPrivateIpResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
GetPrivateIpResult();
|
||||
explicit GetPrivateIpResult(const std::string &payload);
|
||||
~GetPrivateIpResult();
|
||||
std::string getPrivateIp()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string privateIp_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_EAIS_MODEL_GETPRIVATEIPRESULT_H_
|
||||
@@ -339,3 +339,39 @@ EaisClient::DetachEaiOutcomeCallable EaisClient::detachEaiCallable(const DetachE
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EaisClient::GetPrivateIpOutcome EaisClient::getPrivateIp(const GetPrivateIpRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetPrivateIpOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetPrivateIpOutcome(GetPrivateIpResult(outcome.result()));
|
||||
else
|
||||
return GetPrivateIpOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EaisClient::getPrivateIpAsync(const GetPrivateIpRequest& request, const GetPrivateIpAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getPrivateIp(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EaisClient::GetPrivateIpOutcomeCallable EaisClient::getPrivateIpCallable(const GetPrivateIpRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetPrivateIpOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getPrivateIp(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
51
eais/src/model/GetPrivateIpRequest.cc
Normal file
51
eais/src/model/GetPrivateIpRequest.cc
Normal 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/GetPrivateIpRequest.h>
|
||||
|
||||
using AlibabaCloud::Eais::Model::GetPrivateIpRequest;
|
||||
|
||||
GetPrivateIpRequest::GetPrivateIpRequest() :
|
||||
RpcServiceRequest("eais", "2019-06-24", "GetPrivateIp")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetPrivateIpRequest::~GetPrivateIpRequest()
|
||||
{}
|
||||
|
||||
std::string GetPrivateIpRequest::getClientInstanceId()const
|
||||
{
|
||||
return clientInstanceId_;
|
||||
}
|
||||
|
||||
void GetPrivateIpRequest::setClientInstanceId(const std::string& clientInstanceId)
|
||||
{
|
||||
clientInstanceId_ = clientInstanceId;
|
||||
setParameter("ClientInstanceId", clientInstanceId);
|
||||
}
|
||||
|
||||
std::string GetPrivateIpRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void GetPrivateIpRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
51
eais/src/model/GetPrivateIpResult.cc
Normal file
51
eais/src/model/GetPrivateIpResult.cc
Normal 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/GetPrivateIpResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eais;
|
||||
using namespace AlibabaCloud::Eais::Model;
|
||||
|
||||
GetPrivateIpResult::GetPrivateIpResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetPrivateIpResult::GetPrivateIpResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetPrivateIpResult::~GetPrivateIpResult()
|
||||
{}
|
||||
|
||||
void GetPrivateIpResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["PrivateIp"].isNull())
|
||||
privateIp_ = value["PrivateIp"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetPrivateIpResult::getPrivateIp()const
|
||||
{
|
||||
return privateIp_;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,8 @@ set(imagerecog_public_header_model
|
||||
include/alibabacloud/imagerecog/model/DetectImageElementsResult.h
|
||||
include/alibabacloud/imagerecog/model/EvaluateCertificateQualityRequest.h
|
||||
include/alibabacloud/imagerecog/model/EvaluateCertificateQualityResult.h
|
||||
include/alibabacloud/imagerecog/model/GetAsyncJobResultRequest.h
|
||||
include/alibabacloud/imagerecog/model/GetAsyncJobResultResult.h
|
||||
include/alibabacloud/imagerecog/model/RecognizeFoodRequest.h
|
||||
include/alibabacloud/imagerecog/model/RecognizeFoodResult.h
|
||||
include/alibabacloud/imagerecog/model/RecognizeImageColorRequest.h
|
||||
@@ -54,6 +56,8 @@ set(imagerecog_src
|
||||
src/model/DetectImageElementsResult.cc
|
||||
src/model/EvaluateCertificateQualityRequest.cc
|
||||
src/model/EvaluateCertificateQualityResult.cc
|
||||
src/model/GetAsyncJobResultRequest.cc
|
||||
src/model/GetAsyncJobResultResult.cc
|
||||
src/model/RecognizeFoodRequest.cc
|
||||
src/model/RecognizeFoodResult.cc
|
||||
src/model/RecognizeImageColorRequest.cc
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#include "model/DetectImageElementsResult.h"
|
||||
#include "model/EvaluateCertificateQualityRequest.h"
|
||||
#include "model/EvaluateCertificateQualityResult.h"
|
||||
#include "model/GetAsyncJobResultRequest.h"
|
||||
#include "model/GetAsyncJobResultResult.h"
|
||||
#include "model/RecognizeFoodRequest.h"
|
||||
#include "model/RecognizeFoodResult.h"
|
||||
#include "model/RecognizeImageColorRequest.h"
|
||||
@@ -65,6 +67,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::EvaluateCertificateQualityResult> EvaluateCertificateQualityOutcome;
|
||||
typedef std::future<EvaluateCertificateQualityOutcome> EvaluateCertificateQualityOutcomeCallable;
|
||||
typedef std::function<void(const ImagerecogClient*, const Model::EvaluateCertificateQualityRequest&, const EvaluateCertificateQualityOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> EvaluateCertificateQualityAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetAsyncJobResultResult> GetAsyncJobResultOutcome;
|
||||
typedef std::future<GetAsyncJobResultOutcome> GetAsyncJobResultOutcomeCallable;
|
||||
typedef std::function<void(const ImagerecogClient*, const Model::GetAsyncJobResultRequest&, const GetAsyncJobResultOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetAsyncJobResultAsyncHandler;
|
||||
typedef Outcome<Error, Model::RecognizeFoodResult> RecognizeFoodOutcome;
|
||||
typedef std::future<RecognizeFoodOutcome> RecognizeFoodOutcomeCallable;
|
||||
typedef std::function<void(const ImagerecogClient*, const Model::RecognizeFoodRequest&, const RecognizeFoodOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeFoodAsyncHandler;
|
||||
@@ -103,6 +108,9 @@ namespace AlibabaCloud
|
||||
EvaluateCertificateQualityOutcome evaluateCertificateQuality(const Model::EvaluateCertificateQualityRequest &request)const;
|
||||
void evaluateCertificateQualityAsync(const Model::EvaluateCertificateQualityRequest& request, const EvaluateCertificateQualityAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
EvaluateCertificateQualityOutcomeCallable evaluateCertificateQualityCallable(const Model::EvaluateCertificateQualityRequest& request) const;
|
||||
GetAsyncJobResultOutcome getAsyncJobResult(const Model::GetAsyncJobResultRequest &request)const;
|
||||
void getAsyncJobResultAsync(const Model::GetAsyncJobResultRequest& request, const GetAsyncJobResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetAsyncJobResultOutcomeCallable getAsyncJobResultCallable(const Model::GetAsyncJobResultRequest& request) const;
|
||||
RecognizeFoodOutcome recognizeFood(const Model::RecognizeFoodRequest &request)const;
|
||||
void recognizeFoodAsync(const Model::RecognizeFoodRequest& request, const RecognizeFoodAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RecognizeFoodOutcomeCallable recognizeFoodCallable(const Model::RecognizeFoodRequest& request) const;
|
||||
|
||||
@@ -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_IMAGERECOG_MODEL_GETASYNCJOBRESULTREQUEST_H_
|
||||
#define ALIBABACLOUD_IMAGERECOG_MODEL_GETASYNCJOBRESULTREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/imagerecog/ImagerecogExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Imagerecog
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IMAGERECOG_EXPORT GetAsyncJobResultRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
GetAsyncJobResultRequest();
|
||||
~GetAsyncJobResultRequest();
|
||||
|
||||
std::string getJobId()const;
|
||||
void setJobId(const std::string& jobId);
|
||||
std::string getAsync()const;
|
||||
void setAsync(const std::string& async);
|
||||
|
||||
private:
|
||||
std::string jobId_;
|
||||
std::string async_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IMAGERECOG_MODEL_GETASYNCJOBRESULTREQUEST_H_
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* 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_IMAGERECOG_MODEL_GETASYNCJOBRESULTRESULT_H_
|
||||
#define ALIBABACLOUD_IMAGERECOG_MODEL_GETASYNCJOBRESULTRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/imagerecog/ImagerecogExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Imagerecog
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_IMAGERECOG_EXPORT GetAsyncJobResultResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string status;
|
||||
std::string errorCode;
|
||||
std::string errorMessage;
|
||||
std::string jobId;
|
||||
std::string result;
|
||||
};
|
||||
|
||||
|
||||
GetAsyncJobResultResult();
|
||||
explicit GetAsyncJobResultResult(const std::string &payload);
|
||||
~GetAsyncJobResultResult();
|
||||
Data getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
Data data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IMAGERECOG_MODEL_GETASYNCJOBRESULTRESULT_H_
|
||||
@@ -37,11 +37,14 @@ namespace AlibabaCloud
|
||||
|
||||
int getImageType()const;
|
||||
void setImageType(int imageType);
|
||||
bool getAsync()const;
|
||||
void setAsync(bool async);
|
||||
std::string getImageURL()const;
|
||||
void setImageURL(const std::string& imageURL);
|
||||
|
||||
private:
|
||||
int imageType_;
|
||||
bool async_;
|
||||
std::string imageURL_;
|
||||
|
||||
};
|
||||
|
||||
@@ -195,6 +195,42 @@ ImagerecogClient::EvaluateCertificateQualityOutcomeCallable ImagerecogClient::ev
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ImagerecogClient::GetAsyncJobResultOutcome ImagerecogClient::getAsyncJobResult(const GetAsyncJobResultRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetAsyncJobResultOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetAsyncJobResultOutcome(GetAsyncJobResultResult(outcome.result()));
|
||||
else
|
||||
return GetAsyncJobResultOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ImagerecogClient::getAsyncJobResultAsync(const GetAsyncJobResultRequest& request, const GetAsyncJobResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getAsyncJobResult(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ImagerecogClient::GetAsyncJobResultOutcomeCallable ImagerecogClient::getAsyncJobResultCallable(const GetAsyncJobResultRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetAsyncJobResultOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getAsyncJobResult(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ImagerecogClient::RecognizeFoodOutcome ImagerecogClient::recognizeFood(const RecognizeFoodRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
51
imagerecog/src/model/GetAsyncJobResultRequest.cc
Normal file
51
imagerecog/src/model/GetAsyncJobResultRequest.cc
Normal 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/imagerecog/model/GetAsyncJobResultRequest.h>
|
||||
|
||||
using AlibabaCloud::Imagerecog::Model::GetAsyncJobResultRequest;
|
||||
|
||||
GetAsyncJobResultRequest::GetAsyncJobResultRequest() :
|
||||
RpcServiceRequest("imagerecog", "2019-09-30", "GetAsyncJobResult")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetAsyncJobResultRequest::~GetAsyncJobResultRequest()
|
||||
{}
|
||||
|
||||
std::string GetAsyncJobResultRequest::getJobId()const
|
||||
{
|
||||
return jobId_;
|
||||
}
|
||||
|
||||
void GetAsyncJobResultRequest::setJobId(const std::string& jobId)
|
||||
{
|
||||
jobId_ = jobId;
|
||||
setParameter("JobId", jobId);
|
||||
}
|
||||
|
||||
std::string GetAsyncJobResultRequest::getAsync()const
|
||||
{
|
||||
return async_;
|
||||
}
|
||||
|
||||
void GetAsyncJobResultRequest::setAsync(const std::string& async)
|
||||
{
|
||||
async_ = async;
|
||||
setParameter("Async", async);
|
||||
}
|
||||
|
||||
60
imagerecog/src/model/GetAsyncJobResultResult.cc
Normal file
60
imagerecog/src/model/GetAsyncJobResultResult.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/imagerecog/model/GetAsyncJobResultResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Imagerecog;
|
||||
using namespace AlibabaCloud::Imagerecog::Model;
|
||||
|
||||
GetAsyncJobResultResult::GetAsyncJobResultResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAsyncJobResultResult::GetAsyncJobResultResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAsyncJobResultResult::~GetAsyncJobResultResult()
|
||||
{}
|
||||
|
||||
void GetAsyncJobResultResult::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["Status"].isNull())
|
||||
data_.status = dataNode["Status"].asString();
|
||||
if(!dataNode["ErrorCode"].isNull())
|
||||
data_.errorCode = dataNode["ErrorCode"].asString();
|
||||
if(!dataNode["ErrorMessage"].isNull())
|
||||
data_.errorMessage = dataNode["ErrorMessage"].asString();
|
||||
if(!dataNode["JobId"].isNull())
|
||||
data_.jobId = dataNode["JobId"].asString();
|
||||
if(!dataNode["Result"].isNull())
|
||||
data_.result = dataNode["Result"].asString();
|
||||
|
||||
}
|
||||
|
||||
GetAsyncJobResultResult::Data GetAsyncJobResultResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,17 @@ void TaggingImageRequest::setImageType(int imageType)
|
||||
setBodyParameter("ImageType", std::to_string(imageType));
|
||||
}
|
||||
|
||||
bool TaggingImageRequest::getAsync()const
|
||||
{
|
||||
return async_;
|
||||
}
|
||||
|
||||
void TaggingImageRequest::setAsync(bool async)
|
||||
{
|
||||
async_ = async;
|
||||
setBodyParameter("Async", async ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string TaggingImageRequest::getImageURL()const
|
||||
{
|
||||
return imageURL_;
|
||||
|
||||
@@ -91,6 +91,8 @@ set(outboundbot_public_header_model
|
||||
include/alibabacloud/outboundbot/model/ExportScriptResult.h
|
||||
include/alibabacloud/outboundbot/model/ImportScriptRequest.h
|
||||
include/alibabacloud/outboundbot/model/ImportScriptResult.h
|
||||
include/alibabacloud/outboundbot/model/InflightTaskTimeoutRequest.h
|
||||
include/alibabacloud/outboundbot/model/InflightTaskTimeoutResult.h
|
||||
include/alibabacloud/outboundbot/model/ListDialogueFlowsRequest.h
|
||||
include/alibabacloud/outboundbot/model/ListDialogueFlowsResult.h
|
||||
include/alibabacloud/outboundbot/model/ListGlobalQuestionsRequest.h
|
||||
@@ -109,6 +111,8 @@ set(outboundbot_public_header_model
|
||||
include/alibabacloud/outboundbot/model/ListMediaResult.h
|
||||
include/alibabacloud/outboundbot/model/ListOutboundCallNumbersRequest.h
|
||||
include/alibabacloud/outboundbot/model/ListOutboundCallNumbersResult.h
|
||||
include/alibabacloud/outboundbot/model/ListSchedulerInstancesRequest.h
|
||||
include/alibabacloud/outboundbot/model/ListSchedulerInstancesResult.h
|
||||
include/alibabacloud/outboundbot/model/ListScriptPublishHistoriesRequest.h
|
||||
include/alibabacloud/outboundbot/model/ListScriptPublishHistoriesResult.h
|
||||
include/alibabacloud/outboundbot/model/ListScriptVoiceConfigsRequest.h
|
||||
@@ -165,6 +169,8 @@ set(outboundbot_public_header_model
|
||||
include/alibabacloud/outboundbot/model/SubmitScriptReviewResult.h
|
||||
include/alibabacloud/outboundbot/model/SuspendJobsRequest.h
|
||||
include/alibabacloud/outboundbot/model/SuspendJobsResult.h
|
||||
include/alibabacloud/outboundbot/model/TaskPreparingRequest.h
|
||||
include/alibabacloud/outboundbot/model/TaskPreparingResult.h
|
||||
include/alibabacloud/outboundbot/model/WithdrawScriptReviewRequest.h
|
||||
include/alibabacloud/outboundbot/model/WithdrawScriptReviewResult.h )
|
||||
|
||||
@@ -240,6 +246,8 @@ set(outboundbot_src
|
||||
src/model/ExportScriptResult.cc
|
||||
src/model/ImportScriptRequest.cc
|
||||
src/model/ImportScriptResult.cc
|
||||
src/model/InflightTaskTimeoutRequest.cc
|
||||
src/model/InflightTaskTimeoutResult.cc
|
||||
src/model/ListDialogueFlowsRequest.cc
|
||||
src/model/ListDialogueFlowsResult.cc
|
||||
src/model/ListGlobalQuestionsRequest.cc
|
||||
@@ -258,6 +266,8 @@ set(outboundbot_src
|
||||
src/model/ListMediaResult.cc
|
||||
src/model/ListOutboundCallNumbersRequest.cc
|
||||
src/model/ListOutboundCallNumbersResult.cc
|
||||
src/model/ListSchedulerInstancesRequest.cc
|
||||
src/model/ListSchedulerInstancesResult.cc
|
||||
src/model/ListScriptPublishHistoriesRequest.cc
|
||||
src/model/ListScriptPublishHistoriesResult.cc
|
||||
src/model/ListScriptVoiceConfigsRequest.cc
|
||||
@@ -314,6 +324,8 @@ set(outboundbot_src
|
||||
src/model/SubmitScriptReviewResult.cc
|
||||
src/model/SuspendJobsRequest.cc
|
||||
src/model/SuspendJobsResult.cc
|
||||
src/model/TaskPreparingRequest.cc
|
||||
src/model/TaskPreparingResult.cc
|
||||
src/model/WithdrawScriptReviewRequest.cc
|
||||
src/model/WithdrawScriptReviewResult.cc )
|
||||
|
||||
|
||||
@@ -92,6 +92,8 @@
|
||||
#include "model/ExportScriptResult.h"
|
||||
#include "model/ImportScriptRequest.h"
|
||||
#include "model/ImportScriptResult.h"
|
||||
#include "model/InflightTaskTimeoutRequest.h"
|
||||
#include "model/InflightTaskTimeoutResult.h"
|
||||
#include "model/ListDialogueFlowsRequest.h"
|
||||
#include "model/ListDialogueFlowsResult.h"
|
||||
#include "model/ListGlobalQuestionsRequest.h"
|
||||
@@ -110,6 +112,8 @@
|
||||
#include "model/ListMediaResult.h"
|
||||
#include "model/ListOutboundCallNumbersRequest.h"
|
||||
#include "model/ListOutboundCallNumbersResult.h"
|
||||
#include "model/ListSchedulerInstancesRequest.h"
|
||||
#include "model/ListSchedulerInstancesResult.h"
|
||||
#include "model/ListScriptPublishHistoriesRequest.h"
|
||||
#include "model/ListScriptPublishHistoriesResult.h"
|
||||
#include "model/ListScriptVoiceConfigsRequest.h"
|
||||
@@ -166,6 +170,8 @@
|
||||
#include "model/SubmitScriptReviewResult.h"
|
||||
#include "model/SuspendJobsRequest.h"
|
||||
#include "model/SuspendJobsResult.h"
|
||||
#include "model/TaskPreparingRequest.h"
|
||||
#include "model/TaskPreparingResult.h"
|
||||
#include "model/WithdrawScriptReviewRequest.h"
|
||||
#include "model/WithdrawScriptReviewResult.h"
|
||||
|
||||
@@ -282,6 +288,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ImportScriptResult> ImportScriptOutcome;
|
||||
typedef std::future<ImportScriptOutcome> ImportScriptOutcomeCallable;
|
||||
typedef std::function<void(const OutboundBotClient*, const Model::ImportScriptRequest&, const ImportScriptOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ImportScriptAsyncHandler;
|
||||
typedef Outcome<Error, Model::InflightTaskTimeoutResult> InflightTaskTimeoutOutcome;
|
||||
typedef std::future<InflightTaskTimeoutOutcome> InflightTaskTimeoutOutcomeCallable;
|
||||
typedef std::function<void(const OutboundBotClient*, const Model::InflightTaskTimeoutRequest&, const InflightTaskTimeoutOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> InflightTaskTimeoutAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListDialogueFlowsResult> ListDialogueFlowsOutcome;
|
||||
typedef std::future<ListDialogueFlowsOutcome> ListDialogueFlowsOutcomeCallable;
|
||||
typedef std::function<void(const OutboundBotClient*, const Model::ListDialogueFlowsRequest&, const ListDialogueFlowsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListDialogueFlowsAsyncHandler;
|
||||
@@ -309,6 +318,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ListOutboundCallNumbersResult> ListOutboundCallNumbersOutcome;
|
||||
typedef std::future<ListOutboundCallNumbersOutcome> ListOutboundCallNumbersOutcomeCallable;
|
||||
typedef std::function<void(const OutboundBotClient*, const Model::ListOutboundCallNumbersRequest&, const ListOutboundCallNumbersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListOutboundCallNumbersAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListSchedulerInstancesResult> ListSchedulerInstancesOutcome;
|
||||
typedef std::future<ListSchedulerInstancesOutcome> ListSchedulerInstancesOutcomeCallable;
|
||||
typedef std::function<void(const OutboundBotClient*, const Model::ListSchedulerInstancesRequest&, const ListSchedulerInstancesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListSchedulerInstancesAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListScriptPublishHistoriesResult> ListScriptPublishHistoriesOutcome;
|
||||
typedef std::future<ListScriptPublishHistoriesOutcome> ListScriptPublishHistoriesOutcomeCallable;
|
||||
typedef std::function<void(const OutboundBotClient*, const Model::ListScriptPublishHistoriesRequest&, const ListScriptPublishHistoriesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListScriptPublishHistoriesAsyncHandler;
|
||||
@@ -393,6 +405,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::SuspendJobsResult> SuspendJobsOutcome;
|
||||
typedef std::future<SuspendJobsOutcome> SuspendJobsOutcomeCallable;
|
||||
typedef std::function<void(const OutboundBotClient*, const Model::SuspendJobsRequest&, const SuspendJobsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SuspendJobsAsyncHandler;
|
||||
typedef Outcome<Error, Model::TaskPreparingResult> TaskPreparingOutcome;
|
||||
typedef std::future<TaskPreparingOutcome> TaskPreparingOutcomeCallable;
|
||||
typedef std::function<void(const OutboundBotClient*, const Model::TaskPreparingRequest&, const TaskPreparingOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TaskPreparingAsyncHandler;
|
||||
typedef Outcome<Error, Model::WithdrawScriptReviewResult> WithdrawScriptReviewOutcome;
|
||||
typedef std::future<WithdrawScriptReviewOutcome> WithdrawScriptReviewOutcomeCallable;
|
||||
typedef std::function<void(const OutboundBotClient*, const Model::WithdrawScriptReviewRequest&, const WithdrawScriptReviewOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> WithdrawScriptReviewAsyncHandler;
|
||||
@@ -506,6 +521,9 @@ namespace AlibabaCloud
|
||||
ImportScriptOutcome importScript(const Model::ImportScriptRequest &request)const;
|
||||
void importScriptAsync(const Model::ImportScriptRequest& request, const ImportScriptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ImportScriptOutcomeCallable importScriptCallable(const Model::ImportScriptRequest& request) const;
|
||||
InflightTaskTimeoutOutcome inflightTaskTimeout(const Model::InflightTaskTimeoutRequest &request)const;
|
||||
void inflightTaskTimeoutAsync(const Model::InflightTaskTimeoutRequest& request, const InflightTaskTimeoutAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
InflightTaskTimeoutOutcomeCallable inflightTaskTimeoutCallable(const Model::InflightTaskTimeoutRequest& request) const;
|
||||
ListDialogueFlowsOutcome listDialogueFlows(const Model::ListDialogueFlowsRequest &request)const;
|
||||
void listDialogueFlowsAsync(const Model::ListDialogueFlowsRequest& request, const ListDialogueFlowsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListDialogueFlowsOutcomeCallable listDialogueFlowsCallable(const Model::ListDialogueFlowsRequest& request) const;
|
||||
@@ -533,6 +551,9 @@ namespace AlibabaCloud
|
||||
ListOutboundCallNumbersOutcome listOutboundCallNumbers(const Model::ListOutboundCallNumbersRequest &request)const;
|
||||
void listOutboundCallNumbersAsync(const Model::ListOutboundCallNumbersRequest& request, const ListOutboundCallNumbersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListOutboundCallNumbersOutcomeCallable listOutboundCallNumbersCallable(const Model::ListOutboundCallNumbersRequest& request) const;
|
||||
ListSchedulerInstancesOutcome listSchedulerInstances(const Model::ListSchedulerInstancesRequest &request)const;
|
||||
void listSchedulerInstancesAsync(const Model::ListSchedulerInstancesRequest& request, const ListSchedulerInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListSchedulerInstancesOutcomeCallable listSchedulerInstancesCallable(const Model::ListSchedulerInstancesRequest& request) const;
|
||||
ListScriptPublishHistoriesOutcome listScriptPublishHistories(const Model::ListScriptPublishHistoriesRequest &request)const;
|
||||
void listScriptPublishHistoriesAsync(const Model::ListScriptPublishHistoriesRequest& request, const ListScriptPublishHistoriesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListScriptPublishHistoriesOutcomeCallable listScriptPublishHistoriesCallable(const Model::ListScriptPublishHistoriesRequest& request) const;
|
||||
@@ -617,6 +638,9 @@ namespace AlibabaCloud
|
||||
SuspendJobsOutcome suspendJobs(const Model::SuspendJobsRequest &request)const;
|
||||
void suspendJobsAsync(const Model::SuspendJobsRequest& request, const SuspendJobsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SuspendJobsOutcomeCallable suspendJobsCallable(const Model::SuspendJobsRequest& request) const;
|
||||
TaskPreparingOutcome taskPreparing(const Model::TaskPreparingRequest &request)const;
|
||||
void taskPreparingAsync(const Model::TaskPreparingRequest& request, const TaskPreparingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
TaskPreparingOutcomeCallable taskPreparingCallable(const Model::TaskPreparingRequest& request) const;
|
||||
WithdrawScriptReviewOutcome withdrawScriptReview(const Model::WithdrawScriptReviewRequest &request)const;
|
||||
void withdrawScriptReviewAsync(const Model::WithdrawScriptReviewRequest& request, const WithdrawScriptReviewAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
WithdrawScriptReviewOutcomeCallable withdrawScriptReviewCallable(const Model::WithdrawScriptReviewRequest& request) const;
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_OUTBOUNDBOT_MODEL_INFLIGHTTASKTIMEOUTREQUEST_H_
|
||||
#define ALIBABACLOUD_OUTBOUNDBOT_MODEL_INFLIGHTTASKTIMEOUTREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/outboundbot/OutboundBotExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace OutboundBot
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_OUTBOUNDBOT_EXPORT InflightTaskTimeoutRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
InflightTaskTimeoutRequest();
|
||||
~InflightTaskTimeoutRequest();
|
||||
|
||||
std::string getInstanceId()const;
|
||||
void setInstanceId(const std::string& instanceId);
|
||||
long getInstanceOwnerId()const;
|
||||
void setInstanceOwnerId(long instanceOwnerId);
|
||||
std::string getTaskId()const;
|
||||
void setTaskId(const std::string& taskId);
|
||||
|
||||
private:
|
||||
std::string instanceId_;
|
||||
long instanceOwnerId_;
|
||||
std::string taskId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_OUTBOUNDBOT_MODEL_INFLIGHTTASKTIMEOUTREQUEST_H_
|
||||
@@ -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_OUTBOUNDBOT_MODEL_INFLIGHTTASKTIMEOUTRESULT_H_
|
||||
#define ALIBABACLOUD_OUTBOUNDBOT_MODEL_INFLIGHTTASKTIMEOUTRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/outboundbot/OutboundBotExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace OutboundBot
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_OUTBOUNDBOT_EXPORT InflightTaskTimeoutResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
InflightTaskTimeoutResult();
|
||||
explicit InflightTaskTimeoutResult(const std::string &payload);
|
||||
~InflightTaskTimeoutResult();
|
||||
std::string getMessage()const;
|
||||
int getHttpStatusCode()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
int httpStatusCode_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_OUTBOUNDBOT_MODEL_INFLIGHTTASKTIMEOUTRESULT_H_
|
||||
@@ -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_OUTBOUNDBOT_MODEL_LISTSCHEDULERINSTANCESREQUEST_H_
|
||||
#define ALIBABACLOUD_OUTBOUNDBOT_MODEL_LISTSCHEDULERINSTANCESREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/outboundbot/OutboundBotExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace OutboundBot
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_OUTBOUNDBOT_EXPORT ListSchedulerInstancesRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ListSchedulerInstancesRequest();
|
||||
~ListSchedulerInstancesRequest();
|
||||
|
||||
long getInstanceOwnerId()const;
|
||||
void setInstanceOwnerId(long instanceOwnerId);
|
||||
|
||||
private:
|
||||
long instanceOwnerId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_OUTBOUNDBOT_MODEL_LISTSCHEDULERINSTANCESREQUEST_H_
|
||||
@@ -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_OUTBOUNDBOT_MODEL_LISTSCHEDULERINSTANCESRESULT_H_
|
||||
#define ALIBABACLOUD_OUTBOUNDBOT_MODEL_LISTSCHEDULERINSTANCESRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/outboundbot/OutboundBotExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace OutboundBot
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_OUTBOUNDBOT_EXPORT ListSchedulerInstancesResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct SchedulerInstance
|
||||
{
|
||||
std::string ownerId;
|
||||
std::string instanceId;
|
||||
int maxConcurrency;
|
||||
std::string business;
|
||||
};
|
||||
|
||||
|
||||
ListSchedulerInstancesResult();
|
||||
explicit ListSchedulerInstancesResult(const std::string &payload);
|
||||
~ListSchedulerInstancesResult();
|
||||
std::vector<SchedulerInstance> getSchedulerInstances()const;
|
||||
std::string getMessage()const;
|
||||
int getHttpStatusCode()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::vector<SchedulerInstance> schedulerInstances_;
|
||||
std::string message_;
|
||||
int httpStatusCode_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_OUTBOUNDBOT_MODEL_LISTSCHEDULERINSTANCESRESULT_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_OUTBOUNDBOT_MODEL_TASKPREPARINGREQUEST_H_
|
||||
#define ALIBABACLOUD_OUTBOUNDBOT_MODEL_TASKPREPARINGREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/outboundbot/OutboundBotExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace OutboundBot
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_OUTBOUNDBOT_EXPORT TaskPreparingRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
TaskPreparingRequest();
|
||||
~TaskPreparingRequest();
|
||||
|
||||
std::string getJobId()const;
|
||||
void setJobId(const std::string& jobId);
|
||||
std::string getInstanceId()const;
|
||||
void setInstanceId(const std::string& instanceId);
|
||||
long getInstanceOwnerId()const;
|
||||
void setInstanceOwnerId(long instanceOwnerId);
|
||||
|
||||
private:
|
||||
std::string jobId_;
|
||||
std::string instanceId_;
|
||||
long instanceOwnerId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_OUTBOUNDBOT_MODEL_TASKPREPARINGREQUEST_H_
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* 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_OUTBOUNDBOT_MODEL_TASKPREPARINGRESULT_H_
|
||||
#define ALIBABACLOUD_OUTBOUNDBOT_MODEL_TASKPREPARINGRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/outboundbot/OutboundBotExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace OutboundBot
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_OUTBOUNDBOT_EXPORT TaskPreparingResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
TaskPreparingResult();
|
||||
explicit TaskPreparingResult(const std::string &payload);
|
||||
~TaskPreparingResult();
|
||||
std::string getTaskId()const;
|
||||
std::string getMessage()const;
|
||||
int getHttpStatusCode()const;
|
||||
std::string getCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string taskId_;
|
||||
std::string message_;
|
||||
int httpStatusCode_;
|
||||
std::string code_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_OUTBOUNDBOT_MODEL_TASKPREPARINGRESULT_H_
|
||||
@@ -1311,6 +1311,42 @@ OutboundBotClient::ImportScriptOutcomeCallable OutboundBotClient::importScriptCa
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OutboundBotClient::InflightTaskTimeoutOutcome OutboundBotClient::inflightTaskTimeout(const InflightTaskTimeoutRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return InflightTaskTimeoutOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return InflightTaskTimeoutOutcome(InflightTaskTimeoutResult(outcome.result()));
|
||||
else
|
||||
return InflightTaskTimeoutOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void OutboundBotClient::inflightTaskTimeoutAsync(const InflightTaskTimeoutRequest& request, const InflightTaskTimeoutAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, inflightTaskTimeout(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
OutboundBotClient::InflightTaskTimeoutOutcomeCallable OutboundBotClient::inflightTaskTimeoutCallable(const InflightTaskTimeoutRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<InflightTaskTimeoutOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->inflightTaskTimeout(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OutboundBotClient::ListDialogueFlowsOutcome OutboundBotClient::listDialogueFlows(const ListDialogueFlowsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1635,6 +1671,42 @@ OutboundBotClient::ListOutboundCallNumbersOutcomeCallable OutboundBotClient::lis
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OutboundBotClient::ListSchedulerInstancesOutcome OutboundBotClient::listSchedulerInstances(const ListSchedulerInstancesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListSchedulerInstancesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListSchedulerInstancesOutcome(ListSchedulerInstancesResult(outcome.result()));
|
||||
else
|
||||
return ListSchedulerInstancesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void OutboundBotClient::listSchedulerInstancesAsync(const ListSchedulerInstancesRequest& request, const ListSchedulerInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listSchedulerInstances(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
OutboundBotClient::ListSchedulerInstancesOutcomeCallable OutboundBotClient::listSchedulerInstancesCallable(const ListSchedulerInstancesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListSchedulerInstancesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listSchedulerInstances(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OutboundBotClient::ListScriptPublishHistoriesOutcome OutboundBotClient::listScriptPublishHistories(const ListScriptPublishHistoriesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -2643,6 +2715,42 @@ OutboundBotClient::SuspendJobsOutcomeCallable OutboundBotClient::suspendJobsCall
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OutboundBotClient::TaskPreparingOutcome OutboundBotClient::taskPreparing(const TaskPreparingRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return TaskPreparingOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return TaskPreparingOutcome(TaskPreparingResult(outcome.result()));
|
||||
else
|
||||
return TaskPreparingOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void OutboundBotClient::taskPreparingAsync(const TaskPreparingRequest& request, const TaskPreparingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, taskPreparing(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
OutboundBotClient::TaskPreparingOutcomeCallable OutboundBotClient::taskPreparingCallable(const TaskPreparingRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<TaskPreparingOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->taskPreparing(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OutboundBotClient::WithdrawScriptReviewOutcome OutboundBotClient::withdrawScriptReview(const WithdrawScriptReviewRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
62
outboundbot/src/model/InflightTaskTimeoutRequest.cc
Normal file
62
outboundbot/src/model/InflightTaskTimeoutRequest.cc
Normal 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/outboundbot/model/InflightTaskTimeoutRequest.h>
|
||||
|
||||
using AlibabaCloud::OutboundBot::Model::InflightTaskTimeoutRequest;
|
||||
|
||||
InflightTaskTimeoutRequest::InflightTaskTimeoutRequest() :
|
||||
RpcServiceRequest("outboundbot", "2019-12-26", "InflightTaskTimeout")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
InflightTaskTimeoutRequest::~InflightTaskTimeoutRequest()
|
||||
{}
|
||||
|
||||
std::string InflightTaskTimeoutRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void InflightTaskTimeoutRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
long InflightTaskTimeoutRequest::getInstanceOwnerId()const
|
||||
{
|
||||
return instanceOwnerId_;
|
||||
}
|
||||
|
||||
void InflightTaskTimeoutRequest::setInstanceOwnerId(long instanceOwnerId)
|
||||
{
|
||||
instanceOwnerId_ = instanceOwnerId;
|
||||
setParameter("InstanceOwnerId", std::to_string(instanceOwnerId));
|
||||
}
|
||||
|
||||
std::string InflightTaskTimeoutRequest::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void InflightTaskTimeoutRequest::setTaskId(const std::string& taskId)
|
||||
{
|
||||
taskId_ = taskId;
|
||||
setParameter("TaskId", taskId);
|
||||
}
|
||||
|
||||
72
outboundbot/src/model/InflightTaskTimeoutResult.cc
Normal file
72
outboundbot/src/model/InflightTaskTimeoutResult.cc
Normal 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/outboundbot/model/InflightTaskTimeoutResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::OutboundBot;
|
||||
using namespace AlibabaCloud::OutboundBot::Model;
|
||||
|
||||
InflightTaskTimeoutResult::InflightTaskTimeoutResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
InflightTaskTimeoutResult::InflightTaskTimeoutResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
InflightTaskTimeoutResult::~InflightTaskTimeoutResult()
|
||||
{}
|
||||
|
||||
void InflightTaskTimeoutResult::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["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string InflightTaskTimeoutResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int InflightTaskTimeoutResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string InflightTaskTimeoutResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool InflightTaskTimeoutResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
40
outboundbot/src/model/ListSchedulerInstancesRequest.cc
Normal file
40
outboundbot/src/model/ListSchedulerInstancesRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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/outboundbot/model/ListSchedulerInstancesRequest.h>
|
||||
|
||||
using AlibabaCloud::OutboundBot::Model::ListSchedulerInstancesRequest;
|
||||
|
||||
ListSchedulerInstancesRequest::ListSchedulerInstancesRequest() :
|
||||
RpcServiceRequest("outboundbot", "2019-12-26", "ListSchedulerInstances")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListSchedulerInstancesRequest::~ListSchedulerInstancesRequest()
|
||||
{}
|
||||
|
||||
long ListSchedulerInstancesRequest::getInstanceOwnerId()const
|
||||
{
|
||||
return instanceOwnerId_;
|
||||
}
|
||||
|
||||
void ListSchedulerInstancesRequest::setInstanceOwnerId(long instanceOwnerId)
|
||||
{
|
||||
instanceOwnerId_ = instanceOwnerId;
|
||||
setParameter("InstanceOwnerId", std::to_string(instanceOwnerId));
|
||||
}
|
||||
|
||||
91
outboundbot/src/model/ListSchedulerInstancesResult.cc
Normal file
91
outboundbot/src/model/ListSchedulerInstancesResult.cc
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* 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/outboundbot/model/ListSchedulerInstancesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::OutboundBot;
|
||||
using namespace AlibabaCloud::OutboundBot::Model;
|
||||
|
||||
ListSchedulerInstancesResult::ListSchedulerInstancesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListSchedulerInstancesResult::ListSchedulerInstancesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListSchedulerInstancesResult::~ListSchedulerInstancesResult()
|
||||
{}
|
||||
|
||||
void ListSchedulerInstancesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allSchedulerInstancesNode = value["SchedulerInstances"]["SchedulerInstance"];
|
||||
for (auto valueSchedulerInstancesSchedulerInstance : allSchedulerInstancesNode)
|
||||
{
|
||||
SchedulerInstance schedulerInstancesObject;
|
||||
if(!valueSchedulerInstancesSchedulerInstance["OwnerId"].isNull())
|
||||
schedulerInstancesObject.ownerId = valueSchedulerInstancesSchedulerInstance["OwnerId"].asString();
|
||||
if(!valueSchedulerInstancesSchedulerInstance["InstanceId"].isNull())
|
||||
schedulerInstancesObject.instanceId = valueSchedulerInstancesSchedulerInstance["InstanceId"].asString();
|
||||
if(!valueSchedulerInstancesSchedulerInstance["Business"].isNull())
|
||||
schedulerInstancesObject.business = valueSchedulerInstancesSchedulerInstance["Business"].asString();
|
||||
if(!valueSchedulerInstancesSchedulerInstance["MaxConcurrency"].isNull())
|
||||
schedulerInstancesObject.maxConcurrency = std::stoi(valueSchedulerInstancesSchedulerInstance["MaxConcurrency"].asString());
|
||||
schedulerInstances_.push_back(schedulerInstancesObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListSchedulerInstancesResult::SchedulerInstance> ListSchedulerInstancesResult::getSchedulerInstances()const
|
||||
{
|
||||
return schedulerInstances_;
|
||||
}
|
||||
|
||||
std::string ListSchedulerInstancesResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int ListSchedulerInstancesResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string ListSchedulerInstancesResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListSchedulerInstancesResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
62
outboundbot/src/model/TaskPreparingRequest.cc
Normal file
62
outboundbot/src/model/TaskPreparingRequest.cc
Normal 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/outboundbot/model/TaskPreparingRequest.h>
|
||||
|
||||
using AlibabaCloud::OutboundBot::Model::TaskPreparingRequest;
|
||||
|
||||
TaskPreparingRequest::TaskPreparingRequest() :
|
||||
RpcServiceRequest("outboundbot", "2019-12-26", "TaskPreparing")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
TaskPreparingRequest::~TaskPreparingRequest()
|
||||
{}
|
||||
|
||||
std::string TaskPreparingRequest::getJobId()const
|
||||
{
|
||||
return jobId_;
|
||||
}
|
||||
|
||||
void TaskPreparingRequest::setJobId(const std::string& jobId)
|
||||
{
|
||||
jobId_ = jobId;
|
||||
setParameter("JobId", jobId);
|
||||
}
|
||||
|
||||
std::string TaskPreparingRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void TaskPreparingRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
long TaskPreparingRequest::getInstanceOwnerId()const
|
||||
{
|
||||
return instanceOwnerId_;
|
||||
}
|
||||
|
||||
void TaskPreparingRequest::setInstanceOwnerId(long instanceOwnerId)
|
||||
{
|
||||
instanceOwnerId_ = instanceOwnerId;
|
||||
setParameter("InstanceOwnerId", std::to_string(instanceOwnerId));
|
||||
}
|
||||
|
||||
79
outboundbot/src/model/TaskPreparingResult.cc
Normal file
79
outboundbot/src/model/TaskPreparingResult.cc
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* 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/outboundbot/model/TaskPreparingResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::OutboundBot;
|
||||
using namespace AlibabaCloud::OutboundBot::Model;
|
||||
|
||||
TaskPreparingResult::TaskPreparingResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
TaskPreparingResult::TaskPreparingResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
TaskPreparingResult::~TaskPreparingResult()
|
||||
{}
|
||||
|
||||
void TaskPreparingResult::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["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
if(!value["TaskId"].isNull())
|
||||
taskId_ = value["TaskId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string TaskPreparingResult::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
std::string TaskPreparingResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int TaskPreparingResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string TaskPreparingResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool TaskPreparingResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -137,6 +137,8 @@ set(r-kvstore_public_header_model
|
||||
include/alibabacloud/r-kvstore/model/ModifyAccountPasswordResult.h
|
||||
include/alibabacloud/r-kvstore/model/ModifyActiveOperationTaskRequest.h
|
||||
include/alibabacloud/r-kvstore/model/ModifyActiveOperationTaskResult.h
|
||||
include/alibabacloud/r-kvstore/model/ModifyAuditLogConfigRequest.h
|
||||
include/alibabacloud/r-kvstore/model/ModifyAuditLogConfigResult.h
|
||||
include/alibabacloud/r-kvstore/model/ModifyBackupPolicyRequest.h
|
||||
include/alibabacloud/r-kvstore/model/ModifyBackupPolicyResult.h
|
||||
include/alibabacloud/r-kvstore/model/ModifyDBInstanceConnectionStringRequest.h
|
||||
@@ -318,6 +320,8 @@ set(r-kvstore_src
|
||||
src/model/ModifyAccountPasswordResult.cc
|
||||
src/model/ModifyActiveOperationTaskRequest.cc
|
||||
src/model/ModifyActiveOperationTaskResult.cc
|
||||
src/model/ModifyAuditLogConfigRequest.cc
|
||||
src/model/ModifyAuditLogConfigResult.cc
|
||||
src/model/ModifyBackupPolicyRequest.cc
|
||||
src/model/ModifyBackupPolicyResult.cc
|
||||
src/model/ModifyDBInstanceConnectionStringRequest.cc
|
||||
|
||||
@@ -138,6 +138,8 @@
|
||||
#include "model/ModifyAccountPasswordResult.h"
|
||||
#include "model/ModifyActiveOperationTaskRequest.h"
|
||||
#include "model/ModifyActiveOperationTaskResult.h"
|
||||
#include "model/ModifyAuditLogConfigRequest.h"
|
||||
#include "model/ModifyAuditLogConfigResult.h"
|
||||
#include "model/ModifyBackupPolicyRequest.h"
|
||||
#include "model/ModifyBackupPolicyResult.h"
|
||||
#include "model/ModifyDBInstanceConnectionStringRequest.h"
|
||||
@@ -383,6 +385,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ModifyActiveOperationTaskResult> ModifyActiveOperationTaskOutcome;
|
||||
typedef std::future<ModifyActiveOperationTaskOutcome> ModifyActiveOperationTaskOutcomeCallable;
|
||||
typedef std::function<void(const R_kvstoreClient*, const Model::ModifyActiveOperationTaskRequest&, const ModifyActiveOperationTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyActiveOperationTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::ModifyAuditLogConfigResult> ModifyAuditLogConfigOutcome;
|
||||
typedef std::future<ModifyAuditLogConfigOutcome> ModifyAuditLogConfigOutcomeCallable;
|
||||
typedef std::function<void(const R_kvstoreClient*, const Model::ModifyAuditLogConfigRequest&, const ModifyAuditLogConfigOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyAuditLogConfigAsyncHandler;
|
||||
typedef Outcome<Error, Model::ModifyBackupPolicyResult> ModifyBackupPolicyOutcome;
|
||||
typedef std::future<ModifyBackupPolicyOutcome> ModifyBackupPolicyOutcomeCallable;
|
||||
typedef std::function<void(const R_kvstoreClient*, const Model::ModifyBackupPolicyRequest&, const ModifyBackupPolicyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyBackupPolicyAsyncHandler;
|
||||
@@ -655,6 +660,9 @@ namespace AlibabaCloud
|
||||
ModifyActiveOperationTaskOutcome modifyActiveOperationTask(const Model::ModifyActiveOperationTaskRequest &request)const;
|
||||
void modifyActiveOperationTaskAsync(const Model::ModifyActiveOperationTaskRequest& request, const ModifyActiveOperationTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ModifyActiveOperationTaskOutcomeCallable modifyActiveOperationTaskCallable(const Model::ModifyActiveOperationTaskRequest& request) const;
|
||||
ModifyAuditLogConfigOutcome modifyAuditLogConfig(const Model::ModifyAuditLogConfigRequest &request)const;
|
||||
void modifyAuditLogConfigAsync(const Model::ModifyAuditLogConfigRequest& request, const ModifyAuditLogConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ModifyAuditLogConfigOutcomeCallable modifyAuditLogConfigCallable(const Model::ModifyAuditLogConfigRequest& request) const;
|
||||
ModifyBackupPolicyOutcome modifyBackupPolicy(const Model::ModifyBackupPolicyRequest &request)const;
|
||||
void modifyBackupPolicyAsync(const Model::ModifyBackupPolicyRequest& request, const ModifyBackupPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ModifyBackupPolicyOutcomeCallable modifyBackupPolicyCallable(const Model::ModifyBackupPolicyRequest& request) const;
|
||||
|
||||
@@ -41,6 +41,8 @@ namespace AlibabaCloud
|
||||
void setEngineVersion(const std::string& engineVersion);
|
||||
std::string getAccessKeyId()const;
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
std::string getResourceGroupId()const;
|
||||
void setResourceGroupId(const std::string& resourceGroupId);
|
||||
std::string getSecurityToken()const;
|
||||
void setSecurityToken(const std::string& securityToken);
|
||||
std::string getEngine()const;
|
||||
@@ -58,6 +60,7 @@ namespace AlibabaCloud
|
||||
long resourceOwnerId_;
|
||||
std::string engineVersion_;
|
||||
std::string accessKeyId_;
|
||||
std::string resourceGroupId_;
|
||||
std::string securityToken_;
|
||||
std::string engine_;
|
||||
std::string resourceOwnerAccount_;
|
||||
|
||||
@@ -14,80 +14,71 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DDS_MODEL_DESCRIBEINDEXRECOMMENDATIONREQUEST_H_
|
||||
#define ALIBABACLOUD_DDS_MODEL_DESCRIBEINDEXRECOMMENDATIONREQUEST_H_
|
||||
#ifndef ALIBABACLOUD_R_KVSTORE_MODEL_MODIFYAUDITLOGCONFIGREQUEST_H_
|
||||
#define ALIBABACLOUD_R_KVSTORE_MODEL_MODIFYAUDITLOGCONFIGREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/dds/DdsExport.h>
|
||||
#include <alibabacloud/r-kvstore/R_kvstoreExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Dds
|
||||
namespace R_kvstore
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DDS_EXPORT DescribeIndexRecommendationRequest : public RpcServiceRequest
|
||||
class ALIBABACLOUD_R_KVSTORE_EXPORT ModifyAuditLogConfigRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
DescribeIndexRecommendationRequest();
|
||||
~DescribeIndexRecommendationRequest();
|
||||
ModifyAuditLogConfigRequest();
|
||||
~ModifyAuditLogConfigRequest();
|
||||
|
||||
long getResourceOwnerId()const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getStartTime()const;
|
||||
void setStartTime(const std::string& startTime);
|
||||
int getPageNumber()const;
|
||||
void setPageNumber(int pageNumber);
|
||||
std::string getAccessKeyId()const;
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
std::string getDatabase()const;
|
||||
void setDatabase(const std::string& database);
|
||||
std::string getSecurityToken()const;
|
||||
void setSecurityToken(const std::string& securityToken);
|
||||
int getPageSize()const;
|
||||
void setPageSize(int pageSize);
|
||||
std::string getNodeId()const;
|
||||
void setNodeId(const std::string& nodeId);
|
||||
std::string getTaskId()const;
|
||||
void setTaskId(const std::string& taskId);
|
||||
std::string getAuditCommand()const;
|
||||
void setAuditCommand(const std::string& auditCommand);
|
||||
std::string getAuditLogSwitchSource()const;
|
||||
void setAuditLogSwitchSource(const std::string& auditLogSwitchSource);
|
||||
std::string getProxyAudit()const;
|
||||
void setProxyAudit(const std::string& proxyAudit);
|
||||
int getRetention()const;
|
||||
void setRetention(int retention);
|
||||
std::string getResourceOwnerAccount()const;
|
||||
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
|
||||
std::string getOwnerAccount()const;
|
||||
void setOwnerAccount(const std::string& ownerAccount);
|
||||
std::string getEndTime()const;
|
||||
void setEndTime(const std::string& endTime);
|
||||
std::string getCollection()const;
|
||||
void setCollection(const std::string& collection);
|
||||
std::string getOperationType()const;
|
||||
void setOperationType(const std::string& operationType);
|
||||
bool getDbAudit()const;
|
||||
void setDbAudit(bool dbAudit);
|
||||
long getOwnerId()const;
|
||||
void setOwnerId(long ownerId);
|
||||
std::string getServiceType()const;
|
||||
void setServiceType(const std::string& serviceType);
|
||||
std::string getInstanceId()const;
|
||||
void setInstanceId(const std::string& instanceId);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string startTime_;
|
||||
int pageNumber_;
|
||||
std::string accessKeyId_;
|
||||
std::string database_;
|
||||
std::string securityToken_;
|
||||
int pageSize_;
|
||||
std::string nodeId_;
|
||||
std::string taskId_;
|
||||
std::string auditCommand_;
|
||||
std::string auditLogSwitchSource_;
|
||||
std::string proxyAudit_;
|
||||
int retention_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string ownerAccount_;
|
||||
std::string endTime_;
|
||||
std::string collection_;
|
||||
std::string operationType_;
|
||||
bool dbAudit_;
|
||||
long ownerId_;
|
||||
std::string serviceType_;
|
||||
std::string instanceId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DDS_MODEL_DESCRIBEINDEXRECOMMENDATIONREQUEST_H_
|
||||
#endif // !ALIBABACLOUD_R_KVSTORE_MODEL_MODIFYAUDITLOGCONFIGREQUEST_H_
|
||||
@@ -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_R_KVSTORE_MODEL_MODIFYAUDITLOGCONFIGRESULT_H_
|
||||
#define ALIBABACLOUD_R_KVSTORE_MODEL_MODIFYAUDITLOGCONFIGRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/r-kvstore/R_kvstoreExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace R_kvstore
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_R_KVSTORE_EXPORT ModifyAuditLogConfigResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
ModifyAuditLogConfigResult();
|
||||
explicit ModifyAuditLogConfigResult(const std::string &payload);
|
||||
~ModifyAuditLogConfigResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_R_KVSTORE_MODEL_MODIFYAUDITLOGCONFIGRESULT_H_
|
||||
@@ -2139,6 +2139,42 @@ R_kvstoreClient::ModifyActiveOperationTaskOutcomeCallable R_kvstoreClient::modif
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
R_kvstoreClient::ModifyAuditLogConfigOutcome R_kvstoreClient::modifyAuditLogConfig(const ModifyAuditLogConfigRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ModifyAuditLogConfigOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ModifyAuditLogConfigOutcome(ModifyAuditLogConfigResult(outcome.result()));
|
||||
else
|
||||
return ModifyAuditLogConfigOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void R_kvstoreClient::modifyAuditLogConfigAsync(const ModifyAuditLogConfigRequest& request, const ModifyAuditLogConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, modifyAuditLogConfig(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
R_kvstoreClient::ModifyAuditLogConfigOutcomeCallable R_kvstoreClient::modifyAuditLogConfigCallable(const ModifyAuditLogConfigRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ModifyAuditLogConfigOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->modifyAuditLogConfig(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
R_kvstoreClient::ModifyBackupPolicyOutcome R_kvstoreClient::modifyBackupPolicy(const ModifyBackupPolicyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -60,6 +60,17 @@ void DescribeParameterTemplatesRequest::setAccessKeyId(const std::string& access
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string DescribeParameterTemplatesRequest::getResourceGroupId()const
|
||||
{
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void DescribeParameterTemplatesRequest::setResourceGroupId(const std::string& resourceGroupId)
|
||||
{
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter("ResourceGroupId", resourceGroupId);
|
||||
}
|
||||
|
||||
std::string DescribeParameterTemplatesRequest::getSecurityToken()const
|
||||
{
|
||||
return securityToken_;
|
||||
|
||||
172
r-kvstore/src/model/ModifyAuditLogConfigRequest.cc
Normal file
172
r-kvstore/src/model/ModifyAuditLogConfigRequest.cc
Normal file
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* 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/r-kvstore/model/ModifyAuditLogConfigRequest.h>
|
||||
|
||||
using AlibabaCloud::R_kvstore::Model::ModifyAuditLogConfigRequest;
|
||||
|
||||
ModifyAuditLogConfigRequest::ModifyAuditLogConfigRequest() :
|
||||
RpcServiceRequest("r-kvstore", "2015-01-01", "ModifyAuditLogConfig")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ModifyAuditLogConfigRequest::~ModifyAuditLogConfigRequest()
|
||||
{}
|
||||
|
||||
long ModifyAuditLogConfigRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void ModifyAuditLogConfigRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string ModifyAuditLogConfigRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ModifyAuditLogConfigRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string ModifyAuditLogConfigRequest::getSecurityToken()const
|
||||
{
|
||||
return securityToken_;
|
||||
}
|
||||
|
||||
void ModifyAuditLogConfigRequest::setSecurityToken(const std::string& securityToken)
|
||||
{
|
||||
securityToken_ = securityToken;
|
||||
setParameter("SecurityToken", securityToken);
|
||||
}
|
||||
|
||||
std::string ModifyAuditLogConfigRequest::getAuditCommand()const
|
||||
{
|
||||
return auditCommand_;
|
||||
}
|
||||
|
||||
void ModifyAuditLogConfigRequest::setAuditCommand(const std::string& auditCommand)
|
||||
{
|
||||
auditCommand_ = auditCommand;
|
||||
setParameter("AuditCommand", auditCommand);
|
||||
}
|
||||
|
||||
std::string ModifyAuditLogConfigRequest::getAuditLogSwitchSource()const
|
||||
{
|
||||
return auditLogSwitchSource_;
|
||||
}
|
||||
|
||||
void ModifyAuditLogConfigRequest::setAuditLogSwitchSource(const std::string& auditLogSwitchSource)
|
||||
{
|
||||
auditLogSwitchSource_ = auditLogSwitchSource;
|
||||
setParameter("AuditLogSwitchSource", auditLogSwitchSource);
|
||||
}
|
||||
|
||||
std::string ModifyAuditLogConfigRequest::getProxyAudit()const
|
||||
{
|
||||
return proxyAudit_;
|
||||
}
|
||||
|
||||
void ModifyAuditLogConfigRequest::setProxyAudit(const std::string& proxyAudit)
|
||||
{
|
||||
proxyAudit_ = proxyAudit;
|
||||
setParameter("ProxyAudit", proxyAudit);
|
||||
}
|
||||
|
||||
int ModifyAuditLogConfigRequest::getRetention()const
|
||||
{
|
||||
return retention_;
|
||||
}
|
||||
|
||||
void ModifyAuditLogConfigRequest::setRetention(int retention)
|
||||
{
|
||||
retention_ = retention;
|
||||
setParameter("Retention", std::to_string(retention));
|
||||
}
|
||||
|
||||
std::string ModifyAuditLogConfigRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void ModifyAuditLogConfigRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string ModifyAuditLogConfigRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void ModifyAuditLogConfigRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
bool ModifyAuditLogConfigRequest::getDbAudit()const
|
||||
{
|
||||
return dbAudit_;
|
||||
}
|
||||
|
||||
void ModifyAuditLogConfigRequest::setDbAudit(bool dbAudit)
|
||||
{
|
||||
dbAudit_ = dbAudit;
|
||||
setParameter("DbAudit", dbAudit ? "true" : "false");
|
||||
}
|
||||
|
||||
long ModifyAuditLogConfigRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void ModifyAuditLogConfigRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string ModifyAuditLogConfigRequest::getServiceType()const
|
||||
{
|
||||
return serviceType_;
|
||||
}
|
||||
|
||||
void ModifyAuditLogConfigRequest::setServiceType(const std::string& serviceType)
|
||||
{
|
||||
serviceType_ = serviceType;
|
||||
setParameter("ServiceType", serviceType);
|
||||
}
|
||||
|
||||
std::string ModifyAuditLogConfigRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ModifyAuditLogConfigRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
44
r-kvstore/src/model/ModifyAuditLogConfigResult.cc
Normal file
44
r-kvstore/src/model/ModifyAuditLogConfigResult.cc
Normal 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/r-kvstore/model/ModifyAuditLogConfigResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::R_kvstore;
|
||||
using namespace AlibabaCloud::R_kvstore::Model;
|
||||
|
||||
ModifyAuditLogConfigResult::ModifyAuditLogConfigResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyAuditLogConfigResult::ModifyAuditLogConfigResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyAuditLogConfigResult::~ModifyAuditLogConfigResult()
|
||||
{}
|
||||
|
||||
void ModifyAuditLogConfigResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
90
safconsole/CMakeLists.txt
Normal file
90
safconsole/CMakeLists.txt
Normal 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(safconsole_public_header
|
||||
include/alibabacloud/safconsole/SafconsoleClient.h
|
||||
include/alibabacloud/safconsole/SafconsoleExport.h )
|
||||
|
||||
set(safconsole_public_header_model
|
||||
include/alibabacloud/safconsole/model/RevokeFeedbackRequest.h
|
||||
include/alibabacloud/safconsole/model/RevokeFeedbackResult.h
|
||||
include/alibabacloud/safconsole/model/SendFeedbackRequest.h
|
||||
include/alibabacloud/safconsole/model/SendFeedbackResult.h )
|
||||
|
||||
set(safconsole_src
|
||||
src/SafconsoleClient.cc
|
||||
src/model/RevokeFeedbackRequest.cc
|
||||
src/model/RevokeFeedbackResult.cc
|
||||
src/model/SendFeedbackRequest.cc
|
||||
src/model/SendFeedbackResult.cc )
|
||||
|
||||
add_library(safconsole ${LIB_TYPE}
|
||||
${safconsole_public_header}
|
||||
${safconsole_public_header_model}
|
||||
${safconsole_src})
|
||||
|
||||
set_target_properties(safconsole
|
||||
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}safconsole
|
||||
)
|
||||
|
||||
if(${LIB_TYPE} STREQUAL "SHARED")
|
||||
set_target_properties(safconsole
|
||||
PROPERTIES
|
||||
DEFINE_SYMBOL ALIBABACLOUD_SAFCONSOLE_LIBRARY)
|
||||
endif()
|
||||
|
||||
target_include_directories(safconsole
|
||||
PRIVATE include
|
||||
${CMAKE_SOURCE_DIR}/core/include
|
||||
)
|
||||
target_link_libraries(safconsole
|
||||
core)
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
|
||||
set(jsoncpp_install_dir ${INSTALL_DIR})
|
||||
add_dependencies(safconsole
|
||||
jsoncpp)
|
||||
target_include_directories(safconsole
|
||||
PRIVATE ${jsoncpp_install_dir}/include)
|
||||
target_link_libraries(safconsole
|
||||
${jsoncpp_install_dir}/lib/jsoncpp.lib)
|
||||
set_target_properties(safconsole
|
||||
PROPERTIES
|
||||
COMPILE_OPTIONS "/bigobj")
|
||||
else()
|
||||
target_include_directories(safconsole
|
||||
PRIVATE /usr/include/jsoncpp)
|
||||
target_link_libraries(safconsole
|
||||
jsoncpp)
|
||||
endif()
|
||||
|
||||
install(FILES ${safconsole_public_header}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/safconsole)
|
||||
install(FILES ${safconsole_public_header_model}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/safconsole/model)
|
||||
install(TARGETS safconsole
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
@@ -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_SAFCONSOLE_SAFCONSOLECLIENT_H_
|
||||
#define ALIBABACLOUD_SAFCONSOLE_SAFCONSOLECLIENT_H_
|
||||
|
||||
#include <future>
|
||||
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RpcServiceClient.h>
|
||||
#include "SafconsoleExport.h"
|
||||
#include "model/RevokeFeedbackRequest.h"
|
||||
#include "model/RevokeFeedbackResult.h"
|
||||
#include "model/SendFeedbackRequest.h"
|
||||
#include "model/SendFeedbackResult.h"
|
||||
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Safconsole
|
||||
{
|
||||
class ALIBABACLOUD_SAFCONSOLE_EXPORT SafconsoleClient : public RpcServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::RevokeFeedbackResult> RevokeFeedbackOutcome;
|
||||
typedef std::future<RevokeFeedbackOutcome> RevokeFeedbackOutcomeCallable;
|
||||
typedef std::function<void(const SafconsoleClient*, const Model::RevokeFeedbackRequest&, const RevokeFeedbackOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RevokeFeedbackAsyncHandler;
|
||||
typedef Outcome<Error, Model::SendFeedbackResult> SendFeedbackOutcome;
|
||||
typedef std::future<SendFeedbackOutcome> SendFeedbackOutcomeCallable;
|
||||
typedef std::function<void(const SafconsoleClient*, const Model::SendFeedbackRequest&, const SendFeedbackOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SendFeedbackAsyncHandler;
|
||||
|
||||
SafconsoleClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
SafconsoleClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
SafconsoleClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~SafconsoleClient();
|
||||
RevokeFeedbackOutcome revokeFeedback(const Model::RevokeFeedbackRequest &request)const;
|
||||
void revokeFeedbackAsync(const Model::RevokeFeedbackRequest& request, const RevokeFeedbackAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RevokeFeedbackOutcomeCallable revokeFeedbackCallable(const Model::RevokeFeedbackRequest& request) const;
|
||||
SendFeedbackOutcome sendFeedback(const Model::SendFeedbackRequest &request)const;
|
||||
void sendFeedbackAsync(const Model::SendFeedbackRequest& request, const SendFeedbackAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SendFeedbackOutcomeCallable sendFeedbackCallable(const Model::SendFeedbackRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !ALIBABACLOUD_SAFCONSOLE_SAFCONSOLECLIENT_H_
|
||||
@@ -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_SAFCONSOLE_SAFCONSOLEEXPORT_H_
|
||||
#define ALIBABACLOUD_SAFCONSOLE_SAFCONSOLEEXPORT_H_
|
||||
|
||||
#include <alibabacloud/core/Global.h>
|
||||
|
||||
#if defined(ALIBABACLOUD_SHARED)
|
||||
# if defined(ALIBABACLOUD_SAFCONSOLE_LIBRARY)
|
||||
# define ALIBABACLOUD_SAFCONSOLE_EXPORT ALIBABACLOUD_DECL_EXPORT
|
||||
# else
|
||||
# define ALIBABACLOUD_SAFCONSOLE_EXPORT ALIBABACLOUD_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define ALIBABACLOUD_SAFCONSOLE_EXPORT
|
||||
#endif
|
||||
|
||||
#endif // !ALIBABACLOUD_SAFCONSOLE_SAFCONSOLEEXPORT_H_
|
||||
@@ -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_SAFCONSOLE_MODEL_REVOKEFEEDBACKREQUEST_H_
|
||||
#define ALIBABACLOUD_SAFCONSOLE_MODEL_REVOKEFEEDBACKREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/safconsole/SafconsoleExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Safconsole
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_SAFCONSOLE_EXPORT RevokeFeedbackRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
RevokeFeedbackRequest();
|
||||
~RevokeFeedbackRequest();
|
||||
|
||||
std::string getSampleType()const;
|
||||
void setSampleType(const std::string& sampleType);
|
||||
std::string getValue()const;
|
||||
void setValue(const std::string& value);
|
||||
|
||||
private:
|
||||
std::string sampleType_;
|
||||
std::string value_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_SAFCONSOLE_MODEL_REVOKEFEEDBACKREQUEST_H_
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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_SAFCONSOLE_MODEL_REVOKEFEEDBACKRESULT_H_
|
||||
#define ALIBABACLOUD_SAFCONSOLE_MODEL_REVOKEFEEDBACKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/safconsole/SafconsoleExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Safconsole
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_SAFCONSOLE_EXPORT RevokeFeedbackResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
RevokeFeedbackResult();
|
||||
explicit RevokeFeedbackResult(const std::string &payload);
|
||||
~RevokeFeedbackResult();
|
||||
std::string getMessage()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_SAFCONSOLE_MODEL_REVOKEFEEDBACKRESULT_H_
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_SAFCONSOLE_MODEL_SENDFEEDBACKREQUEST_H_
|
||||
#define ALIBABACLOUD_SAFCONSOLE_MODEL_SENDFEEDBACKREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/safconsole/SafconsoleExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Safconsole
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_SAFCONSOLE_EXPORT SendFeedbackRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
SendFeedbackRequest();
|
||||
~SendFeedbackRequest();
|
||||
|
||||
std::string getRiskLabel()const;
|
||||
void setRiskLabel(const std::string& riskLabel);
|
||||
std::string getSampleType()const;
|
||||
void setSampleType(const std::string& sampleType);
|
||||
std::string getValue()const;
|
||||
void setValue(const std::string& value);
|
||||
|
||||
private:
|
||||
std::string riskLabel_;
|
||||
std::string sampleType_;
|
||||
std::string value_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_SAFCONSOLE_MODEL_SENDFEEDBACKREQUEST_H_
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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_SAFCONSOLE_MODEL_SENDFEEDBACKRESULT_H_
|
||||
#define ALIBABACLOUD_SAFCONSOLE_MODEL_SENDFEEDBACKRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/safconsole/SafconsoleExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Safconsole
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_SAFCONSOLE_EXPORT SendFeedbackResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
SendFeedbackResult();
|
||||
explicit SendFeedbackResult(const std::string &payload);
|
||||
~SendFeedbackResult();
|
||||
std::string getMessage()const;
|
||||
int getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
int code_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_SAFCONSOLE_MODEL_SENDFEEDBACKRESULT_H_
|
||||
125
safconsole/src/SafconsoleClient.cc
Normal file
125
safconsole/src/SafconsoleClient.cc
Normal 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/safconsole/SafconsoleClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::Safconsole;
|
||||
using namespace AlibabaCloud::Safconsole::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "safconsole";
|
||||
}
|
||||
|
||||
SafconsoleClient::SafconsoleClient(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, "saf");
|
||||
}
|
||||
|
||||
SafconsoleClient::SafconsoleClient(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, "saf");
|
||||
}
|
||||
|
||||
SafconsoleClient::SafconsoleClient(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, "saf");
|
||||
}
|
||||
|
||||
SafconsoleClient::~SafconsoleClient()
|
||||
{}
|
||||
|
||||
SafconsoleClient::RevokeFeedbackOutcome SafconsoleClient::revokeFeedback(const RevokeFeedbackRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RevokeFeedbackOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RevokeFeedbackOutcome(RevokeFeedbackResult(outcome.result()));
|
||||
else
|
||||
return RevokeFeedbackOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void SafconsoleClient::revokeFeedbackAsync(const RevokeFeedbackRequest& request, const RevokeFeedbackAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, revokeFeedback(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
SafconsoleClient::RevokeFeedbackOutcomeCallable SafconsoleClient::revokeFeedbackCallable(const RevokeFeedbackRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RevokeFeedbackOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->revokeFeedback(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
SafconsoleClient::SendFeedbackOutcome SafconsoleClient::sendFeedback(const SendFeedbackRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SendFeedbackOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SendFeedbackOutcome(SendFeedbackResult(outcome.result()));
|
||||
else
|
||||
return SendFeedbackOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void SafconsoleClient::sendFeedbackAsync(const SendFeedbackRequest& request, const SendFeedbackAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, sendFeedback(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
SafconsoleClient::SendFeedbackOutcomeCallable SafconsoleClient::sendFeedbackCallable(const SendFeedbackRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SendFeedbackOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->sendFeedback(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
51
safconsole/src/model/RevokeFeedbackRequest.cc
Normal file
51
safconsole/src/model/RevokeFeedbackRequest.cc
Normal 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/safconsole/model/RevokeFeedbackRequest.h>
|
||||
|
||||
using AlibabaCloud::Safconsole::Model::RevokeFeedbackRequest;
|
||||
|
||||
RevokeFeedbackRequest::RevokeFeedbackRequest() :
|
||||
RpcServiceRequest("safconsole", "2021-01-12", "RevokeFeedback")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RevokeFeedbackRequest::~RevokeFeedbackRequest()
|
||||
{}
|
||||
|
||||
std::string RevokeFeedbackRequest::getSampleType()const
|
||||
{
|
||||
return sampleType_;
|
||||
}
|
||||
|
||||
void RevokeFeedbackRequest::setSampleType(const std::string& sampleType)
|
||||
{
|
||||
sampleType_ = sampleType;
|
||||
setBodyParameter("SampleType", sampleType);
|
||||
}
|
||||
|
||||
std::string RevokeFeedbackRequest::getValue()const
|
||||
{
|
||||
return value_;
|
||||
}
|
||||
|
||||
void RevokeFeedbackRequest::setValue(const std::string& value)
|
||||
{
|
||||
value_ = value;
|
||||
setBodyParameter("Value", value);
|
||||
}
|
||||
|
||||
58
safconsole/src/model/RevokeFeedbackResult.cc
Normal file
58
safconsole/src/model/RevokeFeedbackResult.cc
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* 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/safconsole/model/RevokeFeedbackResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Safconsole;
|
||||
using namespace AlibabaCloud::Safconsole::Model;
|
||||
|
||||
RevokeFeedbackResult::RevokeFeedbackResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RevokeFeedbackResult::RevokeFeedbackResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RevokeFeedbackResult::~RevokeFeedbackResult()
|
||||
{}
|
||||
|
||||
void RevokeFeedbackResult::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();
|
||||
|
||||
}
|
||||
|
||||
std::string RevokeFeedbackResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string RevokeFeedbackResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
62
safconsole/src/model/SendFeedbackRequest.cc
Normal file
62
safconsole/src/model/SendFeedbackRequest.cc
Normal 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/safconsole/model/SendFeedbackRequest.h>
|
||||
|
||||
using AlibabaCloud::Safconsole::Model::SendFeedbackRequest;
|
||||
|
||||
SendFeedbackRequest::SendFeedbackRequest() :
|
||||
RpcServiceRequest("safconsole", "2021-01-12", "SendFeedback")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
SendFeedbackRequest::~SendFeedbackRequest()
|
||||
{}
|
||||
|
||||
std::string SendFeedbackRequest::getRiskLabel()const
|
||||
{
|
||||
return riskLabel_;
|
||||
}
|
||||
|
||||
void SendFeedbackRequest::setRiskLabel(const std::string& riskLabel)
|
||||
{
|
||||
riskLabel_ = riskLabel;
|
||||
setParameter("RiskLabel", riskLabel);
|
||||
}
|
||||
|
||||
std::string SendFeedbackRequest::getSampleType()const
|
||||
{
|
||||
return sampleType_;
|
||||
}
|
||||
|
||||
void SendFeedbackRequest::setSampleType(const std::string& sampleType)
|
||||
{
|
||||
sampleType_ = sampleType;
|
||||
setParameter("SampleType", sampleType);
|
||||
}
|
||||
|
||||
std::string SendFeedbackRequest::getValue()const
|
||||
{
|
||||
return value_;
|
||||
}
|
||||
|
||||
void SendFeedbackRequest::setValue(const std::string& value)
|
||||
{
|
||||
value_ = value;
|
||||
setParameter("Value", value);
|
||||
}
|
||||
|
||||
58
safconsole/src/model/SendFeedbackResult.cc
Normal file
58
safconsole/src/model/SendFeedbackResult.cc
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* 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/safconsole/model/SendFeedbackResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Safconsole;
|
||||
using namespace AlibabaCloud::Safconsole::Model;
|
||||
|
||||
SendFeedbackResult::SendFeedbackResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SendFeedbackResult::SendFeedbackResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SendFeedbackResult::~SendFeedbackResult()
|
||||
{}
|
||||
|
||||
void SendFeedbackResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string SendFeedbackResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int SendFeedbackResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user