Compare commits

..

5 Commits

Author SHA1 Message Date
sdk-team
ab7e92063b Add new openapi ApplyNodes. 2020-05-11 18:08:58 +08:00
sdk-team
92d767384b Support CreationCategory for CreateDBCluster. 2020-05-11 15:09:53 +08:00
sdk-team
32e4dafba9 Generated 2019-01-01 for Cassandra. 2020-05-09 22:55:19 +08:00
sdk-team
9f2fb5a595 VideoSearch deploy SDK. 2020-05-09 17:31:25 +08:00
sdk-team
590e1bdfaf Support sg for region. 2020-05-08 09:45:11 +08:00
91 changed files with 4752 additions and 214 deletions

View File

@@ -1,3 +1,18 @@
2020-05-11 Version: 1.36.403
- Add new openapi ApplyNodes.
2020-05-11 Version: 1.36.402
- Support CreationCategory for CreateDBCluster.
2020-05-09 Version: 1.36.401
- Generated 2019-01-01 for `Cassandra`.
2020-05-09 Version: 1.36.400
- VideoSearch deploy SDK.
2020-05-08 Version: 1.36.399
- Support sg for region.
2020-05-06 Version: 1.36.398
- Describe describeAvailableResource.

View File

@@ -1 +1 @@
1.36.398
1.36.403

View File

