Skip to content

Commit

Permalink
release 3.1.15 source code for cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Huaweicloud-SDK committed Dec 22, 2022
1 parent 20caf41 commit e4e21c3
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 1 deletion.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# 3.1.15 2022-12-22

### HuaweiCloud SDK IMS

- _Features_
- None
- _Bug Fix_
- None
- _Change_
- Add the request parameter `vault_id` to the interface `CopyImageCrossRegion`

# 3.1.14 2022-12-19

### HuaweiCloud SDK ECS
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG_CN.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# 3.1.15 2022-12-22

### HuaweiCloud SDK IMS

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

# 3.1.14 2022-12-19

### HuaweiCloud SDK ECS
Expand Down
2 changes: 1 addition & 1 deletion core/src/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ std::unique_ptr<HttpResponse> Client::callApi(const std::string &method, const s
std::string queryParamsHttp = getQueryParams(queryParams);
RequestParams requestParams(method, scheme, host, uriHttp, queryParamsHttp, false, body);

requestParams.addHeader(Header("User-Agent", "huaweicloud-sdk-cpp/3.0"));
requestParams.addHeader(Header("User-Agent", "huaweicloud-usdk-cpp/3.0"));
addHeaderParams(requestParams, headerParams);
credentials_->processAuthRequest(requestParams);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ class HUAWEICLOUD_IMS_V2_EXPORT CopyImageCrossRegionRequestBody
void unsetregion();
void setRegion(const std::string& value);

/// <summary>
/// 存储库ID。如果是整机镜像,则在跨Region复制镜像时,为必选参数,需传入该值。
/// </summary>

std::string getVaultId() const;
bool vaultIdIsSet() const;
void unsetvaultId();
void setVaultId(const std::string& value);


protected:
std::string agencyName_;
Expand All @@ -95,6 +104,8 @@ class HUAWEICLOUD_IMS_V2_EXPORT CopyImageCrossRegionRequestBody
bool projectNameIsSet_;
std::string region_;
bool regionIsSet_;
std::string vaultId_;
bool vaultIdIsSet_;

};

Expand Down
35 changes: 35 additions & 0 deletions ims/src/v2/model/CopyImageCrossRegionRequestBody.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ CopyImageCrossRegionRequestBody::CopyImageCrossRegionRequestBody()
projectNameIsSet_ = false;
region_ = "";
regionIsSet_ = false;
vaultId_ = "";
vaultIdIsSet_ = false;
}

CopyImageCrossRegionRequestBody::~CopyImageCrossRegionRequestBody() = default;
Expand Down Expand Up @@ -50,6 +52,9 @@ web::json::value CopyImageCrossRegionRequestBody::toJson() const
if(regionIsSet_) {
val[utility::conversions::to_string_t("region")] = ModelBase::toJson(region_);
}
if(vaultIdIsSet_) {
val[utility::conversions::to_string_t("vault_id")] = ModelBase::toJson(vaultId_);
}

return val;
}
Expand Down Expand Up @@ -103,6 +108,15 @@ bool CopyImageCrossRegionRequestBody::fromJson(const web::json::value& val)
setRegion(refVal);
}
}
if(val.has_field(utility::conversions::to_string_t("vault_id"))) {
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("vault_id"));
if(!fieldValue.is_null())
{
std::string refVal;
ok &= ModelBase::fromJson(fieldValue, refVal);
setVaultId(refVal);
}
}
return ok;
}

Expand Down Expand Up @@ -212,6 +226,27 @@ void CopyImageCrossRegionRequestBody::unsetregion()
regionIsSet_ = false;
}

std::string CopyImageCrossRegionRequestBody::getVaultId() const
{
return vaultId_;
}

void CopyImageCrossRegionRequestBody::setVaultId(const std::string& value)
{
vaultId_ = value;
vaultIdIsSet_ = true;
}

bool CopyImageCrossRegionRequestBody::vaultIdIsSet() const
{
return vaultIdIsSet_;
}

void CopyImageCrossRegionRequestBody::unsetvaultId()
{
vaultIdIsSet_ = false;
}

}
}
}
Expand Down

0 comments on commit e4e21c3

Please sign in to comment.