Skip to content

Commit d8929c0

Browse files
release 3.0.8-beta source code for cpp
1 parent a366e7c commit d8929c0

File tree

6 files changed

+90
-21
lines changed

6 files changed

+90
-21
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# 3.0.8-beta 2021-03-19
2+
3+
### HuaweiCloud SDK ECS
4+
5+
- _Features_
6+
- None
7+
- _Bug Fix_
8+
- Fix the problem of deserialization failure of response body of interface `ListFlavors`.
9+
- _Change_
10+
- None
11+
112
# 3.0.7-beta 2021-03-15
213

314
### HuaweiCloud SDK ECS

CHANGELOG_CN.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# 3.0.8-beta 2021-03-19
2+
3+
### HuaweiCloud SDK ECS
4+
5+
- _新增特性_
6+
-
7+
- _解决问题_
8+
- 解决 ListFlavors 接口响应体反序列化出错的问题
9+
- _特性变更_
10+
-
11+
112
# 3.0.7-beta 2021-03-15
213

314
### HuaweiCloud SDK ECS

ecs/include/huaweicloud/ecs/v2/model/FlavorExtraSpec.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,19 @@ class HUAWEICLOUD_ECS_V2_EXPORT FlavorExtraSpec
8888
/// 最大带宽,单位Mbps,最大值为10000。
8989
/// </summary>
9090

91-
int32_t getInstanceVnicinstanceBandwidth() const;
91+
std::string getInstanceVnicinstanceBandwidth() const;
9292
bool instanceVnicinstanceBandwidthIsSet() const;
9393
void unsetinstanceVnicinstanceBandwidth();
94-
void setInstanceVnicinstanceBandwidth(int32_t value);
94+
void setInstanceVnicinstanceBandwidth(const std::string& value);
9595

9696
/// <summary>
9797
/// 最大网卡个数,最大为4。
9898
/// </summary>
9999

100-
int32_t getInstanceVnicmaxCount() const;
100+
std::string getInstanceVnicmaxCount() const;
101101
bool instanceVnicmaxCountIsSet() const;
102102
void unsetinstanceVnicmaxCount();
103-
void setInstanceVnicmaxCount(int32_t value);
103+
void setInstanceVnicmaxCount(const std::string& value);
104104

105105
/// <summary>
106106
/// 值格式为{type}:{count}:{size}:{safeFormat},其中: - type指磁盘类型,当前只支持hdd。 - count指本地磁盘数量,目前支持d1类型:3/6/12/24,d2类型:2/4/8/12/16/24,d3类型:2/4/8/12/16/24/28。 - size指单个磁盘容量,单位GB,目前只支持1675(实际磁盘大小为1800,格式化后可用大小为1675)。 - safeFormat指云服务器本地磁盘是否安全格式化,目前仅支持d1类型:FALSE,d2/d3类型:True。 &gt; 说明: - 磁盘增强型特有字段。
@@ -124,10 +124,10 @@ class HUAWEICLOUD_ECS_V2_EXPORT FlavorExtraSpec
124124
/// 是否支持持久化,值为true。 代表云服务器访问存储的方式为持久化授权。 &gt; 说明: - 密集存储D1型特有字段。
125125
/// </summary>
126126

127-
bool isExtraSpeciopersistentGrant() const;
127+
std::string getExtraSpeciopersistentGrant() const;
128128
bool extraSpeciopersistentGrantIsSet() const;
129129
void unsetextraSpeciopersistentGrant();
130-
void setExtraSpeciopersistentGrant(bool value);
130+
void setExtraSpeciopersistentGrant(const std::string& value);
131131

132132
/// <summary>
133133
/// 弹性云服务器类型的代数。 - s1:通用型I代 - s2:通用型II代 - s3:通用型 - m1:内存优化型I代 - m2:内存优化型II代 - m3:内存优化型 - h1:高性能计算型I代 - h2:高性能计算型II代 - h3:高性能计算型 - hi3:超高性能计算型 - d1:密集存储型I代 - d2:密集存储型II代 - d3:磁盘增强型 - g1:GPU加速型I代 - g2:GPU加速型II代 - f1:FPGA高性能型 - f2:FPGA通用型 - c3:通用计算增强型 - e3:大内存型 - i3:超高I/O型
@@ -339,15 +339,15 @@ class HUAWEICLOUD_ECS_V2_EXPORT FlavorExtraSpec
339339
bool hpetSupportIsSet_;
340340
std::string instanceVnictype_;
341341
bool instanceVnictypeIsSet_;
342-
int32_t instanceVnicinstanceBandwidth_;
342+
std::string instanceVnicinstanceBandwidth_;
343343
bool instanceVnicinstanceBandwidthIsSet_;
344-
int32_t instanceVnicmaxCount_;
344+
std::string instanceVnicmaxCount_;
345345
bool instanceVnicmaxCountIsSet_;
346346
std::string quotalocalDisk_;
347347
bool quotalocalDiskIsSet_;
348348
std::string quotanvmeSsd_;
349349
bool quotanvmeSsdIsSet_;
350-
bool extraSpeciopersistentGrant_;
350+
std::string extraSpeciopersistentGrant_;
351351
bool extraSpeciopersistentGrantIsSet_;
352352
std::string ecsgeneration_;
353353
bool ecsgenerationIsSet_;