@@ -57,6 +57,8 @@ set(cassandra_public_header_model
include/alibabacloud/cassandra/model/DescribeClustersResult.h
include/alibabacloud/cassandra/model/DescribeContactPointsRequest.h
include/alibabacloud/cassandra/model/DescribeContactPointsResult.h
include/alibabacloud/cassandra/model/DescribeDataCenterRequest.h
include/alibabacloud/cassandra/model/DescribeDataCenterResult.h
include/alibabacloud/cassandra/model/DescribeDataCentersRequest.h
include/alibabacloud/cassandra/model/DescribeDataCentersResult.h
include/alibabacloud/cassandra/model/DescribeDeletedClustersRequest.h
@@ -160,6 +162,8 @@ set(cassandra_src
src/model/DescribeClustersResult.cc
src/model/DescribeContactPointsRequest.cc
src/model/DescribeContactPointsResult.cc
src/model/DescribeDataCenterRequest.cc
src/model/DescribeDataCenterResult.cc
src/model/DescribeDataCentersRequest.cc
src/model/DescribeDataCentersResult.cc
src/model/DescribeDeletedClustersRequest.cc

View File

@@ -58,6 +58,8 @@
#include "model/DescribeClustersResult.h"
#include "model/DescribeContactPointsRequest.h"
#include "model/DescribeContactPointsResult.h"
#include "model/DescribeDataCenterRequest.h"
#include "model/DescribeDataCenterResult.h"
#include "model/DescribeDataCentersRequest.h"
#include "model/DescribeDataCentersResult.h"
#include "model/DescribeDeletedClustersRequest.h"
@@ -185,6 +187,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DescribeContactPointsResult> DescribeContactPointsOutcome;
typedef std::future<DescribeContactPointsOutcome> DescribeContactPointsOutcomeCallable;
typedef std::function<void(const CassandraClient*, const Model::DescribeContactPointsRequest&, const DescribeContactPointsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeContactPointsAsyncHandler;
typedef Outcome<Error, Model::DescribeDataCenterResult> DescribeDataCenterOutcome;
typedef std::future<DescribeDataCenterOutcome> DescribeDataCenterOutcomeCallable;
typedef std::function<void(const CassandraClient*, const Model::DescribeDataCenterRequest&, const DescribeDataCenterOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDataCenterAsyncHandler;
typedef Outcome<Error, Model::DescribeDataCentersResult> DescribeDataCentersOutcome;
typedef std::future<DescribeDataCentersOutcome> DescribeDataCentersOutcomeCallable;
typedef std::function<void(const CassandraClient*, const Model::DescribeDataCentersRequest&, const DescribeDataCentersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDataCentersAsyncHandler;
@@ -340,6 +345,9 @@ namespace AlibabaCloud
DescribeContactPointsOutcome describeContactPoints(const Model::DescribeContactPointsRequest &request)const;
void describeContactPointsAsync(const Model::DescribeContactPointsRequest& request, const DescribeContactPointsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeContactPointsOutcomeCallable describeContactPointsCallable(const Model::DescribeContactPointsRequest& request) const;
DescribeDataCenterOutcome describeDataCenter(const Model::DescribeDataCenterRequest &request)const;
void describeDataCenterAsync(const Model::DescribeDataCenterRequest& request, const DescribeDataCenterAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeDataCenterOutcomeCallable describeDataCenterCallable(const Model::DescribeDataCenterRequest& request) const;
DescribeDataCentersOutcome describeDataCenters(const Model::DescribeDataCentersRequest &request)const;
void describeDataCentersAsync(const Model::DescribeDataCentersRequest& request, const DescribeDataCentersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeDataCentersOutcomeCallable describeDataCentersCallable(const Model::DescribeDataCentersRequest& request) const;

View File

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

View File

@@ -0,0 +1,83 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_CASSANDRA_MODEL_DESCRIBEDATACENTERRESULT_H_
#define ALIBABACLOUD_CASSANDRA_MODEL_DESCRIBEDATACENTERRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/cassandra/CassandraExport.h>
namespace AlibabaCloud
{
namespace Cassandra
{
namespace Model
{
class ALIBABACLOUD_CASSANDRA_EXPORT DescribeDataCenterResult : public ServiceResult
{
public:
DescribeDataCenterResult();
explicit DescribeDataCenterResult(const std::string &payload);
~DescribeDataCenterResult();
std::string getStatus()const;
std::string getDataCenterId()const;
std::string getCreatedTime()const;
std::string getCommodityInstance()const;
std::string getZoneId()const;
int getNodeCount()const;
std::string getClusterId()const;
std::string getPayType()const;
std::string getLockMode()const;
std::string getDataCenterName()const;
std::string getVswitchId()const;
std::string getDiskType()const;
std::string getVpcId()const;
int getDiskSize()const;
std::string getRegionId()const;
std::string getInstanceType()const;
std::string getExpireTime()const;
protected:
void parse(const std::string &payload);
private:
std::string status_;
std::string dataCenterId_;
std::string createdTime_;
std::string commodityInstance_;
std::string zoneId_;
int nodeCount_;
std::string clusterId_;
std::string payType_;
std::string lockMode_;
std::string dataCenterName_;
std::string vswitchId_;
std::string diskType_;
std::string vpcId_;
int diskSize_;
std::string regionId_;
std::string instanceType_;
std::string expireTime_;
};
}
}
}
#endif // !ALIBABACLOUD_CASSANDRA_MODEL_DESCRIBEDATACENTERRESULT_H_

View File

@@ -699,6 +699,42 @@ CassandraClient::DescribeContactPointsOutcomeCallable CassandraClient::describeC
return task->get_future();
}
CassandraClient::DescribeDataCenterOutcome CassandraClient::describeDataCenter(const DescribeDataCenterRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeDataCenterOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeDataCenterOutcome(DescribeDataCenterResult(outcome.result()));
else
return DescribeDataCenterOutcome(outcome.error());
}
void CassandraClient::describeDataCenterAsync(const DescribeDataCenterRequest& request, const DescribeDataCenterAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeDataCenter(request), context);
};
asyncExecute(new Runnable(fn));
}
CassandraClient::DescribeDataCenterOutcomeCallable CassandraClient::describeDataCenterCallable(const DescribeDataCenterRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeDataCenterOutcome()>>(
[this, request]()
{
return this->describeDataCenter(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CassandraClient::DescribeDataCentersOutcome CassandraClient::describeDataCenters(const DescribeDataCentersRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/cassandra/model/DescribeDataCenterRequest.h>
using AlibabaCloud::Cassandra::Model::DescribeDataCenterRequest;
DescribeDataCenterRequest::DescribeDataCenterRequest() :
RpcServiceRequest("cassandra", "2019-01-01", "DescribeDataCenter")
{
setMethod(HttpRequest::Method::Post);
}
DescribeDataCenterRequest::~DescribeDataCenterRequest()
{}
std::string DescribeDataCenterRequest::getDataCenterId()const
{
return dataCenterId_;
}
void DescribeDataCenterRequest::setDataCenterId(const std::string& dataCenterId)
{
dataCenterId_ = dataCenterId;
setParameter("DataCenterId", dataCenterId);
}
std::string DescribeDataCenterRequest::getClusterId()const
{
return clusterId_;
}
void DescribeDataCenterRequest::setClusterId(const std::string& clusterId)
{
clusterId_ = clusterId;
setParameter("ClusterId", clusterId);
}

View File

@@ -0,0 +1,163 @@
/*
* 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/cassandra/model/DescribeDataCenterResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cassandra;
using namespace AlibabaCloud::Cassandra::Model;
DescribeDataCenterResult::DescribeDataCenterResult() :
ServiceResult()
{}
DescribeDataCenterResult::DescribeDataCenterResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeDataCenterResult::~DescribeDataCenterResult()
{}
void DescribeDataCenterResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["DataCenterId"].isNull())
dataCenterId_ = value["DataCenterId"].asString();
if(!value["RegionId"].isNull())
regionId_ = value["RegionId"].asString();
if(!value["ZoneId"].isNull())
zoneId_ = value["ZoneId"].asString();
if(!value["ClusterId"].isNull())
clusterId_ = value["ClusterId"].asString();
if(!value["DataCenterName"].isNull())
dataCenterName_ = value["DataCenterName"].asString();
if(!value["Status"].isNull())
status_ = value["Status"].asString();
if(!value["CreatedTime"].isNull())
createdTime_ = value["CreatedTime"].asString();
if(!value["InstanceType"].isNull())
instanceType_ = value["InstanceType"].asString();
if(!value["NodeCount"].isNull())
nodeCount_ = std::stoi(value["NodeCount"].asString());
if(!value["DiskType"].isNull())
diskType_ = value["DiskType"].asString();
if(!value["DiskSize"].isNull())
diskSize_ = std::stoi(value["DiskSize"].asString());
if(!value["VpcId"].isNull())
vpcId_ = value["VpcId"].asString();
if(!value["VswitchId"].isNull())
vswitchId_ = value["VswitchId"].asString();
if(!value["PayType"].isNull())
payType_ = value["PayType"].asString();
if(!value["CommodityInstance"].isNull())
commodityInstance_ = value["CommodityInstance"].asString();
if(!value["ExpireTime"].isNull())
expireTime_ = value["ExpireTime"].asString();
if(!value["LockMode"].isNull())
lockMode_ = value["LockMode"].asString();
}
std::string DescribeDataCenterResult::getStatus()const
{
return status_;
}
std::string DescribeDataCenterResult::getDataCenterId()const
{
return dataCenterId_;
}
std::string DescribeDataCenterResult::getCreatedTime()const
{
return createdTime_;
}
std::string DescribeDataCenterResult::getCommodityInstance()const
{
return commodityInstance_;
}
std::string DescribeDataCenterResult::getZoneId()const
{
return zoneId_;
}
int DescribeDataCenterResult::getNodeCount()const
{
return nodeCount_;
}
std::string DescribeDataCenterResult::getClusterId()const
{
return clusterId_;
}
std::string DescribeDataCenterResult::getPayType()const
{
return payType_;
}
std::string DescribeDataCenterResult::getLockMode()const
{
return lockMode_;
}
std::string DescribeDataCenterResult::getDataCenterName()const
{
return dataCenterName_;
}
std::string DescribeDataCenterResult::getVswitchId()const
{
return vswitchId_;
}
std::string DescribeDataCenterResult::getDiskType()const
{
return diskType_;
}
std::string DescribeDataCenterResult::getVpcId()const
{
return vpcId_;
}
int DescribeDataCenterResult::getDiskSize()const
{
return diskSize_;
}
std::string DescribeDataCenterResult::getRegionId()const
{
return regionId_;
}
std::string DescribeDataCenterResult::getInstanceType()const
{
return instanceType_;
}
std::string DescribeDataCenterResult::getExpireTime()const
{
return expireTime_;
}

View File

@@ -31,6 +31,8 @@ set(ehpc_public_header_model
include/alibabacloud/ehpc/model/AddQueueResult.h
include/alibabacloud/ehpc/model/AddUsersRequest.h
include/alibabacloud/ehpc/model/AddUsersResult.h
include/alibabacloud/ehpc/model/ApplyNodesRequest.h
include/alibabacloud/ehpc/model/ApplyNodesResult.h
include/alibabacloud/ehpc/model/BindAccountToClusterUserRequest.h
include/alibabacloud/ehpc/model/BindAccountToClusterUserResult.h
include/alibabacloud/ehpc/model/CreateClusterRequest.h
@@ -258,6 +260,8 @@ set(ehpc_src
src/model/AddQueueResult.cc
src/model/AddUsersRequest.cc
src/model/AddUsersResult.cc
src/model/ApplyNodesRequest.cc
src/model/ApplyNodesResult.cc
src/model/BindAccountToClusterUserRequest.cc
src/model/BindAccountToClusterUserResult.cc
src/model/CreateClusterRequest.cc

View File

@@ -32,6 +32,8 @@
#include "model/AddQueueResult.h"
#include "model/AddUsersRequest.h"
#include "model/AddUsersResult.h"
#include "model/ApplyNodesRequest.h"
#include "model/ApplyNodesResult.h"
#include "model/BindAccountToClusterUserRequest.h"
#include "model/BindAccountToClusterUserResult.h"
#include "model/CreateClusterRequest.h"
@@ -270,6 +272,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::AddUsersResult> AddUsersOutcome;
typedef std::future<AddUsersOutcome> AddUsersOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::AddUsersRequest&, const AddUsersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddUsersAsyncHandler;
typedef Outcome<Error, Model::ApplyNodesResult> ApplyNodesOutcome;
typedef std::future<ApplyNodesOutcome> ApplyNodesOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::ApplyNodesRequest&, const ApplyNodesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ApplyNodesAsyncHandler;
typedef Outcome<Error, Model::BindAccountToClusterUserResult> BindAccountToClusterUserOutcome;
typedef std::future<BindAccountToClusterUserOutcome> BindAccountToClusterUserOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::BindAccountToClusterUserRequest&, const BindAccountToClusterUserOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BindAccountToClusterUserAsyncHandler;
@@ -611,6 +616,9 @@ namespace AlibabaCloud
AddUsersOutcome addUsers(const Model::AddUsersRequest &request)const;
void addUsersAsync(const Model::AddUsersRequest& request, const AddUsersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AddUsersOutcomeCallable addUsersCallable(const Model::AddUsersRequest& request) const;
ApplyNodesOutcome applyNodes(const Model::ApplyNodesRequest &request)const;
void applyNodesAsync(const Model::ApplyNodesRequest& request, const ApplyNodesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ApplyNodesOutcomeCallable applyNodesCallable(const Model::ApplyNodesRequest& request) const;
BindAccountToClusterUserOutcome bindAccountToClusterUser(const Model::BindAccountToClusterUserRequest &request)const;
void bindAccountToClusterUserAsync(const Model::BindAccountToClusterUserRequest& request, const BindAccountToClusterUserAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
BindAccountToClusterUserOutcomeCallable bindAccountToClusterUserCallable(const Model::BindAccountToClusterUserRequest& request) const;

View File

@@ -0,0 +1,122 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_EHPC_MODEL_APPLYNODESREQUEST_H_
#define ALIBABACLOUD_EHPC_MODEL_APPLYNODESREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ehpc/EHPCExport.h>
namespace AlibabaCloud
{
namespace EHPC
{
namespace Model
{
class ALIBABACLOUD_EHPC_EXPORT ApplyNodesRequest : public RpcServiceRequest
{
public:
struct ZoneInfos
{
std::string vSwitchId;
std::string zoneId;
};
struct InstanceTypeModel
{
float maxPrice;
std::string instanceType;
};
public:
ApplyNodesRequest();
~ApplyNodesRequest();
std::string getImageId()const;
void setImageId(const std::string& imageId);
int getMemory()const;
void setMemory(int memory);
bool getAllocatePublicAddress()const;
void setAllocatePublicAddress(bool allocatePublicAddress);
int getInternetMaxBandWidthOut()const;
void setInternetMaxBandWidthOut(int internetMaxBandWidthOut);
std::string getResourceAmountType()const;
void setResourceAmountType(const std::string& resourceAmountType);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getSystemDiskType()const;
void setSystemDiskType(const std::string& systemDiskType);
int getCores()const;
void setCores(int cores);
int getSystemDiskSize()const;
void setSystemDiskSize(int systemDiskSize);
std::vector<ZoneInfos> getZoneInfos()const;
void setZoneInfos(const std::vector<ZoneInfos>& zoneInfos);
std::string getHostNamePrefix()const;
void setHostNamePrefix(const std::string& hostNamePrefix);
std::string getComputeSpotPriceLimit()const;
void setComputeSpotPriceLimit(const std::string& computeSpotPriceLimit);
std::string getClusterId()const;
void setClusterId(const std::string& clusterId);
std::string getComputeSpotStrategy()const;
void setComputeSpotStrategy(const std::string& computeSpotStrategy);
std::string getHostNameSuffix()const;
void setHostNameSuffix(const std::string& hostNameSuffix);
std::string getPriorityStrategy()const;
void setPriorityStrategy(const std::string& priorityStrategy);
std::string getInstanceFamilyLevel()const;
void setInstanceFamilyLevel(const std::string& instanceFamilyLevel);
std::string getEcsChargeType()const;
void setEcsChargeType(const std::string& ecsChargeType);
std::string getInternetChargeType()const;
void setInternetChargeType(const std::string& internetChargeType);
std::vector<InstanceTypeModel> getInstanceTypeModel()const;
void setInstanceTypeModel(const std::vector<InstanceTypeModel>& instanceTypeModel);
int getInternetMaxBandWidthIn()const;
void setInternetMaxBandWidthIn(int internetMaxBandWidthIn);
int getTargetCapacity()const;
void setTargetCapacity(int targetCapacity);
private:
std::string imageId_;
int memory_;
bool allocatePublicAddress_;
int internetMaxBandWidthOut_;
std::string resourceAmountType_;
std::string accessKeyId_;
std::string systemDiskType_;
int cores_;
int systemDiskSize_;
std::vector<ZoneInfos> zoneInfos_;
std::string hostNamePrefix_;
std::string computeSpotPriceLimit_;
std::string clusterId_;
std::string computeSpotStrategy_;
std::string hostNameSuffix_;
std::string priorityStrategy_;
std::string instanceFamilyLevel_;
std::string ecsChargeType_;
std::string internetChargeType_;
std::vector<InstanceTypeModel> instanceTypeModel_;
int internetMaxBandWidthIn_;
int targetCapacity_;
};
}
}
}
#endif // !ALIBABACLOUD_EHPC_MODEL_APPLYNODESREQUEST_H_

View File

@@ -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_EHPC_MODEL_APPLYNODESRESULT_H_
#define ALIBABACLOUD_EHPC_MODEL_APPLYNODESRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ehpc/EHPCExport.h>
namespace AlibabaCloud
{
namespace EHPC
{
namespace Model
{
class ALIBABACLOUD_EHPC_EXPORT ApplyNodesResult : public ServiceResult
{
public:
ApplyNodesResult();
explicit ApplyNodesResult(const std::string &payload);
~ApplyNodesResult();
std::vector<std::string> getInstanceIds()const;
std::string getDetail()const;
protected:
void parse(const std::string &payload);
private:
std::vector<std::string> instanceIds_;
std::string detail_;
};
}
}
}
#endif // !ALIBABACLOUD_EHPC_MODEL_APPLYNODESRESULT_H_

View File

@@ -53,99 +53,111 @@ namespace AlibabaCloud
CreateHybridClusterRequest();
~CreateHybridClusterRequest();
std::string getKeyPairName()const;
void setKeyPairName(const std::string& keyPairName);
std::string getSecurityGroupName()const;
void setSecurityGroupName(const std::string& securityGroupName);
std::string getOnPremiseVolumeRemotePath()const;
void setOnPremiseVolumeRemotePath(const std::string& onPremiseVolumeRemotePath);
std::string getImageOwnerAlias()const;
void setImageOwnerAlias(const std::string& imageOwnerAlias);
std::string getResourceGroupId()const;
void setResourceGroupId(const std::string& resourceGroupId);
std::string getPassword()const;
void setPassword(const std::string& password);
float getComputeSpotPriceLimit()const;
void setComputeSpotPriceLimit(float computeSpotPriceLimit);
std::string getOnPremiseVolumeLocalPath()const;
void setOnPremiseVolumeLocalPath(const std::string& onPremiseVolumeLocalPath);
std::string getRemoteDirectory()const;
void setRemoteDirectory(const std::string& remoteDirectory);
std::string getComputeSpotStrategy()const;
void setComputeSpotStrategy(const std::string& computeSpotStrategy);
std::vector<PostInstallScript> getPostInstallScript()const;
void setPostInstallScript(const std::vector<PostInstallScript>& postInstallScript);
std::string getVSwitchId()const;
void setVSwitchId(const std::string& vSwitchId);
std::string getDomain()const;
void setDomain(const std::string& domain);
std::string getName()const;
void setName(const std::string& name);
std::string getVolumeId()const;
void setVolumeId(const std::string& volumeId);
std::string getZoneId()const;
void setZoneId(const std::string& zoneId);
std::string getImageId()const;
void setImageId(const std::string& imageId);
std::string getEhpcVersion()const;
void setEhpcVersion(const std::string& ehpcVersion);
std::string getSecurityGroupId()const;
void setSecurityGroupId(const std::string& securityGroupId);
std::string getDescription()const;
void setDescription(const std::string& description);
std::string getKeyPairName()const;
void setKeyPairName(const std::string& keyPairName);
std::string getSecurityGroupName()const;
void setSecurityGroupName(const std::string& securityGroupName);
std::string getEcsOrderComputeInstanceType()const;
void setEcsOrderComputeInstanceType(const std::string& ecsOrderComputeInstanceType);
std::string getOnPremiseVolumeRemotePath()const;
void setOnPremiseVolumeRemotePath(const std::string& onPremiseVolumeRemotePath);
std::string getJobQueue()const;
void setJobQueue(const std::string& jobQueue);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getVolumeType()const;
void setVolumeType(const std::string& volumeType);
std::string getResourceGroupId()const;
void setResourceGroupId(const std::string& resourceGroupId);
std::string getPassword()const;
void setPassword(const std::string& password);
std::string getOnPremiseVolumeMountPoint()const;
void setOnPremiseVolumeMountPoint(const std::string& onPremiseVolumeMountPoint);
std::string getOnPremiseVolumeProtocol()const;
void setOnPremiseVolumeProtocol(const std::string& onPremiseVolumeProtocol);
std::string getVolumeProtocol()const;
void setVolumeProtocol(const std::string& volumeProtocol);
std::string getOnPremiseVolumeLocalPath()const;
void setOnPremiseVolumeLocalPath(const std::string& onPremiseVolumeLocalPath);
std::string getClientVersion()const;
void setClientVersion(const std::string& clientVersion);
std::string getOsTag()const;
void setOsTag(const std::string& osTag);
std::string getRemoteDirectory()const;
void setRemoteDirectory(const std::string& remoteDirectory);
std::vector<PostInstallScript> getPostInstallScript()const;
void setPostInstallScript(const std::vector<PostInstallScript>& postInstallScript);
std::string getVSwitchId()const;
void setVSwitchId(const std::string& vSwitchId);
std::vector<Nodes> getNodes()const;
void setNodes(const std::vector<Nodes>& nodes);
std::vector<Application> getApplication()const;
void setApplication(const std::vector<Application>& application);
std::string getDomain()const;
void setDomain(const std::string& domain);
std::string getVpcId()const;
void setVpcId(const std::string& vpcId);
std::string getName()const;
void setName(const std::string& name);
std::string getVolumeId()const;
void setVolumeId(const std::string& volumeId);
std::string getVolumeMountpoint()const;
void setVolumeMountpoint(const std::string& volumeMountpoint);
std::string getZoneId()const;
void setZoneId(const std::string& zoneId);
bool getSchedulerPreInstall()const;
void setSchedulerPreInstall(bool schedulerPreInstall);
std::string getLocation()const;
void setLocation(const std::string& location);
private:
std::string keyPairName_;
std::string securityGroupName_;
std::string onPremiseVolumeRemotePath_;
std::string imageOwnerAlias_;
std::string resourceGroupId_;
std::string password_;
float computeSpotPriceLimit_;
std::string onPremiseVolumeLocalPath_;
std::string remoteDirectory_;
std::string computeSpotStrategy_;
std::vector<PostInstallScript> postInstallScript_;
std::string vSwitchId_;
std::string domain_;
std::string name_;
std::string volumeId_;
std::string zoneId_;
std::string imageId_;
std::string ehpcVersion_;
std::string securityGroupId_;
std::string description_;
std::string keyPairName_;
std::string securityGroupName_;
std::string ecsOrderComputeInstanceType_;
std::string onPremiseVolumeRemotePath_;
std::string jobQueue_;
std::string accessKeyId_;
std::string volumeType_;
std::string resourceGroupId_;
std::string password_;
std::string onPremiseVolumeMountPoint_;
std::string onPremiseVolumeProtocol_;
std::string volumeProtocol_;
std::string onPremiseVolumeLocalPath_;
std::string clientVersion_;
std::string osTag_;
std::string remoteDirectory_;
std::vector<PostInstallScript> postInstallScript_;
std::string vSwitchId_;
std::vector<Nodes> nodes_;
std::vector<Application> application_;
std::string domain_;
std::string vpcId_;
std::string name_;
std::string volumeId_;
std::string volumeMountpoint_;
std::string zoneId_;
bool schedulerPreInstall_;
std::string location_;

View File

@@ -88,6 +88,7 @@ namespace AlibabaCloud
std::string accountType;
std::string volumeMountpoint;
std::string baseOsTag;
std::string imageName;
std::string vpcId;
EcsInfo ecsInfo;
bool haEnable;

View File

@@ -43,6 +43,7 @@ namespace AlibabaCloud
std::string instanceType;
std::string spotStrategy;
};
int minNodesInQueue;
int maxNodesInQueue;
std::string resourceGroupId;
bool enableAutoGrow;

View File

@@ -65,6 +65,8 @@ namespace AlibabaCloud
std::string imageOwnerAlias;
std::string description;
std::string nodePrefix;
std::string instanceChargeType;
float computeSpotPriceLimit;
std::string nodeSuffix;
int count;
std::string name;
@@ -79,6 +81,7 @@ namespace AlibabaCloud
std::string vSwitchId;
std::string createTime;
std::string schedulerType;
std::string computeSpotStrategy;
std::string accountType;
std::string ehpcVersion;
std::string baseOsTag;

View File

@@ -35,19 +35,25 @@ namespace AlibabaCloud
ModifyClusterAttributesRequest();
~ModifyClusterAttributesRequest();
std::string getImageId()const;
void setImageId(const std::string& imageId);
std::string getDescription()const;
void setDescription(const std::string& description);
std::string getClusterId()const;
void setClusterId(const std::string& clusterId);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getImageOwnerAlias()const;
void setImageOwnerAlias(const std::string& imageOwnerAlias);
std::string getName()const;
void setName(const std::string& name);
private:
std::string imageId_;
std::string description_;
std::string clusterId_;
std::string accessKeyId_;
std::string imageOwnerAlias_;
std::string name_;
};

View File

@@ -35,6 +35,7 @@ namespace AlibabaCloud
{
std::string spotStrategy;
std::string queueName;
int minNodesInQueue;
struct InstanceTypes
{
std::string spotStrategy;

View File

@@ -31,21 +31,21 @@ EHPCClient::EHPCClient(const Credentials &credentials, const ClientConfiguration
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, "ehs");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
EHPCClient::EHPCClient(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, "ehs");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
EHPCClient::EHPCClient(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, "ehs");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
EHPCClient::~EHPCClient()
@@ -231,6 +231,42 @@ EHPCClient::AddUsersOutcomeCallable EHPCClient::addUsersCallable(const AddUsersR
return task->get_future();
}
EHPCClient::ApplyNodesOutcome EHPCClient::applyNodes(const ApplyNodesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ApplyNodesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ApplyNodesOutcome(ApplyNodesResult(outcome.result()));
else
return ApplyNodesOutcome(outcome.error());
}
void EHPCClient::applyNodesAsync(const ApplyNodesRequest& request, const ApplyNodesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, applyNodes(request), context);
};
asyncExecute(new Runnable(fn));
}
EHPCClient::ApplyNodesOutcomeCallable EHPCClient::applyNodesCallable(const ApplyNodesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ApplyNodesOutcome()>>(
[this, request]()
{
return this->applyNodes(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EHPCClient::BindAccountToClusterUserOutcome EHPCClient::bindAccountToClusterUser(const BindAccountToClusterUserRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,281 @@
/*
* 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/ehpc/model/ApplyNodesRequest.h>
using AlibabaCloud::EHPC::Model::ApplyNodesRequest;
ApplyNodesRequest::ApplyNodesRequest() :
RpcServiceRequest("ehpc", "2018-04-12", "ApplyNodes")
{
setMethod(HttpRequest::Method::Get);
}
ApplyNodesRequest::~ApplyNodesRequest()
{}
std::string ApplyNodesRequest::getImageId()const
{
return imageId_;
}
void ApplyNodesRequest::setImageId(const std::string& imageId)
{
imageId_ = imageId;
setParameter("ImageId", imageId);
}
int ApplyNodesRequest::getMemory()const
{
return memory_;
}
void ApplyNodesRequest::setMemory(int memory)
{
memory_ = memory;
setParameter("Memory", std::to_string(memory));
}
bool ApplyNodesRequest::getAllocatePublicAddress()const
{
return allocatePublicAddress_;
}
void ApplyNodesRequest::setAllocatePublicAddress(bool allocatePublicAddress)
{
allocatePublicAddress_ = allocatePublicAddress;
setParameter("AllocatePublicAddress", allocatePublicAddress ? "true" : "false");
}
int ApplyNodesRequest::getInternetMaxBandWidthOut()const
{
return internetMaxBandWidthOut_;
}
void ApplyNodesRequest::setInternetMaxBandWidthOut(int internetMaxBandWidthOut)
{
internetMaxBandWidthOut_ = internetMaxBandWidthOut;
setParameter("InternetMaxBandWidthOut", std::to_string(internetMaxBandWidthOut));
}
std::string ApplyNodesRequest::getResourceAmountType()const
{
return resourceAmountType_;
}
void ApplyNodesRequest::setResourceAmountType(const std::string& resourceAmountType)
{
resourceAmountType_ = resourceAmountType;
setParameter("ResourceAmountType", resourceAmountType);
}
std::string ApplyNodesRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ApplyNodesRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string ApplyNodesRequest::getSystemDiskType()const
{
return systemDiskType_;
}
void ApplyNodesRequest::setSystemDiskType(const std::string& systemDiskType)
{
systemDiskType_ = systemDiskType;
setParameter("SystemDiskType", systemDiskType);
}
int ApplyNodesRequest::getCores()const
{
return cores_;
}
void ApplyNodesRequest::setCores(int cores)
{
cores_ = cores;
setParameter("Cores", std::to_string(cores));
}
int ApplyNodesRequest::getSystemDiskSize()const
{
return systemDiskSize_;
}
void ApplyNodesRequest::setSystemDiskSize(int systemDiskSize)
{
systemDiskSize_ = systemDiskSize;
setParameter("SystemDiskSize", std::to_string(systemDiskSize));
}
std::vector<ApplyNodesRequest::ZoneInfos> ApplyNodesRequest::getZoneInfos()const
{
return zoneInfos_;
}
void ApplyNodesRequest::setZoneInfos(const std::vector<ZoneInfos>& zoneInfos)
{
zoneInfos_ = zoneInfos;
for(int dep1 = 0; dep1!= zoneInfos.size(); dep1++) {
auto zoneInfosObj = zoneInfos.at(dep1);
std::string zoneInfosObjStr = "ZoneInfos." + std::to_string(dep1 + 1);
setParameter(zoneInfosObjStr + ".VSwitchId", zoneInfosObj.vSwitchId);
setParameter(zoneInfosObjStr + ".ZoneId", zoneInfosObj.zoneId);
}
}
std::string ApplyNodesRequest::getHostNamePrefix()const
{
return hostNamePrefix_;
}
void ApplyNodesRequest::setHostNamePrefix(const std::string& hostNamePrefix)
{
hostNamePrefix_ = hostNamePrefix;
setParameter("HostNamePrefix", hostNamePrefix);
}
std::string ApplyNodesRequest::getComputeSpotPriceLimit()const
{
return computeSpotPriceLimit_;
}
void ApplyNodesRequest::setComputeSpotPriceLimit(const std::string& computeSpotPriceLimit)
{
computeSpotPriceLimit_ = computeSpotPriceLimit;
setParameter("ComputeSpotPriceLimit", computeSpotPriceLimit);
}
std::string ApplyNodesRequest::getClusterId()const
{
return clusterId_;
}
void ApplyNodesRequest::setClusterId(const std::string& clusterId)
{
clusterId_ = clusterId;
setParameter("ClusterId", clusterId);
}
std::string ApplyNodesRequest::getComputeSpotStrategy()const
{
return computeSpotStrategy_;
}
void ApplyNodesRequest::setComputeSpotStrategy(const std::string& computeSpotStrategy)
{
computeSpotStrategy_ = computeSpotStrategy;
setParameter("ComputeSpotStrategy", computeSpotStrategy);
}
std::string ApplyNodesRequest::getHostNameSuffix()const
{
return hostNameSuffix_;
}
void ApplyNodesRequest::setHostNameSuffix(const std::string& hostNameSuffix)
{
hostNameSuffix_ = hostNameSuffix;
setParameter("HostNameSuffix", hostNameSuffix);
}
std::string ApplyNodesRequest::getPriorityStrategy()const
{
return priorityStrategy_;
}
void ApplyNodesRequest::setPriorityStrategy(const std::string& priorityStrategy)
{
priorityStrategy_ = priorityStrategy;
setParameter("PriorityStrategy", priorityStrategy);
}
std::string ApplyNodesRequest::getInstanceFamilyLevel()const
{
return instanceFamilyLevel_;
}
void ApplyNodesRequest::setInstanceFamilyLevel(const std::string& instanceFamilyLevel)
{
instanceFamilyLevel_ = instanceFamilyLevel;
setParameter("InstanceFamilyLevel", instanceFamilyLevel);
}
std::string ApplyNodesRequest::getEcsChargeType()const
{
return ecsChargeType_;
}
void ApplyNodesRequest::setEcsChargeType(const std::string& ecsChargeType)
{
ecsChargeType_ = ecsChargeType;
setParameter("EcsChargeType", ecsChargeType);
}
std::string ApplyNodesRequest::getInternetChargeType()const
{
return internetChargeType_;
}
void ApplyNodesRequest::setInternetChargeType(const std::string& internetChargeType)
{
internetChargeType_ = internetChargeType;
setParameter("InternetChargeType", internetChargeType);
}
std::vector<ApplyNodesRequest::InstanceTypeModel> ApplyNodesRequest::getInstanceTypeModel()const
{
return instanceTypeModel_;
}
void ApplyNodesRequest::setInstanceTypeModel(const std::vector<InstanceTypeModel>& instanceTypeModel)
{
instanceTypeModel_ = instanceTypeModel;
for(int dep1 = 0; dep1!= instanceTypeModel.size(); dep1++) {
auto instanceTypeModelObj = instanceTypeModel.at(dep1);
std::string instanceTypeModelObjStr = "InstanceTypeModel." + std::to_string(dep1 + 1);
setParameter(instanceTypeModelObjStr + ".MaxPrice", std::to_string(instanceTypeModelObj.maxPrice));
setParameter(instanceTypeModelObjStr + ".InstanceType", instanceTypeModelObj.instanceType);
}
}
int ApplyNodesRequest::getInternetMaxBandWidthIn()const
{
return internetMaxBandWidthIn_;
}
void ApplyNodesRequest::setInternetMaxBandWidthIn(int internetMaxBandWidthIn)
{
internetMaxBandWidthIn_ = internetMaxBandWidthIn;
setParameter("InternetMaxBandWidthIn", std::to_string(internetMaxBandWidthIn));
}
int ApplyNodesRequest::getTargetCapacity()const
{
return targetCapacity_;
}
void ApplyNodesRequest::setTargetCapacity(int targetCapacity)
{
targetCapacity_ = targetCapacity;
setParameter("TargetCapacity", std::to_string(targetCapacity));
}

View File

@@ -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.
*/
#include <alibabacloud/ehpc/model/ApplyNodesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::EHPC;
using namespace AlibabaCloud::EHPC::Model;
ApplyNodesResult::ApplyNodesResult() :
ServiceResult()
{}
ApplyNodesResult::ApplyNodesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ApplyNodesResult::~ApplyNodesResult()
{}
void ApplyNodesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allInstanceIds = value["InstanceIds"]["InstanceId"];
for (const auto &item : allInstanceIds)
instanceIds_.push_back(item.asString());
if(!value["Detail"].isNull())
detail_ = value["Detail"].asString();
}
std::vector<std::string> ApplyNodesResult::getInstanceIds()const
{
return instanceIds_;
}
std::string ApplyNodesResult::getDetail()const
{
return detail_;
}

View File

@@ -27,6 +27,198 @@ CreateHybridClusterRequest::CreateHybridClusterRequest() :
CreateHybridClusterRequest::~CreateHybridClusterRequest()
{}
std::string CreateHybridClusterRequest::getKeyPairName()const
{
return keyPairName_;
}
void CreateHybridClusterRequest::setKeyPairName(const std::string& keyPairName)
{
keyPairName_ = keyPairName;
setParameter("KeyPairName", keyPairName);
}
std::string CreateHybridClusterRequest::getSecurityGroupName()const
{
return securityGroupName_;
}
void CreateHybridClusterRequest::setSecurityGroupName(const std::string& securityGroupName)
{
securityGroupName_ = securityGroupName;
setParameter("SecurityGroupName", securityGroupName);
}
std::string CreateHybridClusterRequest::getOnPremiseVolumeRemotePath()const
{
return onPremiseVolumeRemotePath_;
}
void CreateHybridClusterRequest::setOnPremiseVolumeRemotePath(const std::string& onPremiseVolumeRemotePath)
{
onPremiseVolumeRemotePath_ = onPremiseVolumeRemotePath;
setParameter("OnPremiseVolumeRemotePath", onPremiseVolumeRemotePath);
}
std::string CreateHybridClusterRequest::getImageOwnerAlias()const
{
return imageOwnerAlias_;
}
void CreateHybridClusterRequest::setImageOwnerAlias(const std::string& imageOwnerAlias)
{
imageOwnerAlias_ = imageOwnerAlias;
setParameter("ImageOwnerAlias", imageOwnerAlias);
}
std::string CreateHybridClusterRequest::getResourceGroupId()const
{
return resourceGroupId_;
}
void CreateHybridClusterRequest::setResourceGroupId(const std::string& resourceGroupId)
{
resourceGroupId_ = resourceGroupId;
setParameter("ResourceGroupId", resourceGroupId);
}
std::string CreateHybridClusterRequest::getPassword()const
{
return password_;
}
void CreateHybridClusterRequest::setPassword(const std::string& password)
{
password_ = password;
setParameter("Password", password);
}
float CreateHybridClusterRequest::getComputeSpotPriceLimit()const
{
return computeSpotPriceLimit_;
}
void CreateHybridClusterRequest::setComputeSpotPriceLimit(float computeSpotPriceLimit)
{
computeSpotPriceLimit_ = computeSpotPriceLimit;
setParameter("ComputeSpotPriceLimit", std::to_string(computeSpotPriceLimit));
}
std::string CreateHybridClusterRequest::getOnPremiseVolumeLocalPath()const
{
return onPremiseVolumeLocalPath_;
}
void CreateHybridClusterRequest::setOnPremiseVolumeLocalPath(const std::string& onPremiseVolumeLocalPath)
{
onPremiseVolumeLocalPath_ = onPremiseVolumeLocalPath;
setParameter("OnPremiseVolumeLocalPath", onPremiseVolumeLocalPath);
}
std::string CreateHybridClusterRequest::getRemoteDirectory()const
{
return remoteDirectory_;
}
void CreateHybridClusterRequest::setRemoteDirectory(const std::string& remoteDirectory)
{
remoteDirectory_ = remoteDirectory;
setParameter("RemoteDirectory", remoteDirectory);
}
std::string CreateHybridClusterRequest::getComputeSpotStrategy()const
{
return computeSpotStrategy_;
}
void CreateHybridClusterRequest::setComputeSpotStrategy(const std::string& computeSpotStrategy)
{
computeSpotStrategy_ = computeSpotStrategy;
setParameter("ComputeSpotStrategy", computeSpotStrategy);
}
std::vector<CreateHybridClusterRequest::PostInstallScript> CreateHybridClusterRequest::getPostInstallScript()const
{
return postInstallScript_;
}
void CreateHybridClusterRequest::setPostInstallScript(const std::vector<PostInstallScript>& postInstallScript)
{
postInstallScript_ = postInstallScript;
for(int dep1 = 0; dep1!= postInstallScript.size(); dep1++) {
auto postInstallScriptObj = postInstallScript.at(dep1);
std::string postInstallScriptObjStr = "PostInstallScript." + std::to_string(dep1 + 1);
setParameter(postInstallScriptObjStr + ".Args", postInstallScriptObj.args);
setParameter(postInstallScriptObjStr + ".Url", postInstallScriptObj.url);
}
}
std::string CreateHybridClusterRequest::getVSwitchId()const
{
return vSwitchId_;
}
void CreateHybridClusterRequest::setVSwitchId(const std::string& vSwitchId)
{
vSwitchId_ = vSwitchId;
setParameter("VSwitchId", vSwitchId);
}
std::string CreateHybridClusterRequest::getDomain()const
{
return domain_;
}
void CreateHybridClusterRequest::setDomain(const std::string& domain)
{
domain_ = domain;
setParameter("Domain", domain);
}
std::string CreateHybridClusterRequest::getName()const
{
return name_;
}
void CreateHybridClusterRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
std::string CreateHybridClusterRequest::getVolumeId()const
{
return volumeId_;
}
void CreateHybridClusterRequest::setVolumeId(const std::string& volumeId)
{
volumeId_ = volumeId;
setParameter("VolumeId", volumeId);
}
std::string CreateHybridClusterRequest::getZoneId()const
{
return zoneId_;
}
void CreateHybridClusterRequest::setZoneId(const std::string& zoneId)
{
zoneId_ = zoneId;
setParameter("ZoneId", zoneId);
}
std::string CreateHybridClusterRequest::getImageId()const
{
return imageId_;
}
void CreateHybridClusterRequest::setImageId(const std::string& imageId)
{
imageId_ = imageId;
setParameter("ImageId", imageId);
}
std::string CreateHybridClusterRequest::getEhpcVersion()const
{
return ehpcVersion_;
@@ -60,28 +252,6 @@ void CreateHybridClusterRequest::setDescription(const std::string& description)
setParameter("Description", description);
}
std::string CreateHybridClusterRequest::getKeyPairName()const
{
return keyPairName_;
}
void CreateHybridClusterRequest::setKeyPairName(const std::string& keyPairName)
{
keyPairName_ = keyPairName;
setParameter("KeyPairName", keyPairName);
}
std::string CreateHybridClusterRequest::getSecurityGroupName()const
{
return securityGroupName_;
}
void CreateHybridClusterRequest::setSecurityGroupName(const std::string& securityGroupName)
{
securityGroupName_ = securityGroupName;
setParameter("SecurityGroupName", securityGroupName);
}
std::string CreateHybridClusterRequest::getEcsOrderComputeInstanceType()const
{
return ecsOrderComputeInstanceType_;
@@ -93,17 +263,6 @@ void CreateHybridClusterRequest::setEcsOrderComputeInstanceType(const std::strin
setParameter("EcsOrderComputeInstanceType", ecsOrderComputeInstanceType);
}
std::string CreateHybridClusterRequest::getOnPremiseVolumeRemotePath()const
{
return onPremiseVolumeRemotePath_;
}
void CreateHybridClusterRequest::setOnPremiseVolumeRemotePath(const std::string& onPremiseVolumeRemotePath)
{
onPremiseVolumeRemotePath_ = onPremiseVolumeRemotePath;
setParameter("OnPremiseVolumeRemotePath", onPremiseVolumeRemotePath);
}
std::string CreateHybridClusterRequest::getJobQueue()const
{
return jobQueue_;
@@ -137,28 +296,6 @@ void CreateHybridClusterRequest::setVolumeType(const std::string& volumeType)
setParameter("VolumeType", volumeType);
}
std::string CreateHybridClusterRequest::getResourceGroupId()const
{
return resourceGroupId_;
}
void CreateHybridClusterRequest::setResourceGroupId(const std::string& resourceGroupId)
{
resourceGroupId_ = resourceGroupId;
setParameter("ResourceGroupId", resourceGroupId);
}
std::string CreateHybridClusterRequest::getPassword()const
{
return password_;
}
void CreateHybridClusterRequest::setPassword(const std::string& password)
{
password_ = password;
setParameter("Password", password);
}
std::string CreateHybridClusterRequest::getOnPremiseVolumeMountPoint()const
{
return onPremiseVolumeMountPoint_;
@@ -192,17 +329,6 @@ void CreateHybridClusterRequest::setVolumeProtocol(const std::string& volumeProt
setParameter("VolumeProtocol", volumeProtocol);
}
std::string CreateHybridClusterRequest::getOnPremiseVolumeLocalPath()const
{
return onPremiseVolumeLocalPath_;
}
void CreateHybridClusterRequest::setOnPremiseVolumeLocalPath(const std::string& onPremiseVolumeLocalPath)
{
onPremiseVolumeLocalPath_ = onPremiseVolumeLocalPath;
setParameter("OnPremiseVolumeLocalPath", onPremiseVolumeLocalPath);
}
std::string CreateHybridClusterRequest::getClientVersion()const
{
return clientVersion_;
@@ -225,44 +351,6 @@ void CreateHybridClusterRequest::setOsTag(const std::string& osTag)
setParameter("OsTag", osTag);
}
std::string CreateHybridClusterRequest::getRemoteDirectory()const
{
return remoteDirectory_;
}
void CreateHybridClusterRequest::setRemoteDirectory(const std::string& remoteDirectory)
{
remoteDirectory_ = remoteDirectory;
setParameter("RemoteDirectory", remoteDirectory);
}
std::vector<CreateHybridClusterRequest::PostInstallScript> CreateHybridClusterRequest::getPostInstallScript()const
{
return postInstallScript_;
}
void CreateHybridClusterRequest::setPostInstallScript(const std::vector<PostInstallScript>& postInstallScript)
{
postInstallScript_ = postInstallScript;
for(int dep1 = 0; dep1!= postInstallScript.size(); dep1++) {
auto postInstallScriptObj = postInstallScript.at(dep1);
std::string postInstallScriptObjStr = "PostInstallScript." + std::to_string(dep1 + 1);
setParameter(postInstallScriptObjStr + ".Args", postInstallScriptObj.args);
setParameter(postInstallScriptObjStr + ".Url", postInstallScriptObj.url);
}
}
std::string CreateHybridClusterRequest::getVSwitchId()const
{
return vSwitchId_;
}
void CreateHybridClusterRequest::setVSwitchId(const std::string& vSwitchId)
{
vSwitchId_ = vSwitchId;
setParameter("VSwitchId", vSwitchId);
}
std::vector<CreateHybridClusterRequest::Nodes> CreateHybridClusterRequest::getNodes()const
{
return nodes_;
@@ -297,17 +385,6 @@ void CreateHybridClusterRequest::setApplication(const std::vector<Application>&
}
}
std::string CreateHybridClusterRequest::getDomain()const
{
return domain_;
}
void CreateHybridClusterRequest::setDomain(const std::string& domain)
{
domain_ = domain;
setParameter("Domain", domain);
}
std::string CreateHybridClusterRequest::getVpcId()const
{
return vpcId_;
@@ -319,28 +396,6 @@ void CreateHybridClusterRequest::setVpcId(const std::string& vpcId)
setParameter("VpcId", vpcId);
}
std::string CreateHybridClusterRequest::getName()const
{
return name_;
}
void CreateHybridClusterRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
std::string CreateHybridClusterRequest::getVolumeId()const
{
return volumeId_;
}
void CreateHybridClusterRequest::setVolumeId(const std::string& volumeId)
{
volumeId_ = volumeId;
setParameter("VolumeId", volumeId);
}
std::string CreateHybridClusterRequest::getVolumeMountpoint()const
{
return volumeMountpoint_;
@@ -352,17 +407,6 @@ void CreateHybridClusterRequest::setVolumeMountpoint(const std::string& volumeMo
setParameter("VolumeMountpoint", volumeMountpoint);
}
std::string CreateHybridClusterRequest::getZoneId()const
{
return zoneId_;
}
void CreateHybridClusterRequest::setZoneId(const std::string& zoneId)
{
zoneId_ = zoneId;
setParameter("ZoneId", zoneId);
}
bool CreateHybridClusterRequest::getSchedulerPreInstall()const
{
return schedulerPreInstall_;

View File

@@ -94,6 +94,8 @@ void DescribeClusterResult::parse(const std::string &payload)
clusterInfo_.location = clusterInfoNode["Location"].asString();
if(!clusterInfoNode["BaseOsTag"].isNull())
clusterInfo_.baseOsTag = clusterInfoNode["BaseOsTag"].asString();
if(!clusterInfoNode["ImageName"].isNull())
clusterInfo_.imageName = clusterInfoNode["ImageName"].asString();
auto allApplicationsNode = clusterInfoNode["Applications"]["ApplicationInfo"];
for (auto clusterInfoNodeApplicationsApplicationInfo : allApplicationsNode)
{

View File

@@ -59,6 +59,8 @@ void GetAutoScaleConfigResult::parse(const std::string &payload)
queuesObject.enableAutoShrink = valueQueuesQueueInfo["EnableAutoShrink"].asString() == "true";
if(!valueQueuesQueueInfo["MaxNodesInQueue"].isNull())
queuesObject.maxNodesInQueue = std::stoi(valueQueuesQueueInfo["MaxNodesInQueue"].asString());
if(!valueQueuesQueueInfo["MinNodesInQueue"].isNull())
queuesObject.minNodesInQueue = std::stoi(valueQueuesQueueInfo["MinNodesInQueue"].asString());
auto allInstanceTypesNode = allQueuesNode["InstanceTypes"]["InstanceTypeInfo"];
for (auto allQueuesNodeInstanceTypesInstanceTypeInfo : allInstanceTypesNode)
{

View File

@@ -89,6 +89,12 @@ void ListClustersResult::parse(const std::string &payload)
clustersObject.nodeSuffix = valueClustersClusterInfoSimple["NodeSuffix"].asString();
if(!valueClustersClusterInfoSimple["BaseOsTag"].isNull())
clustersObject.baseOsTag = valueClustersClusterInfoSimple["BaseOsTag"].asString();
if(!valueClustersClusterInfoSimple["InstanceChargeType"].isNull())
clustersObject.instanceChargeType = valueClustersClusterInfoSimple["InstanceChargeType"].asString();
if(!valueClustersClusterInfoSimple["ComputeSpotStrategy"].isNull())
clustersObject.computeSpotStrategy = valueClustersClusterInfoSimple["ComputeSpotStrategy"].asString();
if(!valueClustersClusterInfoSimple["ComputeSpotPriceLimit"].isNull())
clustersObject.computeSpotPriceLimit = std::stof(valueClustersClusterInfoSimple["ComputeSpotPriceLimit"].asString());
auto managersNode = value["Managers"];
if(!managersNode["Total"].isNull())
clustersObject.managers.total = std::stoi(managersNode["Total"].asString());

View File

@@ -27,6 +27,17 @@ ModifyClusterAttributesRequest::ModifyClusterAttributesRequest() :
ModifyClusterAttributesRequest::~ModifyClusterAttributesRequest()
{}
std::string ModifyClusterAttributesRequest::getImageId()const
{
return imageId_;
}
void ModifyClusterAttributesRequest::setImageId(const std::string& imageId)
{
imageId_ = imageId;
setParameter("ImageId", imageId);
}
std::string ModifyClusterAttributesRequest::getDescription()const
{
return description_;
@@ -60,6 +71,17 @@ void ModifyClusterAttributesRequest::setAccessKeyId(const std::string& accessKey
setParameter("AccessKeyId", accessKeyId);
}
std::string ModifyClusterAttributesRequest::getImageOwnerAlias()const
{
return imageOwnerAlias_;
}
void ModifyClusterAttributesRequest::setImageOwnerAlias(const std::string& imageOwnerAlias)
{
imageOwnerAlias_ = imageOwnerAlias;
setParameter("ImageOwnerAlias", imageOwnerAlias);
}
std::string ModifyClusterAttributesRequest::getName()const
{
return name_;

View File

@@ -183,6 +183,7 @@ void SetAutoScaleConfigRequest::setQueues(const std::vector<Queues>& queues)
std::string queuesObjStr = "Queues." + std::to_string(dep1 + 1);
setParameter(queuesObjStr + ".SpotStrategy", queuesObj.spotStrategy);
setParameter(queuesObjStr + ".QueueName", queuesObj.queueName);
setParameter(queuesObjStr + ".MinNodesInQueue", std::to_string(queuesObj.minNodesInQueue));
for(int dep2 = 0; dep2!= queuesObj.instanceTypes.size(); dep2++) {
auto instanceTypesObj = queuesObj.instanceTypes.at(dep2);
std::string instanceTypesObjStr = queuesObjStr + "InstanceTypes." + std::to_string(dep2 + 1);

View File

@@ -81,10 +81,16 @@ set(polardb_public_header_model
include/alibabacloud/polardb/model/DescribeDBClusterSSLResult.h
include/alibabacloud/polardb/model/DescribeDBClustersRequest.h
include/alibabacloud/polardb/model/DescribeDBClustersResult.h
include/alibabacloud/polardb/model/DescribeDBClustersWithBackupsRequest.h
include/alibabacloud/polardb/model/DescribeDBClustersWithBackupsResult.h
include/alibabacloud/polardb/model/DescribeDBNodePerformanceRequest.h
include/alibabacloud/polardb/model/DescribeDBNodePerformanceResult.h
include/alibabacloud/polardb/model/DescribeDatabasesRequest.h
include/alibabacloud/polardb/model/DescribeDatabasesResult.h
include/alibabacloud/polardb/model/DescribeDetachedBackupsRequest.h
include/alibabacloud/polardb/model/DescribeDetachedBackupsResult.h
include/alibabacloud/polardb/model/DescribeLogBackupPolicyRequest.h
include/alibabacloud/polardb/model/DescribeLogBackupPolicyResult.h
include/alibabacloud/polardb/model/DescribeRegionsRequest.h
include/alibabacloud/polardb/model/DescribeRegionsResult.h
include/alibabacloud/polardb/model/DescribeSlowLogRecordsRequest.h
@@ -127,6 +133,8 @@ set(polardb_public_header_model
include/alibabacloud/polardb/model/ModifyDBEndpointAddressResult.h
include/alibabacloud/polardb/model/ModifyDBNodeClassRequest.h
include/alibabacloud/polardb/model/ModifyDBNodeClassResult.h
include/alibabacloud/polardb/model/ModifyLogBackupPolicyRequest.h
include/alibabacloud/polardb/model/ModifyLogBackupPolicyResult.h
include/alibabacloud/polardb/model/ResetAccountRequest.h
include/alibabacloud/polardb/model/ResetAccountResult.h
include/alibabacloud/polardb/model/RestartDBNodeRequest.h
@@ -200,10 +208,16 @@ set(polardb_src
src/model/DescribeDBClusterSSLResult.cc
src/model/DescribeDBClustersRequest.cc
src/model/DescribeDBClustersResult.cc
src/model/DescribeDBClustersWithBackupsRequest.cc
src/model/DescribeDBClustersWithBackupsResult.cc
src/model/DescribeDBNodePerformanceRequest.cc
src/model/DescribeDBNodePerformanceResult.cc
src/model/DescribeDatabasesRequest.cc
src/model/DescribeDatabasesResult.cc
src/model/DescribeDetachedBackupsRequest.cc
src/model/DescribeDetachedBackupsResult.cc
src/model/DescribeLogBackupPolicyRequest.cc
src/model/DescribeLogBackupPolicyResult.cc
src/model/DescribeRegionsRequest.cc
src/model/DescribeRegionsResult.cc
src/model/DescribeSlowLogRecordsRequest.cc
@@ -246,6 +260,8 @@ set(polardb_src
src/model/ModifyDBEndpointAddressResult.cc
src/model/ModifyDBNodeClassRequest.cc
src/model/ModifyDBNodeClassResult.cc
src/model/ModifyLogBackupPolicyRequest.cc
src/model/ModifyLogBackupPolicyResult.cc
src/model/ResetAccountRequest.cc
src/model/ResetAccountResult.cc
src/model/RestartDBNodeRequest.cc

View File

@@ -82,10 +82,16 @@
#include "model/DescribeDBClusterSSLResult.h"
#include "model/DescribeDBClustersRequest.h"
#include "model/DescribeDBClustersResult.h"
#include "model/DescribeDBClustersWithBackupsRequest.h"
#include "model/DescribeDBClustersWithBackupsResult.h"
#include "model/DescribeDBNodePerformanceRequest.h"
#include "model/DescribeDBNodePerformanceResult.h"
#include "model/DescribeDatabasesRequest.h"
#include "model/DescribeDatabasesResult.h"
#include "model/DescribeDetachedBackupsRequest.h"
#include "model/DescribeDetachedBackupsResult.h"
#include "model/DescribeLogBackupPolicyRequest.h"
#include "model/DescribeLogBackupPolicyResult.h"
#include "model/DescribeRegionsRequest.h"
#include "model/DescribeRegionsResult.h"
#include "model/DescribeSlowLogRecordsRequest.h"
@@ -128,6 +134,8 @@
#include "model/ModifyDBEndpointAddressResult.h"
#include "model/ModifyDBNodeClassRequest.h"
#include "model/ModifyDBNodeClassResult.h"
#include "model/ModifyLogBackupPolicyRequest.h"
#include "model/ModifyLogBackupPolicyResult.h"
#include "model/ResetAccountRequest.h"
#include "model/ResetAccountResult.h"
#include "model/RestartDBNodeRequest.h"
@@ -237,12 +245,21 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DescribeDBClustersResult> DescribeDBClustersOutcome;
typedef std::future<DescribeDBClustersOutcome> DescribeDBClustersOutcomeCallable;
typedef std::function<void(const PolardbClient*, const Model::DescribeDBClustersRequest&, const DescribeDBClustersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDBClustersAsyncHandler;
typedef Outcome<Error, Model::DescribeDBClustersWithBackupsResult> DescribeDBClustersWithBackupsOutcome;
typedef std::future<DescribeDBClustersWithBackupsOutcome> DescribeDBClustersWithBackupsOutcomeCallable;
typedef std::function<void(const PolardbClient*, const Model::DescribeDBClustersWithBackupsRequest&, const DescribeDBClustersWithBackupsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDBClustersWithBackupsAsyncHandler;
typedef Outcome<Error, Model::DescribeDBNodePerformanceResult> DescribeDBNodePerformanceOutcome;
typedef std::future<DescribeDBNodePerformanceOutcome> DescribeDBNodePerformanceOutcomeCallable;
typedef std::function<void(const PolardbClient*, const Model::DescribeDBNodePerformanceRequest&, const DescribeDBNodePerformanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDBNodePerformanceAsyncHandler;
typedef Outcome<Error, Model::DescribeDatabasesResult> DescribeDatabasesOutcome;
typedef std::future<DescribeDatabasesOutcome> DescribeDatabasesOutcomeCallable;
typedef std::function<void(const PolardbClient*, const Model::DescribeDatabasesRequest&, const DescribeDatabasesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDatabasesAsyncHandler;
typedef Outcome<Error, Model::DescribeDetachedBackupsResult> DescribeDetachedBackupsOutcome;
typedef std::future<DescribeDetachedBackupsOutcome> DescribeDetachedBackupsOutcomeCallable;
typedef std::function<void(const PolardbClient*, const Model::DescribeDetachedBackupsRequest&, const DescribeDetachedBackupsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDetachedBackupsAsyncHandler;
typedef Outcome<Error, Model::DescribeLogBackupPolicyResult> DescribeLogBackupPolicyOutcome;
typedef std::future<DescribeLogBackupPolicyOutcome> DescribeLogBackupPolicyOutcomeCallable;
typedef std::function<void(const PolardbClient*, const Model::DescribeLogBackupPolicyRequest&, const DescribeLogBackupPolicyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeLogBackupPolicyAsyncHandler;
typedef Outcome<Error, Model::DescribeRegionsResult> DescribeRegionsOutcome;
typedef std::future<DescribeRegionsOutcome> DescribeRegionsOutcomeCallable;
typedef std::function<void(const PolardbClient*, const Model::DescribeRegionsRequest&, const DescribeRegionsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRegionsAsyncHandler;
@@ -306,6 +323,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ModifyDBNodeClassResult> ModifyDBNodeClassOutcome;
typedef std::future<ModifyDBNodeClassOutcome> ModifyDBNodeClassOutcomeCallable;
typedef std::function<void(const PolardbClient*, const Model::ModifyDBNodeClassRequest&, const ModifyDBNodeClassOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyDBNodeClassAsyncHandler;
typedef Outcome<Error, Model::ModifyLogBackupPolicyResult> ModifyLogBackupPolicyOutcome;
typedef std::future<ModifyLogBackupPolicyOutcome> ModifyLogBackupPolicyOutcomeCallable;
typedef std::function<void(const PolardbClient*, const Model::ModifyLogBackupPolicyRequest&, const ModifyLogBackupPolicyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyLogBackupPolicyAsyncHandler;
typedef Outcome<Error, Model::ResetAccountResult> ResetAccountOutcome;
typedef std::future<ResetAccountOutcome> ResetAccountOutcomeCallable;
typedef std::function<void(const PolardbClient*, const Model::ResetAccountRequest&, const ResetAccountOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ResetAccountAsyncHandler;
@@ -416,12 +436,21 @@ namespace AlibabaCloud
DescribeDBClustersOutcome describeDBClusters(const Model::DescribeDBClustersRequest &request)const;
void describeDBClustersAsync(const Model::DescribeDBClustersRequest& request, const DescribeDBClustersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeDBClustersOutcomeCallable describeDBClustersCallable(const Model::DescribeDBClustersRequest& request) const;
DescribeDBClustersWithBackupsOutcome describeDBClustersWithBackups(const Model::DescribeDBClustersWithBackupsRequest &request)const;
void describeDBClustersWithBackupsAsync(const Model::DescribeDBClustersWithBackupsRequest& request, const DescribeDBClustersWithBackupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeDBClustersWithBackupsOutcomeCallable describeDBClustersWithBackupsCallable(const Model::DescribeDBClustersWithBackupsRequest& request) const;
DescribeDBNodePerformanceOutcome describeDBNodePerformance(const Model::DescribeDBNodePerformanceRequest &request)const;
void describeDBNodePerformanceAsync(const Model::DescribeDBNodePerformanceRequest& request, const DescribeDBNodePerformanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeDBNodePerformanceOutcomeCallable describeDBNodePerformanceCallable(const Model::DescribeDBNodePerformanceRequest& request) const;
DescribeDatabasesOutcome describeDatabases(const Model::DescribeDatabasesRequest &request)const;
void describeDatabasesAsync(const Model::DescribeDatabasesRequest& request, const DescribeDatabasesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeDatabasesOutcomeCallable describeDatabasesCallable(const Model::DescribeDatabasesRequest& request) const;
DescribeDetachedBackupsOutcome describeDetachedBackups(const Model::DescribeDetachedBackupsRequest &request)const;
void describeDetachedBackupsAsync(const Model::DescribeDetachedBackupsRequest& request, const DescribeDetachedBackupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeDetachedBackupsOutcomeCallable describeDetachedBackupsCallable(const Model::DescribeDetachedBackupsRequest& request) const;
DescribeLogBackupPolicyOutcome describeLogBackupPolicy(const Model::DescribeLogBackupPolicyRequest &request)const;
void describeLogBackupPolicyAsync(const Model::DescribeLogBackupPolicyRequest& request, const DescribeLogBackupPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeLogBackupPolicyOutcomeCallable describeLogBackupPolicyCallable(const Model::DescribeLogBackupPolicyRequest& request) const;
DescribeRegionsOutcome describeRegions(const Model::DescribeRegionsRequest &request)const;
void describeRegionsAsync(const Model::DescribeRegionsRequest& request, const DescribeRegionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeRegionsOutcomeCallable describeRegionsCallable(const Model::DescribeRegionsRequest& request) const;
@@ -485,6 +514,9 @@ namespace AlibabaCloud
ModifyDBNodeClassOutcome modifyDBNodeClass(const Model::ModifyDBNodeClassRequest &request)const;
void modifyDBNodeClassAsync(const Model::ModifyDBNodeClassRequest& request, const ModifyDBNodeClassAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ModifyDBNodeClassOutcomeCallable modifyDBNodeClassCallable(const Model::ModifyDBNodeClassRequest& request) const;
ModifyLogBackupPolicyOutcome modifyLogBackupPolicy(const Model::ModifyLogBackupPolicyRequest &request)const;
void modifyLogBackupPolicyAsync(const Model::ModifyLogBackupPolicyRequest& request, const ModifyLogBackupPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ModifyLogBackupPolicyOutcomeCallable modifyLogBackupPolicyCallable(const Model::ModifyLogBackupPolicyRequest& request) const;
ResetAccountOutcome resetAccount(const Model::ResetAccountRequest &request)const;
void resetAccountAsync(const Model::ResetAccountRequest& request, const ResetAccountAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ResetAccountOutcomeCallable resetAccountCallable(const Model::ResetAccountRequest& request) const;

View File

@@ -43,6 +43,8 @@ namespace AlibabaCloud
void setClientToken(const std::string& clientToken);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getCreationCategory()const;
void setCreationCategory(const std::string& creationCategory);
std::string getClusterNetworkType()const;
void setClusterNetworkType(const std::string& clusterNetworkType);
std::string getResourceGroupId()const;
@@ -93,6 +95,7 @@ namespace AlibabaCloud
std::string dBClusterDescription_;
std::string clientToken_;
std::string accessKeyId_;
std::string creationCategory_;
std::string clusterNetworkType_;
std::string resourceGroupId_;
std::string dBNodeClass_;

View File

@@ -39,6 +39,8 @@ namespace AlibabaCloud
void setResourceOwnerId(long resourceOwnerId);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getBackupRetentionPolicyOnClusterDeletion()const;
void setBackupRetentionPolicyOnClusterDeletion(const std::string& backupRetentionPolicyOnClusterDeletion);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
std::string getDBClusterId()const;
@@ -51,6 +53,7 @@ namespace AlibabaCloud
private:
long resourceOwnerId_;
std::string accessKeyId_;
std::string backupRetentionPolicyOnClusterDeletion_;
std::string resourceOwnerAccount_;
std::string dBClusterId_;
std::string ownerAccount_;

View File

@@ -38,17 +38,23 @@ namespace AlibabaCloud
explicit DescribeBackupPolicyResult(const std::string &payload);
~DescribeBackupPolicyResult();
std::string getPreferredBackupPeriod()const;
std::string getDataLevel1BackupRetentionPeriod()const;
std::string getPreferredBackupTime()const;
std::string getBackupRetentionPolicyOnClusterDeletion()const;
int getBackupRetentionPeriod()const;
std::string getPreferredNextBackupTime()const;
std::string getDataLevel2BackupRetentionPeriod()const;
protected:
void parse(const std::string &payload);
private:
std::string preferredBackupPeriod_;
std::string dataLevel1BackupRetentionPeriod_;
std::string preferredBackupTime_;
std::string backupRetentionPolicyOnClusterDeletion_;
int backupRetentionPeriod_;
std::string preferredNextBackupTime_;
std::string dataLevel2BackupRetentionPeriod_;
};
}

View File

@@ -35,15 +35,17 @@ namespace AlibabaCloud
struct Backup
{
std::string backupMethod;
std::string backupMode;
std::string backupsLevel;
std::string dBClusterId;
std::string backupId;
std::string isAvail;
std::string backupSetSize;
std::string storeStatus;
std::string backupEndTime;
std::string backupMode;
std::string dBClusterId;
std::string backupStartTime;
std::string consistentTime;
std::string backupId;
std::string backupType;
std::string backupSetSize;
std::string backupStatus;
};

View File

@@ -56,6 +56,7 @@ namespace AlibabaCloud
~DescribeDBClusterAttributeResult();
int getDeletionLock()const;
std::string getResourceGroupId()const;
long getDataLevel1BackupChainSize()const;
std::string getDBClusterId()const;
std::string getDBClusterNetworkType()const;
std::string getDBType()const;
@@ -85,6 +86,7 @@ namespace AlibabaCloud
private:
int deletionLock_;
std::string resourceGroupId_;
long dataLevel1BackupChainSize_;
std::string dBClusterId_;
std::string dBClusterNetworkType_;
std::string dBType_;

View File

@@ -38,6 +38,7 @@ namespace AlibabaCloud
{
struct AvailableResource
{
std::string category;
std::string dBNodeClass;
};
std::vector<SupportedEngine::AvailableResource> availableResources;

View File

@@ -0,0 +1,84 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDBCLUSTERSWITHBACKUPSREQUEST_H_
#define ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDBCLUSTERSWITHBACKUPSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/polardb/PolardbExport.h>
namespace AlibabaCloud
{
namespace Polardb
{
namespace Model
{
class ALIBABACLOUD_POLARDB_EXPORT DescribeDBClustersWithBackupsRequest : public RpcServiceRequest
{
public:
DescribeDBClustersWithBackupsRequest();
~DescribeDBClustersWithBackupsRequest();
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getDBClusterDescription()const;
void setDBClusterDescription(const std::string& dBClusterDescription);
int getIsDeleted()const;
void setIsDeleted(int isDeleted);
int getPageNumber()const;
void setPageNumber(int pageNumber);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
std::string getOwnerAccount()const;
void setOwnerAccount(const std::string& ownerAccount);
long getOwnerId()const;
void setOwnerId(long ownerId);
std::string getDBType()const;
void setDBType(const std::string& dBType);
std::string getDBVersion()const;
void setDBVersion(const std::string& dBVersion);
std::string getDBClusterIds()const;
void setDBClusterIds(const std::string& dBClusterIds);
private:
long resourceOwnerId_;
std::string dBClusterDescription_;
int isDeleted_;
int pageNumber_;
std::string accessKeyId_;
std::string regionId_;
int pageSize_;
std::string resourceOwnerAccount_;
std::string ownerAccount_;
long ownerId_;
std::string dBType_;
std::string dBVersion_;
std::string dBClusterIds_;
};
}
}
}
#endif // !ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDBCLUSTERSWITHBACKUPSREQUEST_H_

View 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.
*/
#ifndef ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDBCLUSTERSWITHBACKUPSRESULT_H_
#define ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDBCLUSTERSWITHBACKUPSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/polardb/PolardbExport.h>
namespace AlibabaCloud
{
namespace Polardb
{
namespace Model
{
class ALIBABACLOUD_POLARDB_EXPORT DescribeDBClustersWithBackupsResult : public ServiceResult
{
public:
struct DBCluster
{
int deletionLock;
int isDeleted;
std::string zoneId;
std::string deletedTime;
std::string dBClusterStatus;
std::string createTime;
std::string dBClusterId;
std::string dBClusterDescription;
std::string expired;
std::string payType;
std::string dBClusterNetworkType;
std::string dBType;
std::string lockMode;
std::string dBNodeClass;
std::string dBVersion;
std::string vpcId;
std::string regionId;
std::string expireTime;
std::string engine;
};
DescribeDBClustersWithBackupsResult();
explicit DescribeDBClustersWithBackupsResult(const std::string &payload);
~DescribeDBClustersWithBackupsResult();
int getTotalRecordCount()const;
int getPageRecordCount()const;
int getPageNumber()const;
std::vector<DBCluster> getItems()const;
protected:
void parse(const std::string &payload);
private:
int totalRecordCount_;
int pageRecordCount_;
int pageNumber_;
std::vector<DBCluster> items_;
};
}
}
}
#endif // !ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDBCLUSTERSWITHBACKUPSRESULT_H_

View File

@@ -0,0 +1,84 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDETACHEDBACKUPSREQUEST_H_
#define ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDETACHEDBACKUPSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/polardb/PolardbExport.h>
namespace AlibabaCloud
{
namespace Polardb
{
namespace Model
{
class ALIBABACLOUD_POLARDB_EXPORT DescribeDetachedBackupsRequest : public RpcServiceRequest
{
public:
DescribeDetachedBackupsRequest();
~DescribeDetachedBackupsRequest();
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);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
std::string getDBClusterId()const;
void setDBClusterId(const std::string& dBClusterId);
std::string getOwnerAccount()const;
void setOwnerAccount(const std::string& ownerAccount);
std::string getBackupId()const;
void setBackupId(const std::string& backupId);
std::string getEndTime()const;
void setEndTime(const std::string& endTime);
long getOwnerId()const;
void setOwnerId(long ownerId);
std::string getBackupStatus()const;
void setBackupStatus(const std::string& backupStatus);
std::string getBackupMode()const;
void setBackupMode(const std::string& backupMode);
private:
long resourceOwnerId_;
std::string startTime_;
int pageNumber_;
std::string accessKeyId_;
int pageSize_;
std::string resourceOwnerAccount_;
std::string dBClusterId_;
std::string ownerAccount_;
std::string backupId_;
std::string endTime_;
long ownerId_;
std::string backupStatus_;
std::string backupMode_;
};
}
}
}
#endif // !ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDETACHEDBACKUPSREQUEST_H_

View File

@@ -0,0 +1,73 @@
/*
* 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_POLARDB_MODEL_DESCRIBEDETACHEDBACKUPSRESULT_H_
#define ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDETACHEDBACKUPSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/polardb/PolardbExport.h>
namespace AlibabaCloud
{
namespace Polardb
{
namespace Model
{
class ALIBABACLOUD_POLARDB_EXPORT DescribeDetachedBackupsResult : public ServiceResult
{
public:
struct Backup
{
std::string backupMethod;
std::string backupMode;
std::string backupsLevel;
std::string dBClusterId;
std::string backupId;
std::string isAvail;
std::string backupSetSize;
std::string storeStatus;
std::string backupEndTime;
std::string backupStartTime;
std::string consistentTime;
std::string backupType;
std::string backupStatus;
};
DescribeDetachedBackupsResult();
explicit DescribeDetachedBackupsResult(const std::string &payload);
~DescribeDetachedBackupsResult();
std::string getTotalRecordCount()const;
std::string getPageRecordCount()const;
std::string getPageNumber()const;
std::vector<Backup> getItems()const;
protected:
void parse(const std::string &payload);
private:
std::string totalRecordCount_;
std::string pageRecordCount_;
std::string pageNumber_;
std::vector<Backup> items_;
};
}
}
}
#endif // !ALIBABACLOUD_POLARDB_MODEL_DESCRIBEDETACHEDBACKUPSRESULT_H_

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_POLARDB_MODEL_DESCRIBELOGBACKUPPOLICYREQUEST_H_
#define ALIBABACLOUD_POLARDB_MODEL_DESCRIBELOGBACKUPPOLICYREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/polardb/PolardbExport.h>
namespace AlibabaCloud
{
namespace Polardb
{
namespace Model
{
class ALIBABACLOUD_POLARDB_EXPORT DescribeLogBackupPolicyRequest : public RpcServiceRequest
{
public:
DescribeLogBackupPolicyRequest();
~DescribeLogBackupPolicyRequest();
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
std::string getDBClusterId()const;
void setDBClusterId(const std::string& dBClusterId);
std::string getOwnerAccount()const;
void setOwnerAccount(const std::string& ownerAccount);
long getOwnerId()const;
void setOwnerId(long ownerId);
private:
long resourceOwnerId_;
std::string accessKeyId_;
std::string resourceOwnerAccount_;
std::string dBClusterId_;
std::string ownerAccount_;
long ownerId_;
};
}
}
}
#endif // !ALIBABACLOUD_POLARDB_MODEL_DESCRIBELOGBACKUPPOLICYREQUEST_H_

View File

@@ -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_POLARDB_MODEL_DESCRIBELOGBACKUPPOLICYRESULT_H_
#define ALIBABACLOUD_POLARDB_MODEL_DESCRIBELOGBACKUPPOLICYRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/polardb/PolardbExport.h>
namespace AlibabaCloud
{
namespace Polardb
{
namespace Model
{
class ALIBABACLOUD_POLARDB_EXPORT DescribeLogBackupPolicyResult : public ServiceResult
{
public:
DescribeLogBackupPolicyResult();
explicit DescribeLogBackupPolicyResult(const std::string &payload);
~DescribeLogBackupPolicyResult();
int getLogBackupRetentionPeriod()const;
int getEnableBackupLog()const;
protected:
void parse(const std::string &payload);
private:
int logBackupRetentionPeriod_;
int enableBackupLog_;
};
}
}
}
#endif // !ALIBABACLOUD_POLARDB_MODEL_DESCRIBELOGBACKUPPOLICYRESULT_H_

View File

@@ -37,10 +37,16 @@ namespace AlibabaCloud
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getDataLevel2BackupRetentionPeriod()const;
void setDataLevel2BackupRetentionPeriod(const std::string& dataLevel2BackupRetentionPeriod);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getPreferredBackupPeriod()const;
void setPreferredBackupPeriod(const std::string& preferredBackupPeriod);
std::string getDataLevel1BackupRetentionPeriod()const;
void setDataLevel1BackupRetentionPeriod(const std::string& dataLevel1BackupRetentionPeriod);
std::string getBackupRetentionPolicyOnClusterDeletion()const;
void setBackupRetentionPolicyOnClusterDeletion(const std::string& backupRetentionPolicyOnClusterDeletion);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
std::string getDBClusterId()const;
@@ -56,8 +62,11 @@ namespace AlibabaCloud
private:
long resourceOwnerId_;
std::string dataLevel2BackupRetentionPeriod_;
std::string accessKeyId_;
std::string preferredBackupPeriod_;
std::string dataLevel1BackupRetentionPeriod_;
std::string backupRetentionPolicyOnClusterDeletion_;
std::string resourceOwnerAccount_;
std::string dBClusterId_;
std::string ownerAccount_;

View File

@@ -0,0 +1,66 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_POLARDB_MODEL_MODIFYLOGBACKUPPOLICYREQUEST_H_
#define ALIBABACLOUD_POLARDB_MODEL_MODIFYLOGBACKUPPOLICYREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/polardb/PolardbExport.h>
namespace AlibabaCloud
{
namespace Polardb
{
namespace Model
{
class ALIBABACLOUD_POLARDB_EXPORT ModifyLogBackupPolicyRequest : public RpcServiceRequest
{
public:
ModifyLogBackupPolicyRequest();
~ModifyLogBackupPolicyRequest();
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
std::string getDBClusterId()const;
void setDBClusterId(const std::string& dBClusterId);
std::string getOwnerAccount()const;
void setOwnerAccount(const std::string& ownerAccount);
long getOwnerId()const;
void setOwnerId(long ownerId);
std::string getLogBackupRetentionPeriod()const;
void setLogBackupRetentionPeriod(const std::string& logBackupRetentionPeriod);
private:
long resourceOwnerId_;
std::string accessKeyId_;
std::string resourceOwnerAccount_;
std::string dBClusterId_;
std::string ownerAccount_;
long ownerId_;
std::string logBackupRetentionPeriod_;
};
}
}
}
#endif // !ALIBABACLOUD_POLARDB_MODEL_MODIFYLOGBACKUPPOLICYREQUEST_H_

View File

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

View File

@@ -1131,6 +1131,42 @@ PolardbClient::DescribeDBClustersOutcomeCallable PolardbClient::describeDBCluste
return task->get_future();
}
PolardbClient::DescribeDBClustersWithBackupsOutcome PolardbClient::describeDBClustersWithBackups(const DescribeDBClustersWithBackupsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeDBClustersWithBackupsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeDBClustersWithBackupsOutcome(DescribeDBClustersWithBackupsResult(outcome.result()));
else
return DescribeDBClustersWithBackupsOutcome(outcome.error());
}
void PolardbClient::describeDBClustersWithBackupsAsync(const DescribeDBClustersWithBackupsRequest& request, const DescribeDBClustersWithBackupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeDBClustersWithBackups(request), context);
};
asyncExecute(new Runnable(fn));
}
PolardbClient::DescribeDBClustersWithBackupsOutcomeCallable PolardbClient::describeDBClustersWithBackupsCallable(const DescribeDBClustersWithBackupsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeDBClustersWithBackupsOutcome()>>(
[this, request]()
{
return this->describeDBClustersWithBackups(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
PolardbClient::DescribeDBNodePerformanceOutcome PolardbClient::describeDBNodePerformance(const DescribeDBNodePerformanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1203,6 +1239,78 @@ PolardbClient::DescribeDatabasesOutcomeCallable PolardbClient::describeDatabases
return task->get_future();
}
PolardbClient::DescribeDetachedBackupsOutcome PolardbClient::describeDetachedBackups(const DescribeDetachedBackupsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeDetachedBackupsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeDetachedBackupsOutcome(DescribeDetachedBackupsResult(outcome.result()));
else
return DescribeDetachedBackupsOutcome(outcome.error());
}
void PolardbClient::describeDetachedBackupsAsync(const DescribeDetachedBackupsRequest& request, const DescribeDetachedBackupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeDetachedBackups(request), context);
};
asyncExecute(new Runnable(fn));
}
PolardbClient::DescribeDetachedBackupsOutcomeCallable PolardbClient::describeDetachedBackupsCallable(const DescribeDetachedBackupsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeDetachedBackupsOutcome()>>(
[this, request]()
{
return this->describeDetachedBackups(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
PolardbClient::DescribeLogBackupPolicyOutcome PolardbClient::describeLogBackupPolicy(const DescribeLogBackupPolicyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeLogBackupPolicyOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeLogBackupPolicyOutcome(DescribeLogBackupPolicyResult(outcome.result()));
else
return DescribeLogBackupPolicyOutcome(outcome.error());
}
void PolardbClient::describeLogBackupPolicyAsync(const DescribeLogBackupPolicyRequest& request, const DescribeLogBackupPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeLogBackupPolicy(request), context);
};
asyncExecute(new Runnable(fn));
}
PolardbClient::DescribeLogBackupPolicyOutcomeCallable PolardbClient::describeLogBackupPolicyCallable(const DescribeLogBackupPolicyRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeLogBackupPolicyOutcome()>>(
[this, request]()
{
return this->describeLogBackupPolicy(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
PolardbClient::DescribeRegionsOutcome PolardbClient::describeRegions(const DescribeRegionsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1959,6 +2067,42 @@ PolardbClient::ModifyDBNodeClassOutcomeCallable PolardbClient::modifyDBNodeClass
return task->get_future();
}
PolardbClient::ModifyLogBackupPolicyOutcome PolardbClient::modifyLogBackupPolicy(const ModifyLogBackupPolicyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ModifyLogBackupPolicyOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ModifyLogBackupPolicyOutcome(ModifyLogBackupPolicyResult(outcome.result()));
else
return ModifyLogBackupPolicyOutcome(outcome.error());
}
void PolardbClient::modifyLogBackupPolicyAsync(const ModifyLogBackupPolicyRequest& request, const ModifyLogBackupPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, modifyLogBackupPolicy(request), context);
};
asyncExecute(new Runnable(fn));
}
PolardbClient::ModifyLogBackupPolicyOutcomeCallable PolardbClient::modifyLogBackupPolicyCallable(const ModifyLogBackupPolicyRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ModifyLogBackupPolicyOutcome()>>(
[this, request]()
{
return this->modifyLogBackupPolicy(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
PolardbClient::ResetAccountOutcome PolardbClient::resetAccount(const ResetAccountRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -71,6 +71,17 @@ void CreateDBClusterRequest::setAccessKeyId(const std::string& accessKeyId)
setParameter("AccessKeyId", accessKeyId);
}
std::string CreateDBClusterRequest::getCreationCategory()const
{
return creationCategory_;
}
void CreateDBClusterRequest::setCreationCategory(const std::string& creationCategory)
{
creationCategory_ = creationCategory;
setParameter("CreationCategory", creationCategory);
}
std::string CreateDBClusterRequest::getClusterNetworkType()const
{
return clusterNetworkType_;

View File

@@ -49,6 +49,17 @@ void DeleteDBClusterRequest::setAccessKeyId(const std::string& accessKeyId)
setParameter("AccessKeyId", accessKeyId);
}
std::string DeleteDBClusterRequest::getBackupRetentionPolicyOnClusterDeletion()const
{
return backupRetentionPolicyOnClusterDeletion_;
}
void DeleteDBClusterRequest::setBackupRetentionPolicyOnClusterDeletion(const std::string& backupRetentionPolicyOnClusterDeletion)
{
backupRetentionPolicyOnClusterDeletion_ = backupRetentionPolicyOnClusterDeletion;
setParameter("BackupRetentionPolicyOnClusterDeletion", backupRetentionPolicyOnClusterDeletion);
}
std::string DeleteDBClusterRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;

View File

@@ -47,6 +47,12 @@ void DescribeBackupPolicyResult::parse(const std::string &payload)
preferredBackupTime_ = value["PreferredBackupTime"].asString();
if(!value["PreferredBackupPeriod"].isNull())
preferredBackupPeriod_ = value["PreferredBackupPeriod"].asString();
if(!value["DataLevel1BackupRetentionPeriod"].isNull())
dataLevel1BackupRetentionPeriod_ = value["DataLevel1BackupRetentionPeriod"].asString();
if(!value["DataLevel2BackupRetentionPeriod"].isNull())
dataLevel2BackupRetentionPeriod_ = value["DataLevel2BackupRetentionPeriod"].asString();
if(!value["BackupRetentionPolicyOnClusterDeletion"].isNull())
backupRetentionPolicyOnClusterDeletion_ = value["BackupRetentionPolicyOnClusterDeletion"].asString();
}
@@ -55,11 +61,21 @@ std::string DescribeBackupPolicyResult::getPreferredBackupPeriod()const
return preferredBackupPeriod_;
}
std::string DescribeBackupPolicyResult::getDataLevel1BackupRetentionPeriod()const
{
return dataLevel1BackupRetentionPeriod_;
}
std::string DescribeBackupPolicyResult::getPreferredBackupTime()const
{
return preferredBackupTime_;
}
std::string DescribeBackupPolicyResult::getBackupRetentionPolicyOnClusterDeletion()const
{
return backupRetentionPolicyOnClusterDeletion_;
}
int DescribeBackupPolicyResult::getBackupRetentionPeriod()const
{
return backupRetentionPeriod_;
@@ -70,3 +86,8 @@ std::string DescribeBackupPolicyResult::getPreferredNextBackupTime()const
return preferredNextBackupTime_;
}
std::string DescribeBackupPolicyResult::getDataLevel2BackupRetentionPeriod()const
{
return dataLevel2BackupRetentionPeriod_;
}

View File

@@ -65,6 +65,10 @@ void DescribeBackupsResult::parse(const std::string &payload)
itemsObject.backupSetSize = valueItemsBackup["BackupSetSize"].asString();
if(!valueItemsBackup["ConsistentTime"].isNull())
itemsObject.consistentTime = valueItemsBackup["ConsistentTime"].asString();
if(!valueItemsBackup["BackupsLevel"].isNull())
itemsObject.backupsLevel = valueItemsBackup["BackupsLevel"].asString();
if(!valueItemsBackup["IsAvail"].isNull())
itemsObject.isAvail = valueItemsBackup["IsAvail"].asString();
items_.push_back(itemsObject);
}
if(!value["TotalRecordCount"].isNull())

View File

@@ -119,6 +119,8 @@ void DescribeDBClusterAttributeResult::parse(const std::string &payload)
isLatestVersion_ = value["IsLatestVersion"].asString() == "true";
if(!value["ResourceGroupId"].isNull())
resourceGroupId_ = value["ResourceGroupId"].asString();
if(!value["DataLevel1BackupChainSize"].isNull())
dataLevel1BackupChainSize_ = std::stol(value["DataLevel1BackupChainSize"].asString());
}
@@ -132,6 +134,11 @@ std::string DescribeDBClusterAttributeResult::getResourceGroupId()const
return resourceGroupId_;
}
long DescribeDBClusterAttributeResult::getDataLevel1BackupChainSize()const
{
return dataLevel1BackupChainSize_;
}
std::string DescribeDBClusterAttributeResult::getDBClusterId()const
{
return dBClusterId_;

View File

@@ -59,6 +59,8 @@ void DescribeDBClusterAvailableResourcesResult::parse(const std::string &payload
AvailableZone::SupportedEngine::AvailableResource availableResourcesObject;
if(!allSupportedEnginesNodeAvailableResourcesAvailableResource["DBNodeClass"].isNull())
availableResourcesObject.dBNodeClass = allSupportedEnginesNodeAvailableResourcesAvailableResource["DBNodeClass"].asString();
if(!allSupportedEnginesNodeAvailableResourcesAvailableResource["Category"].isNull())
availableResourcesObject.category = allSupportedEnginesNodeAvailableResourcesAvailableResource["Category"].asString();
supportedEnginesObject.availableResources.push_back(availableResourcesObject);
}
availableZonesObject.supportedEngines.push_back(supportedEnginesObject);

View 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/polardb/model/DescribeDBClustersWithBackupsRequest.h>
using AlibabaCloud::Polardb::Model::DescribeDBClustersWithBackupsRequest;
DescribeDBClustersWithBackupsRequest::DescribeDBClustersWithBackupsRequest() :
RpcServiceRequest("polardb", "2017-08-01", "DescribeDBClustersWithBackups")
{
setMethod(HttpRequest::Method::Post);
}
DescribeDBClustersWithBackupsRequest::~DescribeDBClustersWithBackupsRequest()
{}
long DescribeDBClustersWithBackupsRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribeDBClustersWithBackupsRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DescribeDBClustersWithBackupsRequest::getDBClusterDescription()const
{
return dBClusterDescription_;
}
void DescribeDBClustersWithBackupsRequest::setDBClusterDescription(const std::string& dBClusterDescription)
{
dBClusterDescription_ = dBClusterDescription;
setParameter("DBClusterDescription", dBClusterDescription);
}
int DescribeDBClustersWithBackupsRequest::getIsDeleted()const
{
return isDeleted_;
}
void DescribeDBClustersWithBackupsRequest::setIsDeleted(int isDeleted)
{
isDeleted_ = isDeleted;
setParameter("IsDeleted", std::to_string(isDeleted));
}
int DescribeDBClustersWithBackupsRequest::getPageNumber()const
{
return pageNumber_;
}
void DescribeDBClustersWithBackupsRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string DescribeDBClustersWithBackupsRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DescribeDBClustersWithBackupsRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string DescribeDBClustersWithBackupsRequest::getRegionId()const
{
return regionId_;
}
void DescribeDBClustersWithBackupsRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
int DescribeDBClustersWithBackupsRequest::getPageSize()const
{
return pageSize_;
}
void DescribeDBClustersWithBackupsRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string DescribeDBClustersWithBackupsRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void DescribeDBClustersWithBackupsRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string DescribeDBClustersWithBackupsRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void DescribeDBClustersWithBackupsRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
long DescribeDBClustersWithBackupsRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeDBClustersWithBackupsRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string DescribeDBClustersWithBackupsRequest::getDBType()const
{
return dBType_;
}
void DescribeDBClustersWithBackupsRequest::setDBType(const std::string& dBType)
{
dBType_ = dBType;
setParameter("DBType", dBType);
}
std::string DescribeDBClustersWithBackupsRequest::getDBVersion()const
{
return dBVersion_;
}
void DescribeDBClustersWithBackupsRequest::setDBVersion(const std::string& dBVersion)
{
dBVersion_ = dBVersion;
setParameter("DBVersion", dBVersion);
}
std::string DescribeDBClustersWithBackupsRequest::getDBClusterIds()const
{
return dBClusterIds_;
}
void DescribeDBClustersWithBackupsRequest::setDBClusterIds(const std::string& dBClusterIds)
{
dBClusterIds_ = dBClusterIds;
setParameter("DBClusterIds", dBClusterIds);
}

View File

@@ -0,0 +1,114 @@
/*
* 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/polardb/model/DescribeDBClustersWithBackupsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
DescribeDBClustersWithBackupsResult::DescribeDBClustersWithBackupsResult() :
ServiceResult()
{}
DescribeDBClustersWithBackupsResult::DescribeDBClustersWithBackupsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeDBClustersWithBackupsResult::~DescribeDBClustersWithBackupsResult()
{}
void DescribeDBClustersWithBackupsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allItemsNode = value["Items"]["DBCluster"];
for (auto valueItemsDBCluster : allItemsNode)
{
DBCluster itemsObject;
if(!valueItemsDBCluster["DBClusterId"].isNull())
itemsObject.dBClusterId = valueItemsDBCluster["DBClusterId"].asString();
if(!valueItemsDBCluster["DBClusterDescription"].isNull())
itemsObject.dBClusterDescription = valueItemsDBCluster["DBClusterDescription"].asString();
if(!valueItemsDBCluster["PayType"].isNull())
itemsObject.payType = valueItemsDBCluster["PayType"].asString();
if(!valueItemsDBCluster["DBClusterNetworkType"].isNull())
itemsObject.dBClusterNetworkType = valueItemsDBCluster["DBClusterNetworkType"].asString();
if(!valueItemsDBCluster["RegionId"].isNull())
itemsObject.regionId = valueItemsDBCluster["RegionId"].asString();
if(!valueItemsDBCluster["ZoneId"].isNull())
itemsObject.zoneId = valueItemsDBCluster["ZoneId"].asString();
if(!valueItemsDBCluster["ExpireTime"].isNull())
itemsObject.expireTime = valueItemsDBCluster["ExpireTime"].asString();
if(!valueItemsDBCluster["Expired"].isNull())
itemsObject.expired = valueItemsDBCluster["Expired"].asString();
if(!valueItemsDBCluster["DBClusterStatus"].isNull())
itemsObject.dBClusterStatus = valueItemsDBCluster["DBClusterStatus"].asString();
if(!valueItemsDBCluster["Engine"].isNull())
itemsObject.engine = valueItemsDBCluster["Engine"].asString();
if(!valueItemsDBCluster["DBType"].isNull())
itemsObject.dBType = valueItemsDBCluster["DBType"].asString();
if(!valueItemsDBCluster["DBVersion"].isNull())
itemsObject.dBVersion = valueItemsDBCluster["DBVersion"].asString();
if(!valueItemsDBCluster["LockMode"].isNull())
itemsObject.lockMode = valueItemsDBCluster["LockMode"].asString();
if(!valueItemsDBCluster["DeletionLock"].isNull())
itemsObject.deletionLock = std::stoi(valueItemsDBCluster["DeletionLock"].asString());
if(!valueItemsDBCluster["CreateTime"].isNull())
itemsObject.createTime = valueItemsDBCluster["CreateTime"].asString();
if(!valueItemsDBCluster["VpcId"].isNull())
itemsObject.vpcId = valueItemsDBCluster["VpcId"].asString();
if(!valueItemsDBCluster["IsDeleted"].isNull())
itemsObject.isDeleted = std::stoi(valueItemsDBCluster["IsDeleted"].asString());
if(!valueItemsDBCluster["DeletedTime"].isNull())
itemsObject.deletedTime = valueItemsDBCluster["DeletedTime"].asString();
if(!valueItemsDBCluster["DBNodeClass"].isNull())
itemsObject.dBNodeClass = valueItemsDBCluster["DBNodeClass"].asString();
items_.push_back(itemsObject);
}
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["TotalRecordCount"].isNull())
totalRecordCount_ = std::stoi(value["TotalRecordCount"].asString());
if(!value["PageRecordCount"].isNull())
pageRecordCount_ = std::stoi(value["PageRecordCount"].asString());
}
int DescribeDBClustersWithBackupsResult::getTotalRecordCount()const
{
return totalRecordCount_;
}
int DescribeDBClustersWithBackupsResult::getPageRecordCount()const
{
return pageRecordCount_;
}
int DescribeDBClustersWithBackupsResult::getPageNumber()const
{
return pageNumber_;
}
std::vector<DescribeDBClustersWithBackupsResult::DBCluster> DescribeDBClustersWithBackupsResult::getItems()const
{
return items_;
}

View 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/polardb/model/DescribeDetachedBackupsRequest.h>
using AlibabaCloud::Polardb::Model::DescribeDetachedBackupsRequest;
DescribeDetachedBackupsRequest::DescribeDetachedBackupsRequest() :
RpcServiceRequest("polardb", "2017-08-01", "DescribeDetachedBackups")
{
setMethod(HttpRequest::Method::Post);
}
DescribeDetachedBackupsRequest::~DescribeDetachedBackupsRequest()
{}
long DescribeDetachedBackupsRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribeDetachedBackupsRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DescribeDetachedBackupsRequest::getStartTime()const
{
return startTime_;
}
void DescribeDetachedBackupsRequest::setStartTime(const std::string& startTime)
{
startTime_ = startTime;
setParameter("StartTime", startTime);
}
int DescribeDetachedBackupsRequest::getPageNumber()const
{
return pageNumber_;
}
void DescribeDetachedBackupsRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string DescribeDetachedBackupsRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DescribeDetachedBackupsRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
int DescribeDetachedBackupsRequest::getPageSize()const
{
return pageSize_;
}
void DescribeDetachedBackupsRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string DescribeDetachedBackupsRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void DescribeDetachedBackupsRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string DescribeDetachedBackupsRequest::getDBClusterId()const
{
return dBClusterId_;
}
void DescribeDetachedBackupsRequest::setDBClusterId(const std::string& dBClusterId)
{
dBClusterId_ = dBClusterId;
setParameter("DBClusterId", dBClusterId);
}
std::string DescribeDetachedBackupsRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void DescribeDetachedBackupsRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
std::string DescribeDetachedBackupsRequest::getBackupId()const
{
return backupId_;
}
void DescribeDetachedBackupsRequest::setBackupId(const std::string& backupId)
{
backupId_ = backupId;
setParameter("BackupId", backupId);
}
std::string DescribeDetachedBackupsRequest::getEndTime()const
{
return endTime_;
}
void DescribeDetachedBackupsRequest::setEndTime(const std::string& endTime)
{
endTime_ = endTime;
setParameter("EndTime", endTime);
}
long DescribeDetachedBackupsRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeDetachedBackupsRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string DescribeDetachedBackupsRequest::getBackupStatus()const
{
return backupStatus_;
}
void DescribeDetachedBackupsRequest::setBackupStatus(const std::string& backupStatus)
{
backupStatus_ = backupStatus;
setParameter("BackupStatus", backupStatus);
}
std::string DescribeDetachedBackupsRequest::getBackupMode()const
{
return backupMode_;
}
void DescribeDetachedBackupsRequest::setBackupMode(const std::string& backupMode)
{
backupMode_ = backupMode;
setParameter("BackupMode", backupMode);
}

View File

@@ -0,0 +1,102 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/polardb/model/DescribeDetachedBackupsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
DescribeDetachedBackupsResult::DescribeDetachedBackupsResult() :
ServiceResult()
{}
DescribeDetachedBackupsResult::DescribeDetachedBackupsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeDetachedBackupsResult::~DescribeDetachedBackupsResult()
{}
void DescribeDetachedBackupsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allItemsNode = value["Items"]["Backup"];
for (auto valueItemsBackup : allItemsNode)
{
Backup itemsObject;
if(!valueItemsBackup["BackupId"].isNull())
itemsObject.backupId = valueItemsBackup["BackupId"].asString();
if(!valueItemsBackup["DBClusterId"].isNull())
itemsObject.dBClusterId = valueItemsBackup["DBClusterId"].asString();
if(!valueItemsBackup["BackupStatus"].isNull())
itemsObject.backupStatus = valueItemsBackup["BackupStatus"].asString();
if(!valueItemsBackup["BackupStartTime"].isNull())
itemsObject.backupStartTime = valueItemsBackup["BackupStartTime"].asString();
if(!valueItemsBackup["BackupEndTime"].isNull())
itemsObject.backupEndTime = valueItemsBackup["BackupEndTime"].asString();
if(!valueItemsBackup["BackupType"].isNull())
itemsObject.backupType = valueItemsBackup["BackupType"].asString();
if(!valueItemsBackup["BackupMode"].isNull())
itemsObject.backupMode = valueItemsBackup["BackupMode"].asString();
if(!valueItemsBackup["BackupMethod"].isNull())
itemsObject.backupMethod = valueItemsBackup["BackupMethod"].asString();
if(!valueItemsBackup["StoreStatus"].isNull())
itemsObject.storeStatus = valueItemsBackup["StoreStatus"].asString();
if(!valueItemsBackup["BackupSetSize"].isNull())
itemsObject.backupSetSize = valueItemsBackup["BackupSetSize"].asString();
if(!valueItemsBackup["ConsistentTime"].isNull())
itemsObject.consistentTime = valueItemsBackup["ConsistentTime"].asString();
if(!valueItemsBackup["BackupsLevel"].isNull())
itemsObject.backupsLevel = valueItemsBackup["BackupsLevel"].asString();
if(!valueItemsBackup["IsAvail"].isNull())
itemsObject.isAvail = valueItemsBackup["IsAvail"].asString();
items_.push_back(itemsObject);
}
if(!value["TotalRecordCount"].isNull())
totalRecordCount_ = value["TotalRecordCount"].asString();
if(!value["PageNumber"].isNull())
pageNumber_ = value["PageNumber"].asString();
if(!value["PageRecordCount"].isNull())
pageRecordCount_ = value["PageRecordCount"].asString();
}
std::string DescribeDetachedBackupsResult::getTotalRecordCount()const
{
return totalRecordCount_;
}
std::string DescribeDetachedBackupsResult::getPageRecordCount()const
{
return pageRecordCount_;
}
std::string DescribeDetachedBackupsResult::getPageNumber()const
{
return pageNumber_;
}
std::vector<DescribeDetachedBackupsResult::Backup> DescribeDetachedBackupsResult::getItems()const
{
return items_;
}

View File

@@ -0,0 +1,95 @@
/*
* 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/polardb/model/DescribeLogBackupPolicyRequest.h>
using AlibabaCloud::Polardb::Model::DescribeLogBackupPolicyRequest;
DescribeLogBackupPolicyRequest::DescribeLogBackupPolicyRequest() :
RpcServiceRequest("polardb", "2017-08-01", "DescribeLogBackupPolicy")
{
setMethod(HttpRequest::Method::Post);
}
DescribeLogBackupPolicyRequest::~DescribeLogBackupPolicyRequest()
{}
long DescribeLogBackupPolicyRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribeLogBackupPolicyRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DescribeLogBackupPolicyRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DescribeLogBackupPolicyRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string DescribeLogBackupPolicyRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void DescribeLogBackupPolicyRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string DescribeLogBackupPolicyRequest::getDBClusterId()const
{
return dBClusterId_;
}
void DescribeLogBackupPolicyRequest::setDBClusterId(const std::string& dBClusterId)
{
dBClusterId_ = dBClusterId;
setParameter("DBClusterId", dBClusterId);
}
std::string DescribeLogBackupPolicyRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void DescribeLogBackupPolicyRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
long DescribeLogBackupPolicyRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeLogBackupPolicyRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

View 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/polardb/model/DescribeLogBackupPolicyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Polardb;
using namespace AlibabaCloud::Polardb::Model;
DescribeLogBackupPolicyResult::DescribeLogBackupPolicyResult() :
ServiceResult()
{}
DescribeLogBackupPolicyResult::DescribeLogBackupPolicyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeLogBackupPolicyResult::~DescribeLogBackupPolicyResult()
{}
void DescribeLogBackupPolicyResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["EnableBackupLog"].isNull())
enableBackupLog_ = std::stoi(value["EnableBackupLog"].asString());
if(!value["LogBackupRetentionPeriod"].isNull())
logBackupRetentionPeriod_ = std::stoi(value["LogBackupRetentionPeriod"].asString());
}
int DescribeLogBackupPolicyResult::getLogBackupRetentionPeriod()const
{
return logBackupRetentionPeriod_;
}
int DescribeLogBackupPolicyResult::getEnableBackupLog()const
{
return enableBackupLog_;
}

View File

@@ -38,6 +38,17 @@ void ModifyBackupPolicyRequest::setResourceOwnerId(long resourceOwnerId)
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string ModifyBackupPolicyRequest::getDataLevel2BackupRetentionPeriod()const
{
return dataLevel2BackupRetentionPeriod_;
}
void ModifyBackupPolicyRequest::setDataLevel2BackupRetentionPeriod(const std::string& dataLevel2BackupRetentionPeriod)
{
dataLevel2BackupRetentionPeriod_ = dataLevel2BackupRetentionPeriod;
setParameter("DataLevel2BackupRetentionPeriod", dataLevel2BackupRetentionPeriod);
}
std::string ModifyBackupPolicyRequest::getAccessKeyId()const
{
return accessKeyId_;
@@ -60,6 +71,28 @@ void ModifyBackupPolicyRequest::setPreferredBackupPeriod(const std::string& pref
setParameter("PreferredBackupPeriod", preferredBackupPeriod);
}
std::string ModifyBackupPolicyRequest::getDataLevel1BackupRetentionPeriod()const
{
return dataLevel1BackupRetentionPeriod_;
}
void ModifyBackupPolicyRequest::setDataLevel1BackupRetentionPeriod(const std::string& dataLevel1BackupRetentionPeriod)
{
dataLevel1BackupRetentionPeriod_ = dataLevel1BackupRetentionPeriod;
setParameter("DataLevel1BackupRetentionPeriod", dataLevel1BackupRetentionPeriod);
}
std::string ModifyBackupPolicyRequest::getBackupRetentionPolicyOnClusterDeletion()const
{
return backupRetentionPolicyOnClusterDeletion_;
}
void ModifyBackupPolicyRequest::setBackupRetentionPolicyOnClusterDeletion(const std::string& backupRetentionPolicyOnClusterDeletion)
{
backupRetentionPolicyOnClusterDeletion_ = backupRetentionPolicyOnClusterDeletion;
setParameter("BackupRetentionPolicyOnClusterDeletion", backupRetentionPolicyOnClusterDeletion);
}
std::string ModifyBackupPolicyRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;

View File

@@ -0,0 +1,106 @@
/*
* 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/polardb/model/ModifyLogBackupPolicyRequest.h>
using AlibabaCloud::Polardb::Model::ModifyLogBackupPolicyRequest;
ModifyLogBackupPolicyRequest::ModifyLogBackupPolicyRequest() :
RpcServiceRequest("polardb", "2017-08-01", "ModifyLogBackupPolicy")
{
setMethod(HttpRequest::Method::Post);
}
ModifyLogBackupPolicyRequest::~ModifyLogBackupPolicyRequest()
{}
long ModifyLogBackupPolicyRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void ModifyLogBackupPolicyRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string ModifyLogBackupPolicyRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ModifyLogBackupPolicyRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string ModifyLogBackupPolicyRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void ModifyLogBackupPolicyRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string ModifyLogBackupPolicyRequest::getDBClusterId()const
{
return dBClusterId_;
}
void ModifyLogBackupPolicyRequest::setDBClusterId(const std::string& dBClusterId)
{
dBClusterId_ = dBClusterId;
setParameter("DBClusterId", dBClusterId);
}
std::string ModifyLogBackupPolicyRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void ModifyLogBackupPolicyRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
long ModifyLogBackupPolicyRequest::getOwnerId()const
{
return ownerId_;
}
void ModifyLogBackupPolicyRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string ModifyLogBackupPolicyRequest::getLogBackupRetentionPeriod()const
{
return logBackupRetentionPeriod_;
}
void ModifyLogBackupPolicyRequest::setLogBackupRetentionPeriod(const std::string& logBackupRetentionPeriod)
{
logBackupRetentionPeriod_ = logBackupRetentionPeriod;
setParameter("LogBackupRetentionPeriod", logBackupRetentionPeriod);
}

View File

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

View File

@@ -22,12 +22,16 @@ set(saf_public_header
set(saf_public_header_model
include/alibabacloud/saf/model/ExecuteRequestRequest.h
include/alibabacloud/saf/model/ExecuteRequestResult.h )
include/alibabacloud/saf/model/ExecuteRequestResult.h
include/alibabacloud/saf/model/ExecuteRequestSGRequest.h
include/alibabacloud/saf/model/ExecuteRequestSGResult.h )
set(saf_src
src/SafClient.cc
src/model/ExecuteRequestRequest.cc
src/model/ExecuteRequestResult.cc )
src/model/ExecuteRequestResult.cc
src/model/ExecuteRequestSGRequest.cc
src/model/ExecuteRequestSGResult.cc )
add_library(saf ${LIB_TYPE}
${saf_public_header}

View File

@@ -24,6 +24,8 @@
#include "SafExport.h"
#include "model/ExecuteRequestRequest.h"
#include "model/ExecuteRequestResult.h"
#include "model/ExecuteRequestSGRequest.h"
#include "model/ExecuteRequestSGResult.h"
namespace AlibabaCloud
@@ -36,6 +38,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ExecuteRequestResult> ExecuteRequestOutcome;
typedef std::future<ExecuteRequestOutcome> ExecuteRequestOutcomeCallable;
typedef std::function<void(const SafClient*, const Model::ExecuteRequestRequest&, const ExecuteRequestOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExecuteRequestAsyncHandler;
typedef Outcome<Error, Model::ExecuteRequestSGResult> ExecuteRequestSGOutcome;
typedef std::future<ExecuteRequestSGOutcome> ExecuteRequestSGOutcomeCallable;
typedef std::function<void(const SafClient*, const Model::ExecuteRequestSGRequest&, const ExecuteRequestSGOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExecuteRequestSGAsyncHandler;
SafClient(const Credentials &credentials, const ClientConfiguration &configuration);
SafClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
@@ -44,6 +49,9 @@ namespace AlibabaCloud
ExecuteRequestOutcome executeRequest(const Model::ExecuteRequestRequest &request)const;
void executeRequestAsync(const Model::ExecuteRequestRequest& request, const ExecuteRequestAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ExecuteRequestOutcomeCallable executeRequestCallable(const Model::ExecuteRequestRequest& request) const;
ExecuteRequestSGOutcome executeRequestSG(const Model::ExecuteRequestSGRequest &request)const;
void executeRequestSGAsync(const Model::ExecuteRequestSGRequest& request, const ExecuteRequestSGAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ExecuteRequestSGOutcomeCallable executeRequestSGCallable(const Model::ExecuteRequestSGRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;

View File

@@ -32,26 +32,20 @@ namespace AlibabaCloud
class ALIBABACLOUD_SAF_EXPORT ExecuteRequestResult : public ServiceResult
{
public:
struct Data
{
std::string score;
std::string extend;
std::string tags;
};
ExecuteRequestResult();
explicit ExecuteRequestResult(const std::string &payload);
~ExecuteRequestResult();
std::string getMessage()const;
Data getData()const;
std::string getData()const;
int getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
Data data_;
std::string data_;
int code_;
};

View File

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

View File

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

View File

@@ -87,3 +87,39 @@ SafClient::ExecuteRequestOutcomeCallable SafClient::executeRequestCallable(const
return task->get_future();
}
SafClient::ExecuteRequestSGOutcome SafClient::executeRequestSG(const ExecuteRequestSGRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ExecuteRequestSGOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ExecuteRequestSGOutcome(ExecuteRequestSGResult(outcome.result()));
else
return ExecuteRequestSGOutcome(outcome.error());
}
void SafClient::executeRequestSGAsync(const ExecuteRequestSGRequest& request, const ExecuteRequestSGAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, executeRequestSG(request), context);
};
asyncExecute(new Runnable(fn));
}
SafClient::ExecuteRequestSGOutcomeCallable SafClient::executeRequestSGCallable(const ExecuteRequestSGRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ExecuteRequestSGOutcome()>>(
[this, request]()
{
return this->executeRequestSG(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -19,7 +19,7 @@
using AlibabaCloud::Saf::Model::ExecuteRequestRequest;
ExecuteRequestRequest::ExecuteRequestRequest() :
RpcServiceRequest("saf", "2018-09-19", "ExecuteRequest")
RpcServiceRequest("saf", "2019-05-21", "ExecuteRequest")
{
setMethod(HttpRequest::Method::Post);
}

View File

@@ -39,17 +39,12 @@ void ExecuteRequestResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Tags"].isNull())
data_.tags = dataNode["Tags"].asString();
if(!dataNode["Score"].isNull())
data_.score = dataNode["Score"].asString();
if(!dataNode["Extend"].isNull())
data_.extend = dataNode["Extend"].asString();
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Data"].isNull())
data_ = value["Data"].asString();
}
@@ -58,7 +53,7 @@ std::string ExecuteRequestResult::getMessage()const
return message_;
}
ExecuteRequestResult::Data ExecuteRequestResult::getData()const
std::string ExecuteRequestResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/saf/model/ExecuteRequestSGRequest.h>
using AlibabaCloud::Saf::Model::ExecuteRequestSGRequest;
ExecuteRequestSGRequest::ExecuteRequestSGRequest() :
RpcServiceRequest("saf", "2019-05-21", "ExecuteRequestSG")
{
setMethod(HttpRequest::Method::Post);
}
ExecuteRequestSGRequest::~ExecuteRequestSGRequest()
{}
std::string ExecuteRequestSGRequest::getServiceParameters()const
{
return serviceParameters_;
}
void ExecuteRequestSGRequest::setServiceParameters(const std::string& serviceParameters)
{
serviceParameters_ = serviceParameters;
setParameter("ServiceParameters", serviceParameters);
}
std::string ExecuteRequestSGRequest::getService()const
{
return service_;
}
void ExecuteRequestSGRequest::setService(const std::string& service)
{
service_ = service;
setParameter("Service", service);
}

View File

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

View File

@@ -0,0 +1,98 @@
#
# Copyright 2009-2017 Alibaba Cloud All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
set(videosearch_public_header
include/alibabacloud/videosearch/VideosearchClient.h
include/alibabacloud/videosearch/VideosearchExport.h )
set(videosearch_public_header_model
include/alibabacloud/videosearch/model/AddDeletionVideoTaskRequest.h
include/alibabacloud/videosearch/model/AddDeletionVideoTaskResult.h
include/alibabacloud/videosearch/model/AddSearchVideoTaskRequest.h
include/alibabacloud/videosearch/model/AddSearchVideoTaskResult.h
include/alibabacloud/videosearch/model/AddStorageVideoTaskRequest.h
include/alibabacloud/videosearch/model/AddStorageVideoTaskResult.h
include/alibabacloud/videosearch/model/GetTaskStatusRequest.h
include/alibabacloud/videosearch/model/GetTaskStatusResult.h )
set(videosearch_src
src/VideosearchClient.cc
src/model/AddDeletionVideoTaskRequest.cc
src/model/AddDeletionVideoTaskResult.cc
src/model/AddSearchVideoTaskRequest.cc
src/model/AddSearchVideoTaskResult.cc
src/model/AddStorageVideoTaskRequest.cc
src/model/AddStorageVideoTaskResult.cc
src/model/GetTaskStatusRequest.cc
src/model/GetTaskStatusResult.cc )
add_library(videosearch ${LIB_TYPE}
${videosearch_public_header}
${videosearch_public_header_model}
${videosearch_src})
set_target_properties(videosearch
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}videosearch
)
if(${LIB_TYPE} STREQUAL "SHARED")
set_target_properties(videosearch
PROPERTIES
DEFINE_SYMBOL ALIBABACLOUD_VIDEOSEARCH_LIBRARY)
endif()
target_include_directories(videosearch
PRIVATE include
${CMAKE_SOURCE_DIR}/core/include
)
target_link_libraries(videosearch
core)
if(CMAKE_HOST_WIN32)
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
set(jsoncpp_install_dir ${INSTALL_DIR})
add_dependencies(videosearch
jsoncpp)
target_include_directories(videosearch
PRIVATE ${jsoncpp_install_dir}/include)
target_link_libraries(videosearch
${jsoncpp_install_dir}/lib/jsoncpp.lib)
set_target_properties(videosearch
PROPERTIES
COMPILE_OPTIONS "/bigobj")
else()
target_include_directories(videosearch
PRIVATE /usr/include/jsoncpp)
target_link_libraries(videosearch
jsoncpp)
endif()
install(FILES ${videosearch_public_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/videosearch)
install(FILES ${videosearch_public_header_model}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/videosearch/model)
install(TARGETS videosearch
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View File

@@ -0,0 +1,78 @@
/*
* 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_VIDEOSEARCH_VIDEOSEARCHCLIENT_H_
#define ALIBABACLOUD_VIDEOSEARCH_VIDEOSEARCHCLIENT_H_
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include "VideosearchExport.h"
#include "model/AddDeletionVideoTaskRequest.h"
#include "model/AddDeletionVideoTaskResult.h"
#include "model/AddSearchVideoTaskRequest.h"
#include "model/AddSearchVideoTaskResult.h"
#include "model/AddStorageVideoTaskRequest.h"
#include "model/AddStorageVideoTaskResult.h"
#include "model/GetTaskStatusRequest.h"
#include "model/GetTaskStatusResult.h"
namespace AlibabaCloud
{
namespace Videosearch
{
class ALIBABACLOUD_VIDEOSEARCH_EXPORT VideosearchClient : public RpcServiceClient
{
public:
typedef Outcome<Error, Model::AddDeletionVideoTaskResult> AddDeletionVideoTaskOutcome;
typedef std::future<AddDeletionVideoTaskOutcome> AddDeletionVideoTaskOutcomeCallable;
typedef std::function<void(const VideosearchClient*, const Model::AddDeletionVideoTaskRequest&, const AddDeletionVideoTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddDeletionVideoTaskAsyncHandler;
typedef Outcome<Error, Model::AddSearchVideoTaskResult> AddSearchVideoTaskOutcome;
typedef std::future<AddSearchVideoTaskOutcome> AddSearchVideoTaskOutcomeCallable;
typedef std::function<void(const VideosearchClient*, const Model::AddSearchVideoTaskRequest&, const AddSearchVideoTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddSearchVideoTaskAsyncHandler;
typedef Outcome<Error, Model::AddStorageVideoTaskResult> AddStorageVideoTaskOutcome;
typedef std::future<AddStorageVideoTaskOutcome> AddStorageVideoTaskOutcomeCallable;
typedef std::function<void(const VideosearchClient*, const Model::AddStorageVideoTaskRequest&, const AddStorageVideoTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddStorageVideoTaskAsyncHandler;
typedef Outcome<Error, Model::GetTaskStatusResult> GetTaskStatusOutcome;
typedef std::future<GetTaskStatusOutcome> GetTaskStatusOutcomeCallable;
typedef std::function<void(const VideosearchClient*, const Model::GetTaskStatusRequest&, const GetTaskStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetTaskStatusAsyncHandler;
VideosearchClient(const Credentials &credentials, const ClientConfiguration &configuration);
VideosearchClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
VideosearchClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~VideosearchClient();
AddDeletionVideoTaskOutcome addDeletionVideoTask(const Model::AddDeletionVideoTaskRequest &request)const;
void addDeletionVideoTaskAsync(const Model::AddDeletionVideoTaskRequest& request, const AddDeletionVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AddDeletionVideoTaskOutcomeCallable addDeletionVideoTaskCallable(const Model::AddDeletionVideoTaskRequest& request) const;
AddSearchVideoTaskOutcome addSearchVideoTask(const Model::AddSearchVideoTaskRequest &request)const;
void addSearchVideoTaskAsync(const Model::AddSearchVideoTaskRequest& request, const AddSearchVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AddSearchVideoTaskOutcomeCallable addSearchVideoTaskCallable(const Model::AddSearchVideoTaskRequest& request) const;
AddStorageVideoTaskOutcome addStorageVideoTask(const Model::AddStorageVideoTaskRequest &request)const;
void addStorageVideoTaskAsync(const Model::AddStorageVideoTaskRequest& request, const AddStorageVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AddStorageVideoTaskOutcomeCallable addStorageVideoTaskCallable(const Model::AddStorageVideoTaskRequest& request) const;
GetTaskStatusOutcome getTaskStatus(const Model::GetTaskStatusRequest &request)const;
void getTaskStatusAsync(const Model::GetTaskStatusRequest& request, const GetTaskStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetTaskStatusOutcomeCallable getTaskStatusCallable(const Model::GetTaskStatusRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_VIDEOSEARCH_VIDEOSEARCHCLIENT_H_

View File

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

View File

@@ -0,0 +1,57 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDDELETIONVIDEOTASKREQUEST_H_
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDDELETIONVIDEOTASKREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/videosearch/VideosearchExport.h>
namespace AlibabaCloud
{
namespace Videosearch
{
namespace Model
{
class ALIBABACLOUD_VIDEOSEARCH_EXPORT AddDeletionVideoTaskRequest : public RpcServiceRequest
{
public:
AddDeletionVideoTaskRequest();
~AddDeletionVideoTaskRequest();
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
std::string getVideoId()const;
void setVideoId(const std::string& videoId);
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
private:
std::string clientToken_;
std::string videoId_;
std::string instanceId_;
std::string regionId_;
};
}
}
}
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDDELETIONVIDEOTASKREQUEST_H_

View File

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

View File

@@ -0,0 +1,78 @@
/*
* 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_VIDEOSEARCH_MODEL_ADDSEARCHVIDEOTASKREQUEST_H_
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSEARCHVIDEOTASKREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/videosearch/VideosearchExport.h>
namespace AlibabaCloud
{
namespace Videosearch
{
namespace Model
{
class ALIBABACLOUD_VIDEOSEARCH_EXPORT AddSearchVideoTaskRequest : public RpcServiceRequest
{
public:
AddSearchVideoTaskRequest();
~AddSearchVideoTaskRequest();
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
int getStorageType()const;
void setStorageType(int storageType);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getVideoTags()const;
void setVideoTags(const std::string& videoTags);
int getReturnVideoNumber()const;
void setReturnVideoNumber(int returnVideoNumber);
std::string getVideoId()const;
void setVideoId(const std::string& videoId);
float getReplaceStorageThreshold()const;
void setReplaceStorageThreshold(float replaceStorageThreshold);
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
std::string getVideoUrl()const;
void setVideoUrl(const std::string& videoUrl);
std::string getQueryTags()const;
void setQueryTags(const std::string& queryTags);
std::string getCallbackUrl()const;
void setCallbackUrl(const std::string& callbackUrl);
private:
std::string clientToken_;
int storageType_;
std::string regionId_;
std::string videoTags_;
int returnVideoNumber_;
std::string videoId_;
float replaceStorageThreshold_;
std::string instanceId_;
std::string videoUrl_;
std::string queryTags_;
std::string callbackUrl_;
};
}
}
}
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSEARCHVIDEOTASKREQUEST_H_

View File

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

View File

@@ -0,0 +1,66 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSTORAGEVIDEOTASKREQUEST_H_
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSTORAGEVIDEOTASKREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/videosearch/VideosearchExport.h>
namespace AlibabaCloud
{
namespace Videosearch
{
namespace Model
{
class ALIBABACLOUD_VIDEOSEARCH_EXPORT AddStorageVideoTaskRequest : public RpcServiceRequest
{
public:
AddStorageVideoTaskRequest();
~AddStorageVideoTaskRequest();
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getVideoTags()const;
void setVideoTags(const std::string& videoTags);
std::string getVideoId()const;
void setVideoId(const std::string& videoId);
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
std::string getVideoUrl()const;
void setVideoUrl(const std::string& videoUrl);
std::string getCallbackUrl()const;
void setCallbackUrl(const std::string& callbackUrl);
private:
std::string clientToken_;
std::string regionId_;
std::string videoTags_;
std::string videoId_;
std::string instanceId_;
std::string videoUrl_;
std::string callbackUrl_;
};
}
}
}
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_ADDSTORAGEVIDEOTASKREQUEST_H_

View File

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

View File

@@ -0,0 +1,57 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_VIDEOSEARCH_MODEL_GETTASKSTATUSREQUEST_H_
#define ALIBABACLOUD_VIDEOSEARCH_MODEL_GETTASKSTATUSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/videosearch/VideosearchExport.h>
namespace AlibabaCloud
{
namespace Videosearch
{
namespace Model
{
class ALIBABACLOUD_VIDEOSEARCH_EXPORT GetTaskStatusRequest : public RpcServiceRequest
{
public:
GetTaskStatusRequest();
~GetTaskStatusRequest();
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
std::string getInstanceId()const;
void setInstanceId(const std::string& instanceId);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getTaskId()const;
void setTaskId(const std::string& taskId);
private:
std::string clientToken_;
std::string instanceId_;
std::string regionId_;
std::string taskId_;
};
}
}
}
#endif // !ALIBABACLOUD_VIDEOSEARCH_MODEL_GETTASKSTATUSREQUEST_H_

View File

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

View File

@@ -0,0 +1,197 @@
/*
* 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/videosearch/VideosearchClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::Videosearch;
using namespace AlibabaCloud::Videosearch::Model;
namespace
{
const std::string SERVICE_NAME = "videosearch";
}
VideosearchClient::VideosearchClient(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, "");
}
VideosearchClient::VideosearchClient(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, "");
}
VideosearchClient::VideosearchClient(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, "");
}
VideosearchClient::~VideosearchClient()
{}
VideosearchClient::AddDeletionVideoTaskOutcome VideosearchClient::addDeletionVideoTask(const AddDeletionVideoTaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AddDeletionVideoTaskOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AddDeletionVideoTaskOutcome(AddDeletionVideoTaskResult(outcome.result()));
else
return AddDeletionVideoTaskOutcome(outcome.error());
}
void VideosearchClient::addDeletionVideoTaskAsync(const AddDeletionVideoTaskRequest& request, const AddDeletionVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, addDeletionVideoTask(request), context);
};
asyncExecute(new Runnable(fn));
}
VideosearchClient::AddDeletionVideoTaskOutcomeCallable VideosearchClient::addDeletionVideoTaskCallable(const AddDeletionVideoTaskRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AddDeletionVideoTaskOutcome()>>(
[this, request]()
{
return this->addDeletionVideoTask(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VideosearchClient::AddSearchVideoTaskOutcome VideosearchClient::addSearchVideoTask(const AddSearchVideoTaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AddSearchVideoTaskOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AddSearchVideoTaskOutcome(AddSearchVideoTaskResult(outcome.result()));
else
return AddSearchVideoTaskOutcome(outcome.error());
}
void VideosearchClient::addSearchVideoTaskAsync(const AddSearchVideoTaskRequest& request, const AddSearchVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, addSearchVideoTask(request), context);
};
asyncExecute(new Runnable(fn));
}
VideosearchClient::AddSearchVideoTaskOutcomeCallable VideosearchClient::addSearchVideoTaskCallable(const AddSearchVideoTaskRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AddSearchVideoTaskOutcome()>>(
[this, request]()
{
return this->addSearchVideoTask(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VideosearchClient::AddStorageVideoTaskOutcome VideosearchClient::addStorageVideoTask(const AddStorageVideoTaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AddStorageVideoTaskOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AddStorageVideoTaskOutcome(AddStorageVideoTaskResult(outcome.result()));
else
return AddStorageVideoTaskOutcome(outcome.error());
}
void VideosearchClient::addStorageVideoTaskAsync(const AddStorageVideoTaskRequest& request, const AddStorageVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, addStorageVideoTask(request), context);
};
asyncExecute(new Runnable(fn));
}
VideosearchClient::AddStorageVideoTaskOutcomeCallable VideosearchClient::addStorageVideoTaskCallable(const AddStorageVideoTaskRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AddStorageVideoTaskOutcome()>>(
[this, request]()
{
return this->addStorageVideoTask(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VideosearchClient::GetTaskStatusOutcome VideosearchClient::getTaskStatus(const GetTaskStatusRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetTaskStatusOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetTaskStatusOutcome(GetTaskStatusResult(outcome.result()));
else
return GetTaskStatusOutcome(outcome.error());
}
void VideosearchClient::getTaskStatusAsync(const GetTaskStatusRequest& request, const GetTaskStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getTaskStatus(request), context);
};
asyncExecute(new Runnable(fn));
}
VideosearchClient::GetTaskStatusOutcomeCallable VideosearchClient::getTaskStatusCallable(const GetTaskStatusRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetTaskStatusOutcome()>>(
[this, request]()
{
return this->getTaskStatus(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,73 @@
/*
* 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/videosearch/model/AddDeletionVideoTaskRequest.h>
using AlibabaCloud::Videosearch::Model::AddDeletionVideoTaskRequest;
AddDeletionVideoTaskRequest::AddDeletionVideoTaskRequest() :
RpcServiceRequest("videosearch", "2020-02-25", "AddDeletionVideoTask")
{
setMethod(HttpRequest::Method::Post);
}
AddDeletionVideoTaskRequest::~AddDeletionVideoTaskRequest()
{}
std::string AddDeletionVideoTaskRequest::getClientToken()const
{
return clientToken_;
}
void AddDeletionVideoTaskRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string AddDeletionVideoTaskRequest::getVideoId()const
{
return videoId_;
}
void AddDeletionVideoTaskRequest::setVideoId(const std::string& videoId)
{
videoId_ = videoId;
setBodyParameter("VideoId", videoId);
}
std::string AddDeletionVideoTaskRequest::getInstanceId()const
{
return instanceId_;
}
void AddDeletionVideoTaskRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setBodyParameter("InstanceId", instanceId);
}
std::string AddDeletionVideoTaskRequest::getRegionId()const
{
return regionId_;
}
void AddDeletionVideoTaskRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}

View File

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

View File

@@ -0,0 +1,150 @@
/*
* 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/videosearch/model/AddSearchVideoTaskRequest.h>
using AlibabaCloud::Videosearch::Model::AddSearchVideoTaskRequest;
AddSearchVideoTaskRequest::AddSearchVideoTaskRequest() :
RpcServiceRequest("videosearch", "2020-02-25", "AddSearchVideoTask")
{
setMethod(HttpRequest::Method::Post);
}
AddSearchVideoTaskRequest::~AddSearchVideoTaskRequest()
{}
std::string AddSearchVideoTaskRequest::getClientToken()const
{
return clientToken_;
}
void AddSearchVideoTaskRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
int AddSearchVideoTaskRequest::getStorageType()const
{
return storageType_;
}
void AddSearchVideoTaskRequest::setStorageType(int storageType)
{
storageType_ = storageType;
setBodyParameter("StorageType", std::to_string(storageType));
}
std::string AddSearchVideoTaskRequest::getRegionId()const
{
return regionId_;
}
void AddSearchVideoTaskRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string AddSearchVideoTaskRequest::getVideoTags()const
{
return videoTags_;
}
void AddSearchVideoTaskRequest::setVideoTags(const std::string& videoTags)
{
videoTags_ = videoTags;
setBodyParameter("VideoTags", videoTags);
}
int AddSearchVideoTaskRequest::getReturnVideoNumber()const
{
return returnVideoNumber_;
}
void AddSearchVideoTaskRequest::setReturnVideoNumber(int returnVideoNumber)
{
returnVideoNumber_ = returnVideoNumber;
setBodyParameter("ReturnVideoNumber", std::to_string(returnVideoNumber));
}
std::string AddSearchVideoTaskRequest::getVideoId()const
{
return videoId_;
}
void AddSearchVideoTaskRequest::setVideoId(const std::string& videoId)
{
videoId_ = videoId;
setBodyParameter("VideoId", videoId);
}
float AddSearchVideoTaskRequest::getReplaceStorageThreshold()const
{
return replaceStorageThreshold_;
}
void AddSearchVideoTaskRequest::setReplaceStorageThreshold(float replaceStorageThreshold)
{
replaceStorageThreshold_ = replaceStorageThreshold;
setBodyParameter("ReplaceStorageThreshold", std::to_string(replaceStorageThreshold));
}
std::string AddSearchVideoTaskRequest::getInstanceId()const
{
return instanceId_;
}
void AddSearchVideoTaskRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setBodyParameter("InstanceId", instanceId);
}
std::string AddSearchVideoTaskRequest::getVideoUrl()const
{
return videoUrl_;
}
void AddSearchVideoTaskRequest::setVideoUrl(const std::string& videoUrl)
{
videoUrl_ = videoUrl;
setBodyParameter("VideoUrl", videoUrl);
}
std::string AddSearchVideoTaskRequest::getQueryTags()const
{
return queryTags_;
}
void AddSearchVideoTaskRequest::setQueryTags(const std::string& queryTags)
{
queryTags_ = queryTags;
setBodyParameter("QueryTags", queryTags);
}
std::string AddSearchVideoTaskRequest::getCallbackUrl()const
{
return callbackUrl_;
}
void AddSearchVideoTaskRequest::setCallbackUrl(const std::string& callbackUrl)
{
callbackUrl_ = callbackUrl;
setBodyParameter("CallbackUrl", callbackUrl);
}

View File

@@ -0,0 +1,52 @@
/*
* 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/videosearch/model/AddSearchVideoTaskResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Videosearch;
using namespace AlibabaCloud::Videosearch::Model;
AddSearchVideoTaskResult::AddSearchVideoTaskResult() :
ServiceResult()
{}
AddSearchVideoTaskResult::AddSearchVideoTaskResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AddSearchVideoTaskResult::~AddSearchVideoTaskResult()
{}
void AddSearchVideoTaskResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["TaskId"].isNull())
data_.taskId = dataNode["TaskId"].asString();
}
AddSearchVideoTaskResult::Data AddSearchVideoTaskResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,106 @@
/*
* 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/videosearch/model/AddStorageVideoTaskRequest.h>
using AlibabaCloud::Videosearch::Model::AddStorageVideoTaskRequest;
AddStorageVideoTaskRequest::AddStorageVideoTaskRequest() :
RpcServiceRequest("videosearch", "2020-02-25", "AddStorageVideoTask")
{
setMethod(HttpRequest::Method::Post);
}
AddStorageVideoTaskRequest::~AddStorageVideoTaskRequest()
{}
std::string AddStorageVideoTaskRequest::getClientToken()const
{
return clientToken_;
}
void AddStorageVideoTaskRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string AddStorageVideoTaskRequest::getRegionId()const
{
return regionId_;
}
void AddStorageVideoTaskRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string AddStorageVideoTaskRequest::getVideoTags()const
{
return videoTags_;
}
void AddStorageVideoTaskRequest::setVideoTags(const std::string& videoTags)
{
videoTags_ = videoTags;
setBodyParameter("VideoTags", videoTags);
}
std::string AddStorageVideoTaskRequest::getVideoId()const
{
return videoId_;
}
void AddStorageVideoTaskRequest::setVideoId(const std::string& videoId)
{
videoId_ = videoId;
setBodyParameter("VideoId", videoId);
}
std::string AddStorageVideoTaskRequest::getInstanceId()const
{
return instanceId_;
}
void AddStorageVideoTaskRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setBodyParameter("InstanceId", instanceId);
}
std::string AddStorageVideoTaskRequest::getVideoUrl()const
{
return videoUrl_;
}
void AddStorageVideoTaskRequest::setVideoUrl(const std::string& videoUrl)
{
videoUrl_ = videoUrl;
setBodyParameter("VideoUrl", videoUrl);
}
std::string AddStorageVideoTaskRequest::getCallbackUrl()const
{
return callbackUrl_;
}
void AddStorageVideoTaskRequest::setCallbackUrl(const std::string& callbackUrl)
{
callbackUrl_ = callbackUrl;
setBodyParameter("CallbackUrl", callbackUrl);
}

View File

@@ -0,0 +1,52 @@
/*
* 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/videosearch/model/AddStorageVideoTaskResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Videosearch;
using namespace AlibabaCloud::Videosearch::Model;
AddStorageVideoTaskResult::AddStorageVideoTaskResult() :
ServiceResult()
{}
AddStorageVideoTaskResult::AddStorageVideoTaskResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AddStorageVideoTaskResult::~AddStorageVideoTaskResult()
{}
void AddStorageVideoTaskResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["TaskId"].isNull())
data_.taskId = dataNode["TaskId"].asString();
}
AddStorageVideoTaskResult::Data AddStorageVideoTaskResult::getData()const
{
return data_;
}

View File

@@ -0,0 +1,73 @@
/*
* 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/videosearch/model/GetTaskStatusRequest.h>
using AlibabaCloud::Videosearch::Model::GetTaskStatusRequest;
GetTaskStatusRequest::GetTaskStatusRequest() :
RpcServiceRequest("videosearch", "2020-02-25", "GetTaskStatus")
{
setMethod(HttpRequest::Method::Post);
}
GetTaskStatusRequest::~GetTaskStatusRequest()
{}
std::string GetTaskStatusRequest::getClientToken()const
{
return clientToken_;
}
void GetTaskStatusRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string GetTaskStatusRequest::getInstanceId()const
{
return instanceId_;
}
void GetTaskStatusRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setBodyParameter("InstanceId", instanceId);
}
std::string GetTaskStatusRequest::getRegionId()const
{
return regionId_;
}
void GetTaskStatusRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string GetTaskStatusRequest::getTaskId()const
{
return taskId_;
}
void GetTaskStatusRequest::setTaskId(const std::string& taskId)
{
taskId_ = taskId;
setBodyParameter("TaskId", taskId);
}

View File

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