Add DescribeInstances API.
This commit is contained in:
@@ -339,6 +339,42 @@ R_kvstoreClient::CreateInstanceOutcomeCallable R_kvstoreClient::createInstanceCa
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
R_kvstoreClient::CreateInstancesOutcome R_kvstoreClient::createInstances(const CreateInstancesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateInstancesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateInstancesOutcome(CreateInstancesResult(outcome.result()));
|
||||
else
|
||||
return CreateInstancesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void R_kvstoreClient::createInstancesAsync(const CreateInstancesRequest& request, const CreateInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createInstances(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
R_kvstoreClient::CreateInstancesOutcomeCallable R_kvstoreClient::createInstancesCallable(const CreateInstancesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateInstancesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createInstances(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
R_kvstoreClient::CreateTairInstanceOutcome R_kvstoreClient::createTairInstance(const CreateTairInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -3327,6 +3363,42 @@ R_kvstoreClient::TagResourcesOutcomeCallable R_kvstoreClient::tagResourcesCallab
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
R_kvstoreClient::TransformInstanceChargeTypeOutcome R_kvstoreClient::transformInstanceChargeType(const TransformInstanceChargeTypeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return TransformInstanceChargeTypeOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return TransformInstanceChargeTypeOutcome(TransformInstanceChargeTypeResult(outcome.result()));
|
||||
else
|
||||
return TransformInstanceChargeTypeOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void R_kvstoreClient::transformInstanceChargeTypeAsync(const TransformInstanceChargeTypeRequest& request, const TransformInstanceChargeTypeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, transformInstanceChargeType(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
R_kvstoreClient::TransformInstanceChargeTypeOutcomeCallable R_kvstoreClient::transformInstanceChargeTypeCallable(const TransformInstanceChargeTypeRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<TransformInstanceChargeTypeOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->transformInstanceChargeType(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
R_kvstoreClient::TransformToPrePaidOutcome R_kvstoreClient::transformToPrePaid(const TransformToPrePaidRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
216
r-kvstore/src/model/CreateInstancesRequest.cc
Normal file
216
r-kvstore/src/model/CreateInstancesRequest.cc
Normal file
@@ -0,0 +1,216 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/r-kvstore/model/CreateInstancesRequest.h>
|
||||
|
||||
using AlibabaCloud::R_kvstore::Model::CreateInstancesRequest;
|
||||
|
||||
CreateInstancesRequest::CreateInstancesRequest() :
|
||||
RpcServiceRequest("r-kvstore", "2015-01-01", "CreateInstances")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateInstancesRequest::~CreateInstancesRequest()
|
||||
{}
|
||||
|
||||
long CreateInstancesRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void CreateInstancesRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string CreateInstancesRequest::getInstances()const
|
||||
{
|
||||
return instances_;
|
||||
}
|
||||
|
||||
void CreateInstancesRequest::setInstances(const std::string& instances)
|
||||
{
|
||||
instances_ = instances;
|
||||
setParameter("Instances", instances);
|
||||
}
|
||||
|
||||
std::string CreateInstancesRequest::getCouponNo()const
|
||||
{
|
||||
return couponNo_;
|
||||
}
|
||||
|
||||
void CreateInstancesRequest::setCouponNo(const std::string& couponNo)
|
||||
{
|
||||
couponNo_ = couponNo;
|
||||
setParameter("CouponNo", couponNo);
|
||||
}
|
||||
|
||||
std::string CreateInstancesRequest::getEngineVersion()const
|
||||
{
|
||||
return engineVersion_;
|
||||
}
|
||||
|
||||
void CreateInstancesRequest::setEngineVersion(const std::string& engineVersion)
|
||||
{
|
||||
engineVersion_ = engineVersion;
|
||||
setParameter("EngineVersion", engineVersion);
|
||||
}
|
||||
|
||||
std::string CreateInstancesRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void CreateInstancesRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string CreateInstancesRequest::getSecurityToken()const
|
||||
{
|
||||
return securityToken_;
|
||||
}
|
||||
|
||||
void CreateInstancesRequest::setSecurityToken(const std::string& securityToken)
|
||||
{
|
||||
securityToken_ = securityToken;
|
||||
setParameter("SecurityToken", securityToken);
|
||||
}
|
||||
|
||||
bool CreateInstancesRequest::getRebuildInstance()const
|
||||
{
|
||||
return rebuildInstance_;
|
||||
}
|
||||
|
||||
void CreateInstancesRequest::setRebuildInstance(bool rebuildInstance)
|
||||
{
|
||||
rebuildInstance_ = rebuildInstance;
|
||||
setParameter("RebuildInstance", rebuildInstance ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateInstancesRequest::getBusinessInfo()const
|
||||
{
|
||||
return businessInfo_;
|
||||
}
|
||||
|
||||
void CreateInstancesRequest::setBusinessInfo(const std::string& businessInfo)
|
||||
{
|
||||
businessInfo_ = businessInfo;
|
||||
setParameter("BusinessInfo", businessInfo);
|
||||
}
|
||||
|
||||
std::string CreateInstancesRequest::getAgentId()const
|
||||
{
|
||||
return agentId_;
|
||||
}
|
||||
|
||||
void CreateInstancesRequest::setAgentId(const std::string& agentId)
|
||||
{
|
||||
agentId_ = agentId;
|
||||
setParameter("AgentId", agentId);
|
||||
}
|
||||
|
||||
std::string CreateInstancesRequest::getRestoreTime()const
|
||||
{
|
||||
return restoreTime_;
|
||||
}
|
||||
|
||||
void CreateInstancesRequest::setRestoreTime(const std::string& restoreTime)
|
||||
{
|
||||
restoreTime_ = restoreTime;
|
||||
setParameter("RestoreTime", restoreTime);
|
||||
}
|
||||
|
||||
bool CreateInstancesRequest::getAutoPay()const
|
||||
{
|
||||
return autoPay_;
|
||||
}
|
||||
|
||||
void CreateInstancesRequest::setAutoPay(bool autoPay)
|
||||
{
|
||||
autoPay_ = autoPay;
|
||||
setParameter("AutoPay", autoPay ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateInstancesRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void CreateInstancesRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string CreateInstancesRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void CreateInstancesRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
long CreateInstancesRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void CreateInstancesRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string CreateInstancesRequest::getToken()const
|
||||
{
|
||||
return token_;
|
||||
}
|
||||
|
||||
void CreateInstancesRequest::setToken(const std::string& token)
|
||||
{
|
||||
token_ = token;
|
||||
setParameter("Token", token);
|
||||
}
|
||||
|
||||
std::string CreateInstancesRequest::getPrivateIpAddress()const
|
||||
{
|
||||
return privateIpAddress_;
|
||||
}
|
||||
|
||||
void CreateInstancesRequest::setPrivateIpAddress(const std::string& privateIpAddress)
|
||||
{
|
||||
privateIpAddress_ = privateIpAddress;
|
||||
setParameter("PrivateIpAddress", privateIpAddress);
|
||||
}
|
||||
|
||||
std::string CreateInstancesRequest::getAutoRenew()const
|
||||
{
|
||||
return autoRenew_;
|
||||
}
|
||||
|
||||
void CreateInstancesRequest::setAutoRenew(const std::string& autoRenew)
|
||||
{
|
||||
autoRenew_ = autoRenew;
|
||||
setParameter("AutoRenew", autoRenew);
|
||||
}
|
||||
|
||||
59
r-kvstore/src/model/CreateInstancesResult.cc
Normal file
59
r-kvstore/src/model/CreateInstancesResult.cc
Normal 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/r-kvstore/model/CreateInstancesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::R_kvstore;
|
||||
using namespace AlibabaCloud::R_kvstore::Model;
|
||||
|
||||
CreateInstancesResult::CreateInstancesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateInstancesResult::CreateInstancesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateInstancesResult::~CreateInstancesResult()
|
||||
{}
|
||||
|
||||
void CreateInstancesResult::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["OrderId"].isNull())
|
||||
orderId_ = value["OrderId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::string> CreateInstancesResult::getInstanceIds()const
|
||||
{
|
||||
return instanceIds_;
|
||||
}
|
||||
|
||||
std::string CreateInstancesResult::getOrderId()const
|
||||
{
|
||||
return orderId_;
|
||||
}
|
||||
|
||||
@@ -59,6 +59,8 @@ void DescribeAuditRecordsResult::parse(const std::string &payload)
|
||||
itemsObject.executeTime = valueItemsSQL["ExecuteTime"].asString();
|
||||
if(!valueItemsSQL["AccountName"].isNull())
|
||||
itemsObject.accountName = valueItemsSQL["AccountName"].asString();
|
||||
if(!valueItemsSQL["NodeId"].isNull())
|
||||
itemsObject.nodeId = valueItemsSQL["NodeId"].asString();
|
||||
items_.push_back(itemsObject);
|
||||
}
|
||||
if(!value["PageNumber"].isNull())
|
||||
|
||||
@@ -129,6 +129,10 @@ void DescribeInstanceAttributeResult::parse(const std::string &payload)
|
||||
instancesObject.storageType = valueInstancesDBInstanceAttribute["StorageType"].asString();
|
||||
if(!valueInstancesDBInstanceAttribute["GlobalInstanceId"].isNull())
|
||||
instancesObject.globalInstanceId = valueInstancesDBInstanceAttribute["GlobalInstanceId"].asString();
|
||||
if(!valueInstancesDBInstanceAttribute["SecondaryZoneId"].isNull())
|
||||
instancesObject.secondaryZoneId = valueInstancesDBInstanceAttribute["SecondaryZoneId"].asString();
|
||||
if(!valueInstancesDBInstanceAttribute["ZoneType"].isNull())
|
||||
instancesObject.zoneType = valueInstancesDBInstanceAttribute["ZoneType"].asString();
|
||||
auto allTagsNode = valueInstancesDBInstanceAttribute["Tags"]["Tag"];
|
||||
for (auto valueInstancesDBInstanceAttributeTagsTag : allTagsNode)
|
||||
{
|
||||
|
||||
@@ -148,6 +148,17 @@ void DescribePriceRequest::setPeriod(long period)
|
||||
setParameter("Period", std::to_string(period));
|
||||
}
|
||||
|
||||
std::string DescribePriceRequest::getProduct()const
|
||||
{
|
||||
return product_;
|
||||
}
|
||||
|
||||
void DescribePriceRequest::setProduct(const std::string& product)
|
||||
{
|
||||
product_ = product;
|
||||
setParameter("Product", product);
|
||||
}
|
||||
|
||||
long DescribePriceRequest::getQuantity()const
|
||||
{
|
||||
return quantity_;
|
||||
@@ -236,6 +247,17 @@ void DescribePriceRequest::setChargeType(const std::string& chargeType)
|
||||
setParameter("ChargeType", chargeType);
|
||||
}
|
||||
|
||||
std::string DescribePriceRequest::getCategory()const
|
||||
{
|
||||
return category_;
|
||||
}
|
||||
|
||||
void DescribePriceRequest::setCategory(const std::string& category)
|
||||
{
|
||||
category_ = category;
|
||||
setParameter("Category", category);
|
||||
}
|
||||
|
||||
bool DescribePriceRequest::getForceUpgrade()const
|
||||
{
|
||||
return forceUpgrade_;
|
||||
|
||||
@@ -77,6 +77,8 @@ void DescribePriceResult::parse(const std::string &payload)
|
||||
order_.discountAmount = orderNode["DiscountAmount"].asString();
|
||||
if(!orderNode["Currency"].isNull())
|
||||
order_.currency = orderNode["Currency"].asString();
|
||||
if(!orderNode["HandlingFeeAmount"].isNull())
|
||||
order_.handlingFeeAmount = orderNode["HandlingFeeAmount"].asString();
|
||||
auto allCouponsNode = orderNode["Coupons"]["Coupon"];
|
||||
for (auto orderNodeCouponsCoupon : allCouponsNode)
|
||||
{
|
||||
|
||||
@@ -57,6 +57,8 @@ void DescribeRunningLogRecordsResult::parse(const std::string &payload)
|
||||
itemsObject.content = valueItemsLogRecords["Content"].asString();
|
||||
if(!valueItemsLogRecords["InstanceId"].isNull())
|
||||
itemsObject.instanceId = valueItemsLogRecords["InstanceId"].asString();
|
||||
if(!valueItemsLogRecords["NodeId"].isNull())
|
||||
itemsObject.nodeId = valueItemsLogRecords["NodeId"].asString();
|
||||
items_.push_back(itemsObject);
|
||||
}
|
||||
if(!value["InstanceId"].isNull())
|
||||
|
||||
@@ -38,6 +38,17 @@ void MigrateToOtherZoneRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string MigrateToOtherZoneRequest::getSecondaryZoneId()const
|
||||
{
|
||||
return secondaryZoneId_;
|
||||
}
|
||||
|
||||
void MigrateToOtherZoneRequest::setSecondaryZoneId(const std::string& secondaryZoneId)
|
||||
{
|
||||
secondaryZoneId_ = secondaryZoneId;
|
||||
setParameter("SecondaryZoneId", secondaryZoneId);
|
||||
}
|
||||
|
||||
std::string MigrateToOtherZoneRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
|
||||
@@ -60,6 +60,17 @@ void ModifyInstanceConfigRequest::setSecurityToken(const std::string& securityTo
|
||||
setParameter("SecurityToken", securityToken);
|
||||
}
|
||||
|
||||
std::string ModifyInstanceConfigRequest::getProduct()const
|
||||
{
|
||||
return product_;
|
||||
}
|
||||
|
||||
void ModifyInstanceConfigRequest::setProduct(const std::string& product)
|
||||
{
|
||||
product_ = product;
|
||||
setParameter("Product", product);
|
||||
}
|
||||
|
||||
std::string ModifyInstanceConfigRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
@@ -104,6 +115,17 @@ void ModifyInstanceConfigRequest::setInstanceId(const std::string& instanceId)
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ModifyInstanceConfigRequest::getCategory()const
|
||||
{
|
||||
return category_;
|
||||
}
|
||||
|
||||
void ModifyInstanceConfigRequest::setCategory(const std::string& category)
|
||||
{
|
||||
category_ = category;
|
||||
setParameter("Category", category);
|
||||
}
|
||||
|
||||
std::string ModifyInstanceConfigRequest::getConfig()const
|
||||
{
|
||||
return config_;
|
||||
|
||||
150
r-kvstore/src/model/TransformInstanceChargeTypeRequest.cc
Normal file
150
r-kvstore/src/model/TransformInstanceChargeTypeRequest.cc
Normal 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/r-kvstore/model/TransformInstanceChargeTypeRequest.h>
|
||||
|
||||
using AlibabaCloud::R_kvstore::Model::TransformInstanceChargeTypeRequest;
|
||||
|
||||
TransformInstanceChargeTypeRequest::TransformInstanceChargeTypeRequest() :
|
||||
RpcServiceRequest("r-kvstore", "2015-01-01", "TransformInstanceChargeType")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
TransformInstanceChargeTypeRequest::~TransformInstanceChargeTypeRequest()
|
||||
{}
|
||||
|
||||
long TransformInstanceChargeTypeRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void TransformInstanceChargeTypeRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string TransformInstanceChargeTypeRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void TransformInstanceChargeTypeRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string TransformInstanceChargeTypeRequest::getSecurityToken()const
|
||||
{
|
||||
return securityToken_;
|
||||
}
|
||||
|
||||
void TransformInstanceChargeTypeRequest::setSecurityToken(const std::string& securityToken)
|
||||
{
|
||||
securityToken_ = securityToken;
|
||||
setParameter("SecurityToken", securityToken);
|
||||
}
|
||||
|
||||
long TransformInstanceChargeTypeRequest::getPeriod()const
|
||||
{
|
||||
return period_;
|
||||
}
|
||||
|
||||
void TransformInstanceChargeTypeRequest::setPeriod(long period)
|
||||
{
|
||||
period_ = period;
|
||||
setParameter("Period", std::to_string(period));
|
||||
}
|
||||
|
||||
bool TransformInstanceChargeTypeRequest::getAutoPay()const
|
||||
{
|
||||
return autoPay_;
|
||||
}
|
||||
|
||||
void TransformInstanceChargeTypeRequest::setAutoPay(bool autoPay)
|
||||
{
|
||||
autoPay_ = autoPay;
|
||||
setParameter("AutoPay", autoPay ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string TransformInstanceChargeTypeRequest::getFromApp()const
|
||||
{
|
||||
return fromApp_;
|
||||
}
|
||||
|
||||
void TransformInstanceChargeTypeRequest::setFromApp(const std::string& fromApp)
|
||||
{
|
||||
fromApp_ = fromApp;
|
||||
setParameter("FromApp", fromApp);
|
||||
}
|
||||
|
||||
std::string TransformInstanceChargeTypeRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void TransformInstanceChargeTypeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string TransformInstanceChargeTypeRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void TransformInstanceChargeTypeRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
long TransformInstanceChargeTypeRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void TransformInstanceChargeTypeRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string TransformInstanceChargeTypeRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void TransformInstanceChargeTypeRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string TransformInstanceChargeTypeRequest::getChargeType()const
|
||||
{
|
||||
return chargeType_;
|
||||
}
|
||||
|
||||
void TransformInstanceChargeTypeRequest::setChargeType(const std::string& chargeType)
|
||||
{
|
||||
chargeType_ = chargeType;
|
||||
setParameter("ChargeType", chargeType);
|
||||
}
|
||||
|
||||
58
r-kvstore/src/model/TransformInstanceChargeTypeResult.cc
Normal file
58
r-kvstore/src/model/TransformInstanceChargeTypeResult.cc
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/r-kvstore/model/TransformInstanceChargeTypeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::R_kvstore;
|
||||
using namespace AlibabaCloud::R_kvstore::Model;
|
||||
|
||||
TransformInstanceChargeTypeResult::TransformInstanceChargeTypeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
TransformInstanceChargeTypeResult::TransformInstanceChargeTypeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
TransformInstanceChargeTypeResult::~TransformInstanceChargeTypeResult()
|
||||
{}
|
||||
|
||||
void TransformInstanceChargeTypeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["OrderId"].isNull())
|
||||
orderId_ = value["OrderId"].asString();
|
||||
if(!value["EndTime"].isNull())
|
||||
endTime_ = value["EndTime"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string TransformInstanceChargeTypeResult::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
std::string TransformInstanceChargeTypeResult::getOrderId()const
|
||||
{
|
||||
return orderId_;
|
||||
}
|
||||
|
||||
@@ -137,3 +137,14 @@ void TransformToPrePaidRequest::setInstanceId(const std::string& instanceId)
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string TransformToPrePaidRequest::getChargeType()const
|
||||
{
|
||||
return chargeType_;
|
||||
}
|
||||
|
||||
void TransformToPrePaidRequest::setChargeType(const std::string& chargeType)
|
||||
{
|
||||
chargeType_ = chargeType;
|
||||
setParameter("ChargeType", chargeType);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user