Skip to content

Commit

Permalink
release 3.0.43-rc source code for cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Huaweicloud-SDK committed Aug 29, 2022
1 parent 8455798 commit fa31733
Show file tree
Hide file tree
Showing 12 changed files with 1,119 additions and 36 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# 3.0.43-rc 2022-08-29

### HuaweiCloud SDK ECS

- _Features_
- None
- _Bug Fix_
- None
- _Change_
- Add the request parameter `batch_create_in_multi_az` to the interface `CreatePostPaidServers`

### HuaweiCloud SDK IMS

- _Features_
- Support the interface `ShowJobProgress`
- _Bug Fix_
- None
- _Change_
- None

# 3.0.42-beta 2022-08-25

### HuaweiCloud SDK OCR
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG_CN.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# 3.0.43-rc 2022-08-29

### HuaweiCloud SDK ECS

- _新增特性_
-
- _解决问题_
-
- _特性变更_
- 接口`CreatePostPaidServers`新增请求参数 `batch_create_in_multi_az`

### HuaweiCloud SDK IMS

- _新增特性_
- 支持接口`ShowJobProgress`
- _解决问题_
-
- _特性变更_
-

# 3.0.42-beta 2022-08-25

### HuaweiCloud SDK OCR
Expand Down
11 changes: 11 additions & 0 deletions ecs/include/huaweicloud/ecs/v2/model/PostPaidServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ class HUAWEICLOUD_ECS_V2_EXPORT PostPaidServer
void unsetavailabilityZone();
void setAvailabilityZone(const std::string& value);

/// <summary>
/// 是否支持随机多AZ部署。 - “true”:批量创建的ecs部署在多个AZ上 - “false”:批量创建的ecs部署在单个AZ上 &gt; 说明: &gt; &gt; 当availability_zone为空时该字段生效。
/// </summary>

bool isBatchCreateInMultiAz() const;
bool batchCreateInMultiAzIsSet() const;
void unsetbatchCreateInMultiAz();
void setBatchCreateInMultiAz(bool value);

/// <summary>
/// 创建云服务器数量。 约束: - 不传该字段时默认取值为1。 - 租户的配额足够时,最大值为500。
/// </summary>
Expand Down Expand Up @@ -255,6 +264,8 @@ class HUAWEICLOUD_ECS_V2_EXPORT PostPaidServer
bool adminPassIsSet_;
std::string availabilityZone_;
bool availabilityZoneIsSet_;
bool batchCreateInMultiAz_;
bool batchCreateInMultiAzIsSet_;
int32_t count_;
bool countIsSet_;
std::vector<PostPaidServerDataVolume> dataVolumes_;
Expand Down
35 changes: 35 additions & 0 deletions ecs/src/v2/model/PostPaidServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ PostPaidServer::PostPaidServer()
adminPassIsSet_ = false;
availabilityZone_ = "";
availabilityZoneIsSet_ = false;
batchCreateInMultiAz_ = false;
batchCreateInMultiAzIsSet_ = false;
count_ = 0;
countIsSet_ = false;
dataVolumesIsSet_ = false;
Expand Down Expand Up @@ -68,6 +70,9 @@ web::json::value PostPaidServer::toJson() const
if(availabilityZoneIsSet_) {
val[utility::conversions::to_string_t("availability_zone")] = ModelBase::toJson(availabilityZone_);
}
if(batchCreateInMultiAzIsSet_) {
val[utility::conversions::to_string_t("batch_create_in_multi_az")] = ModelBase::toJson(batchCreateInMultiAz_);
}
if(countIsSet_) {
val[utility::conversions::to_string_t("count")] = ModelBase::toJson(count_);
}
Expand Down Expand Up @@ -160,6 +165,15 @@ bool PostPaidServer::fromJson(const web::json::value& val)
setAvailabilityZone(refVal);
}
}
if(val.has_field(utility::conversions::to_string_t("batch_create_in_multi_az"))) {
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("batch_create_in_multi_az"));
if(!fieldValue.is_null())
{
bool refVal;
ok &= ModelBase::fromJson(fieldValue, refVal);
setBatchCreateInMultiAz(refVal);
}
}
if(val.has_field(utility::conversions::to_string_t("count"))) {
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("count"));
if(!fieldValue.is_null())
Expand Down Expand Up @@ -398,6 +412,27 @@ void PostPaidServer::unsetavailabilityZone()
availabilityZoneIsSet_ = false;
}

