瀏覽代碼

Fix bugs for DescribeDedicatedHosts.

sdk-team 3 年之前
父節點
當前提交
79815391f7

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1627
+1.36.1628

+ 7 - 0
rds/include/alibabacloud/rds/model/DescribePriceRequest.h

@@ -28,6 +28,10 @@ namespace Rds {
 namespace Model {
 class ALIBABACLOUD_RDS_EXPORT DescribePriceRequest : public RpcServiceRequest {
 public:
+	struct ServerlessConfig {
+		double minCapacity;
+		double maxCapacity;
+	};
 	DescribePriceRequest();
 	~DescribePriceRequest();
 	long getResourceOwnerId() const;
@@ -50,6 +54,8 @@ public:
 	void setDBInstanceStorageType(const std::string &dBInstanceStorageType);
 	int getQuantity() const;
 	void setQuantity(int quantity);
+	ServerlessConfig getServerlessConfig() const;
+	void setServerlessConfig(const ServerlessConfig &serverlessConfig);
 	std::string getResourceOwnerAccount() const;
 	void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
 	std::string getOwnerAccount() const;
@@ -86,6 +92,7 @@ private:
 	std::string dBInstanceId_;
 	std::string dBInstanceStorageType_;
 	int quantity_;
+	ServerlessConfig serverlessConfig_;
 	std::string resourceOwnerAccount_;
 	std::string ownerAccount_;
 	std::string commodityCode_;

+ 4 - 0
rds/include/alibabacloud/rds/model/DescribePriceResult.h

@@ -66,14 +66,18 @@ namespace AlibabaCloud
 				DescribePriceResult();
 				explicit DescribePriceResult(const std::string &payload);
 				~DescribePriceResult();
+				float getTradeMinRCUAmount()const;
 				bool getShowDiscount()const;
+				float getTradeMaxRCUAmount()const;
 				std::vector<Rule> getRules()const;
 				PriceInfo getPriceInfo()const;
 
 			protected:
 				void parse(const std::string &payload);
 			private:
+				float tradeMinRCUAmount_;
 				bool showDiscount_;
+				float tradeMaxRCUAmount_;
 				std::vector<Rule> rules_;
 				PriceInfo priceInfo_;
 

+ 10 - 0
rds/src/model/DescribePriceRequest.cc

@@ -115,6 +115,16 @@ void DescribePriceRequest::setQuantity(int quantity) {
   setParameter(std::string("Quantity"), std::to_string(quantity));
 }
 
+DescribePriceRequest::ServerlessConfig DescribePriceRequest::getServerlessConfig() const {
+  return serverlessConfig_;
+}
+
+void DescribePriceRequest::setServerlessConfig(const DescribePriceRequest::ServerlessConfig &serverlessConfig) {
+  serverlessConfig_ = serverlessConfig;
+  setParameter(std::string("ServerlessConfig") + ".MinCapacity", std::to_string(serverlessConfig.minCapacity));
+  setParameter(std::string("ServerlessConfig") + ".MaxCapacity", std::to_string(serverlessConfig.maxCapacity));
+}
+
 std::string DescribePriceRequest::getResourceOwnerAccount() const {
   return resourceOwnerAccount_;
 }

+ 14 - 0
rds/src/model/DescribePriceResult.cc

@@ -86,14 +86,28 @@ void DescribePriceResult::parse(const std::string &payload)
 			priceInfo_.ruleIds.push_back(value.asString());
 	if(!value["ShowDiscount"].isNull())
 		showDiscount_ = value["ShowDiscount"].asString() == "true";
+	if(!value["TradeMaxRCUAmount"].isNull())
+		tradeMaxRCUAmount_ = std::stof(value["TradeMaxRCUAmount"].asString());
+	if(!value["TradeMinRCUAmount"].isNull())
+		tradeMinRCUAmount_ = std::stof(value["TradeMinRCUAmount"].asString());
 
 }
 
+float DescribePriceResult::getTradeMinRCUAmount()const
+{
+	return tradeMinRCUAmount_;
+}
+
 bool DescribePriceResult::getShowDiscount()const
 {
 	return showDiscount_;
 }
 
+float DescribePriceResult::getTradeMaxRCUAmount()const
+{
+	return tradeMaxRCUAmount_;
+}
+
 std::vector<DescribePriceResult::Rule> DescribePriceResult::getRules()const
 {
 	return rules_;