From ed04eb638be41a27616d2b09f83a7456a7064332 Mon Sep 17 00:00:00 2001 From: Huaweicloud-SDK Date: Thu, 5 Sep 2024 15:35:53 +0800 Subject: [PATCH] release 3.1.101 source code --- CHANGELOG.md | 64 ++++ CHANGELOG_CN.md | 64 ++++ VERSION | 2 +- .../huaweicloud/ecs/v2/model/CloudServer.h | 14 +- .../huaweicloud/ecs/v2/model/FlavorQuasar.h | 38 +-- .../ecs/v2/model/ListCloudServersRequest.h | 15 +- .../ecs/v2/model/ListCloudServersResponse.h | 11 - .../ecs/v2/model/NetworkAddresses.h | 11 + .../huaweicloud/ecs/v2/model/SecurityGroup.h | 11 + .../huaweicloud/ecs/v2/model/VolumeAttach.h | 11 + ecs/src/v2/EcsClient.cpp | 3 + ecs/src/v2/EcsMeta.cpp | 3 + ecs/src/v2/model/CloudServer.cpp | 32 +- ecs/src/v2/model/FlavorQuasar.cpp | 100 ++---- ecs/src/v2/model/ListCloudServersRequest.cpp | 35 +++ ecs/src/v2/model/ListCloudServersResponse.cpp | 35 --- ecs/src/v2/model/NetworkAddresses.cpp | 35 +++ ecs/src/v2/model/SecurityGroup.cpp | 35 +++ ecs/src/v2/model/VolumeAttach.cpp | 35 +++ .../live/v1/model/DomainHttpsCertInfo.h | 24 ++ .../live/v1/model/GmCertificateInfo.h | 130 ++++++++ .../v1/model/ShowDomainHttpsCertResponse.h | 24 ++ .../live/v1/model/TlsCertificateInfo.h | 108 +++++++ live/src/v1/model/DomainHttpsCertInfo.cpp | 68 +++++ live/src/v1/model/GmCertificateInfo.cpp | 289 ++++++++++++++++++ .../v1/model/ShowDomainHttpsCertResponse.cpp | 68 +++++ live/src/v1/model/TlsCertificateInfo.cpp | 219 +++++++++++++ 27 files changed, 1320 insertions(+), 164 deletions(-) create mode 100644 live/include/huaweicloud/live/v1/model/GmCertificateInfo.h create mode 100644 live/include/huaweicloud/live/v1/model/TlsCertificateInfo.h create mode 100644 live/src/v1/model/GmCertificateInfo.cpp create mode 100644 live/src/v1/model/TlsCertificateInfo.cpp diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fec0b370..88a10ad07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,67 @@ +# 3.1.101 2024-09-05 + +### HuaweiCloud SDK ECS + +- _API Version_ + - V2 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ListCloudServers** + - changes of request param + - `+ marker` + - changes of response param + - `- count` + - `+ servers.launched_at` + - `- servers.launched` + - `+ servers.security_groups.id` + - `+ servers.volumes_attached.size` + - `+ servers.flavor.gpus` + - `+ servers.flavor.asic_accelerators` + - `- servers.flavor.root_gb` + - `- servers.flavor.ephemeral_gb` + - `- servers.flavor.extra_specs` + +### HuaweiCloud SDK Live + +- _API Version_ + - V1 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ShowDomainHttpsCert** + - changes of response param + - `+ tls_certificate` + - `+ gm_certificate` + - **UpdateDomainHttpsCert** + - changes of request param + - `+ tls_certificate` + - `+ gm_certificate` + +### HuaweiCloud SDK VPC + +- _API Version_ + - V3 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **CreateSubNetworkInterface** + - changes of request param + - `- sub_network_interface.instance_id` + - `- sub_network_interface.instance_type` + - `- sub_network_interface.tags` + - **BatchCreateSubNetworkInterface** + - changes of request param + - `- sub_network_interface.instance_id` + - `- sub_network_interface.instance_type` + - `- sub_network_interface.tags` + # 3.1.100 2024-08-29 ### HuaweiCloud SDK ECS diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index e8fca958f..01f0a8797 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,3 +1,67 @@ +# 3.1.101 2024-09-05 + +### HuaweiCloud SDK ECS + +- _接口版本_ + - V2 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ListCloudServers** + - 请求参数变更 + - `+ marker` + - 响应参数变更 + - `- count` + - `+ servers.launched_at` + - `- servers.launched` + - `+ servers.security_groups.id` + - `+ servers.volumes_attached.size` + - `+ servers.flavor.gpus` + - `+ servers.flavor.asic_accelerators` + - `- servers.flavor.root_gb` + - `- servers.flavor.ephemeral_gb` + - `- servers.flavor.extra_specs` + +### HuaweiCloud SDK Live + +- _接口版本_ + - V1 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ShowDomainHttpsCert** + - 响应参数变更 + - `+ tls_certificate` + - `+ gm_certificate` + - **UpdateDomainHttpsCert** + - 请求参数变更 + - `+ tls_certificate` + - `+ gm_certificate` + +### HuaweiCloud SDK VPC + +- _接口版本_ + - V3 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **CreateSubNetworkInterface** + - 请求参数变更 + - `- sub_network_interface.instance_id` + - `- sub_network_interface.instance_type` + - `- sub_network_interface.tags` + - **BatchCreateSubNetworkInterface** + - 请求参数变更 + - `- sub_network_interface.instance_id` + - `- sub_network_interface.instance_type` + - `- sub_network_interface.tags` + # 3.1.100 2024-08-29 ### HuaweiCloud SDK ECS diff --git a/VERSION b/VERSION index 659937d47..80ed89d1c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.100 +3.1.101 diff --git a/ecs/include/huaweicloud/ecs/v2/model/CloudServer.h b/ecs/include/huaweicloud/ecs/v2/model/CloudServer.h index fe5b7a2b6..2c256ec72 100644 --- a/ecs/include/huaweicloud/ecs/v2/model/CloudServer.h +++ b/ecs/include/huaweicloud/ecs/v2/model/CloudServer.h @@ -175,13 +175,13 @@ class HUAWEICLOUD_ECS_V2_EXPORT CloudServer void setUpdated(const std::string& value); /// - /// 云服务器启动时间。时间格式例如:2020-05-22T07:48:53Z。 + /// 云服务器启动时间。时间格式例如:2020-05-22T07:48:53.000000。 /// - std::string getLaunched() const; - bool launchedIsSet() const; - void unsetlaunched(); - void setLaunched(const std::string& value); + std::string getLaunchedAt() const; + bool launchedAtIsSet() const; + void unsetlaunchedAt(); + void setLaunchedAt(const std::string& value); /// /// 云服务器的描述信息。 @@ -357,8 +357,8 @@ class HUAWEICLOUD_ECS_V2_EXPORT CloudServer bool spodIdIsSet_; std::string updated_; bool updatedIsSet_; - std::string launched_; - bool launchedIsSet_; + std::string launchedAt_; + bool launchedAtIsSet_; std::string description_; bool descriptionIsSet_; std::string keyName_; diff --git a/ecs/include/huaweicloud/ecs/v2/model/FlavorQuasar.h b/ecs/include/huaweicloud/ecs/v2/model/FlavorQuasar.h index c8643547b..89916e66a 100644 --- a/ecs/include/huaweicloud/ecs/v2/model/FlavorQuasar.h +++ b/ecs/include/huaweicloud/ecs/v2/model/FlavorQuasar.h @@ -9,8 +9,9 @@ #include #include +#include +#include #include -#include #include namespace HuaweiCloud { @@ -89,28 +90,19 @@ class HUAWEICLOUD_ECS_V2_EXPORT FlavorQuasar /// /// - int32_t getRootGb() const; - bool rootGbIsSet() const; - void unsetrootGb(); - void setRootGb(int32_t value); + std::vector& getGpus(); + bool gpusIsSet() const; + void unsetgpus(); + void setGpus(const std::vector& value); /// /// /// - int32_t getEphemeralGb() const; - bool ephemeralGbIsSet() const; - void unsetephemeralGb(); - void setEphemeralGb(int32_t value); - - /// - /// flavor扩展字段。 - /// - - std::map& getExtraSpecs(); - bool extraSpecsIsSet() const; - void unsetextraSpecs(); - void setExtraSpecs(const std::map& value); + std::vector& getAsicAccelerators(); + bool asicAcceleratorsIsSet() const; + void unsetasicAccelerators(); + void setAsicAccelerators(const std::vector& value); protected: @@ -124,12 +116,10 @@ class HUAWEICLOUD_ECS_V2_EXPORT FlavorQuasar bool ramIsSet_; int32_t disk_; bool diskIsSet_; - int32_t rootGb_; - bool rootGbIsSet_; - int32_t ephemeralGb_; - bool ephemeralGbIsSet_; - std::map extraSpecs_; - bool extraSpecsIsSet_; + std::vector gpus_; + bool gpusIsSet_; + std::vector asicAccelerators_; + bool asicAcceleratorsIsSet_; }; diff --git a/ecs/include/huaweicloud/ecs/v2/model/ListCloudServersRequest.h b/ecs/include/huaweicloud/ecs/v2/model/ListCloudServersRequest.h index 26426716e..b10af5d9c 100644 --- a/ecs/include/huaweicloud/ecs/v2/model/ListCloudServersRequest.h +++ b/ecs/include/huaweicloud/ecs/v2/model/ListCloudServersRequest.h @@ -58,7 +58,7 @@ class HUAWEICLOUD_ECS_V2_EXPORT ListCloudServersRequest void setName(const std::string& value); /// - /// 云服务器状态。 取值范围: ACTIVE, BUILD,DELETED,ERROR,HARD_REBOOT,MIGRATING,REBOOT,RESIZE,REVERT_RESIZE,SHELVED,SHELVED_OFFLOADED,SHUTOFF,UNKNOWN,VERIFY_RESIZE 弹性云服务器状态说明请参考[云服务器状态](https://support.huaweicloud.com/api-ecs/ecs_08_0002.html) + /// 云服务器状态。 取值范围: ACTIVE, BUILD,ERROR,HARD_REBOOT,MIGRATING,REBOOT,RESIZE,REVERT_RESIZE,SHELVED,SHELVED_OFFLOADED,SHUTOFF,UNKNOWN,VERIFY_RESIZE 弹性云服务器状态说明请参考[云服务器状态](https://support.huaweicloud.com/api-ecs/ecs_08_0002.html) /// std::string getStatus() const; @@ -193,7 +193,7 @@ class HUAWEICLOUD_ECS_V2_EXPORT ListCloudServersRequest void setEnterpriseProjectId(const std::string& value); /// - /// 控制查询输出的字段。在默认字段的基础上选择是否查询,有管理员字段。 + /// 控制查询输出的字段。在默认字段的基础上选择是否查询。 launched_at:云服务器启动时间。 key_name:云服务器使用的密钥对名称。 locked:云服务器是否为锁定状态。 root_device_name:云服务器系统盘的设备名称。 tenancy:在专属主机或共享池中创建云服务器。 dedicated_host_id:专属主机ID。 enterprise_project_id:查询绑定某个企业项目的云服务器。 tags:云服务器的标签列表。 metadata:云服务器元数据。 addresses:云服务器对应的网络地址信息。 security_groups:云服务器的安全组信息。 volumes_attached:云服务器挂载磁盘信息。 image:云服务器镜像信息。 power_state:云服务器电源状态。 cpu_options:自定义CPU选项。 market_info:云服务器计费信息,包含计费类型、到期时间等字段。 /// std::vector& getExpectFields(); @@ -210,6 +210,15 @@ class HUAWEICLOUD_ECS_V2_EXPORT ListCloudServersRequest void unsetlimit(); void setLimit(int32_t value); + /// + /// 以单页最后一条server的ID作为分页标记。 + /// + + std::string getMarker() const; + bool markerIsSet() const; + void unsetmarker(); + void setMarker(const std::string& value); + protected: std::string id_; @@ -250,6 +259,8 @@ class HUAWEICLOUD_ECS_V2_EXPORT ListCloudServersRequest bool expectFieldsIsSet_; int32_t limit_; bool limitIsSet_; + std::string marker_; + bool markerIsSet_; #ifdef RTTR_FLAG RTTR_ENABLE() diff --git a/ecs/include/huaweicloud/ecs/v2/model/ListCloudServersResponse.h b/ecs/include/huaweicloud/ecs/v2/model/ListCloudServersResponse.h index 7e69b4ea4..2204e7421 100644 --- a/ecs/include/huaweicloud/ecs/v2/model/ListCloudServersResponse.h +++ b/ecs/include/huaweicloud/ecs/v2/model/ListCloudServersResponse.h @@ -41,15 +41,6 @@ class HUAWEICLOUD_ECS_V2_EXPORT ListCloudServersResponse ///////////////////////////////////////////// /// ListCloudServersResponse members - /// - /// 查询云服务器个数。 - /// - - int32_t getCount() const; - bool countIsSet() const; - void unsetcount(); - void setCount(int32_t value); - /// /// 查询云服务器信息列表。 /// @@ -79,8 +70,6 @@ class HUAWEICLOUD_ECS_V2_EXPORT ListCloudServersResponse protected: - int32_t count_; - bool countIsSet_; std::vector servers_; bool serversIsSet_; std::vector serversLinks_; diff --git a/ecs/include/huaweicloud/ecs/v2/model/NetworkAddresses.h b/ecs/include/huaweicloud/ecs/v2/model/NetworkAddresses.h index 9df0065bd..93f41bfda 100644 --- a/ecs/include/huaweicloud/ecs/v2/model/NetworkAddresses.h +++ b/ecs/include/huaweicloud/ecs/v2/model/NetworkAddresses.h @@ -83,6 +83,15 @@ class HUAWEICLOUD_ECS_V2_EXPORT NetworkAddresses void unsetoSEXTIPSType(); void setOSEXTIPSType(const std::string& value); + /// + /// 是否是主网卡。 true:主网卡。 false:辅助网卡。 + /// + + bool isPrimary() const; + bool primaryIsSet() const; + void unsetprimary(); + void setPrimary(bool value); + protected: std::string addr_; @@ -95,6 +104,8 @@ class HUAWEICLOUD_ECS_V2_EXPORT NetworkAddresses bool oSEXTIPSMACMacAddrIsSet_; std::string oSEXTIPSType_; bool oSEXTIPSTypeIsSet_; + bool primary_; + bool primaryIsSet_; }; diff --git a/ecs/include/huaweicloud/ecs/v2/model/SecurityGroup.h b/ecs/include/huaweicloud/ecs/v2/model/SecurityGroup.h index 76a56fb60..1aa6c5149 100644 --- a/ecs/include/huaweicloud/ecs/v2/model/SecurityGroup.h +++ b/ecs/include/huaweicloud/ecs/v2/model/SecurityGroup.h @@ -47,10 +47,21 @@ class HUAWEICLOUD_ECS_V2_EXPORT SecurityGroup void unsetname(); void setName(const std::string& value); + /// + /// 安全组ID。 + /// + + std::string getId() const; + bool idIsSet() const; + void unsetid(); + void setId(const std::string& value); + protected: std::string name_; bool nameIsSet_; + std::string id_; + bool idIsSet_; }; diff --git a/ecs/include/huaweicloud/ecs/v2/model/VolumeAttach.h b/ecs/include/huaweicloud/ecs/v2/model/VolumeAttach.h index 7d8f0f9e9..d5bbcef7b 100644 --- a/ecs/include/huaweicloud/ecs/v2/model/VolumeAttach.h +++ b/ecs/include/huaweicloud/ecs/v2/model/VolumeAttach.h @@ -74,6 +74,15 @@ class HUAWEICLOUD_ECS_V2_EXPORT VolumeAttach void unsetbootIndex(); void setBootIndex(const std::string& value); + /// + /// 云盘大小(单位:GB)。 + /// + + int32_t getSize() const; + bool sizeIsSet() const; + void unsetsize(); + void setSize(int32_t value); + protected: std::string id_; @@ -84,6 +93,8 @@ class HUAWEICLOUD_ECS_V2_EXPORT VolumeAttach bool deviceIsSet_; std::string bootIndex_; bool bootIndexIsSet_; + int32_t size_; + bool sizeIsSet_; }; diff --git a/ecs/src/v2/EcsClient.cpp b/ecs/src/v2/EcsClient.cpp index e540b0f24..9dfaecb77 100644 --- a/ecs/src/v2/EcsClient.cpp +++ b/ecs/src/v2/EcsClient.cpp @@ -1235,6 +1235,9 @@ std::shared_ptr EcsClient::listCloudServers(ListCloudS if (request.limitIsSet()) { localVarQueryParams["limit"] = parameterToString(request.getLimit()); } + if (request.markerIsSet()) { + localVarQueryParams["marker"] = parameterToString(request.getMarker()); + } std::string localVarHttpBody; diff --git a/ecs/src/v2/EcsMeta.cpp b/ecs/src/v2/EcsMeta.cpp index bacaab1c3..7885cb708 100644 --- a/ecs/src/v2/EcsMeta.cpp +++ b/ecs/src/v2/EcsMeta.cpp @@ -316,6 +316,9 @@ HttpRequestDef EcsMeta::genRequestDefForListCloudServers() { reqDefBuilder.withRequestField(FieldDef().withName("Limit") .withJsonTag("limit") .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Marker") + .withJsonTag("marker") + .withLocationType(Query_)); return reqDefBuilder; } diff --git a/ecs/src/v2/model/CloudServer.cpp b/ecs/src/v2/model/CloudServer.cpp index 498751b6e..d6e6b889c 100644 --- a/ecs/src/v2/model/CloudServer.cpp +++ b/ecs/src/v2/model/CloudServer.cpp @@ -39,8 +39,8 @@ CloudServer::CloudServer() spodIdIsSet_ = false; updated_ = ""; updatedIsSet_ = false; - launched_ = ""; - launchedIsSet_ = false; + launchedAt_ = ""; + launchedAtIsSet_ = false; description_ = ""; descriptionIsSet_ = false; keyName_ = ""; @@ -118,8 +118,8 @@ web::json::value CloudServer::toJson() const if(updatedIsSet_) { val[utility::conversions::to_string_t("updated")] = ModelBase::toJson(updated_); } - if(launchedIsSet_) { - val[utility::conversions::to_string_t("launched")] = ModelBase::toJson(launched_); + if(launchedAtIsSet_) { + val[utility::conversions::to_string_t("launched_at")] = ModelBase::toJson(launchedAt_); } if(descriptionIsSet_) { val[utility::conversions::to_string_t("description")] = ModelBase::toJson(description_); @@ -302,13 +302,13 @@ bool CloudServer::fromJson(const web::json::value& val) setUpdated(refVal); } } - if(val.has_field(utility::conversions::to_string_t("launched"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("launched")); + if(val.has_field(utility::conversions::to_string_t("launched_at"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("launched_at")); if(!fieldValue.is_null()) { std::string refVal; ok &= ModelBase::fromJson(fieldValue, refVal); - setLaunched(refVal); + setLaunchedAt(refVal); } } if(val.has_field(utility::conversions::to_string_t("description"))) { @@ -753,25 +753,25 @@ void CloudServer::unsetupdated() updatedIsSet_ = false; } -std::string CloudServer::getLaunched() const +std::string CloudServer::getLaunchedAt() const { - return launched_; + return launchedAt_; } -void CloudServer::setLaunched(const std::string& value) +void CloudServer::setLaunchedAt(const std::string& value) { - launched_ = value; - launchedIsSet_ = true; + launchedAt_ = value; + launchedAtIsSet_ = true; } -bool CloudServer::launchedIsSet() const +bool CloudServer::launchedAtIsSet() const { - return launchedIsSet_; + return launchedAtIsSet_; } -void CloudServer::unsetlaunched() +void CloudServer::unsetlaunchedAt() { - launchedIsSet_ = false; + launchedAtIsSet_ = false; } std::string CloudServer::getDescription() const diff --git a/ecs/src/v2/model/FlavorQuasar.cpp b/ecs/src/v2/model/FlavorQuasar.cpp index 4ebb91d1a..f14590948 100644 --- a/ecs/src/v2/model/FlavorQuasar.cpp +++ b/ecs/src/v2/model/FlavorQuasar.cpp @@ -22,11 +22,8 @@ FlavorQuasar::FlavorQuasar() ramIsSet_ = false; disk_ = 0; diskIsSet_ = false; - rootGb_ = 0; - rootGbIsSet_ = false; - ephemeralGb_ = 0; - ephemeralGbIsSet_ = false; - extraSpecsIsSet_ = false; + gpusIsSet_ = false; + asicAcceleratorsIsSet_ = false; } FlavorQuasar::~FlavorQuasar() = default; @@ -54,14 +51,11 @@ web::json::value FlavorQuasar::toJson() const if(diskIsSet_) { val[utility::conversions::to_string_t("disk")] = ModelBase::toJson(disk_); } - if(rootGbIsSet_) { - val[utility::conversions::to_string_t("root_gb")] = ModelBase::toJson(rootGb_); + if(gpusIsSet_) { + val[utility::conversions::to_string_t("gpus")] = ModelBase::toJson(gpus_); } - if(ephemeralGbIsSet_) { - val[utility::conversions::to_string_t("ephemeral_gb")] = ModelBase::toJson(ephemeralGb_); - } - if(extraSpecsIsSet_) { - val[utility::conversions::to_string_t("extra_specs")] = ModelBase::toJson(extraSpecs_); + if(asicAcceleratorsIsSet_) { + val[utility::conversions::to_string_t("asic_accelerators")] = ModelBase::toJson(asicAccelerators_); } return val; @@ -115,31 +109,22 @@ bool FlavorQuasar::fromJson(const web::json::value& val) setDisk(refVal); } } - if(val.has_field(utility::conversions::to_string_t("root_gb"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("root_gb")); - if(!fieldValue.is_null()) - { - int32_t refVal; - ok &= ModelBase::fromJson(fieldValue, refVal); - setRootGb(refVal); - } - } - if(val.has_field(utility::conversions::to_string_t("ephemeral_gb"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ephemeral_gb")); + if(val.has_field(utility::conversions::to_string_t("gpus"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("gpus")); if(!fieldValue.is_null()) { - int32_t refVal; + std::vector refVal; ok &= ModelBase::fromJson(fieldValue, refVal); - setEphemeralGb(refVal); + setGpus(refVal); } } - if(val.has_field(utility::conversions::to_string_t("extra_specs"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("extra_specs")); + if(val.has_field(utility::conversions::to_string_t("asic_accelerators"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("asic_accelerators")); if(!fieldValue.is_null()) { - std::map refVal; + std::vector refVal; ok &= ModelBase::fromJson(fieldValue, refVal); - setExtraSpecs(refVal); + setAsicAccelerators(refVal); } } return ok; @@ -251,67 +236,46 @@ void FlavorQuasar::unsetdisk() diskIsSet_ = false; } -int32_t FlavorQuasar::getRootGb() const -{ - return rootGb_; -} - -void FlavorQuasar::setRootGb(int32_t value) -{ - rootGb_ = value; - rootGbIsSet_ = true; -} - -bool FlavorQuasar::rootGbIsSet() const -{ - return rootGbIsSet_; -} - -void FlavorQuasar::unsetrootGb() -{ - rootGbIsSet_ = false; -} - -int32_t FlavorQuasar::getEphemeralGb() const +std::vector& FlavorQuasar::getGpus() { - return ephemeralGb_; + return gpus_; } -void FlavorQuasar::setEphemeralGb(int32_t value) +void FlavorQuasar::setGpus(const std::vector& value) { - ephemeralGb_ = value; - ephemeralGbIsSet_ = true; + gpus_ = value; + gpusIsSet_ = true; } -bool FlavorQuasar::ephemeralGbIsSet() const +bool FlavorQuasar::gpusIsSet() const { - return ephemeralGbIsSet_; + return gpusIsSet_; } -void FlavorQuasar::unsetephemeralGb() +void FlavorQuasar::unsetgpus() { - ephemeralGbIsSet_ = false; + gpusIsSet_ = false; } -std::map& FlavorQuasar::getExtraSpecs() +std::vector& FlavorQuasar::getAsicAccelerators() { - return extraSpecs_; + return asicAccelerators_; } -void FlavorQuasar::setExtraSpecs(const std::map& value) +void FlavorQuasar::setAsicAccelerators(const std::vector& value) { - extraSpecs_ = value; - extraSpecsIsSet_ = true; + asicAccelerators_ = value; + asicAcceleratorsIsSet_ = true; } -bool FlavorQuasar::extraSpecsIsSet() const +bool FlavorQuasar::asicAcceleratorsIsSet() const { - return extraSpecsIsSet_; + return asicAcceleratorsIsSet_; } -void FlavorQuasar::unsetextraSpecs() +void FlavorQuasar::unsetasicAccelerators() { - extraSpecsIsSet_ = false; + asicAcceleratorsIsSet_ = false; } } diff --git a/ecs/src/v2/model/ListCloudServersRequest.cpp b/ecs/src/v2/model/ListCloudServersRequest.cpp index 515cc8050..0c83880a5 100644 --- a/ecs/src/v2/model/ListCloudServersRequest.cpp +++ b/ecs/src/v2/model/ListCloudServersRequest.cpp @@ -49,6 +49,8 @@ ListCloudServersRequest::ListCloudServersRequest() expectFieldsIsSet_ = false; limit_ = 0; limitIsSet_ = false; + marker_ = ""; + markerIsSet_ = false; } ListCloudServersRequest::~ListCloudServersRequest() = default; @@ -118,6 +120,9 @@ web::json::value ListCloudServersRequest::toJson() const if(limitIsSet_) { val[utility::conversions::to_string_t("limit")] = ModelBase::toJson(limit_); } + if(markerIsSet_) { + val[utility::conversions::to_string_t("marker")] = ModelBase::toJson(marker_); + } return val; } @@ -296,6 +301,15 @@ bool ListCloudServersRequest::fromJson(const web::json::value& val) setLimit(refVal); } } + if(val.has_field(utility::conversions::to_string_t("marker"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("marker")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setMarker(refVal); + } + } return ok; } @@ -699,6 +713,27 @@ void ListCloudServersRequest::unsetlimit() limitIsSet_ = false; } +std::string ListCloudServersRequest::getMarker() const +{ + return marker_; +} + +void ListCloudServersRequest::setMarker(const std::string& value) +{ + marker_ = value; + markerIsSet_ = true; +} + +bool ListCloudServersRequest::markerIsSet() const +{ + return markerIsSet_; +} + +void ListCloudServersRequest::unsetmarker() +{ + markerIsSet_ = false; +} + } } } diff --git a/ecs/src/v2/model/ListCloudServersResponse.cpp b/ecs/src/v2/model/ListCloudServersResponse.cpp index 113711064..282b50797 100644 --- a/ecs/src/v2/model/ListCloudServersResponse.cpp +++ b/ecs/src/v2/model/ListCloudServersResponse.cpp @@ -12,8 +12,6 @@ namespace Model { ListCloudServersResponse::ListCloudServersResponse() { - count_ = 0; - countIsSet_ = false; serversIsSet_ = false; serversLinksIsSet_ = false; requestId_ = ""; @@ -30,9 +28,6 @@ web::json::value ListCloudServersResponse::toJson() const { web::json::value val = web::json::value::object(); - if(countIsSet_) { - val[utility::conversions::to_string_t("count")] = ModelBase::toJson(count_); - } if(serversIsSet_) { val[utility::conversions::to_string_t("servers")] = ModelBase::toJson(servers_); } @@ -49,15 +44,6 @@ bool ListCloudServersResponse::fromJson(const web::json::value& val) { bool ok = true; - 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()) - { - int32_t refVal; - ok &= ModelBase::fromJson(fieldValue, refVal); - setCount(refVal); - } - } if(val.has_field(utility::conversions::to_string_t("servers"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("servers")); if(!fieldValue.is_null()) @@ -89,27 +75,6 @@ bool ListCloudServersResponse::fromJson(const web::json::value& val) } -int32_t ListCloudServersResponse::getCount() const -{ - return count_; -} - -void ListCloudServersResponse::setCount(int32_t value) -{ - count_ = value; - countIsSet_ = true; -} - -bool ListCloudServersResponse::countIsSet() const -{ - return countIsSet_; -} - -void ListCloudServersResponse::unsetcount() -{ - countIsSet_ = false; -} - std::vector& ListCloudServersResponse::getServers() { return servers_; diff --git a/ecs/src/v2/model/NetworkAddresses.cpp b/ecs/src/v2/model/NetworkAddresses.cpp index c6d8a1c0d..a36f6bc8f 100644 --- a/ecs/src/v2/model/NetworkAddresses.cpp +++ b/ecs/src/v2/model/NetworkAddresses.cpp @@ -22,6 +22,8 @@ NetworkAddresses::NetworkAddresses() oSEXTIPSMACMacAddrIsSet_ = false; oSEXTIPSType_ = ""; oSEXTIPSTypeIsSet_ = false; + primary_ = false; + primaryIsSet_ = false; } NetworkAddresses::~NetworkAddresses() = default; @@ -49,6 +51,9 @@ web::json::value NetworkAddresses::toJson() const if(oSEXTIPSTypeIsSet_) { val[utility::conversions::to_string_t("OS-EXT-IPS:type")] = ModelBase::toJson(oSEXTIPSType_); } + if(primaryIsSet_) { + val[utility::conversions::to_string_t("primary")] = ModelBase::toJson(primary_); + } return val; } @@ -101,6 +106,15 @@ bool NetworkAddresses::fromJson(const web::json::value& val) setOSEXTIPSType(refVal); } } + if(val.has_field(utility::conversions::to_string_t("primary"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("primary")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPrimary(refVal); + } + } return ok; } @@ -210,6 +224,27 @@ void NetworkAddresses::unsetoSEXTIPSType() oSEXTIPSTypeIsSet_ = false; } +bool NetworkAddresses::isPrimary() const +{ + return primary_; +} + +void NetworkAddresses::setPrimary(bool value) +{ + primary_ = value; + primaryIsSet_ = true; +} + +bool NetworkAddresses::primaryIsSet() const +{ + return primaryIsSet_; +} + +void NetworkAddresses::unsetprimary() +{ + primaryIsSet_ = false; +} + } } } diff --git a/ecs/src/v2/model/SecurityGroup.cpp b/ecs/src/v2/model/SecurityGroup.cpp index 79bf1d843..2c9cb57a2 100644 --- a/ecs/src/v2/model/SecurityGroup.cpp +++ b/ecs/src/v2/model/SecurityGroup.cpp @@ -14,6 +14,8 @@ SecurityGroup::SecurityGroup() { name_ = ""; nameIsSet_ = false; + id_ = ""; + idIsSet_ = false; } SecurityGroup::~SecurityGroup() = default; @@ -29,6 +31,9 @@ web::json::value SecurityGroup::toJson() const if(nameIsSet_) { val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); } + if(idIsSet_) { + val[utility::conversions::to_string_t("id")] = ModelBase::toJson(id_); + } return val; } @@ -45,6 +50,15 @@ bool SecurityGroup::fromJson(const web::json::value& val) setName(refVal); } } + if(val.has_field(utility::conversions::to_string_t("id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setId(refVal); + } + } return ok; } @@ -70,6 +84,27 @@ void SecurityGroup::unsetname() nameIsSet_ = false; } +std::string SecurityGroup::getId() const +{ + return id_; +} + +void SecurityGroup::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool SecurityGroup::idIsSet() const +{ + return idIsSet_; +} + +void SecurityGroup::unsetid() +{ + idIsSet_ = false; +} + } } } diff --git a/ecs/src/v2/model/VolumeAttach.cpp b/ecs/src/v2/model/VolumeAttach.cpp index 23948fe44..4cf074fb4 100644 --- a/ecs/src/v2/model/VolumeAttach.cpp +++ b/ecs/src/v2/model/VolumeAttach.cpp @@ -20,6 +20,8 @@ VolumeAttach::VolumeAttach() deviceIsSet_ = false; bootIndex_ = ""; bootIndexIsSet_ = false; + size_ = 0; + sizeIsSet_ = false; } VolumeAttach::~VolumeAttach() = default; @@ -44,6 +46,9 @@ web::json::value VolumeAttach::toJson() const if(bootIndexIsSet_) { val[utility::conversions::to_string_t("bootIndex")] = ModelBase::toJson(bootIndex_); } + if(sizeIsSet_) { + val[utility::conversions::to_string_t("size")] = ModelBase::toJson(size_); + } return val; } @@ -87,6 +92,15 @@ bool VolumeAttach::fromJson(const web::json::value& val) setBootIndex(refVal); } } + if(val.has_field(utility::conversions::to_string_t("size"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("size")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSize(refVal); + } + } return ok; } @@ -175,6 +189,27 @@ void VolumeAttach::unsetbootIndex() bootIndexIsSet_ = false; } +int32_t VolumeAttach::getSize() const +{ + return size_; +} + +void VolumeAttach::setSize(int32_t value) +{ + size_ = value; + sizeIsSet_ = true; +} + +bool VolumeAttach::sizeIsSet() const +{ + return sizeIsSet_; +} + +void VolumeAttach::unsetsize() +{ + sizeIsSet_ = false; +} + } } } diff --git a/live/include/huaweicloud/live/v1/model/DomainHttpsCertInfo.h b/live/include/huaweicloud/live/v1/model/DomainHttpsCertInfo.h index 3bd222661..d715918dd 100644 --- a/live/include/huaweicloud/live/v1/model/DomainHttpsCertInfo.h +++ b/live/include/huaweicloud/live/v1/model/DomainHttpsCertInfo.h @@ -10,6 +10,8 @@ #include #include +#include +#include namespace HuaweiCloud { namespace Sdk { @@ -74,6 +76,24 @@ class HUAWEICLOUD_LIVE_V1_EXPORT DomainHttpsCertInfo void unsetforceRedirect(); void setForceRedirect(bool value); + /// + /// + /// + + GmCertificateInfo getGmCertificate() const; + bool gmCertificateIsSet() const; + void unsetgmCertificate(); + void setGmCertificate(const GmCertificateInfo& value); + + /// + /// + /// + + TlsCertificateInfo getTlsCertificate() const; + bool tlsCertificateIsSet() const; + void unsettlsCertificate(); + void setTlsCertificate(const TlsCertificateInfo& value); + protected: std::string certificateFormat_; @@ -84,6 +104,10 @@ class HUAWEICLOUD_LIVE_V1_EXPORT DomainHttpsCertInfo bool certificateKeyIsSet_; bool forceRedirect_; bool forceRedirectIsSet_; + GmCertificateInfo gmCertificate_; + bool gmCertificateIsSet_; + TlsCertificateInfo tlsCertificate_; + bool tlsCertificateIsSet_; }; diff --git a/live/include/huaweicloud/live/v1/model/GmCertificateInfo.h b/live/include/huaweicloud/live/v1/model/GmCertificateInfo.h new file mode 100644 index 000000000..462aeff87 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/GmCertificateInfo.h @@ -0,0 +1,130 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_GmCertificateInfo_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_GmCertificateInfo_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_LIVE_V1_EXPORT GmCertificateInfo + : public ModelBase +{ +public: + GmCertificateInfo(); + virtual ~GmCertificateInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// GmCertificateInfo members + + /// + /// 证书来源, 可选, scm: 云证书管理服务,user:默认,用户自有 + /// + + std::string getSource() const; + bool sourceIsSet() const; + void unsetsource(); + void setSource(const std::string& value); + + /// + /// SCM证书名, 可选 + /// + + std::string getCertName() const; + bool certNameIsSet() const; + void unsetcertName(); + void setCertName(const std::string& value); + + /// + /// SCM证书ID, 证书来源为scm时必选 + /// + + std::string getCertId() const; + bool certIdIsSet() const; + void unsetcertId(); + void setCertId(const std::string& value); + + /// + /// 国密签名证书内容 + /// + + std::string getSignCertificate() const; + bool signCertificateIsSet() const; + void unsetsignCertificate(); + void setSignCertificate(const std::string& value); + + /// + /// 国密签名私钥内容 + /// + + std::string getSignCertificateKey() const; + bool signCertificateKeyIsSet() const; + void unsetsignCertificateKey(); + void setSignCertificateKey(const std::string& value); + + /// + /// 国密加密证书内容 + /// + + std::string getEncCertificate() const; + bool encCertificateIsSet() const; + void unsetencCertificate(); + void setEncCertificate(const std::string& value); + + /// + /// 国密加密私钥内容 + /// + + std::string getEncCertificateKey() const; + bool encCertificateKeyIsSet() const; + void unsetencCertificateKey(); + void setEncCertificateKey(const std::string& value); + + +protected: + std::string source_; + bool sourceIsSet_; + std::string certName_; + bool certNameIsSet_; + std::string certId_; + bool certIdIsSet_; + std::string signCertificate_; + bool signCertificateIsSet_; + std::string signCertificateKey_; + bool signCertificateKeyIsSet_; + std::string encCertificate_; + bool encCertificateIsSet_; + std::string encCertificateKey_; + bool encCertificateKeyIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_GmCertificateInfo_H_ diff --git a/live/include/huaweicloud/live/v1/model/ShowDomainHttpsCertResponse.h b/live/include/huaweicloud/live/v1/model/ShowDomainHttpsCertResponse.h index 189c2bf81..e5f437573 100644 --- a/live/include/huaweicloud/live/v1/model/ShowDomainHttpsCertResponse.h +++ b/live/include/huaweicloud/live/v1/model/ShowDomainHttpsCertResponse.h @@ -10,6 +10,8 @@ #include #include +#include +#include namespace HuaweiCloud { namespace Sdk { @@ -74,6 +76,24 @@ class HUAWEICLOUD_LIVE_V1_EXPORT ShowDomainHttpsCertResponse void unsetforceRedirect(); void setForceRedirect(bool value); + /// + /// + /// + + GmCertificateInfo getGmCertificate() const; + bool gmCertificateIsSet() const; + void unsetgmCertificate(); + void setGmCertificate(const GmCertificateInfo& value); + + /// + /// + /// + + TlsCertificateInfo getTlsCertificate() const; + bool tlsCertificateIsSet() const; + void unsettlsCertificate(); + void setTlsCertificate(const TlsCertificateInfo& value); + protected: std::string certificateFormat_; @@ -84,6 +104,10 @@ class HUAWEICLOUD_LIVE_V1_EXPORT ShowDomainHttpsCertResponse bool certificateKeyIsSet_; bool forceRedirect_; bool forceRedirectIsSet_; + GmCertificateInfo gmCertificate_; + bool gmCertificateIsSet_; + TlsCertificateInfo tlsCertificate_; + bool tlsCertificateIsSet_; #ifdef RTTR_FLAG RTTR_ENABLE() diff --git a/live/include/huaweicloud/live/v1/model/TlsCertificateInfo.h b/live/include/huaweicloud/live/v1/model/TlsCertificateInfo.h new file mode 100644 index 000000000..3b9a42d37 --- /dev/null +++ b/live/include/huaweicloud/live/v1/model/TlsCertificateInfo.h @@ -0,0 +1,108 @@ + +#ifndef HUAWEICLOUD_SDK_LIVE_V1_MODEL_TlsCertificateInfo_H_ +#define HUAWEICLOUD_SDK_LIVE_V1_MODEL_TlsCertificateInfo_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_LIVE_V1_EXPORT TlsCertificateInfo + : public ModelBase +{ +public: + TlsCertificateInfo(); + virtual ~TlsCertificateInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// TlsCertificateInfo members + + /// + /// 证书来源, 可选, scm: 云证书管理服务,user:默认,用户自有 + /// + + std::string getSource() const; + bool sourceIsSet() const; + void unsetsource(); + void setSource(const std::string& value); + + /// + /// SCM证书名, 证书来源为scm时可选 + /// + + std::string getCertName() const; + bool certNameIsSet() const; + void unsetcertName(); + void setCertName(const std::string& value); + + /// + /// SCM证书ID, 证书来源为scm时必选 + /// + + std::string getCertId() const; + bool certIdIsSet() const; + void unsetcertId(); + void setCertId(const std::string& value); + + /// + /// 证书内容,证书来源为user时必选 + /// + + std::string getCertificate() const; + bool certificateIsSet() const; + void unsetcertificate(); + void setCertificate(const std::string& value); + + /// + /// 私钥内容,证书来源为user时必选 + /// + + std::string getCertificateKey() const; + bool certificateKeyIsSet() const; + void unsetcertificateKey(); + void setCertificateKey(const std::string& value); + + +protected: + std::string source_; + bool sourceIsSet_; + std::string certName_; + bool certNameIsSet_; + std::string certId_; + bool certIdIsSet_; + std::string certificate_; + bool certificateIsSet_; + std::string certificateKey_; + bool certificateKeyIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_LIVE_V1_MODEL_TlsCertificateInfo_H_ diff --git a/live/src/v1/model/DomainHttpsCertInfo.cpp b/live/src/v1/model/DomainHttpsCertInfo.cpp index 9de788e00..afbe607cf 100644 --- a/live/src/v1/model/DomainHttpsCertInfo.cpp +++ b/live/src/v1/model/DomainHttpsCertInfo.cpp @@ -20,6 +20,8 @@ DomainHttpsCertInfo::DomainHttpsCertInfo() certificateKeyIsSet_ = false; forceRedirect_ = false; forceRedirectIsSet_ = false; + gmCertificateIsSet_ = false; + tlsCertificateIsSet_ = false; } DomainHttpsCertInfo::~DomainHttpsCertInfo() = default; @@ -44,6 +46,12 @@ web::json::value DomainHttpsCertInfo::toJson() const if(forceRedirectIsSet_) { val[utility::conversions::to_string_t("force_redirect")] = ModelBase::toJson(forceRedirect_); } + if(gmCertificateIsSet_) { + val[utility::conversions::to_string_t("gm_certificate")] = ModelBase::toJson(gmCertificate_); + } + if(tlsCertificateIsSet_) { + val[utility::conversions::to_string_t("tls_certificate")] = ModelBase::toJson(tlsCertificate_); + } return val; } @@ -87,6 +95,24 @@ bool DomainHttpsCertInfo::fromJson(const web::json::value& val) setForceRedirect(refVal); } } + if(val.has_field(utility::conversions::to_string_t("gm_certificate"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("gm_certificate")); + if(!fieldValue.is_null()) + { + GmCertificateInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setGmCertificate(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("tls_certificate"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("tls_certificate")); + if(!fieldValue.is_null()) + { + TlsCertificateInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTlsCertificate(refVal); + } + } return ok; } @@ -175,6 +201,48 @@ void DomainHttpsCertInfo::unsetforceRedirect() forceRedirectIsSet_ = false; } +GmCertificateInfo DomainHttpsCertInfo::getGmCertificate() const +{ + return gmCertificate_; +} + +void DomainHttpsCertInfo::setGmCertificate(const GmCertificateInfo& value) +{ + gmCertificate_ = value; + gmCertificateIsSet_ = true; +} + +bool DomainHttpsCertInfo::gmCertificateIsSet() const +{ + return gmCertificateIsSet_; +} + +void DomainHttpsCertInfo::unsetgmCertificate() +{ + gmCertificateIsSet_ = false; +} + +TlsCertificateInfo DomainHttpsCertInfo::getTlsCertificate() const +{ + return tlsCertificate_; +} + +void DomainHttpsCertInfo::setTlsCertificate(const TlsCertificateInfo& value) +{ + tlsCertificate_ = value; + tlsCertificateIsSet_ = true; +} + +bool DomainHttpsCertInfo::tlsCertificateIsSet() const +{ + return tlsCertificateIsSet_; +} + +void DomainHttpsCertInfo::unsettlsCertificate() +{ + tlsCertificateIsSet_ = false; +} + } } } diff --git a/live/src/v1/model/GmCertificateInfo.cpp b/live/src/v1/model/GmCertificateInfo.cpp new file mode 100644 index 000000000..8b510a267 --- /dev/null +++ b/live/src/v1/model/GmCertificateInfo.cpp @@ -0,0 +1,289 @@ + + +#include "huaweicloud/live/v1/model/GmCertificateInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +GmCertificateInfo::GmCertificateInfo() +{ + source_ = ""; + sourceIsSet_ = false; + certName_ = ""; + certNameIsSet_ = false; + certId_ = ""; + certIdIsSet_ = false; + signCertificate_ = ""; + signCertificateIsSet_ = false; + signCertificateKey_ = ""; + signCertificateKeyIsSet_ = false; + encCertificate_ = ""; + encCertificateIsSet_ = false; + encCertificateKey_ = ""; + encCertificateKeyIsSet_ = false; +} + +GmCertificateInfo::~GmCertificateInfo() = default; + +void GmCertificateInfo::validate() +{ +} + +web::json::value GmCertificateInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(sourceIsSet_) { + val[utility::conversions::to_string_t("source")] = ModelBase::toJson(source_); + } + if(certNameIsSet_) { + val[utility::conversions::to_string_t("cert_name")] = ModelBase::toJson(certName_); + } + if(certIdIsSet_) { + val[utility::conversions::to_string_t("cert_id")] = ModelBase::toJson(certId_); + } + if(signCertificateIsSet_) { + val[utility::conversions::to_string_t("sign_certificate")] = ModelBase::toJson(signCertificate_); + } + if(signCertificateKeyIsSet_) { + val[utility::conversions::to_string_t("sign_certificate_key")] = ModelBase::toJson(signCertificateKey_); + } + if(encCertificateIsSet_) { + val[utility::conversions::to_string_t("enc_certificate")] = ModelBase::toJson(encCertificate_); + } + if(encCertificateKeyIsSet_) { + val[utility::conversions::to_string_t("enc_certificate_key")] = ModelBase::toJson(encCertificateKey_); + } + + return val; +} +bool GmCertificateInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("source"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("source")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSource(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("cert_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cert_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCertName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("cert_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cert_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCertId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("sign_certificate"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sign_certificate")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSignCertificate(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("sign_certificate_key"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sign_certificate_key")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSignCertificateKey(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enc_certificate"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enc_certificate")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEncCertificate(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enc_certificate_key"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enc_certificate_key")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEncCertificateKey(refVal); + } + } + return ok; +} + + +std::string GmCertificateInfo::getSource() const +{ + return source_; +} + +void GmCertificateInfo::setSource(const std::string& value) +{ + source_ = value; + sourceIsSet_ = true; +} + +bool GmCertificateInfo::sourceIsSet() const +{ + return sourceIsSet_; +} + +void GmCertificateInfo::unsetsource() +{ + sourceIsSet_ = false; +} + +std::string GmCertificateInfo::getCertName() const +{ + return certName_; +} + +void GmCertificateInfo::setCertName(const std::string& value) +{ + certName_ = value; + certNameIsSet_ = true; +} + +bool GmCertificateInfo::certNameIsSet() const +{ + return certNameIsSet_; +} + +void GmCertificateInfo::unsetcertName() +{ + certNameIsSet_ = false; +} + +std::string GmCertificateInfo::getCertId() const +{ + return certId_; +} + +void GmCertificateInfo::setCertId(const std::string& value) +{ + certId_ = value; + certIdIsSet_ = true; +} + +bool GmCertificateInfo::certIdIsSet() const +{ + return certIdIsSet_; +} + +void GmCertificateInfo::unsetcertId() +{ + certIdIsSet_ = false; +} + +std::string GmCertificateInfo::getSignCertificate() const +{ + return signCertificate_; +} + +void GmCertificateInfo::setSignCertificate(const std::string& value) +{ + signCertificate_ = value; + signCertificateIsSet_ = true; +} + +bool GmCertificateInfo::signCertificateIsSet() const +{ + return signCertificateIsSet_; +} + +void GmCertificateInfo::unsetsignCertificate() +{ + signCertificateIsSet_ = false; +} + +std::string GmCertificateInfo::getSignCertificateKey() const +{ + return signCertificateKey_; +} + +void GmCertificateInfo::setSignCertificateKey(const std::string& value) +{ + signCertificateKey_ = value; + signCertificateKeyIsSet_ = true; +} + +bool GmCertificateInfo::signCertificateKeyIsSet() const +{ + return signCertificateKeyIsSet_; +} + +void GmCertificateInfo::unsetsignCertificateKey() +{ + signCertificateKeyIsSet_ = false; +} + +std::string GmCertificateInfo::getEncCertificate() const +{ + return encCertificate_; +} + +void GmCertificateInfo::setEncCertificate(const std::string& value) +{ + encCertificate_ = value; + encCertificateIsSet_ = true; +} + +bool GmCertificateInfo::encCertificateIsSet() const +{ + return encCertificateIsSet_; +} + +void GmCertificateInfo::unsetencCertificate() +{ + encCertificateIsSet_ = false; +} + +std::string GmCertificateInfo::getEncCertificateKey() const +{ + return encCertificateKey_; +} + +void GmCertificateInfo::setEncCertificateKey(const std::string& value) +{ + encCertificateKey_ = value; + encCertificateKeyIsSet_ = true; +} + +bool GmCertificateInfo::encCertificateKeyIsSet() const +{ + return encCertificateKeyIsSet_; +} + +void GmCertificateInfo::unsetencCertificateKey() +{ + encCertificateKeyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/live/src/v1/model/ShowDomainHttpsCertResponse.cpp b/live/src/v1/model/ShowDomainHttpsCertResponse.cpp index 4b93bac47..8ce13e821 100644 --- a/live/src/v1/model/ShowDomainHttpsCertResponse.cpp +++ b/live/src/v1/model/ShowDomainHttpsCertResponse.cpp @@ -20,6 +20,8 @@ ShowDomainHttpsCertResponse::ShowDomainHttpsCertResponse() certificateKeyIsSet_ = false; forceRedirect_ = false; forceRedirectIsSet_ = false; + gmCertificateIsSet_ = false; + tlsCertificateIsSet_ = false; } ShowDomainHttpsCertResponse::~ShowDomainHttpsCertResponse() = default; @@ -44,6 +46,12 @@ web::json::value ShowDomainHttpsCertResponse::toJson() const if(forceRedirectIsSet_) { val[utility::conversions::to_string_t("force_redirect")] = ModelBase::toJson(forceRedirect_); } + if(gmCertificateIsSet_) { + val[utility::conversions::to_string_t("gm_certificate")] = ModelBase::toJson(gmCertificate_); + } + if(tlsCertificateIsSet_) { + val[utility::conversions::to_string_t("tls_certificate")] = ModelBase::toJson(tlsCertificate_); + } return val; } @@ -87,6 +95,24 @@ bool ShowDomainHttpsCertResponse::fromJson(const web::json::value& val) setForceRedirect(refVal); } } + if(val.has_field(utility::conversions::to_string_t("gm_certificate"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("gm_certificate")); + if(!fieldValue.is_null()) + { + GmCertificateInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setGmCertificate(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("tls_certificate"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("tls_certificate")); + if(!fieldValue.is_null()) + { + TlsCertificateInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTlsCertificate(refVal); + } + } return ok; } @@ -175,6 +201,48 @@ void ShowDomainHttpsCertResponse::unsetforceRedirect() forceRedirectIsSet_ = false; } +GmCertificateInfo ShowDomainHttpsCertResponse::getGmCertificate() const +{ + return gmCertificate_; +} + +void ShowDomainHttpsCertResponse::setGmCertificate(const GmCertificateInfo& value) +{ + gmCertificate_ = value; + gmCertificateIsSet_ = true; +} + +bool ShowDomainHttpsCertResponse::gmCertificateIsSet() const +{ + return gmCertificateIsSet_; +} + +void ShowDomainHttpsCertResponse::unsetgmCertificate() +{ + gmCertificateIsSet_ = false; +} + +TlsCertificateInfo ShowDomainHttpsCertResponse::getTlsCertificate() const +{ + return tlsCertificate_; +} + +void ShowDomainHttpsCertResponse::setTlsCertificate(const TlsCertificateInfo& value) +{ + tlsCertificate_ = value; + tlsCertificateIsSet_ = true; +} + +bool ShowDomainHttpsCertResponse::tlsCertificateIsSet() const +{ + return tlsCertificateIsSet_; +} + +void ShowDomainHttpsCertResponse::unsettlsCertificate() +{ + tlsCertificateIsSet_ = false; +} + } } } diff --git a/live/src/v1/model/TlsCertificateInfo.cpp b/live/src/v1/model/TlsCertificateInfo.cpp new file mode 100644 index 000000000..61a10c012 --- /dev/null +++ b/live/src/v1/model/TlsCertificateInfo.cpp @@ -0,0 +1,219 @@ + + +#include "huaweicloud/live/v1/model/TlsCertificateInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Live { +namespace V1 { +namespace Model { + + + + +TlsCertificateInfo::TlsCertificateInfo() +{ + source_ = ""; + sourceIsSet_ = false; + certName_ = ""; + certNameIsSet_ = false; + certId_ = ""; + certIdIsSet_ = false; + certificate_ = ""; + certificateIsSet_ = false; + certificateKey_ = ""; + certificateKeyIsSet_ = false; +} + +TlsCertificateInfo::~TlsCertificateInfo() = default; + +void TlsCertificateInfo::validate() +{ +} + +web::json::value TlsCertificateInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(sourceIsSet_) { + val[utility::conversions::to_string_t("source")] = ModelBase::toJson(source_); + } + if(certNameIsSet_) { + val[utility::conversions::to_string_t("cert_name")] = ModelBase::toJson(certName_); + } + if(certIdIsSet_) { + val[utility::conversions::to_string_t("cert_id")] = ModelBase::toJson(certId_); + } + if(certificateIsSet_) { + val[utility::conversions::to_string_t("certificate")] = ModelBase::toJson(certificate_); + } + if(certificateKeyIsSet_) { + val[utility::conversions::to_string_t("certificate_key")] = ModelBase::toJson(certificateKey_); + } + + return val; +} +bool TlsCertificateInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("source"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("source")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSource(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("cert_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cert_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCertName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("cert_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cert_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCertId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("certificate"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("certificate")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCertificate(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("certificate_key"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("certificate_key")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCertificateKey(refVal); + } + } + return ok; +} + + +std::string TlsCertificateInfo::getSource() const +{ + return source_; +} + +void TlsCertificateInfo::setSource(const std::string& value) +{ + source_ = value; + sourceIsSet_ = true; +} + +bool TlsCertificateInfo::sourceIsSet() const +{ + return sourceIsSet_; +} + +void TlsCertificateInfo::unsetsource() +{ + sourceIsSet_ = false; +} + +std::string TlsCertificateInfo::getCertName() const +{ + return certName_; +} + +void TlsCertificateInfo::setCertName(const std::string& value) +{ + certName_ = value; + certNameIsSet_ = true; +} + +bool TlsCertificateInfo::certNameIsSet() const +{ + return certNameIsSet_; +} + +void TlsCertificateInfo::unsetcertName() +{ + certNameIsSet_ = false; +} + +std::string TlsCertificateInfo::getCertId() const +{ + return certId_; +} + +void TlsCertificateInfo::setCertId(const std::string& value) +{ + certId_ = value; + certIdIsSet_ = true; +} + +bool TlsCertificateInfo::certIdIsSet() const +{ + return certIdIsSet_; +} + +void TlsCertificateInfo::unsetcertId() +{ + certIdIsSet_ = false; +} + +std::string TlsCertificateInfo::getCertificate() const +{ + return certificate_; +} + +void TlsCertificateInfo::setCertificate(const std::string& value) +{ + certificate_ = value; + certificateIsSet_ = true; +} + +bool TlsCertificateInfo::certificateIsSet() const +{ + return certificateIsSet_; +} + +void TlsCertificateInfo::unsetcertificate() +{ + certificateIsSet_ = false; +} + +std::string TlsCertificateInfo::getCertificateKey() const +{ + return certificateKey_; +} + +void TlsCertificateInfo::setCertificateKey(const std::string& value) +{ + certificateKey_ = value; + certificateKeyIsSet_ = true; +} + +bool TlsCertificateInfo::certificateKeyIsSet() const +{ + return certificateKeyIsSet_; +} + +void TlsCertificateInfo::unsetcertificateKey() +{ + certificateKeyIsSet_ = false; +} + +} +} +} +} +} + +