ecs/src/v2/model/FlavorExtraSpec.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ FlavorExtraSpec::FlavorExtraSpec()
2323
hpetSupportIsSet_ = false;
2424
instanceVnictype_ = "";
2525
instanceVnictypeIsSet_ = false;
26-
instanceVnicinstanceBandwidth_ = 0;
26+
instanceVnicinstanceBandwidth_ = "";
2727
instanceVnicinstanceBandwidthIsSet_ = false;
28-
instanceVnicmaxCount_ = 0;
28+
instanceVnicmaxCount_ = "";
2929
instanceVnicmaxCountIsSet_ = false;
3030
quotalocalDisk_ = "";
3131
quotalocalDiskIsSet_ = false;
3232
quotanvmeSsd_ = "";
3333
quotanvmeSsdIsSet_ = false;
34-
extraSpeciopersistentGrant_ = false;
34+
extraSpeciopersistentGrant_ = "";
3535
extraSpeciopersistentGrantIsSet_ = false;
3636
ecsgeneration_ = "";
3737
ecsgenerationIsSet_ = false;
@@ -242,7 +242,7 @@ bool FlavorExtraSpec::fromJson(const web::json::value& val)
242242
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_vnic:instance_bandwidth"));
243243
if(!fieldValue.is_null())
244244
{
245-
int32_t refVal;
245+
std::string refVal;
246246
ok &= ModelBase::fromJson(fieldValue, refVal);
247247
setInstanceVnicinstanceBandwidth(refVal);
248248
}
@@ -251,7 +251,7 @@ bool FlavorExtraSpec::fromJson(const web::json::value& val)
251251
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_vnic:max_count"));
252252
if(!fieldValue.is_null())
253253
{
254-
int32_t refVal;
254+
std::string refVal;
255255
ok &= ModelBase::fromJson(fieldValue, refVal);
256256
setInstanceVnicmaxCount(refVal);
257257
}
@@ -278,7 +278,7 @@ bool FlavorExtraSpec::fromJson(const web::json::value& val)
278278
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("extra_spec:io:persistent_grant"));
279279
if(!fieldValue.is_null())
280280
{
281-
bool refVal;
281+
std::string refVal;
282282
ok &= ModelBase::fromJson(fieldValue, refVal);
283283
setExtraSpeciopersistentGrant(refVal);
284284
}
@@ -590,12 +590,12 @@ void FlavorExtraSpec::unsetinstanceVnictype()
590590
instanceVnictypeIsSet_ = false;
591591
}
592592

593-
int32_t FlavorExtraSpec::getInstanceVnicinstanceBandwidth() const
593+
std::string FlavorExtraSpec::getInstanceVnicinstanceBandwidth() const
594594
{
595595
return instanceVnicinstanceBandwidth_;
596596
}
597597

598-
void FlavorExtraSpec::setInstanceVnicinstanceBandwidth(int32_t value)
598+
void FlavorExtraSpec::setInstanceVnicinstanceBandwidth(const std::string& value)
599599
{
600600
instanceVnicinstanceBandwidth_ = value;
601601
instanceVnicinstanceBandwidthIsSet_ = true;
@@ -611,12 +611,12 @@ void FlavorExtraSpec::unsetinstanceVnicinstanceBandwidth()
611611
instanceVnicinstanceBandwidthIsSet_ = false;
612612
}
613613

614-
int32_t FlavorExtraSpec::getInstanceVnicmaxCount() const
614+
std::string FlavorExtraSpec::getInstanceVnicmaxCount() const
615615
{
616616
return instanceVnicmaxCount_;
617617
}
618618

619-
void FlavorExtraSpec::setInstanceVnicmaxCount(int32_t value)
619+
void FlavorExtraSpec::setInstanceVnicmaxCount(const std::string& value)
620620
{
621621
instanceVnicmaxCount_ = value;
622622
instanceVnicmaxCountIsSet_ = true;
@@ -674,12 +674,12 @@ void FlavorExtraSpec::unsetquotanvmeSsd()
674674
quotanvmeSsdIsSet_ = false;
675675
}
676676