bool PostPaidServer::isBatchCreateInMultiAz() const
{
return batchCreateInMultiAz_;
}

void PostPaidServer::setBatchCreateInMultiAz(bool value)
{
batchCreateInMultiAz_ = value;
batchCreateInMultiAzIsSet_ = true;
}

bool PostPaidServer::batchCreateInMultiAzIsSet() const
{
return batchCreateInMultiAzIsSet_;
}

void PostPaidServer::unsetbatchCreateInMultiAz()
{
batchCreateInMultiAzIsSet_ = false;
}

int32_t PostPaidServer::getCount() const
{
return count_;
Expand Down
36 changes: 22 additions & 14 deletions ims/include/huaweicloud/ims/v2/ImsClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
#include <huaweicloud/ims/v2/model/RegisterImageResponse.h>
#include <huaweicloud/ims/v2/model/ShowImageQuotaRequest.h>
#include <huaweicloud/ims/v2/model/ShowImageQuotaResponse.h>
#include <huaweicloud/ims/v2/model/ShowJobProgressRequest.h>
#include <huaweicloud/ims/v2/model/ShowJobProgressResponse.h>
#include <huaweicloud/ims/v2/model/ShowJobRequest.h>
#include <huaweicloud/ims/v2/model/ShowJobResponse.h>
#include <huaweicloud/ims/v2/model/UpdateImageRequest.h>
#include <huaweicloud/ims/v2/model/UpdateImageRequestBody.h>
#include <huaweicloud/ims/v2/model/UpdateImageResponse.h>
Expand All @@ -77,10 +81,6 @@
#include <huaweicloud/ims/v2/model/ShowVersionResponse.h>
#include <string>

#include <huaweicloud/ims/v2/model/ShowJobRequest.h>
#include <huaweicloud/ims/v2/model/ShowJobResponse.h>
#include <string>

#include <huaweicloud/ims/v2/model/GlanceAddImageMemberRequest.h>
#include <huaweicloud/ims/v2/model/GlanceAddImageMemberRequestBody.h>
#include <huaweicloud/ims/v2/model/GlanceAddImageMemberResponse.h>
Expand Down Expand Up @@ -368,6 +368,24 @@ class HUAWEICLOUD_IMS_V2_EXPORT ImsClient : public Client
std::shared_ptr<ShowImageQuotaResponse> showImageQuota(
ShowImageQuotaRequest &request
);
// 查询job状态
//
// 该接口为扩展接口,主要用于查询异步接口执行情况,比如查询导出镜像任务的执行状态。
//
// 详细说明请参考华为云API Explorer。
// Please refer to Huawei cloud API Explorer for details.
std::shared_ptr<ShowJobResponse> showJob(
ShowJobRequest &request
);
// 异步任务进度查询
//
// 该接口为扩展接口,主要用于查询异步任务进度。
//
// 详细说明请参考华为云API Explorer。
// Please refer to Huawei cloud API Explorer for details.
std::shared_ptr<ShowJobProgressResponse> showJobProgress(
ShowJobProgressRequest &request
);
// 更新镜像信息
//
// 更新镜像信息接口,主要用于镜像属性的修改。当前仅支持可用(active)状态的镜像更新相关信息。
Expand Down Expand Up @@ -397,16 +415,6 @@ class HUAWEICLOUD_IMS_V2_EXPORT ImsClient : public Client
ShowVersionRequest &request
);

// 查询job状态
//
// 该接口为扩展接口,主要用于查询异步接口执行情况,比如查询导出镜像任务的执行状态。
//
// 详细说明请参考华为云API Explorer。
// Please refer to Huawei cloud API Explorer for details.
std::shared_ptr<ShowJobResponse> showJob(
ShowJobRequest &request
);

// 添加镜像成员(OpenStack原生)
//
// 用户共享镜像给其他用户时,使用该接口向该镜像成员中添加接受镜像用户的项目ID。
Expand Down
109 changes: 109 additions & 0 deletions ims/include/huaweicloud/ims/v2/model/JobProgressEntities.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@

