Fix bugs for DescribeDedicatedHosts.

This commit is contained in:
sdk-team
2023-07-03 15:04:58 +00:00
parent ece2943ddb
commit 79815391f7
5 changed files with 36 additions and 1 deletions

View File

@@ -1 +1 @@
1.36.1627
1.36.1628

View File

@@ -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_;

View File

@@ -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_;

View File

@@ -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_;
}

View File

@@ -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_;