677-
bool FlavorExtraSpec::isExtraSpeciopersistentGrant() const
677+
std::string FlavorExtraSpec::getExtraSpeciopersistentGrant() const
678678
{
679679
return extraSpeciopersistentGrant_;
680680
}
681681

682-
void FlavorExtraSpec::setExtraSpeciopersistentGrant(bool value)
682+
void FlavorExtraSpec::setExtraSpeciopersistentGrant(const std::string& value)
683683
{
684684
extraSpeciopersistentGrant_ = value;
685685
extraSpeciopersistentGrantIsSet_ = true;

eip/include/huaweicloud/eip/v2/model/CreatePrePaidPublicipRequestBody.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <huaweicloud/eip/v2/model/CreatePublicipBandwidthOption.h>
1111
#include <huaweicloud/eip/v2/model/CreatePrePaidPublicipOption.h>
1212
#include <huaweicloud/eip/v2/model/CreatePrePaidPublicipExtendParamOption.h>
13+
#include <string>
1314

1415
namespace HuaweiCloud {
1516
namespace Sdk {
@@ -68,6 +69,15 @@ class HUAWEICLOUD_EIP_V2_EXPORT CreatePrePaidPublicipRequestBody
6869
void unsetextendParam();
6970
void setExtendParam(const CreatePrePaidPublicipExtendParamOption& value);
7071

72+
/// <summary>
73+
/// 企业项目ID。最大长度36字节,带“-”连字符的UUID格式,或者是字符串“0”。 创建弹性公网IP时,给弹性公网IP绑定企业项目ID。 不指定该参数时,默认值是 0
74+
/// </summary>
75+
76+
std::string getEnterpriseProjectId() const;
77+
bool enterpriseProjectIdIsSet() const;
78+
void unsetenterpriseProjectId();
79+
void setEnterpriseProjectId(const std::string& value);
80+
7181

7282
protected:
7383
CreatePrePaidPublicipOption publicip_;
@@ -76,6 +86,8 @@ class HUAWEICLOUD_EIP_V2_EXPORT CreatePrePaidPublicipRequestBody
7686
bool bandwidthIsSet_;
7787
CreatePrePaidPublicipExtendParamOption extendParam_;
7888
bool extendParamIsSet_;
89+
std::string enterpriseProjectId_;
90+
bool enterpriseProjectIdIsSet_;
7991

8092
};
8193

eip/src/v2/model/CreatePrePaidPublicipRequestBody.cpp

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ CreatePrePaidPublicipRequestBody::CreatePrePaidPublicipRequestBody()
1616
publicipIsSet_ = false;
1717
bandwidthIsSet_ = false;
1818
extendParamIsSet_ = false;
19+
enterpriseProjectId_ = "";
20+
enterpriseProjectIdIsSet_ = false;
1921
}
2022

2123
CreatePrePaidPublicipRequestBody::~CreatePrePaidPublicipRequestBody() = default;
@@ -37,6 +39,9 @@ web::json::value CreatePrePaidPublicipRequestBody::toJson() const
3739
if(extendParamIsSet_) {
3840
val[utility::conversions::to_string_t("extendParam")] = ModelBase::toJson(extendParam_);
3941
}
42+
if(enterpriseProjectIdIsSet_) {
43+
val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_);
44+
}
4045

4146
return val;
4247
}
@@ -72,6 +77,15 @@ bool CreatePrePaidPublicipRequestBody::fromJson(const web::json::value& val)
7277
setExtendParam(refVal);
7378
}
7479
}
80+
if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) {
81+
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id"));
82+
if(!fieldValue.is_null())
83+
{
84+
std::string refVal;
85+
ok &= ModelBase::fromJson(fieldValue, refVal);
86+
setEnterpriseProjectId(refVal);
87+
}
88+
}
7589
return ok;
7690
}
7791

@@ -139,6 +153,27 @@ void CreatePrePaidPublicipRequestBody::unsetextendParam()
139153
extendParamIsSet_ = false;
140154
}
141155

156+
std::string CreatePrePaidPublicipRequestBody::getEnterpriseProjectId() const
157+
{
158+
return enterpriseProjectId_;
159+
}
160+
161+
void CreatePrePaidPublicipRequestBody::setEnterpriseProjectId(const std::string& value)
162+
{
163+
enterpriseProjectId_ = value;
164+
enterpriseProjectIdIsSet_ = true;
165+
}
166+
167+
bool CreatePrePaidPublicipRequestBody::enterpriseProjectIdIsSet() const
168+
{
169+
return enterpriseProjectIdIsSet_;
170+
}
171+
172+
void CreatePrePaidPublicipRequestBody::unsetenterpriseProjectId()
173+
{
174+
enterpriseProjectIdIsSet_ = false;
175+
}
176+
142177
}
143178
}
144179
}

0 commit comments

Comments
 (0)