Add DescribePrice API.
This commit is contained in:
@@ -96,6 +96,8 @@
|
||||
#include "model/DescribeParameterTemplatesResult.h"
|
||||
#include "model/DescribeParametersRequest.h"
|
||||
#include "model/DescribeParametersResult.h"
|
||||
#include "model/DescribePriceRequest.h"
|
||||
#include "model/DescribePriceResult.h"
|
||||
#include "model/DescribeRegionsRequest.h"
|
||||
#include "model/DescribeRegionsResult.h"
|
||||
#include "model/DescribeRenewalPriceRequest.h"
|
||||
@@ -308,6 +310,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DescribeParametersResult> DescribeParametersOutcome;
|
||||
typedef std::future<DescribeParametersOutcome> DescribeParametersOutcomeCallable;
|
||||
typedef std::function<void(const DdsClient*, const Model::DescribeParametersRequest&, const DescribeParametersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeParametersAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribePriceResult> DescribePriceOutcome;
|
||||
typedef std::future<DescribePriceOutcome> DescribePriceOutcomeCallable;
|
||||
typedef std::function<void(const DdsClient*, const Model::DescribePriceRequest&, const DescribePriceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribePriceAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeRegionsResult> DescribeRegionsOutcome;
|
||||
typedef std::future<DescribeRegionsOutcome> DescribeRegionsOutcomeCallable;
|
||||
typedef std::function<void(const DdsClient*, const Model::DescribeRegionsRequest&, const DescribeRegionsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRegionsAsyncHandler;
|
||||
@@ -562,6 +567,9 @@ namespace AlibabaCloud
|
||||
DescribeParametersOutcome describeParameters(const Model::DescribeParametersRequest &request)const;
|
||||
void describeParametersAsync(const Model::DescribeParametersRequest& request, const DescribeParametersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeParametersOutcomeCallable describeParametersCallable(const Model::DescribeParametersRequest& request) const;
|
||||
DescribePriceOutcome describePrice(const Model::DescribePriceRequest &request)const;
|
||||
void describePriceAsync(const Model::DescribePriceRequest& request, const DescribePriceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribePriceOutcomeCallable describePriceCallable(const Model::DescribePriceRequest& 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;
|
||||
|
||||
@@ -115,6 +115,7 @@ namespace AlibabaCloud
|
||||
int maxIOPS;
|
||||
std::string chargeType;
|
||||
std::string currentKernelVersion;
|
||||
std::string protocolType;
|
||||
std::string vpcAuthMode;
|
||||
std::string creationTime;
|
||||
std::vector<DBInstance::ConfigserverAttribute> configserverList;
|
||||
|
||||
84
dds/include/alibabacloud/dds/model/DescribePriceRequest.h
Normal file
84
dds/include/alibabacloud/dds/model/DescribePriceRequest.h
Normal 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_DDS_MODEL_DESCRIBEPRICEREQUEST_H_
|
||||
#define ALIBABACLOUD_DDS_MODEL_DESCRIBEPRICEREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/dds/DdsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Dds
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DDS_EXPORT DescribePriceRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
DescribePriceRequest();
|
||||
~DescribePriceRequest();
|
||||
|
||||
long getResourceOwnerId()const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getProductCode()const;
|
||||
void setProductCode(const std::string& productCode);
|
||||
std::string getCouponNo()const;
|
||||
void setCouponNo(const std::string& couponNo);
|
||||
std::string getAccessKeyId()const;
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
std::string getSecurityToken()const;
|
||||
void setSecurityToken(const std::string& securityToken);
|
||||
std::string getBusinessInfo()const;
|
||||
void setBusinessInfo(const std::string& businessInfo);
|
||||
std::string getResourceOwnerAccount()const;
|
||||
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
|
||||
std::string getOwnerAccount()const;
|
||||
void setOwnerAccount(const std::string& ownerAccount);
|
||||
std::string getOrderParamOut()const;
|
||||
void setOrderParamOut(const std::string& orderParamOut);
|
||||
std::string getCommodityCode()const;
|
||||
void setCommodityCode(const std::string& commodityCode);
|
||||
long getOwnerId()const;
|
||||
void setOwnerId(long ownerId);
|
||||
std::string getDBInstances()const;
|
||||
void setDBInstances(const std::string& dBInstances);
|
||||
std::string getOrderType()const;
|
||||
void setOrderType(const std::string& orderType);
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string productCode_;
|
||||
std::string couponNo_;
|
||||
std::string accessKeyId_;
|
||||
std::string securityToken_;
|
||||
std::string businessInfo_;
|
||||
std::string resourceOwnerAccount_;
|
||||
std::string ownerAccount_;
|
||||
std::string orderParamOut_;
|
||||
std::string commodityCode_;
|
||||
long ownerId_;
|
||||
std::string dBInstances_;
|
||||
std::string orderType_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DDS_MODEL_DESCRIBEPRICEREQUEST_H_
|
||||
89
dds/include/alibabacloud/dds/model/DescribePriceResult.h
Normal file
89
dds/include/alibabacloud/dds/model/DescribePriceResult.h
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DDS_MODEL_DESCRIBEPRICERESULT_H_
|
||||
#define ALIBABACLOUD_DDS_MODEL_DESCRIBEPRICERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/dds/DdsExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Dds
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DDS_EXPORT DescribePriceResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Order
|
||||
{
|
||||
struct Coupon
|
||||
{
|
||||
std::string couponNo;
|
||||
std::string description;
|
||||
std::string isSelected;
|
||||
std::string name;
|
||||
};
|
||||
std::vector<std::string> ruleIds1;
|
||||
std::string currency;
|
||||
float tradeAmount;
|
||||
std::vector<Coupon> coupons;
|
||||
float originalAmount;
|
||||
float discountAmount;
|
||||
};
|
||||
struct Rule
|
||||
{
|
||||
long ruleDescId;
|
||||
std::string title;
|
||||
std::string name;
|
||||
};
|
||||
struct SubOrder
|
||||
{
|
||||
std::string instanceId;
|
||||
std::vector<std::string> ruleIds;
|
||||
float tradeAmount;
|
||||
float originalAmount;
|
||||
float discountAmount;
|
||||
};
|
||||
|
||||
|
||||
DescribePriceResult();
|
||||
explicit DescribePriceResult(const std::string &payload);
|
||||
~DescribePriceResult();
|
||||
Order getOrder()const;
|
||||
std::vector<SubOrder> getSubOrders()const;
|
||||
std::string getTraceId()const;
|
||||
std::string getOrderParams()const;
|
||||
std::vector<Rule> getRules()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
Order order_;
|
||||
std::vector<SubOrder> subOrders_;
|
||||
std::string traceId_;
|
||||
std::string orderParams_;
|
||||
std::vector<Rule> rules_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DDS_MODEL_DESCRIBEPRICERESULT_H_
|
||||
Reference in New Issue
Block a user