#ifndef HUAWEICLOUD_SDK_IMS_V2_MODEL_JobProgressEntities_H_
#define HUAWEICLOUD_SDK_IMS_V2_MODEL_JobProgressEntities_H_

#include <huaweicloud/ims/v2/ImsExport.h>

#include <huaweicloud/core/utils/ModelBase.h>
#include <huaweicloud/core/http/HttpResponse.h>

#include <string>

namespace HuaweiCloud {
namespace Sdk {
namespace Ims {
namespace V2 {
namespace Model {

using namespace HuaweiCloud::Sdk::Core::Utils;
using namespace HuaweiCloud::Sdk::Core::Http;

/// <summary>
///
/// </summary>
class HUAWEICLOUD_IMS_V2_EXPORT JobProgressEntities
: public ModelBase
{
public:
JobProgressEntities();
virtual ~JobProgressEntities();

/////////////////////////////////////////////
/// ModelBase overrides

void validate() override;

web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;

/////////////////////////////////////////////
/// JobProgressEntities members

/// <summary>
/// 镜像ID
/// </summary>

std::string getImageId() const;
bool imageIdIsSet() const;
void unsetimageId();
void setImageId(const std::string& value);

/// <summary>
/// 当前任务名称
/// </summary>

std::string getCurrentTask() const;
bool currentTaskIsSet() const;
void unsetcurrentTask();
void setCurrentTask(const std::string& value);

/// <summary>
/// 镜像名称
/// </summary>

std::string getImageName() const;
bool imageNameIsSet() const;
void unsetimageName();
void setImageName(const std::string& value);

/// <summary>
/// 任务执行进度
/// </summary>

double getProcessPercent() const;
bool processPercentIsSet() const;
void unsetprocessPercent();
void setProcessPercent(double value);

/// <summary>
/// 子任务ID
/// </summary>

std::string getSubJobId() const;
bool subJobIdIsSet() const;
void unsetsubJobId();
void setSubJobId(const std::string& value);


protected:
std::string imageId_;
bool imageIdIsSet_;
std::string currentTask_;
bool currentTaskIsSet_;
std::string imageName_;
bool imageNameIsSet_;
double processPercent_;
bool processPercentIsSet_;
std::string subJobId_;
bool subJobIdIsSet_;

};


}
}
}
}
}

#endif // HUAWEICLOUD_SDK_IMS_V2_MODEL_JobProgressEntities_H_
72 changes: 72 additions & 0 deletions ims/include/huaweicloud/ims/v2/model/ShowJobProgressRequest.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@

#ifndef HUAWEICLOUD_SDK_IMS_V2_MODEL_ShowJobProgressRequest_H_
#define HUAWEICLOUD_SDK_IMS_V2_MODEL_ShowJobProgressRequest_H_

#include <huaweicloud/ims/v2/ImsExport.h>

#include <huaweicloud/core/utils/ModelBase.h>
#include <huaweicloud/core/http/HttpResponse.h>

#include <string>

namespace HuaweiCloud {
namespace Sdk {
namespace Ims {
namespace V2 {
namespace Model {

using namespace HuaweiCloud::Sdk::Core::Utils;
using namespace HuaweiCloud::Sdk::Core::Http;

/// <summary>
/// Request Object
/// </summary>
class HUAWEICLOUD_IMS_V2_EXPORT ShowJobProgressRequest
: public ModelBase
{
public:
ShowJobProgressRequest();
virtual ~ShowJobProgressRequest();

/////////////////////////////////////////////
/// ModelBase overrides

void validate() override;

web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;

/////////////////////////////////////////////
/// ShowJobProgressRequest members

/// <summary>
/// 异步任务ID
/// </summary>

std::string getJobId() const;
bool jobIdIsSet() const;
void unsetjobId();
void setJobId(const std::string& value);


protected:
std::string jobId_;
bool jobIdIsSet_;

#ifdef RTTR_FLAG
RTTR_ENABLE()
public:
ShowJobProgressRequest& dereference_from_shared_ptr(std::shared_ptr<ShowJobProgressRequest> ptr) {
return *ptr;
}
#endif
};


}
}
}
}
}

#endif // HUAWEICLOUD_SDK_IMS_V2_MODEL_ShowJobProgressRequest_H_
Loading

0 comments on commit fa31733

Please sign in to comment.