diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a4a32a1b..a1d34a49f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,82 @@ +# 3.1.120 2025-01-16 + +### HuaweiCloud SDK CodeArtsDeploy + +- _API Version_ + - V2 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ListHostClusters** + - changes of response param + - `+ result.is_proxy_mode` + - `- result.created_by` + - `+ result.permission.can_copy` + - **ShowHostClusterDetail** + - changes of response param + - `+ result.permission.can_copy` + +### HuaweiCloud SDK GaussDB + +- _API Version_ + - V3 +- _Features_ + - Support the APIs `UpgradeSrKernelVersion`, `ListStarRocksDataReplicationConfigByDataBase`, `ModifyDataSync` +- _Bug Fix_ + - None +- _Change_ + - **ListStarRocksDbParameters** + - changes of request param + - `+ add_task_scenario` + - changes of response param + - `+ db_parameters.is_modifiable` + +### HuaweiCloud SDK OCR + +- _API Version_ + - V1 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **RecognizeVehicleLicense** + - changes of request param + - `+ recognize_electronic_license` + - changes of response param + - `+ result.type` + - `+ result.color` + - `+ result.mandatory_scrapping_date` + - `+ result.status` + +### HuaweiCloud SDK SMN + +- _API Version_ + - V2 +- _Features_ + - Support the APIs `ShowNotifyPolicy`, `CreateNotifyPolicy`, `UpdateNotifyPolicy`, `DeleteNotifyPolicy` +- _Bug Fix_ + - None +- _Change_ + - **PublishMessage** + - changes of request param + - `+ locale` + - **AddSubscription** + - changes of request param + - `+ subscriptions` + - `+ extension.header` + - `+ extension.app_key` + - `+ extension.app_secret` + - `+ extension.robot_code` + - **ListResourceInstances** + - changes of request param + - `+ without_any_tag` + - **ListTopicAttributes** + - changes of request param + - `* name: required -> optional` + # 3.1.119 2025-01-09 ### HuaweiCloud SDK DRS diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index 18e92d070..837f50bf3 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,3 +1,82 @@ +# 3.1.120 2025-01-16 + +### HuaweiCloud SDK CodeArtsDeploy + +- _接口版本_ + - V2 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ListHostClusters** + - 响应参数变更 + - `+ result.is_proxy_mode` + - `- result.created_by` + - `+ result.permission.can_copy` + - **ShowHostClusterDetail** + - 响应参数变更 + - `+ result.permission.can_copy` + +### HuaweiCloud SDK GaussDB + +- _接口版本_ + - V3 +- _新增特性_ + - 支持接口`UpgradeSrKernelVersion`、`ListStarRocksDataReplicationConfigByDataBase`、`ModifyDataSync` +- _解决问题_ + - 无 +- _特性变更_ + - **ListStarRocksDbParameters** + - 请求参数变更 + - `+ add_task_scenario` + - 响应参数变更 + - `+ db_parameters.is_modifiable` + +### HuaweiCloud SDK OCR + +- _接口版本_ + - V1 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **RecognizeVehicleLicense** + - 请求参数变更 + - `+ recognize_electronic_license` + - 响应参数变更 + - `+ result.type` + - `+ result.color` + - `+ result.mandatory_scrapping_date` + - `+ result.status` + +### HuaweiCloud SDK SMN + +- _接口版本_ + - V2 +- _新增特性_ + - 支持接口`ShowNotifyPolicy`、`CreateNotifyPolicy`、`UpdateNotifyPolicy`、`DeleteNotifyPolicy` +- _解决问题_ + - 无 +- _特性变更_ + - **PublishMessage** + - 请求参数变更 + - `+ locale` + - **AddSubscription** + - 请求参数变更 + - `+ subscriptions` + - `+ extension.header` + - `+ extension.app_key` + - `+ extension.app_secret` + - `+ extension.robot_code` + - **ListResourceInstances** + - 请求参数变更 + - `+ without_any_tag` + - **ListTopicAttributes** + - 请求参数变更 + - `* name: required -> optional` + # 3.1.119 2025-01-09 ### HuaweiCloud SDK DRS diff --git a/VERSION b/VERSION index f1e87240b..59f3ba8d5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.119 +3.1.120 diff --git a/cfw/include/huaweicloud/cfw/v1/CfwRegion.h b/cfw/include/huaweicloud/cfw/v1/CfwRegion.h index 1261ec58b..53841feb2 100644 --- a/cfw/include/huaweicloud/cfw/v1/CfwRegion.h +++ b/cfw/include/huaweicloud/cfw/v1/CfwRegion.h @@ -102,6 +102,22 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwRegion { { "https://cfw.cn-south-2.myhuaweicloud.com" }); + regions["cn-east-4"] = Region("cn-east-4", + { + "https://cfw.cn-east-4.myhuaweicloud.com" + }); + regions["ap-southeast-5"] = Region("ap-southeast-5", + { + "https://cfw.ap-southeast-5.myhuaweicloud.com" + }); + regions["af-north-1"] = Region("af-north-1", + { + "https://cfw.af-north-1.myhuaweicloud.com" + }); + regions["cn-east-5"] = Region("cn-east-5", + { + "https://cfw.cn-east-5.myhuaweicloud.com" + }); return regions; } private: diff --git a/codeartsdeploy/include/huaweicloud/codeartsdeploy/v2/model/HostClusterInfo.h b/codeartsdeploy/include/huaweicloud/codeartsdeploy/v2/model/HostClusterInfo.h index 55f615a98..af48f989a 100644 --- a/codeartsdeploy/include/huaweicloud/codeartsdeploy/v2/model/HostClusterInfo.h +++ b/codeartsdeploy/include/huaweicloud/codeartsdeploy/v2/model/HostClusterInfo.h @@ -11,7 +11,6 @@ #include #include -#include namespace HuaweiCloud { namespace Sdk { @@ -94,15 +93,6 @@ class HUAWEICLOUD_CODEARTSDEPLOY_V2_EXPORT HostClusterInfo void unsetslaveClusterId(); void setSlaveClusterId(const std::string& value); - /// - /// - /// - - UserInfo getCreatedBy() const; - bool createdByIsSet() const; - void unsetcreatedBy(); - void setCreatedBy(const UserInfo& value); - /// /// 描述 /// @@ -139,6 +129,15 @@ class HUAWEICLOUD_CODEARTSDEPLOY_V2_EXPORT HostClusterInfo void unsetenvCount(); void setEnvCount(int32_t value); + /// + /// 主机集群是否为代理机接入模式, 1:是 0:否 + /// + + int32_t getIsProxyMode() const; + bool isProxyModeIsSet() const; + void unsetisProxyMode(); + void setIsProxyMode(int32_t value); + protected: std::string id_; @@ -153,8 +152,6 @@ class HUAWEICLOUD_CODEARTSDEPLOY_V2_EXPORT HostClusterInfo bool osIsSet_; std::string slaveClusterId_; bool slaveClusterIdIsSet_; - UserInfo createdBy_; - bool createdByIsSet_; std::string description_; bool descriptionIsSet_; PermissionClusterDetail permission_; @@ -163,6 +160,8 @@ class HUAWEICLOUD_CODEARTSDEPLOY_V2_EXPORT HostClusterInfo bool nickNameIsSet_; int32_t envCount_; bool envCountIsSet_; + int32_t isProxyMode_; + bool isProxyModeIsSet_; }; diff --git a/codeartsdeploy/include/huaweicloud/codeartsdeploy/v2/model/PermissionClusterDetail.h b/codeartsdeploy/include/huaweicloud/codeartsdeploy/v2/model/PermissionClusterDetail.h index 9cde02b6b..72d9dd2db 100644 --- a/codeartsdeploy/include/huaweicloud/codeartsdeploy/v2/model/PermissionClusterDetail.h +++ b/codeartsdeploy/include/huaweicloud/codeartsdeploy/v2/model/PermissionClusterDetail.h @@ -82,6 +82,15 @@ class HUAWEICLOUD_CODEARTSDEPLOY_V2_EXPORT PermissionClusterDetail void unsetcanManage(); void setCanManage(bool value); + /// + /// 是否有复制主机权限 + /// + + bool isCanCopy() const; + bool canCopyIsSet() const; + void unsetcanCopy(); + void setCanCopy(bool value); + protected: bool canView_; @@ -94,6 +103,8 @@ class HUAWEICLOUD_CODEARTSDEPLOY_V2_EXPORT PermissionClusterDetail bool canAddHostIsSet_; bool canManage_; bool canManageIsSet_; + bool canCopy_; + bool canCopyIsSet_; }; diff --git a/codeartsdeploy/src/v2/model/HostClusterInfo.cpp b/codeartsdeploy/src/v2/model/HostClusterInfo.cpp index a3727b6b7..95d814fd7 100644 --- a/codeartsdeploy/src/v2/model/HostClusterInfo.cpp +++ b/codeartsdeploy/src/v2/model/HostClusterInfo.cpp @@ -24,7 +24,6 @@ HostClusterInfo::HostClusterInfo() osIsSet_ = false; slaveClusterId_ = ""; slaveClusterIdIsSet_ = false; - createdByIsSet_ = false; description_ = ""; descriptionIsSet_ = false; permissionIsSet_ = false; @@ -32,6 +31,8 @@ HostClusterInfo::HostClusterInfo() nickNameIsSet_ = false; envCount_ = 0; envCountIsSet_ = false; + isProxyMode_ = 0; + isProxyModeIsSet_ = false; } HostClusterInfo::~HostClusterInfo() = default; @@ -62,9 +63,6 @@ web::json::value HostClusterInfo::toJson() const if(slaveClusterIdIsSet_) { val[utility::conversions::to_string_t("slave_cluster_id")] = ModelBase::toJson(slaveClusterId_); } - if(createdByIsSet_) { - val[utility::conversions::to_string_t("created_by")] = ModelBase::toJson(createdBy_); - } if(descriptionIsSet_) { val[utility::conversions::to_string_t("description")] = ModelBase::toJson(description_); } @@ -77,6 +75,9 @@ web::json::value HostClusterInfo::toJson() const if(envCountIsSet_) { val[utility::conversions::to_string_t("env_count")] = ModelBase::toJson(envCount_); } + if(isProxyModeIsSet_) { + val[utility::conversions::to_string_t("is_proxy_mode")] = ModelBase::toJson(isProxyMode_); + } return val; } @@ -138,15 +139,6 @@ bool HostClusterInfo::fromJson(const web::json::value& val) setSlaveClusterId(refVal); } } - if(val.has_field(utility::conversions::to_string_t("created_by"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("created_by")); - if(!fieldValue.is_null()) - { - UserInfo refVal; - ok &= ModelBase::fromJson(fieldValue, refVal); - setCreatedBy(refVal); - } - } if(val.has_field(utility::conversions::to_string_t("description"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("description")); if(!fieldValue.is_null()) @@ -183,6 +175,15 @@ bool HostClusterInfo::fromJson(const web::json::value& val) setEnvCount(refVal); } } + if(val.has_field(utility::conversions::to_string_t("is_proxy_mode"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_proxy_mode")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsProxyMode(refVal); + } + } return ok; } @@ -313,27 +314,6 @@ void HostClusterInfo::unsetslaveClusterId() slaveClusterIdIsSet_ = false; } -UserInfo HostClusterInfo::getCreatedBy() const -{ - return createdBy_; -} - -void HostClusterInfo::setCreatedBy(const UserInfo& value) -{ - createdBy_ = value; - createdByIsSet_ = true; -} - -bool HostClusterInfo::createdByIsSet() const -{ - return createdByIsSet_; -} - -void HostClusterInfo::unsetcreatedBy() -{ - createdByIsSet_ = false; -} - std::string HostClusterInfo::getDescription() const { return description_; @@ -418,6 +398,27 @@ void HostClusterInfo::unsetenvCount() envCountIsSet_ = false; } +int32_t HostClusterInfo::getIsProxyMode() const +{ + return isProxyMode_; +} + +void HostClusterInfo::setIsProxyMode(int32_t value) +{ + isProxyMode_ = value; + isProxyModeIsSet_ = true; +} + +bool HostClusterInfo::isProxyModeIsSet() const +{ + return isProxyModeIsSet_; +} + +void HostClusterInfo::unsetisProxyMode() +{ + isProxyModeIsSet_ = false; +} + } } } diff --git a/codeartsdeploy/src/v2/model/PermissionClusterDetail.cpp b/codeartsdeploy/src/v2/model/PermissionClusterDetail.cpp index 96dc9143d..2da787297 100644 --- a/codeartsdeploy/src/v2/model/PermissionClusterDetail.cpp +++ b/codeartsdeploy/src/v2/model/PermissionClusterDetail.cpp @@ -22,6 +22,8 @@ PermissionClusterDetail::PermissionClusterDetail() canAddHostIsSet_ = false; canManage_ = false; canManageIsSet_ = false; + canCopy_ = false; + canCopyIsSet_ = false; } PermissionClusterDetail::~PermissionClusterDetail() = default; @@ -49,6 +51,9 @@ web::json::value PermissionClusterDetail::toJson() const if(canManageIsSet_) { val[utility::conversions::to_string_t("can_manage")] = ModelBase::toJson(canManage_); } + if(canCopyIsSet_) { + val[utility::conversions::to_string_t("can_copy")] = ModelBase::toJson(canCopy_); + } return val; } @@ -101,6 +106,15 @@ bool PermissionClusterDetail::fromJson(const web::json::value& val) setCanManage(refVal); } } + if(val.has_field(utility::conversions::to_string_t("can_copy"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("can_copy")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCanCopy(refVal); + } + } return ok; } @@ -210,6 +224,27 @@ void PermissionClusterDetail::unsetcanManage() canManageIsSet_ = false; } +bool PermissionClusterDetail::isCanCopy() const +{ + return canCopy_; +} + +void PermissionClusterDetail::setCanCopy(bool value) +{ + canCopy_ = value; + canCopyIsSet_ = true; +} + +bool PermissionClusterDetail::canCopyIsSet() const +{ + return canCopyIsSet_; +} + +void PermissionClusterDetail::unsetcanCopy() +{ + canCopyIsSet_ = false; +} + } } } diff --git a/csms/include/huaweicloud/csms/v1/CsmsRegion.h b/csms/include/huaweicloud/csms/v1/CsmsRegion.h index cdba70426..7a7f75641 100644 --- a/csms/include/huaweicloud/csms/v1/CsmsRegion.h +++ b/csms/include/huaweicloud/csms/v1/CsmsRegion.h @@ -118,6 +118,10 @@ class HUAWEICLOUD_CSMS_V1_EXPORT CsmsRegion { { "https://kms.cn-east-4.myhuaweicloud.com" }); + regions["ap-southeast-5"] = Region("ap-southeast-5", + { + "https://kms.ap-southeast-5.myhuaweicloud.com" + }); return regions; } private: diff --git a/csms/include/huaweicloud/csms/v1/model/CreateSecretRequestBody.h b/csms/include/huaweicloud/csms/v1/model/CreateSecretRequestBody.h index 2895d2320..fc0d56c25 100644 --- a/csms/include/huaweicloud/csms/v1/model/CreateSecretRequestBody.h +++ b/csms/include/huaweicloud/csms/v1/model/CreateSecretRequestBody.h @@ -85,7 +85,7 @@ class HUAWEICLOUD_CSMS_V1_EXPORT CreateSecretRequestBody void setSecretString(const std::string& value); /// - /// 凭据类型 - COMMON:通用凭据(默认)。用于应用系统中的各种敏感信息储存。 - RDS:RDS凭据 。专门针对RDS的凭据,用于存储RDS的账号信息。(已不支持,使用RDS-FG替代) - RDS-FG:RDS凭据 。专门针对RDS的凭据,用于存储RDS的账号信息。 - GaussDB-FG:GaussDB凭据。专门针对GaussDB的凭据,用于存储GaussDB的账号信息。 + /// 凭据类型 - COMMON:通用凭据(默认)。用于应用系统中的各种敏感信息储存。 - RDS:RDS凭据 。专门针对RDS的凭据,用于存储RDS的账号信息。(已不支持,使用RDS-FG替代) - RDS-FG:RDS凭据 。专门针对RDS的凭据,用于存储RDS的账号信息。 - GaussDB-FG:TaurusDB凭据。专门针对TaurusDB的凭据,用于存储TaurusDB的账号信息。 /// std::string getSecretType() const; @@ -112,7 +112,7 @@ class HUAWEICLOUD_CSMS_V1_EXPORT CreateSecretRequestBody void setRotationPeriod(const std::string& value); /// - /// 轮转配置 约束:范围不超过1024个字符。 当secret_type为RDS-FG、GaussDB-FG时,配置为{\"InstanceId\":\"\",\"SecretSubType\":\"\"} 说明:当secret_type为RDS-FG、GaussDB-FG时,必须填写该值 InstanceId为实例ID,SecretSubType为轮转子类型,取值为:SingleUser,MultiUser。 SingleUser:指定轮转类型为单用户模式轮转,每次轮转将指定账号重置为新的口令。 MultiUser:指定轮转类型为双用户模式轮转,SYSCURRENT和SYSPREVIOUS分别引用其中一个账号。凭据轮转时,SYSPREVIOUS引用的账号口令会被重置为新的随机口令,随后凭据交换SYSCURRENT和SYSPREVIOUS对账号的引用。 + /// 轮转配置 约束:范围不超过1024个字符。 当secret_type为RDS-FG、GaussDB-FG时,必须填写本参数,参数格式为{\"InstanceId\":\"\",\"SecretSubType\":\"\"} 参数说明:InstanceId为实例ID,SecretSubType为轮转子类型,取值为:SingleUser,MultiUser。 SingleUser:指定轮转类型为单用户模式轮转,每次轮转将指定账号重置为新的口令。 MultiUser:指定轮转类型为双用户模式轮转,SYSCURRENT和SYSPREVIOUS分别引用其中一个账号。凭据轮转时,SYSPREVIOUS引用的账号口令会被重置为新的随机口令,随后凭据交换SYSCURRENT和SYSPREVIOUS对账号的引用。 /// std::string getRotationConfig() const; diff --git a/csms/include/huaweicloud/csms/v1/model/Record.h b/csms/include/huaweicloud/csms/v1/model/Record.h index c735e5076..42e3419e0 100644 --- a/csms/include/huaweicloud/csms/v1/model/Record.h +++ b/csms/include/huaweicloud/csms/v1/model/Record.h @@ -75,7 +75,7 @@ class HUAWEICLOUD_CSMS_V1_EXPORT Record void setSecretName(const std::string& value); /// - /// 凭据类型 - COMMON:通用凭据(默认)。用于应用系统中的各种敏感信息储存。 - RDS:RDS凭据 。专门针对RDS的凭据,用于存储RDS的账号信息。(已不支持,使用RDS-FG替代) - RDS-FG:RDS凭据 。专门针对RDS的凭据,用于存储RDS的账号信息。 - GaussDB-FG:GaussDB凭据。专门针对GaussDB的凭据,用于存储GaussDB的账号信息。 + /// 凭据类型 - COMMON:通用凭据(默认)。用于应用系统中的各种敏感信息储存。 - RDS:RDS凭据 。专门针对RDS的凭据,用于存储RDS的账号信息。(已不支持,使用RDS-FG替代) - RDS-FG:RDS凭据 。专门针对RDS的凭据,用于存储RDS的账号信息。 - GaussDB-FG:TaurusDB凭据。专门针对TaurusDB的凭据,用于存储TaurusDB的账号信息。 /// std::string getSecretType() const; diff --git a/csms/include/huaweicloud/csms/v1/model/Secret.h b/csms/include/huaweicloud/csms/v1/model/Secret.h index 1cf933872..a111b546e 100644 --- a/csms/include/huaweicloud/csms/v1/model/Secret.h +++ b/csms/include/huaweicloud/csms/v1/model/Secret.h @@ -112,7 +112,7 @@ class HUAWEICLOUD_CSMS_V1_EXPORT Secret void setScheduledDeleteTime(int64_t value); /// - /// 凭据类型 - COMMON:通用凭据(默认)。用于应用系统中的各种敏感信息储存。 - RDS:RDS凭据 。专门针对RDS的凭据,用于存储RDS的账号信息。(已不支持,使用RDS-FG替代) - RDS-FG:RDS凭据 。专门针对RDS的凭据,用于存储RDS的账号信息。 - GaussDB-FG:GaussDB凭据。专门针对GaussDB的凭据,用于存储GaussDB的账号信息。 + /// 凭据类型 - COMMON:通用凭据(默认)。用于应用系统中的各种敏感信息储存。 - RDS:RDS凭据 。专门针对RDS的凭据,用于存储RDS的账号信息。(已不支持,使用RDS-FG替代) - RDS-FG:RDS凭据 。专门针对RDS的凭据,用于存储RDS的账号信息。 - GaussDB-FG:TaurusDB凭据。专门针对TaurusDB的凭据,用于存储TaurusDB的账号信息。 /// std::string getSecretType() const; diff --git a/csms/include/huaweicloud/csms/v1/model/SecretTask.h b/csms/include/huaweicloud/csms/v1/model/SecretTask.h index 53b2375b0..e09df3158 100644 --- a/csms/include/huaweicloud/csms/v1/model/SecretTask.h +++ b/csms/include/huaweicloud/csms/v1/model/SecretTask.h @@ -74,15 +74,6 @@ class HUAWEICLOUD_CSMS_V1_EXPORT SecretTask void unsettaskStatus(); void setTaskStatus(const std::string& value); - /// - /// 任务尝试次数。 - /// - - int32_t getAttemptNums() const; - bool attemptNumsIsSet() const; - void unsetattemptNums(); - void setAttemptNums(int32_t value); - /// /// 轮转类型。 /// @@ -101,6 +92,15 @@ class HUAWEICLOUD_CSMS_V1_EXPORT SecretTask void unsettaskTime(); void setTaskTime(int64_t value); + /// + /// 轮转尝试次数。 + /// + + int32_t getAttemptNums() const; + bool attemptNumsIsSet() const; + void unsetattemptNums(); + void setAttemptNums(int32_t value); + /// /// 任务错误码。 /// @@ -129,12 +129,12 @@ class HUAWEICLOUD_CSMS_V1_EXPORT SecretTask bool rotationFuncUrnIsSet_; std::string taskStatus_; bool taskStatusIsSet_; - int32_t attemptNums_; - bool attemptNumsIsSet_; std::string operateType_; bool operateTypeIsSet_; int64_t taskTime_; bool taskTimeIsSet_; + int32_t attemptNums_; + bool attemptNumsIsSet_; std::string taskErrorCode_; bool taskErrorCodeIsSet_; std::string taskErrorMsg_; diff --git a/csms/include/huaweicloud/csms/v1/model/VersionMetadata.h b/csms/include/huaweicloud/csms/v1/model/VersionMetadata.h index 6cbcbe182..00776955e 100644 --- a/csms/include/huaweicloud/csms/v1/model/VersionMetadata.h +++ b/csms/include/huaweicloud/csms/v1/model/VersionMetadata.h @@ -85,7 +85,7 @@ class HUAWEICLOUD_CSMS_V1_EXPORT VersionMetadata void setSecretName(const std::string& value); /// - /// 凭据版本被标记的状态列表。每个版本标签对于凭据对象下版本是唯一存在的,如果你创建版本时,指定的是同一凭据对象下的一个已经标记在其他版本上的状态,该标签将自动从其他版本上删除,并附加到此版本上。 如果未指定version_stage的值,则凭据管理服务会自动移动临时标签SYSCURRENT到此新版本。 + /// 凭据版本被标记的状态列表。每个版本标签对于凭据对象下版本是唯一存在的,如果创建版本时,指定的是同一凭据对象下的一个已经标记在其他版本上的状态,该标签将自动从其他版本上删除,并附加到此版本上。 如果未指定version_stage的值,则凭据管理服务会自动移动临时标签SYSCURRENT到此新版本。 /// std::vector& getVersionStages(); diff --git a/csms/src/v1/model/SecretTask.cpp b/csms/src/v1/model/SecretTask.cpp index de80d8b4e..90d8c7b3e 100644 --- a/csms/src/v1/model/SecretTask.cpp +++ b/csms/src/v1/model/SecretTask.cpp @@ -20,12 +20,12 @@ SecretTask::SecretTask() rotationFuncUrnIsSet_ = false; taskStatus_ = ""; taskStatusIsSet_ = false; - attemptNums_ = 0; - attemptNumsIsSet_ = false; operateType_ = ""; operateTypeIsSet_ = false; taskTime_ = 0L; taskTimeIsSet_ = false; + attemptNums_ = 0; + attemptNumsIsSet_ = false; taskErrorCode_ = ""; taskErrorCodeIsSet_ = false; taskErrorMsg_ = ""; @@ -54,15 +54,15 @@ web::json::value SecretTask::toJson() const if(taskStatusIsSet_) { val[utility::conversions::to_string_t("task_status")] = ModelBase::toJson(taskStatus_); } - if(attemptNumsIsSet_) { - val[utility::conversions::to_string_t("attempt_nums")] = ModelBase::toJson(attemptNums_); - } if(operateTypeIsSet_) { val[utility::conversions::to_string_t("operate_type")] = ModelBase::toJson(operateType_); } if(taskTimeIsSet_) { val[utility::conversions::to_string_t("task_time")] = ModelBase::toJson(taskTime_); } + if(attemptNumsIsSet_) { + val[utility::conversions::to_string_t("attempt_nums")] = ModelBase::toJson(attemptNums_); + } if(taskErrorCodeIsSet_) { val[utility::conversions::to_string_t("task_error_code")] = ModelBase::toJson(taskErrorCode_); } @@ -112,15 +112,6 @@ bool SecretTask::fromJson(const web::json::value& val) setTaskStatus(refVal); } } - if(val.has_field(utility::conversions::to_string_t("attempt_nums"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("attempt_nums")); - if(!fieldValue.is_null()) - { - int32_t refVal; - ok &= ModelBase::fromJson(fieldValue, refVal); - setAttemptNums(refVal); - } - } if(val.has_field(utility::conversions::to_string_t("operate_type"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("operate_type")); if(!fieldValue.is_null()) @@ -139,6 +130,15 @@ bool SecretTask::fromJson(const web::json::value& val) setTaskTime(refVal); } } + if(val.has_field(utility::conversions::to_string_t("attempt_nums"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("attempt_nums")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAttemptNums(refVal); + } + } if(val.has_field(utility::conversions::to_string_t("task_error_code"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("task_error_code")); if(!fieldValue.is_null()) @@ -245,27 +245,6 @@ void SecretTask::unsettaskStatus() taskStatusIsSet_ = false; } -int32_t SecretTask::getAttemptNums() const -{ - return attemptNums_; -} - -void SecretTask::setAttemptNums(int32_t value) -{ - attemptNums_ = value; - attemptNumsIsSet_ = true; -} - -bool SecretTask::attemptNumsIsSet() const -{ - return attemptNumsIsSet_; -} - -void SecretTask::unsetattemptNums() -{ - attemptNumsIsSet_ = false; -} - std::string SecretTask::getOperateType() const { return operateType_; @@ -308,6 +287,27 @@ void SecretTask::unsettaskTime() taskTimeIsSet_ = false; } +int32_t SecretTask::getAttemptNums() const +{ + return attemptNums_; +} + +void SecretTask::setAttemptNums(int32_t value) +{ + attemptNums_ = value; + attemptNumsIsSet_ = true; +} + +bool SecretTask::attemptNumsIsSet() const +{ + return attemptNumsIsSet_; +} + +void SecretTask::unsetattemptNums() +{ + attemptNumsIsSet_ = false; +} + std::string SecretTask::getTaskErrorCode() const { return taskErrorCode_; diff --git a/ecs/include/huaweicloud/ecs/v2/EcsClient.h b/ecs/include/huaweicloud/ecs/v2/EcsClient.h index a344e61cb..15761f4db 100644 --- a/ecs/include/huaweicloud/ecs/v2/EcsClient.h +++ b/ecs/include/huaweicloud/ecs/v2/EcsClient.h @@ -94,6 +94,8 @@ #include #include #include +#include +#include #include #include #include @@ -542,6 +544,14 @@ class HUAWEICLOUD_ECS_V2_EXPORT EcsClient : public Client std::shared_ptr listResizeFlavors( ListResizeFlavorsRequest &request ); + // 查询可用区列表 + // + // 查询可用区列表 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listServerAzInfo( + ListServerAzInfoRequest &request + ); // 查询弹性云服务器挂载磁盘列表详情信息 // // 查询弹性云服务器挂载的磁盘信息。 diff --git a/ecs/include/huaweicloud/ecs/v2/EcsMeta.h b/ecs/include/huaweicloud/ecs/v2/EcsMeta.h index a260fba19..fafb4135b 100644 --- a/ecs/include/huaweicloud/ecs/v2/EcsMeta.h +++ b/ecs/include/huaweicloud/ecs/v2/EcsMeta.h @@ -45,6 +45,7 @@ class HUAWEICLOUD_ECS_V2_EXPORT EcsMeta { static HttpRequestDef genRequestDefForListFlavorSellPolicies(); static HttpRequestDef genRequestDefForListFlavors(); static HttpRequestDef genRequestDefForListResizeFlavors(); + static HttpRequestDef genRequestDefForListServerAzInfo(); static HttpRequestDef genRequestDefForListServerBlockDevices(); static HttpRequestDef genRequestDefForListServerGroups(); static HttpRequestDef genRequestDefForListServerInterfaces(); diff --git a/ecs/include/huaweicloud/ecs/v2/model/ListServerAzInfo.h b/ecs/include/huaweicloud/ecs/v2/model/ListServerAzInfo.h new file mode 100644 index 000000000..7f8e96df9 --- /dev/null +++ b/ecs/include/huaweicloud/ecs/v2/model/ListServerAzInfo.h @@ -0,0 +1,131 @@ + +#ifndef HUAWEICLOUD_SDK_ECS_V2_MODEL_ListServerAzInfo_H_ +#define HUAWEICLOUD_SDK_ECS_V2_MODEL_ListServerAzInfo_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Ecs { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_ECS_V2_EXPORT ListServerAzInfo + : public ModelBase +{ +public: + ListServerAzInfo(); + virtual ~ListServerAzInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListServerAzInfo members + + /// + /// 可用区ID + /// + + std::string getAvailabilityZoneId() const; + bool availabilityZoneIdIsSet() const; + void unsetavailabilityZoneId(); + void setAvailabilityZoneId(const std::string& value); + + /// + /// 可用区类型 + /// + + std::string getType() const; + bool typeIsSet() const; + void unsettype(); + void setType(const std::string& value); + + /// + /// 可用区模式 + /// + + std::string getMode() const; + bool modeIsSet() const; + void unsetmode(); + void setMode(const std::string& value); + + /// + /// 公网边界组,网络eip类别标识,用于查找az可用的eip池 + /// + + std::string getPublicBorderGroup() const; + bool publicBorderGroupIsSet() const; + void unsetpublicBorderGroup(); + void setPublicBorderGroup(const std::string& value); + + /// + /// 可用区别名 + /// + + std::string getAlias() const; + bool aliasIsSet() const; + void unsetalias(); + void setAlias(const std::string& value); + + /// + /// 可用区所属的AZGroup列表 + /// + + std::vector& getAzGroupIds(); + bool azGroupIdsIsSet() const; + void unsetazGroupIds(); + void setAzGroupIds(const std::vector& value); + + /// + /// 可用区类型对应的子类型 + /// + + int32_t getCategory() const; + bool categoryIsSet() const; + void unsetcategory(); + void setCategory(int32_t value); + + +protected: + std::string availabilityZoneId_; + bool availabilityZoneIdIsSet_; + std::string type_; + bool typeIsSet_; + std::string mode_; + bool modeIsSet_; + std::string publicBorderGroup_; + bool publicBorderGroupIsSet_; + std::string alias_; + bool aliasIsSet_; + std::vector azGroupIds_; + bool azGroupIdsIsSet_; + int32_t category_; + bool categoryIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_ECS_V2_MODEL_ListServerAzInfo_H_ diff --git a/ecs/include/huaweicloud/ecs/v2/model/ListServerAzInfoRequest.h b/ecs/include/huaweicloud/ecs/v2/model/ListServerAzInfoRequest.h new file mode 100644 index 000000000..6e5dfb775 --- /dev/null +++ b/ecs/include/huaweicloud/ecs/v2/model/ListServerAzInfoRequest.h @@ -0,0 +1,59 @@ + +#ifndef HUAWEICLOUD_SDK_ECS_V2_MODEL_ListServerAzInfoRequest_H_ +#define HUAWEICLOUD_SDK_ECS_V2_MODEL_ListServerAzInfoRequest_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Ecs { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_ECS_V2_EXPORT ListServerAzInfoRequest + : public ModelBase +{ +public: + ListServerAzInfoRequest(); + virtual ~ListServerAzInfoRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListServerAzInfoRequest members + + +protected: + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListServerAzInfoRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_ECS_V2_MODEL_ListServerAzInfoRequest_H_ diff --git a/ecs/include/huaweicloud/ecs/v2/model/ListServerAzInfoResponse.h b/ecs/include/huaweicloud/ecs/v2/model/ListServerAzInfoResponse.h new file mode 100644 index 000000000..a342165b9 --- /dev/null +++ b/ecs/include/huaweicloud/ecs/v2/model/ListServerAzInfoResponse.h @@ -0,0 +1,68 @@ + +#ifndef HUAWEICLOUD_SDK_ECS_V2_MODEL_ListServerAzInfoResponse_H_ +#define HUAWEICLOUD_SDK_ECS_V2_MODEL_ListServerAzInfoResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Ecs { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_ECS_V2_EXPORT ListServerAzInfoResponse + : public ModelBase, public HttpResponse +{ +public: + ListServerAzInfoResponse(); + virtual ~ListServerAzInfoResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListServerAzInfoResponse members + + /// + /// az详情信息 + /// + + std::vector& getAvailabilityZones(); + bool availabilityZonesIsSet() const; + void unsetavailabilityZones(); + void setAvailabilityZones(const std::vector& value); + + +protected: + std::vector availabilityZones_; + bool availabilityZonesIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_ECS_V2_MODEL_ListServerAzInfoResponse_H_ diff --git a/ecs/src/v2/EcsClient.cpp b/ecs/src/v2/EcsClient.cpp index df3275730..5699c23a2 100644 --- a/ecs/src/v2/EcsClient.cpp +++ b/ecs/src/v2/EcsClient.cpp @@ -1395,6 +1395,35 @@ std::shared_ptr EcsClient::listResizeFlavors(ListResi return localVarResult; } +std::shared_ptr EcsClient::listServerAzInfo(ListServerAzInfoRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/availability-zones"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, EcsMeta::genRequestDefForListServerAzInfo()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr EcsClient::listServerBlockDevices(ListServerBlockDevicesRequest &request) { std::string localVarPath = "/v1/{project_id}/cloudservers/{server_id}/block_device"; diff --git a/ecs/src/v2/EcsMeta.cpp b/ecs/src/v2/EcsMeta.cpp index 691914c64..4ec844c9e 100644 --- a/ecs/src/v2/EcsMeta.cpp +++ b/ecs/src/v2/EcsMeta.cpp @@ -394,6 +394,11 @@ HttpRequestDef EcsMeta::genRequestDefForListResizeFlavors() { return reqDefBuilder; } +HttpRequestDef EcsMeta::genRequestDefForListServerAzInfo() { + HttpRequestDef reqDefBuilder; + return reqDefBuilder; +} + HttpRequestDef EcsMeta::genRequestDefForListServerBlockDevices() { HttpRequestDef reqDefBuilder; return reqDefBuilder; diff --git a/ecs/src/v2/model/ListServerAzInfo.cpp b/ecs/src/v2/model/ListServerAzInfo.cpp new file mode 100644 index 000000000..57f70c88f --- /dev/null +++ b/ecs/src/v2/model/ListServerAzInfo.cpp @@ -0,0 +1,288 @@ + + +#include "huaweicloud/ecs/v2/model/ListServerAzInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Ecs { +namespace V2 { +namespace Model { + + + + +ListServerAzInfo::ListServerAzInfo() +{ + availabilityZoneId_ = ""; + availabilityZoneIdIsSet_ = false; + type_ = ""; + typeIsSet_ = false; + mode_ = ""; + modeIsSet_ = false; + publicBorderGroup_ = ""; + publicBorderGroupIsSet_ = false; + alias_ = ""; + aliasIsSet_ = false; + azGroupIdsIsSet_ = false; + category_ = 0; + categoryIsSet_ = false; +} + +ListServerAzInfo::~ListServerAzInfo() = default; + +void ListServerAzInfo::validate() +{ +} + +web::json::value ListServerAzInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(availabilityZoneIdIsSet_) { + val[utility::conversions::to_string_t("availability_zone_id")] = ModelBase::toJson(availabilityZoneId_); + } + if(typeIsSet_) { + val[utility::conversions::to_string_t("type")] = ModelBase::toJson(type_); + } + if(modeIsSet_) { + val[utility::conversions::to_string_t("mode")] = ModelBase::toJson(mode_); + } + if(publicBorderGroupIsSet_) { + val[utility::conversions::to_string_t("public_border_group")] = ModelBase::toJson(publicBorderGroup_); + } + if(aliasIsSet_) { + val[utility::conversions::to_string_t("alias")] = ModelBase::toJson(alias_); + } + if(azGroupIdsIsSet_) { + val[utility::conversions::to_string_t("az_group_ids")] = ModelBase::toJson(azGroupIds_); + } + if(categoryIsSet_) { + val[utility::conversions::to_string_t("category")] = ModelBase::toJson(category_); + } + + return val; +} +bool ListServerAzInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("availability_zone_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("availability_zone_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAvailabilityZoneId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("mode"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("mode")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setMode(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("public_border_group"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("public_border_group")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPublicBorderGroup(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("alias"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("alias")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAlias(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("az_group_ids"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("az_group_ids")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAzGroupIds(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("category"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("category")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCategory(refVal); + } + } + return ok; +} + + +std::string ListServerAzInfo::getAvailabilityZoneId() const +{ + return availabilityZoneId_; +} + +void ListServerAzInfo::setAvailabilityZoneId(const std::string& value) +{ + availabilityZoneId_ = value; + availabilityZoneIdIsSet_ = true; +} + +bool ListServerAzInfo::availabilityZoneIdIsSet() const +{ + return availabilityZoneIdIsSet_; +} + +void ListServerAzInfo::unsetavailabilityZoneId() +{ + availabilityZoneIdIsSet_ = false; +} + +std::string ListServerAzInfo::getType() const +{ + return type_; +} + +void ListServerAzInfo::setType(const std::string& value) +{ + type_ = value; + typeIsSet_ = true; +} + +bool ListServerAzInfo::typeIsSet() const +{ + return typeIsSet_; +} + +void ListServerAzInfo::unsettype() +{ + typeIsSet_ = false; +} + +std::string ListServerAzInfo::getMode() const +{ + return mode_; +} + +void ListServerAzInfo::setMode(const std::string& value) +{ + mode_ = value; + modeIsSet_ = true; +} + +bool ListServerAzInfo::modeIsSet() const +{ + return modeIsSet_; +} + +void ListServerAzInfo::unsetmode() +{ + modeIsSet_ = false; +} + +std::string ListServerAzInfo::getPublicBorderGroup() const +{ + return publicBorderGroup_; +} + +void ListServerAzInfo::setPublicBorderGroup(const std::string& value) +{ + publicBorderGroup_ = value; + publicBorderGroupIsSet_ = true; +} + +bool ListServerAzInfo::publicBorderGroupIsSet() const +{ + return publicBorderGroupIsSet_; +} + +void ListServerAzInfo::unsetpublicBorderGroup() +{ + publicBorderGroupIsSet_ = false; +} + +std::string ListServerAzInfo::getAlias() const +{ + return alias_; +} + +void ListServerAzInfo::setAlias(const std::string& value) +{ + alias_ = value; + aliasIsSet_ = true; +} + +bool ListServerAzInfo::aliasIsSet() const +{ + return aliasIsSet_; +} + +void ListServerAzInfo::unsetalias() +{ + aliasIsSet_ = false; +} + +std::vector& ListServerAzInfo::getAzGroupIds() +{ + return azGroupIds_; +} + +void ListServerAzInfo::setAzGroupIds(const std::vector& value) +{ + azGroupIds_ = value; + azGroupIdsIsSet_ = true; +} + +bool ListServerAzInfo::azGroupIdsIsSet() const +{ + return azGroupIdsIsSet_; +} + +void ListServerAzInfo::unsetazGroupIds() +{ + azGroupIdsIsSet_ = false; +} + +int32_t ListServerAzInfo::getCategory() const +{ + return category_; +} + +void ListServerAzInfo::setCategory(int32_t value) +{ + category_ = value; + categoryIsSet_ = true; +} + +bool ListServerAzInfo::categoryIsSet() const +{ + return categoryIsSet_; +} + +void ListServerAzInfo::unsetcategory() +{ + categoryIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/ecs/src/v2/model/ListServerAzInfoRequest.cpp b/ecs/src/v2/model/ListServerAzInfoRequest.cpp new file mode 100644 index 000000000..90eb2bf35 --- /dev/null +++ b/ecs/src/v2/model/ListServerAzInfoRequest.cpp @@ -0,0 +1,44 @@ + + +#include "huaweicloud/ecs/v2/model/ListServerAzInfoRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Ecs { +namespace V2 { +namespace Model { + + + + +ListServerAzInfoRequest::ListServerAzInfoRequest() +{ +} + +ListServerAzInfoRequest::~ListServerAzInfoRequest() = default; + +void ListServerAzInfoRequest::validate() +{ +} + +web::json::value ListServerAzInfoRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + + return val; +} +bool ListServerAzInfoRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + return ok; +} + + +} +} +} +} +} + + diff --git a/ecs/src/v2/model/ListServerAzInfoResponse.cpp b/ecs/src/v2/model/ListServerAzInfoResponse.cpp new file mode 100644 index 000000000..3e56f9bbc --- /dev/null +++ b/ecs/src/v2/model/ListServerAzInfoResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/ecs/v2/model/ListServerAzInfoResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Ecs { +namespace V2 { +namespace Model { + + + + +ListServerAzInfoResponse::ListServerAzInfoResponse() +{ + availabilityZonesIsSet_ = false; +} + +ListServerAzInfoResponse::~ListServerAzInfoResponse() = default; + +void ListServerAzInfoResponse::validate() +{ +} + +web::json::value ListServerAzInfoResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(availabilityZonesIsSet_) { + val[utility::conversions::to_string_t("availability_zones")] = ModelBase::toJson(availabilityZones_); + } + + return val; +} +bool ListServerAzInfoResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("availability_zones"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("availability_zones")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAvailabilityZones(refVal); + } + } + return ok; +} + + +std::vector& ListServerAzInfoResponse::getAvailabilityZones() +{ + return availabilityZones_; +} + +void ListServerAzInfoResponse::setAvailabilityZones(const std::vector& value) +{ + availabilityZones_ = value; + availabilityZonesIsSet_ = true; +} + +bool ListServerAzInfoResponse::availabilityZonesIsSet() const +{ + return availabilityZonesIsSet_; +} + +void ListServerAzInfoResponse::unsetavailabilityZones() +{ + availabilityZonesIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/gaussdb/include/huaweicloud/gaussdb/v3/GaussDBClient.h b/gaussdb/include/huaweicloud/gaussdb/v3/GaussDBClient.h index 8b956bf5e..f657c68a7 100644 --- a/gaussdb/include/huaweicloud/gaussdb/v3/GaussDBClient.h +++ b/gaussdb/include/huaweicloud/gaussdb/v3/GaussDBClient.h @@ -443,6 +443,8 @@ #include #include #include +#include +#include #include #include #include @@ -451,6 +453,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -508,6 +513,9 @@ #include #include #include +#include +#include +#include #include #include @@ -1921,6 +1929,14 @@ class HUAWEICLOUD_GAUSSDB_V3_EXPORT GaussDBClient : public Client std::shared_ptr listStarRocksDataReplicationConfig( ListStarRocksDataReplicationConfigRequest &request ); + // 按目标库查询StarRocks数据同步配置信息 + // + // 按目标库查询StarRocks数据同步配置信息。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listStarRocksDataReplicationConfigByDataBase( + ListStarRocksDataReplicationConfigByDataBaseRequest &request + ); // 查询StarRocks数据同步状态信息 // // 查询StarRocks数据同步状态信息。 @@ -1945,6 +1961,14 @@ class HUAWEICLOUD_GAUSSDB_V3_EXPORT GaussDBClient : public Client std::shared_ptr listStarrocksInstanceInfo( ListStarrocksInstanceInfoRequest &request ); + // 修改StarRocks数据同步配置 + // + // 修改StarRocks数据同步配置。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr modifyDataSync( + ModifyDataSyncRequest &request + ); // 暂停StarRocks数据同步 // // 暂停StarRocks数据同步。 @@ -2129,6 +2153,14 @@ class HUAWEICLOUD_GAUSSDB_V3_EXPORT GaussDBClient : public Client std::shared_ptr updateStarrocksParams( UpdateStarrocksParamsRequest &request ); + // StarRocks内核版本升级 + // + // StarRocks内核版本升级。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr upgradeSrKernelVersion( + UpgradeSrKernelVersionRequest &request + ); // 删除SQL限流规则 // diff --git a/gaussdb/include/huaweicloud/gaussdb/v3/GaussDBMeta.h b/gaussdb/include/huaweicloud/gaussdb/v3/GaussDBMeta.h index 4fa276faf..0729e75e7 100644 --- a/gaussdb/include/huaweicloud/gaussdb/v3/GaussDBMeta.h +++ b/gaussdb/include/huaweicloud/gaussdb/v3/GaussDBMeta.h @@ -184,9 +184,11 @@ class HUAWEICLOUD_GAUSSDB_V3_EXPORT GaussDBMeta { static HttpRequestDef genRequestDefForListHtapStorageType(); static HttpRequestDef genRequestDefForListStarRocksDataBases(); static HttpRequestDef genRequestDefForListStarRocksDataReplicationConfig(); + static HttpRequestDef genRequestDefForListStarRocksDataReplicationConfigByDataBase(); static HttpRequestDef genRequestDefForListStarRocksDataReplications(); static HttpRequestDef genRequestDefForListStarRocksDbParameters(); static HttpRequestDef genRequestDefForListStarrocksInstanceInfo(); + static HttpRequestDef genRequestDefForModifyDataSync(); static HttpRequestDef genRequestDefForPauseStarRocksDataReplication(); static HttpRequestDef genRequestDefForRebootClickHouseInstance(); static HttpRequestDef genRequestDefForResizeClickHouseFlavor(); @@ -210,6 +212,7 @@ class HUAWEICLOUD_GAUSSDB_V3_EXPORT GaussDBMeta { static HttpRequestDef genRequestDefForUpdateStarRocksDatabaseUserPassword(); static HttpRequestDef genRequestDefForUpdateStarRocksDatabaseUserPermission(); static HttpRequestDef genRequestDefForUpdateStarrocksParams(); + static HttpRequestDef genRequestDefForUpgradeSrKernelVersion(); static HttpRequestDef genRequestDefForDeleteSqlFilterRule(); static HttpRequestDef genRequestDefForSetSqlFilterRule(); static HttpRequestDef genRequestDefForShowSqlFilterControl(); diff --git a/gaussdb/include/huaweicloud/gaussdb/v3/model/DbParameter.h b/gaussdb/include/huaweicloud/gaussdb/v3/model/DbParameter.h index f0211633a..0b0de241f 100644 --- a/gaussdb/include/huaweicloud/gaussdb/v3/model/DbParameter.h +++ b/gaussdb/include/huaweicloud/gaussdb/v3/model/DbParameter.h @@ -83,6 +83,15 @@ class HUAWEICLOUD_GAUSSDB_V3_EXPORT DbParameter void unsetdescription(); void setDescription(const std::string& value); + /// + /// **参数解释**: 新增子任务的场景,用于区分库参数是否支持修改。 **取值范围**: 不涉及。 + /// + + std::string getIsModifiable() const; + bool isModifiableIsSet() const; + void unsetisModifiable(); + void setIsModifiable(const std::string& value); + protected: std::string paramName_; @@ -95,6 +104,8 @@ class HUAWEICLOUD_GAUSSDB_V3_EXPORT DbParameter bool valueRangeIsSet_; std::string description_; bool descriptionIsSet_; + std::string isModifiable_; + bool isModifiableIsSet_; }; diff --git a/gaussdb/include/huaweicloud/gaussdb/v3/model/ListStarRocksDataReplicationConfigByDataBaseRequest.h b/gaussdb/include/huaweicloud/gaussdb/v3/model/ListStarRocksDataReplicationConfigByDataBaseRequest.h new file mode 100644 index 000000000..665018df0 --- /dev/null +++ b/gaussdb/include/huaweicloud/gaussdb/v3/model/ListStarRocksDataReplicationConfigByDataBaseRequest.h @@ -0,0 +1,93 @@ + +#ifndef HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_ListStarRocksDataReplicationConfigByDataBaseRequest_H_ +#define HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_ListStarRocksDataReplicationConfigByDataBaseRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_GAUSSDB_V3_EXPORT ListStarRocksDataReplicationConfigByDataBaseRequest + : public ModelBase +{ +public: + ListStarRocksDataReplicationConfigByDataBaseRequest(); + virtual ~ListStarRocksDataReplicationConfigByDataBaseRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListStarRocksDataReplicationConfigByDataBaseRequest members + + /// + /// **参数解释**: StarRocks实例ID,严格匹配UUID规则。 **约束限制**: 不涉及。 **取值范围**: 只能由英文字母、数字组成,后缀为in17,且长度为36个字符。 **默认值**: 不涉及。 + /// + + std::string getInstanceId() const; + bool instanceIdIsSet() const; + void unsetinstanceId(); + void setInstanceId(const std::string& value); + + /// + /// **参数解释**: 请求语言类型。 **约束限制**: 不涉及。 **取值范围**: - en-us - zh-cn **默认值**: en-us。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// **参数解释**: 目标数据库名。 **约束限制**: 不涉及。 **取值范围**: 字符长度限制3~128位,仅支持英文大小写字母、数字以及下划线。 **默认值**: 不涉及。 + /// + + std::string getDatabase() const; + bool databaseIsSet() const; + void unsetdatabase(); + void setDatabase(const std::string& value); + + +protected: + std::string instanceId_; + bool instanceIdIsSet_; + std::string xLanguage_; + bool xLanguageIsSet_; + std::string database_; + bool databaseIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListStarRocksDataReplicationConfigByDataBaseRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_ListStarRocksDataReplicationConfigByDataBaseRequest_H_ diff --git a/gaussdb/include/huaweicloud/gaussdb/v3/model/ListStarRocksDataReplicationConfigByDataBaseResponse.h b/gaussdb/include/huaweicloud/gaussdb/v3/model/ListStarRocksDataReplicationConfigByDataBaseResponse.h new file mode 100644 index 000000000..13b38f1a0 --- /dev/null +++ b/gaussdb/include/huaweicloud/gaussdb/v3/model/ListStarRocksDataReplicationConfigByDataBaseResponse.h @@ -0,0 +1,159 @@ + +#ifndef HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_ListStarRocksDataReplicationConfigByDataBaseResponse_H_ +#define HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_ListStarRocksDataReplicationConfigByDataBaseResponse_H_ + + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_GAUSSDB_V3_EXPORT ListStarRocksDataReplicationConfigByDataBaseResponse + : public ModelBase, public HttpResponse +{ +public: + ListStarRocksDataReplicationConfigByDataBaseResponse(); + virtual ~ListStarRocksDataReplicationConfigByDataBaseResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListStarRocksDataReplicationConfigByDataBaseResponse members + + /// + /// GaussDB(for MySQL)实例ID。 + /// + + std::string getSourceInstanceId() const; + bool sourceInstanceIdIsSet() const; + void unsetsourceInstanceId(); + void setSourceInstanceId(const std::string& value); + + /// + /// GaussDB(for MySQL)节点ID。 + /// + + std::string getSourceNodeId() const; + bool sourceNodeIdIsSet() const; + void unsetsourceNodeId(); + void setSourceNodeId(const std::string& value); + + /// + /// + /// + + DataBaseInfo getDatabaseInfo() const; + bool databaseInfoIsSet() const; + void unsetdatabaseInfo(); + void setDatabaseInfo(const DataBaseInfo& value); + + /// + /// 表配置信息。 + /// + + std::vector& getTableInfos(); + bool tableInfosIsSet() const; + void unsettableInfos(); + void setTableInfos(const std::vector& value); + + /// + /// + /// + + TableReplConfig getTableReplConfig() const; + bool tableReplConfigIsSet() const; + void unsettableReplConfig(); + void setTableReplConfig(const TableReplConfig& value); + + /// + /// + /// + + TableReplConfig getNewTableReplConfig() const; + bool newTableReplConfigIsSet() const; + void unsetnewTableReplConfig(); + void setNewTableReplConfig(const TableReplConfig& value); + + /// + /// 目标数据库名。 + /// + + std::string getTargetDatabaseName() const; + bool targetDatabaseNameIsSet() const; + void unsettargetDatabaseName(); + void setTargetDatabaseName(const std::string& value); + + /// + /// 同步任务表是否变化。 + /// + + bool isIsTablesChange() const; + bool isTablesChangeIsSet() const; + void unsetisTablesChange(); + void setIsTablesChange(bool value); + + /// + /// 最近一次alter table的异常信息。 + /// + + std::string getLastErrorOfAlterTable() const; + bool lastErrorOfAlterTableIsSet() const; + void unsetlastErrorOfAlterTable(); + void setLastErrorOfAlterTable(const std::string& value); + + +protected: + std::string sourceInstanceId_; + bool sourceInstanceIdIsSet_; + std::string sourceNodeId_; + bool sourceNodeIdIsSet_; + DataBaseInfo databaseInfo_; + bool databaseInfoIsSet_; + std::vector tableInfos_; + bool tableInfosIsSet_; + TableReplConfig tableReplConfig_; + bool tableReplConfigIsSet_; + TableReplConfig newTableReplConfig_; + bool newTableReplConfigIsSet_; + std::string targetDatabaseName_; + bool targetDatabaseNameIsSet_; + bool isTablesChange_; + bool isTablesChangeIsSet_; + std::string lastErrorOfAlterTable_; + bool lastErrorOfAlterTableIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_ListStarRocksDataReplicationConfigByDataBaseResponse_H_ diff --git a/gaussdb/include/huaweicloud/gaussdb/v3/model/ListStarRocksDbParametersRequest.h b/gaussdb/include/huaweicloud/gaussdb/v3/model/ListStarRocksDbParametersRequest.h index 5c9b06c1f..93ec9a9f7 100644 --- a/gaussdb/include/huaweicloud/gaussdb/v3/model/ListStarRocksDbParametersRequest.h +++ b/gaussdb/include/huaweicloud/gaussdb/v3/model/ListStarRocksDbParametersRequest.h @@ -56,12 +56,23 @@ class HUAWEICLOUD_GAUSSDB_V3_EXPORT ListStarRocksDbParametersRequest void unsetxLanguage(); void setXLanguage(const std::string& value); + /// + /// **参数解释**: 新增子任务的场景,用于区分库参数是否支持修改。 **约束限制**: 非必填。 **取值范围**: 不涉及。 **默认值**: 不涉及。 + /// + + std::string getAddTaskScenario() const; + bool addTaskScenarioIsSet() const; + void unsetaddTaskScenario(); + void setAddTaskScenario(const std::string& value); + protected: std::string instanceId_; bool instanceIdIsSet_; std::string xLanguage_; bool xLanguageIsSet_; + std::string addTaskScenario_; + bool addTaskScenarioIsSet_; #ifdef RTTR_FLAG RTTR_ENABLE() diff --git a/gaussdb/include/huaweicloud/gaussdb/v3/model/ModifyDataSyncConfigRequestV3.h b/gaussdb/include/huaweicloud/gaussdb/v3/model/ModifyDataSyncConfigRequestV3.h new file mode 100644 index 000000000..d2a24b093 --- /dev/null +++ b/gaussdb/include/huaweicloud/gaussdb/v3/model/ModifyDataSyncConfigRequestV3.h @@ -0,0 +1,145 @@ + +#ifndef HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_ModifyDataSyncConfigRequestV3_H_ +#define HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_ModifyDataSyncConfigRequestV3_H_ + + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// StarRocks修改配置请求体。 +/// +class HUAWEICLOUD_GAUSSDB_V3_EXPORT ModifyDataSyncConfigRequestV3 + : public ModelBase +{ +public: + ModifyDataSyncConfigRequestV3(); + virtual ~ModifyDataSyncConfigRequestV3(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ModifyDataSyncConfigRequestV3 members + + /// + /// **参数解释**: TaurusDB实例ID。 **约束限制**: 不涉及。 **取值范围**: 只能由英文字母、数字组成,后缀为in07,长度为36个字符。 **默认值**: 不涉及。 + /// + + std::string getSourceInstanceId() const; + bool sourceInstanceIdIsSet() const; + void unsetsourceInstanceId(); + void setSourceInstanceId(const std::string& value); + + /// + /// **参数解释**: TaurusDB只读节点ID。 **约束限制**: 不涉及。 **取值范围**: 只能由英文字母、数字组成,后缀为no07,长度为36个字符。 **默认值**: 不涉及。 + /// + + std::string getSourceNodeId() const; + bool sourceNodeIdIsSet() const; + void unsetsourceNodeId(); + void setSourceNodeId(const std::string& value); + + /// + /// **参数解释**: TaurusDB数据库名。 **约束限制**: 不涉及。 **取值范围**: 字符长度限制3~1024位,仅支持英文大小写字母、数字以及下划线。 **默认值**: 不涉及。 + /// + + std::string getSourceDatabaseName() const; + bool sourceDatabaseNameIsSet() const; + void unsetsourceDatabaseName(); + void setSourceDatabaseName(const std::string& value); + + /// + /// **参数解释**: 数据同步任务名称。 **约束限制**: 不涉及。 **取值范围**: 长度限制3~128位,仅支持英文大小写字母、数字以及下划线。 **默认值**: 不涉及。 + /// + + std::string getTaskName() const; + bool taskNameIsSet() const; + void unsettaskName(); + void setTaskName(const std::string& value); + + /// + /// **参数解释**: 库配置列表。 **约束限制**: 不涉及。 **取值范围**: 不涉及。 **默认值**: 不涉及。 + /// + + std::vector& getDbConfigs(); + bool dbConfigsIsSet() const; + void unsetdbConfigs(); + void setDbConfigs(const std::vector& value); + + /// + /// **参数解释**: 表配置信息。 **约束限制**: 不涉及。 **取值范围**: 不涉及。 **默认值**: 不涉及。 + /// + + std::vector& getTablesConfigs(); + bool tablesConfigsIsSet() const; + void unsettablesConfigs(); + void setTablesConfigs(const std::vector& value); + + /// + /// + /// + + TableReplConfig getTableReplConfig() const; + bool tableReplConfigIsSet() const; + void unsettableReplConfig(); + void setTableReplConfig(const TableReplConfig& value); + + /// + /// **参数解释**: 目标数据库名。 **约束限制**: 不涉及。 **取值范围**: 长度限制3~128位,仅支持英文大小写字母、数字以及下划线。 **默认值**: 不涉及。 + /// + + std::string getTargetDatabaseName() const; + bool targetDatabaseNameIsSet() const; + void unsettargetDatabaseName(); + void setTargetDatabaseName(const std::string& value); + + +protected: + std::string sourceInstanceId_; + bool sourceInstanceIdIsSet_; + std::string sourceNodeId_; + bool sourceNodeIdIsSet_; + std::string sourceDatabaseName_; + bool sourceDatabaseNameIsSet_; + std::string taskName_; + bool taskNameIsSet_; + std::vector dbConfigs_; + bool dbConfigsIsSet_; + std::vector tablesConfigs_; + bool tablesConfigsIsSet_; + TableReplConfig tableReplConfig_; + bool tableReplConfigIsSet_; + std::string targetDatabaseName_; + bool targetDatabaseNameIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_ModifyDataSyncConfigRequestV3_H_ diff --git a/gaussdb/include/huaweicloud/gaussdb/v3/model/ModifyDataSyncRequest.h b/gaussdb/include/huaweicloud/gaussdb/v3/model/ModifyDataSyncRequest.h new file mode 100644 index 000000000..dc7c1aaeb --- /dev/null +++ b/gaussdb/include/huaweicloud/gaussdb/v3/model/ModifyDataSyncRequest.h @@ -0,0 +1,94 @@ + +#ifndef HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_ModifyDataSyncRequest_H_ +#define HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_ModifyDataSyncRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_GAUSSDB_V3_EXPORT ModifyDataSyncRequest + : public ModelBase +{ +public: + ModifyDataSyncRequest(); + virtual ~ModifyDataSyncRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ModifyDataSyncRequest members + + /// + /// **参数解释**: 请求语言类型。 **约束限制**: 不涉及。 **取值范围**: - en-us - zh-cn **默认值**: en-us。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// **参数解释**: StarRocks实例ID,严格匹配UUID规则。 **约束限制**: 不涉及。 **取值范围**: 只能由英文字母、数字组成,后缀为in17,且长度为36个字符。 **默认值**: 不涉及。 + /// + + std::string getInstanceId() const; + bool instanceIdIsSet() const; + void unsetinstanceId(); + void setInstanceId(const std::string& value); + + /// + /// + /// + + ModifyDataSyncConfigRequestV3 getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const ModifyDataSyncConfigRequestV3& value); + + +protected: + std::string xLanguage_; + bool xLanguageIsSet_; + std::string instanceId_; + bool instanceIdIsSet_; + ModifyDataSyncConfigRequestV3 body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ModifyDataSyncRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_ModifyDataSyncRequest_H_ diff --git a/gaussdb/include/huaweicloud/gaussdb/v3/model/ModifyDataSyncResponse.h b/gaussdb/include/huaweicloud/gaussdb/v3/model/ModifyDataSyncResponse.h new file mode 100644 index 000000000..b5e392aa8 --- /dev/null +++ b/gaussdb/include/huaweicloud/gaussdb/v3/model/ModifyDataSyncResponse.h @@ -0,0 +1,125 @@ + +#ifndef HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_ModifyDataSyncResponse_H_ +#define HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_ModifyDataSyncResponse_H_ + + +#include + +#include +#include +#include + +#include +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_GAUSSDB_V3_EXPORT ModifyDataSyncResponse + : public ModelBase, public HttpResponse +{ +public: + ModifyDataSyncResponse(); + virtual ~ModifyDataSyncResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ModifyDataSyncResponse members + + /// + /// **参数解释**: TaurusDB数据库名。 **取值范围**: 长度限制3~1024位,仅支持英文大小写字母、数字以及下划线。 + /// + + std::string getSourceDatabaseName() const; + bool sourceDatabaseNameIsSet() const; + void unsetsourceDatabaseName(); + void setSourceDatabaseName(const std::string& value); + + /// + /// **参数解释**: 目标数据库名。 **取值范围**: 长度限制3~1024位,仅支持英文大小写字母、数字以及下划线。 + /// + + std::string getTargetDatabaseName() const; + bool targetDatabaseNameIsSet() const; + void unsettargetDatabaseName(); + void setTargetDatabaseName(const std::string& value); + + /// + /// **参数解释**: TaurusDB数据库配置检查结果。 **取值范围**: 不涉及。 + /// + + std::vector& getSourceDbConfigCheckResults(); + bool sourceDbConfigCheckResultsIsSet() const; + void unsetsourceDbConfigCheckResults(); + void setSourceDbConfigCheckResults(const std::vector& value); + + /// + /// **参数解释**: 表配置检查结果。 **取值范围**: 不涉及。 + /// + + std::vector& getTblConfigCheckResults(); + bool tblConfigCheckResultsIsSet() const; + void unsettblConfigCheckResults(); + void setTblConfigCheckResults(const std::vector& value); + + /// + /// **参数解释**: 同步任务名称。 **取值范围**: 长度限制3~128位,仅支持英文大小写字母、数字以及下划线。 + /// + + std::string getTaskName() const; + bool taskNameIsSet() const; + void unsettaskName(); + void setTaskName(const std::string& value); + + /// + /// **参数解释**: 修改同步配置工作流ID。 **取值范围**: 不涉及。 + /// + + std::string getJobId() const; + bool jobIdIsSet() const; + void unsetjobId(); + void setJobId(const std::string& value); + + +protected: + std::string sourceDatabaseName_; + bool sourceDatabaseNameIsSet_; + std::string targetDatabaseName_; + bool targetDatabaseNameIsSet_; + std::vector sourceDbConfigCheckResults_; + bool sourceDbConfigCheckResultsIsSet_; + std::vector tblConfigCheckResults_; + bool tblConfigCheckResultsIsSet_; + std::string taskName_; + bool taskNameIsSet_; + std::string jobId_; + bool jobIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_ModifyDataSyncResponse_H_ diff --git a/gaussdb/include/huaweicloud/gaussdb/v3/model/UpgradeSrKernelVersionRequest.h b/gaussdb/include/huaweicloud/gaussdb/v3/model/UpgradeSrKernelVersionRequest.h new file mode 100644 index 000000000..05346cd37 --- /dev/null +++ b/gaussdb/include/huaweicloud/gaussdb/v3/model/UpgradeSrKernelVersionRequest.h @@ -0,0 +1,94 @@ + +#ifndef HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_UpgradeSrKernelVersionRequest_H_ +#define HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_UpgradeSrKernelVersionRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_GAUSSDB_V3_EXPORT UpgradeSrKernelVersionRequest + : public ModelBase +{ +public: + UpgradeSrKernelVersionRequest(); + virtual ~UpgradeSrKernelVersionRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpgradeSrKernelVersionRequest members + + /// + /// **参数解释**: 请求语言类型。 **约束限制**: 不涉及。 **取值范围**: - en-us - zh-cn **默认值**: en-us。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// **参数解释**: StarRocks实例ID,严格匹配UUID规则。 **约束限制**: 不涉及。 **取值范围**: 只能由英文字母、数字组成,后缀为in17,且长度为36个字符。 **默认值**: 不涉及。 + /// + + std::string getInstanceId() const; + bool instanceIdIsSet() const; + void unsetinstanceId(); + void setInstanceId(const std::string& value); + + /// + /// + /// + + UpgradeSrKernelVersionRequestV3 getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const UpgradeSrKernelVersionRequestV3& value); + + +protected: + std::string xLanguage_; + bool xLanguageIsSet_; + std::string instanceId_; + bool instanceIdIsSet_; + UpgradeSrKernelVersionRequestV3 body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + UpgradeSrKernelVersionRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_UpgradeSrKernelVersionRequest_H_ diff --git a/gaussdb/include/huaweicloud/gaussdb/v3/model/UpgradeSrKernelVersionRequestV3.h b/gaussdb/include/huaweicloud/gaussdb/v3/model/UpgradeSrKernelVersionRequestV3.h new file mode 100644 index 000000000..f9b2a0ac1 --- /dev/null +++ b/gaussdb/include/huaweicloud/gaussdb/v3/model/UpgradeSrKernelVersionRequestV3.h @@ -0,0 +1,75 @@ + +#ifndef HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_UpgradeSrKernelVersionRequestV3_H_ +#define HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_UpgradeSrKernelVersionRequestV3_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// StarRocks内核版本升级请求体。 +/// +class HUAWEICLOUD_GAUSSDB_V3_EXPORT UpgradeSrKernelVersionRequestV3 + : public ModelBase +{ +public: + UpgradeSrKernelVersionRequestV3(); + virtual ~UpgradeSrKernelVersionRequestV3(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpgradeSrKernelVersionRequestV3 members + + /// + /// **参数解释**: 是否延时升级。 **约束限制**: 不涉及 **取值范围**: - true - false **默认取值**: false。 + /// + + std::string getDelay() const; + bool delayIsSet() const; + void unsetdelay(); + void setDelay(const std::string& value); + + /// + /// **参数解释**: 是否跳过升级校验。 **约束限制**: 不涉及 **取值范围**: - true - false **默认取值**: false。 + /// + + std::string getIsSkipValidate() const; + bool isSkipValidateIsSet() const; + void unsetisSkipValidate(); + void setIsSkipValidate(const std::string& value); + + +protected: + std::string delay_; + bool delayIsSet_; + std::string isSkipValidate_; + bool isSkipValidateIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_UpgradeSrKernelVersionRequestV3_H_ diff --git a/gaussdb/include/huaweicloud/gaussdb/v3/model/UpgradeSrKernelVersionResponse.h b/gaussdb/include/huaweicloud/gaussdb/v3/model/UpgradeSrKernelVersionResponse.h new file mode 100644 index 000000000..abb417875 --- /dev/null +++ b/gaussdb/include/huaweicloud/gaussdb/v3/model/UpgradeSrKernelVersionResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_UpgradeSrKernelVersionResponse_H_ +#define HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_UpgradeSrKernelVersionResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_GAUSSDB_V3_EXPORT UpgradeSrKernelVersionResponse + : public ModelBase, public HttpResponse +{ +public: + UpgradeSrKernelVersionResponse(); + virtual ~UpgradeSrKernelVersionResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpgradeSrKernelVersionResponse members + + /// + /// **参数解释**: 升级工作流ID。 **取值范围**: 不涉及。 + /// + + 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() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_GAUSSDB_V3_MODEL_UpgradeSrKernelVersionResponse_H_ diff --git a/gaussdb/src/v3/GaussDBClient.cpp b/gaussdb/src/v3/GaussDBClient.cpp index b34d0fe9d..4c449b3bd 100644 --- a/gaussdb/src/v3/GaussDBClient.cpp +++ b/gaussdb/src/v3/GaussDBClient.cpp @@ -7167,6 +7167,40 @@ std::shared_ptr GaussDBClient::listS return localVarResult; } +std::shared_ptr GaussDBClient::listStarRocksDataReplicationConfigByDataBase(ListStarRocksDataReplicationConfigByDataBaseRequest &request) +{ + std::string localVarPath = "/v3/{project_id}/instances/{instance_id}/starrocks/databases/replication/configuration/{database}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["instance_id"] = parameterToString(request.getInstanceId()); + localVarPathParams["database"] = parameterToString(request.getDatabase()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.xLanguageIsSet()) { + localVarHeaderParams["X-Language"] = parameterToString(request.getXLanguage()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, GaussDBMeta::genRequestDefForListStarRocksDataReplicationConfigByDataBase()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr GaussDBClient::listStarRocksDataReplications(ListStarRocksDataReplicationsRequest &request) { std::string localVarPath = "/v3/{project_id}/instances/{instance_id}/starrocks/databases/replication"; @@ -7223,6 +7257,9 @@ std::shared_ptr GaussDBClient::listStarRocksD std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); localVarHeaderParams["Content-Type"] = contentType; + if (request.addTaskScenarioIsSet()) { + localVarQueryParams["add_task_scenario"] = parameterToString(request.getAddTaskScenario()); + } if (request.xLanguageIsSet()) { localVarHeaderParams["X-Language"] = parameterToString(request.getXLanguage()); } @@ -7273,6 +7310,51 @@ std::shared_ptr GaussDBClient::listStarrocksI return localVarResult; } +std::shared_ptr GaussDBClient::modifyDataSync(ModifyDataSyncRequest &request) +{ + std::string localVarPath = "/v3/{project_id}/instances/{instance_id}/starrocks/databases/replication"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["instance_id"] = parameterToString(request.getInstanceId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json;charset=UTF-8", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.xLanguageIsSet()) { + localVarHeaderParams["X-Language"] = parameterToString(request.getXLanguage()); + } + + std::string localVarHttpBody; + if (isJson) { + // handle json input + web::json::value localVarJson; + localVarJson = ModelBase::toJson(request.getBody()); + localVarHttpBody = utility::conversions::to_utf8string(localVarJson.serialize()); + } + + std::unique_ptr res = callApi("PUT", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, GaussDBMeta::genRequestDefForModifyDataSync()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + if (!res->getHttpBody().empty()) { + spdlog::info("parse json format response"); + utility::string_t localVarResponse = utility::conversions::to_string_t(res->getHttpBody()); + web::json::value localVarJson = web::json::value::parse(localVarResponse); + localVarResult->fromJson(localVarJson); + } + + return localVarResult; +} std::shared_ptr GaussDBClient::pauseStarRocksDataReplication(PauseStarRocksDataReplicationRequest &request) { std::string localVarPath = "/v3/{project_id}/instances/{instance_id}/starrocks/databases/replication/pause"; @@ -8253,6 +8335,51 @@ std::shared_ptr GaussDBClient::updateStarrocksPar return localVarResult; } +std::shared_ptr GaussDBClient::upgradeSrKernelVersion(UpgradeSrKernelVersionRequest &request) +{ + std::string localVarPath = "/v3/{project_id}/instances/{instance_id}/starrocks/db-upgrade"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["instance_id"] = parameterToString(request.getInstanceId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json;charset=UTF-8", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.xLanguageIsSet()) { + localVarHeaderParams["X-Language"] = parameterToString(request.getXLanguage()); + } + + std::string localVarHttpBody; + if (isJson) { + // handle json input + web::json::value localVarJson; + localVarJson = ModelBase::toJson(request.getBody()); + localVarHttpBody = utility::conversions::to_utf8string(localVarJson.serialize()); + } + + std::unique_ptr res = callApi("POST", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, GaussDBMeta::genRequestDefForUpgradeSrKernelVersion()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + if (!res->getHttpBody().empty()) { + spdlog::info("parse json format response"); + utility::string_t localVarResponse = utility::conversions::to_string_t(res->getHttpBody()); + web::json::value localVarJson = web::json::value::parse(localVarResponse); + localVarResult->fromJson(localVarJson); + } + + return localVarResult; +} std::shared_ptr GaussDBClient::deleteSqlFilterRule(DeleteSqlFilterRuleRequest &request) { std::string localVarPath = "/v3/{project_id}/instances/{instance_id}/sql-filter/rules"; diff --git a/gaussdb/src/v3/GaussDBMeta.cpp b/gaussdb/src/v3/GaussDBMeta.cpp index 78c608719..0316f6c55 100644 --- a/gaussdb/src/v3/GaussDBMeta.cpp +++ b/gaussdb/src/v3/GaussDBMeta.cpp @@ -2469,6 +2469,16 @@ HttpRequestDef GaussDBMeta::genRequestDefForListStarRocksDataReplicationConfig() return reqDefBuilder; } +HttpRequestDef GaussDBMeta::genRequestDefForListStarRocksDataReplicationConfigByDataBase() { + HttpRequestDef reqDefBuilder; + FieldDef headerParamXLanguage; + reqDefBuilder.withRequestField(headerParamXLanguage + .withName("XLanguage") + .withJsonTag("X-Language") + .withLocationType(Header_)); + return reqDefBuilder; +} + HttpRequestDef GaussDBMeta::genRequestDefForListStarRocksDataReplications() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("Limit") @@ -2487,6 +2497,9 @@ HttpRequestDef GaussDBMeta::genRequestDefForListStarRocksDataReplications() { HttpRequestDef GaussDBMeta::genRequestDefForListStarRocksDbParameters() { HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("AddTaskScenario") + .withJsonTag("add_task_scenario") + .withLocationType(Query_)); FieldDef headerParamXLanguage; reqDefBuilder.withRequestField(headerParamXLanguage .withName("XLanguage") @@ -2505,6 +2518,20 @@ HttpRequestDef GaussDBMeta::genRequestDefForListStarrocksInstanceInfo() { return reqDefBuilder; } +HttpRequestDef GaussDBMeta::genRequestDefForModifyDataSync() { + HttpRequestDef reqDefBuilder; + FieldDef headerParamXLanguage; + reqDefBuilder.withRequestField(headerParamXLanguage + .withName("XLanguage") + .withJsonTag("X-Language") + .withLocationType(Header_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef GaussDBMeta::genRequestDefForPauseStarRocksDataReplication() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; @@ -2837,6 +2864,20 @@ HttpRequestDef GaussDBMeta::genRequestDefForUpdateStarrocksParams() { return reqDefBuilder; } +HttpRequestDef GaussDBMeta::genRequestDefForUpgradeSrKernelVersion() { + HttpRequestDef reqDefBuilder; + FieldDef headerParamXLanguage; + reqDefBuilder.withRequestField(headerParamXLanguage + .withName("XLanguage") + .withJsonTag("X-Language") + .withLocationType(Header_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef GaussDBMeta::genRequestDefForDeleteSqlFilterRule() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; diff --git a/gaussdb/src/v3/model/DbParameter.cpp b/gaussdb/src/v3/model/DbParameter.cpp index 0ed198d22..58bd63c13 100644 --- a/gaussdb/src/v3/model/DbParameter.cpp +++ b/gaussdb/src/v3/model/DbParameter.cpp @@ -22,6 +22,8 @@ DbParameter::DbParameter() valueRangeIsSet_ = false; description_ = ""; descriptionIsSet_ = false; + isModifiable_ = ""; + isModifiableIsSet_ = false; } DbParameter::~DbParameter() = default; @@ -49,6 +51,9 @@ web::json::value DbParameter::toJson() const if(descriptionIsSet_) { val[utility::conversions::to_string_t("description")] = ModelBase::toJson(description_); } + if(isModifiableIsSet_) { + val[utility::conversions::to_string_t("is_modifiable")] = ModelBase::toJson(isModifiable_); + } return val; } @@ -101,6 +106,15 @@ bool DbParameter::fromJson(const web::json::value& val) setDescription(refVal); } } + if(val.has_field(utility::conversions::to_string_t("is_modifiable"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_modifiable")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsModifiable(refVal); + } + } return ok; } @@ -210,6 +224,27 @@ void DbParameter::unsetdescription() descriptionIsSet_ = false; } +std::string DbParameter::getIsModifiable() const +{ + return isModifiable_; +} + +void DbParameter::setIsModifiable(const std::string& value) +{ + isModifiable_ = value; + isModifiableIsSet_ = true; +} + +bool DbParameter::isModifiableIsSet() const +{ + return isModifiableIsSet_; +} + +void DbParameter::unsetisModifiable() +{ + isModifiableIsSet_ = false; +} + } } } diff --git a/gaussdb/src/v3/model/ListStarRocksDataReplicationConfigByDataBaseRequest.cpp b/gaussdb/src/v3/model/ListStarRocksDataReplicationConfigByDataBaseRequest.cpp new file mode 100644 index 000000000..fce1aad8d --- /dev/null +++ b/gaussdb/src/v3/model/ListStarRocksDataReplicationConfigByDataBaseRequest.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/gaussdb/v3/model/ListStarRocksDataReplicationConfigByDataBaseRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + + + + +ListStarRocksDataReplicationConfigByDataBaseRequest::ListStarRocksDataReplicationConfigByDataBaseRequest() +{ + instanceId_ = ""; + instanceIdIsSet_ = false; + xLanguage_ = ""; + xLanguageIsSet_ = false; + database_ = ""; + databaseIsSet_ = false; +} + +ListStarRocksDataReplicationConfigByDataBaseRequest::~ListStarRocksDataReplicationConfigByDataBaseRequest() = default; + +void ListStarRocksDataReplicationConfigByDataBaseRequest::validate() +{ +} + +web::json::value ListStarRocksDataReplicationConfigByDataBaseRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(instanceIdIsSet_) { + val[utility::conversions::to_string_t("instance_id")] = ModelBase::toJson(instanceId_); + } + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + if(databaseIsSet_) { + val[utility::conversions::to_string_t("database")] = ModelBase::toJson(database_); + } + + return val; +} +bool ListStarRocksDataReplicationConfigByDataBaseRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("X-Language"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("X-Language")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setXLanguage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("database"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("database")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDatabase(refVal); + } + } + return ok; +} + + +std::string ListStarRocksDataReplicationConfigByDataBaseRequest::getInstanceId() const +{ + return instanceId_; +} + +void ListStarRocksDataReplicationConfigByDataBaseRequest::setInstanceId(const std::string& value) +{ + instanceId_ = value; + instanceIdIsSet_ = true; +} + +bool ListStarRocksDataReplicationConfigByDataBaseRequest::instanceIdIsSet() const +{ + return instanceIdIsSet_; +} + +void ListStarRocksDataReplicationConfigByDataBaseRequest::unsetinstanceId() +{ + instanceIdIsSet_ = false; +} + +std::string ListStarRocksDataReplicationConfigByDataBaseRequest::getXLanguage() const +{ + return xLanguage_; +} + +void ListStarRocksDataReplicationConfigByDataBaseRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool ListStarRocksDataReplicationConfigByDataBaseRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void ListStarRocksDataReplicationConfigByDataBaseRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +std::string ListStarRocksDataReplicationConfigByDataBaseRequest::getDatabase() const +{ + return database_; +} + +void ListStarRocksDataReplicationConfigByDataBaseRequest::setDatabase(const std::string& value) +{ + database_ = value; + databaseIsSet_ = true; +} + +bool ListStarRocksDataReplicationConfigByDataBaseRequest::databaseIsSet() const +{ + return databaseIsSet_; +} + +void ListStarRocksDataReplicationConfigByDataBaseRequest::unsetdatabase() +{ + databaseIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/gaussdb/src/v3/model/ListStarRocksDataReplicationConfigByDataBaseResponse.cpp b/gaussdb/src/v3/model/ListStarRocksDataReplicationConfigByDataBaseResponse.cpp new file mode 100644 index 000000000..2a27778b1 --- /dev/null +++ b/gaussdb/src/v3/model/ListStarRocksDataReplicationConfigByDataBaseResponse.cpp @@ -0,0 +1,355 @@ + + +#include "huaweicloud/gaussdb/v3/model/ListStarRocksDataReplicationConfigByDataBaseResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + + + + +ListStarRocksDataReplicationConfigByDataBaseResponse::ListStarRocksDataReplicationConfigByDataBaseResponse() +{ + sourceInstanceId_ = ""; + sourceInstanceIdIsSet_ = false; + sourceNodeId_ = ""; + sourceNodeIdIsSet_ = false; + databaseInfoIsSet_ = false; + tableInfosIsSet_ = false; + tableReplConfigIsSet_ = false; + newTableReplConfigIsSet_ = false; + targetDatabaseName_ = ""; + targetDatabaseNameIsSet_ = false; + isTablesChange_ = false; + isTablesChangeIsSet_ = false; + lastErrorOfAlterTable_ = ""; + lastErrorOfAlterTableIsSet_ = false; +} + +ListStarRocksDataReplicationConfigByDataBaseResponse::~ListStarRocksDataReplicationConfigByDataBaseResponse() = default; + +void ListStarRocksDataReplicationConfigByDataBaseResponse::validate() +{ +} + +web::json::value ListStarRocksDataReplicationConfigByDataBaseResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(sourceInstanceIdIsSet_) { + val[utility::conversions::to_string_t("source_instance_id")] = ModelBase::toJson(sourceInstanceId_); + } + if(sourceNodeIdIsSet_) { + val[utility::conversions::to_string_t("source_node_id")] = ModelBase::toJson(sourceNodeId_); + } + if(databaseInfoIsSet_) { + val[utility::conversions::to_string_t("database_info")] = ModelBase::toJson(databaseInfo_); + } + if(tableInfosIsSet_) { + val[utility::conversions::to_string_t("table_infos")] = ModelBase::toJson(tableInfos_); + } + if(tableReplConfigIsSet_) { + val[utility::conversions::to_string_t("table_repl_config")] = ModelBase::toJson(tableReplConfig_); + } + if(newTableReplConfigIsSet_) { + val[utility::conversions::to_string_t("new_table_repl_config")] = ModelBase::toJson(newTableReplConfig_); + } + if(targetDatabaseNameIsSet_) { + val[utility::conversions::to_string_t("target_database_name")] = ModelBase::toJson(targetDatabaseName_); + } + if(isTablesChangeIsSet_) { + val[utility::conversions::to_string_t("is_tables_change")] = ModelBase::toJson(isTablesChange_); + } + if(lastErrorOfAlterTableIsSet_) { + val[utility::conversions::to_string_t("last_error_of_alter_table")] = ModelBase::toJson(lastErrorOfAlterTable_); + } + + return val; +} +bool ListStarRocksDataReplicationConfigByDataBaseResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("source_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("source_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSourceInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("source_node_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("source_node_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSourceNodeId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("database_info"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("database_info")); + if(!fieldValue.is_null()) + { + DataBaseInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDatabaseInfo(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("table_infos"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("table_infos")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTableInfos(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("table_repl_config"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("table_repl_config")); + if(!fieldValue.is_null()) + { + TableReplConfig refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTableReplConfig(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("new_table_repl_config"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("new_table_repl_config")); + if(!fieldValue.is_null()) + { + TableReplConfig refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNewTableReplConfig(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("target_database_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("target_database_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTargetDatabaseName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("is_tables_change"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_tables_change")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsTablesChange(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("last_error_of_alter_table"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("last_error_of_alter_table")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLastErrorOfAlterTable(refVal); + } + } + return ok; +} + + +std::string ListStarRocksDataReplicationConfigByDataBaseResponse::getSourceInstanceId() const +{ + return sourceInstanceId_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::setSourceInstanceId(const std::string& value) +{ + sourceInstanceId_ = value; + sourceInstanceIdIsSet_ = true; +} + +bool ListStarRocksDataReplicationConfigByDataBaseResponse::sourceInstanceIdIsSet() const +{ + return sourceInstanceIdIsSet_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::unsetsourceInstanceId() +{ + sourceInstanceIdIsSet_ = false; +} + +std::string ListStarRocksDataReplicationConfigByDataBaseResponse::getSourceNodeId() const +{ + return sourceNodeId_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::setSourceNodeId(const std::string& value) +{ + sourceNodeId_ = value; + sourceNodeIdIsSet_ = true; +} + +bool ListStarRocksDataReplicationConfigByDataBaseResponse::sourceNodeIdIsSet() const +{ + return sourceNodeIdIsSet_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::unsetsourceNodeId() +{ + sourceNodeIdIsSet_ = false; +} + +DataBaseInfo ListStarRocksDataReplicationConfigByDataBaseResponse::getDatabaseInfo() const +{ + return databaseInfo_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::setDatabaseInfo(const DataBaseInfo& value) +{ + databaseInfo_ = value; + databaseInfoIsSet_ = true; +} + +bool ListStarRocksDataReplicationConfigByDataBaseResponse::databaseInfoIsSet() const +{ + return databaseInfoIsSet_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::unsetdatabaseInfo() +{ + databaseInfoIsSet_ = false; +} + +std::vector& ListStarRocksDataReplicationConfigByDataBaseResponse::getTableInfos() +{ + return tableInfos_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::setTableInfos(const std::vector& value) +{ + tableInfos_ = value; + tableInfosIsSet_ = true; +} + +bool ListStarRocksDataReplicationConfigByDataBaseResponse::tableInfosIsSet() const +{ + return tableInfosIsSet_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::unsettableInfos() +{ + tableInfosIsSet_ = false; +} + +TableReplConfig ListStarRocksDataReplicationConfigByDataBaseResponse::getTableReplConfig() const +{ + return tableReplConfig_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::setTableReplConfig(const TableReplConfig& value) +{ + tableReplConfig_ = value; + tableReplConfigIsSet_ = true; +} + +bool ListStarRocksDataReplicationConfigByDataBaseResponse::tableReplConfigIsSet() const +{ + return tableReplConfigIsSet_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::unsettableReplConfig() +{ + tableReplConfigIsSet_ = false; +} + +TableReplConfig ListStarRocksDataReplicationConfigByDataBaseResponse::getNewTableReplConfig() const +{ + return newTableReplConfig_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::setNewTableReplConfig(const TableReplConfig& value) +{ + newTableReplConfig_ = value; + newTableReplConfigIsSet_ = true; +} + +bool ListStarRocksDataReplicationConfigByDataBaseResponse::newTableReplConfigIsSet() const +{ + return newTableReplConfigIsSet_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::unsetnewTableReplConfig() +{ + newTableReplConfigIsSet_ = false; +} + +std::string ListStarRocksDataReplicationConfigByDataBaseResponse::getTargetDatabaseName() const +{ + return targetDatabaseName_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::setTargetDatabaseName(const std::string& value) +{ + targetDatabaseName_ = value; + targetDatabaseNameIsSet_ = true; +} + +bool ListStarRocksDataReplicationConfigByDataBaseResponse::targetDatabaseNameIsSet() const +{ + return targetDatabaseNameIsSet_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::unsettargetDatabaseName() +{ + targetDatabaseNameIsSet_ = false; +} + +bool ListStarRocksDataReplicationConfigByDataBaseResponse::isIsTablesChange() const +{ + return isTablesChange_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::setIsTablesChange(bool value) +{ + isTablesChange_ = value; + isTablesChangeIsSet_ = true; +} + +bool ListStarRocksDataReplicationConfigByDataBaseResponse::isTablesChangeIsSet() const +{ + return isTablesChangeIsSet_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::unsetisTablesChange() +{ + isTablesChangeIsSet_ = false; +} + +std::string ListStarRocksDataReplicationConfigByDataBaseResponse::getLastErrorOfAlterTable() const +{ + return lastErrorOfAlterTable_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::setLastErrorOfAlterTable(const std::string& value) +{ + lastErrorOfAlterTable_ = value; + lastErrorOfAlterTableIsSet_ = true; +} + +bool ListStarRocksDataReplicationConfigByDataBaseResponse::lastErrorOfAlterTableIsSet() const +{ + return lastErrorOfAlterTableIsSet_; +} + +void ListStarRocksDataReplicationConfigByDataBaseResponse::unsetlastErrorOfAlterTable() +{ + lastErrorOfAlterTableIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/gaussdb/src/v3/model/ListStarRocksDbParametersRequest.cpp b/gaussdb/src/v3/model/ListStarRocksDbParametersRequest.cpp index 03febe783..8461a6cdf 100644 --- a/gaussdb/src/v3/model/ListStarRocksDbParametersRequest.cpp +++ b/gaussdb/src/v3/model/ListStarRocksDbParametersRequest.cpp @@ -16,6 +16,8 @@ ListStarRocksDbParametersRequest::ListStarRocksDbParametersRequest() instanceIdIsSet_ = false; xLanguage_ = ""; xLanguageIsSet_ = false; + addTaskScenario_ = ""; + addTaskScenarioIsSet_ = false; } ListStarRocksDbParametersRequest::~ListStarRocksDbParametersRequest() = default; @@ -34,6 +36,9 @@ web::json::value ListStarRocksDbParametersRequest::toJson() const if(xLanguageIsSet_) { val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); } + if(addTaskScenarioIsSet_) { + val[utility::conversions::to_string_t("add_task_scenario")] = ModelBase::toJson(addTaskScenario_); + } return val; } @@ -59,6 +64,15 @@ bool ListStarRocksDbParametersRequest::fromJson(const web::json::value& val) setXLanguage(refVal); } } + if(val.has_field(utility::conversions::to_string_t("add_task_scenario"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("add_task_scenario")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAddTaskScenario(refVal); + } + } return ok; } @@ -105,6 +119,27 @@ void ListStarRocksDbParametersRequest::unsetxLanguage() xLanguageIsSet_ = false; } +std::string ListStarRocksDbParametersRequest::getAddTaskScenario() const +{ + return addTaskScenario_; +} + +void ListStarRocksDbParametersRequest::setAddTaskScenario(const std::string& value) +{ + addTaskScenario_ = value; + addTaskScenarioIsSet_ = true; +} + +bool ListStarRocksDbParametersRequest::addTaskScenarioIsSet() const +{ + return addTaskScenarioIsSet_; +} + +void ListStarRocksDbParametersRequest::unsetaddTaskScenario() +{ + addTaskScenarioIsSet_ = false; +} + } } } diff --git a/gaussdb/src/v3/model/ModifyDataSyncConfigRequestV3.cpp b/gaussdb/src/v3/model/ModifyDataSyncConfigRequestV3.cpp new file mode 100644 index 000000000..8e2fdaf0e --- /dev/null +++ b/gaussdb/src/v3/model/ModifyDataSyncConfigRequestV3.cpp @@ -0,0 +1,321 @@ + + +#include "huaweicloud/gaussdb/v3/model/ModifyDataSyncConfigRequestV3.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + + + + +ModifyDataSyncConfigRequestV3::ModifyDataSyncConfigRequestV3() +{ + sourceInstanceId_ = ""; + sourceInstanceIdIsSet_ = false; + sourceNodeId_ = ""; + sourceNodeIdIsSet_ = false; + sourceDatabaseName_ = ""; + sourceDatabaseNameIsSet_ = false; + taskName_ = ""; + taskNameIsSet_ = false; + dbConfigsIsSet_ = false; + tablesConfigsIsSet_ = false; + tableReplConfigIsSet_ = false; + targetDatabaseName_ = ""; + targetDatabaseNameIsSet_ = false; +} + +ModifyDataSyncConfigRequestV3::~ModifyDataSyncConfigRequestV3() = default; + +void ModifyDataSyncConfigRequestV3::validate() +{ +} + +web::json::value ModifyDataSyncConfigRequestV3::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(sourceInstanceIdIsSet_) { + val[utility::conversions::to_string_t("source_instance_id")] = ModelBase::toJson(sourceInstanceId_); + } + if(sourceNodeIdIsSet_) { + val[utility::conversions::to_string_t("source_node_id")] = ModelBase::toJson(sourceNodeId_); + } + if(sourceDatabaseNameIsSet_) { + val[utility::conversions::to_string_t("source_database_name")] = ModelBase::toJson(sourceDatabaseName_); + } + if(taskNameIsSet_) { + val[utility::conversions::to_string_t("task_name")] = ModelBase::toJson(taskName_); + } + if(dbConfigsIsSet_) { + val[utility::conversions::to_string_t("db_configs")] = ModelBase::toJson(dbConfigs_); + } + if(tablesConfigsIsSet_) { + val[utility::conversions::to_string_t("tables_configs")] = ModelBase::toJson(tablesConfigs_); + } + if(tableReplConfigIsSet_) { + val[utility::conversions::to_string_t("table_repl_config")] = ModelBase::toJson(tableReplConfig_); + } + if(targetDatabaseNameIsSet_) { + val[utility::conversions::to_string_t("target_database_name")] = ModelBase::toJson(targetDatabaseName_); + } + + return val; +} +bool ModifyDataSyncConfigRequestV3::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("source_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("source_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSourceInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("source_node_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("source_node_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSourceNodeId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("source_database_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("source_database_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSourceDatabaseName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("task_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("task_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTaskName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("db_configs"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("db_configs")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDbConfigs(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("tables_configs"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("tables_configs")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTablesConfigs(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("table_repl_config"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("table_repl_config")); + if(!fieldValue.is_null()) + { + TableReplConfig refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTableReplConfig(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("target_database_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("target_database_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTargetDatabaseName(refVal); + } + } + return ok; +} + + +std::string ModifyDataSyncConfigRequestV3::getSourceInstanceId() const +{ + return sourceInstanceId_; +} + +void ModifyDataSyncConfigRequestV3::setSourceInstanceId(const std::string& value) +{ + sourceInstanceId_ = value; + sourceInstanceIdIsSet_ = true; +} + +bool ModifyDataSyncConfigRequestV3::sourceInstanceIdIsSet() const +{ + return sourceInstanceIdIsSet_; +} + +void ModifyDataSyncConfigRequestV3::unsetsourceInstanceId() +{ + sourceInstanceIdIsSet_ = false; +} + +std::string ModifyDataSyncConfigRequestV3::getSourceNodeId() const +{ + return sourceNodeId_; +} + +void ModifyDataSyncConfigRequestV3::setSourceNodeId(const std::string& value) +{ + sourceNodeId_ = value; + sourceNodeIdIsSet_ = true; +} + +bool ModifyDataSyncConfigRequestV3::sourceNodeIdIsSet() const +{ + return sourceNodeIdIsSet_; +} + +void ModifyDataSyncConfigRequestV3::unsetsourceNodeId() +{ + sourceNodeIdIsSet_ = false; +} + +std::string ModifyDataSyncConfigRequestV3::getSourceDatabaseName() const +{ + return sourceDatabaseName_; +} + +void ModifyDataSyncConfigRequestV3::setSourceDatabaseName(const std::string& value) +{ + sourceDatabaseName_ = value; + sourceDatabaseNameIsSet_ = true; +} + +bool ModifyDataSyncConfigRequestV3::sourceDatabaseNameIsSet() const +{ + return sourceDatabaseNameIsSet_; +} + +void ModifyDataSyncConfigRequestV3::unsetsourceDatabaseName() +{ + sourceDatabaseNameIsSet_ = false; +} + +std::string ModifyDataSyncConfigRequestV3::getTaskName() const +{ + return taskName_; +} + +void ModifyDataSyncConfigRequestV3::setTaskName(const std::string& value) +{ + taskName_ = value; + taskNameIsSet_ = true; +} + +bool ModifyDataSyncConfigRequestV3::taskNameIsSet() const +{ + return taskNameIsSet_; +} + +void ModifyDataSyncConfigRequestV3::unsettaskName() +{ + taskNameIsSet_ = false; +} + +std::vector& ModifyDataSyncConfigRequestV3::getDbConfigs() +{ + return dbConfigs_; +} + +void ModifyDataSyncConfigRequestV3::setDbConfigs(const std::vector& value) +{ + dbConfigs_ = value; + dbConfigsIsSet_ = true; +} + +bool ModifyDataSyncConfigRequestV3::dbConfigsIsSet() const +{ + return dbConfigsIsSet_; +} + +void ModifyDataSyncConfigRequestV3::unsetdbConfigs() +{ + dbConfigsIsSet_ = false; +} + +std::vector& ModifyDataSyncConfigRequestV3::getTablesConfigs() +{ + return tablesConfigs_; +} + +void ModifyDataSyncConfigRequestV3::setTablesConfigs(const std::vector& value) +{ + tablesConfigs_ = value; + tablesConfigsIsSet_ = true; +} + +bool ModifyDataSyncConfigRequestV3::tablesConfigsIsSet() const +{ + return tablesConfigsIsSet_; +} + +void ModifyDataSyncConfigRequestV3::unsettablesConfigs() +{ + tablesConfigsIsSet_ = false; +} + +TableReplConfig ModifyDataSyncConfigRequestV3::getTableReplConfig() const +{ + return tableReplConfig_; +} + +void ModifyDataSyncConfigRequestV3::setTableReplConfig(const TableReplConfig& value) +{ + tableReplConfig_ = value; + tableReplConfigIsSet_ = true; +} + +bool ModifyDataSyncConfigRequestV3::tableReplConfigIsSet() const +{ + return tableReplConfigIsSet_; +} + +void ModifyDataSyncConfigRequestV3::unsettableReplConfig() +{ + tableReplConfigIsSet_ = false; +} + +std::string ModifyDataSyncConfigRequestV3::getTargetDatabaseName() const +{ + return targetDatabaseName_; +} + +void ModifyDataSyncConfigRequestV3::setTargetDatabaseName(const std::string& value) +{ + targetDatabaseName_ = value; + targetDatabaseNameIsSet_ = true; +} + +bool ModifyDataSyncConfigRequestV3::targetDatabaseNameIsSet() const +{ + return targetDatabaseNameIsSet_; +} + +void ModifyDataSyncConfigRequestV3::unsettargetDatabaseName() +{ + targetDatabaseNameIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/gaussdb/src/v3/model/ModifyDataSyncRequest.cpp b/gaussdb/src/v3/model/ModifyDataSyncRequest.cpp new file mode 100644 index 000000000..fc2ea4dc2 --- /dev/null +++ b/gaussdb/src/v3/model/ModifyDataSyncRequest.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/gaussdb/v3/model/ModifyDataSyncRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + + + + +ModifyDataSyncRequest::ModifyDataSyncRequest() +{ + xLanguage_ = ""; + xLanguageIsSet_ = false; + instanceId_ = ""; + instanceIdIsSet_ = false; + bodyIsSet_ = false; +} + +ModifyDataSyncRequest::~ModifyDataSyncRequest() = default; + +void ModifyDataSyncRequest::validate() +{ +} + +web::json::value ModifyDataSyncRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + if(instanceIdIsSet_) { + val[utility::conversions::to_string_t("instance_id")] = ModelBase::toJson(instanceId_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool ModifyDataSyncRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("X-Language"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("X-Language")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setXLanguage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + ModifyDataSyncConfigRequestV3 refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string ModifyDataSyncRequest::getXLanguage() const +{ + return xLanguage_; +} + +void ModifyDataSyncRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool ModifyDataSyncRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void ModifyDataSyncRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +std::string ModifyDataSyncRequest::getInstanceId() const +{ + return instanceId_; +} + +void ModifyDataSyncRequest::setInstanceId(const std::string& value) +{ + instanceId_ = value; + instanceIdIsSet_ = true; +} + +bool ModifyDataSyncRequest::instanceIdIsSet() const +{ + return instanceIdIsSet_; +} + +void ModifyDataSyncRequest::unsetinstanceId() +{ + instanceIdIsSet_ = false; +} + +ModifyDataSyncConfigRequestV3 ModifyDataSyncRequest::getBody() const +{ + return body_; +} + +void ModifyDataSyncRequest::setBody(const ModifyDataSyncConfigRequestV3& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool ModifyDataSyncRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void ModifyDataSyncRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/gaussdb/src/v3/model/ModifyDataSyncResponse.cpp b/gaussdb/src/v3/model/ModifyDataSyncResponse.cpp new file mode 100644 index 000000000..4ae3979e6 --- /dev/null +++ b/gaussdb/src/v3/model/ModifyDataSyncResponse.cpp @@ -0,0 +1,252 @@ + + +#include "huaweicloud/gaussdb/v3/model/ModifyDataSyncResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + + + + +ModifyDataSyncResponse::ModifyDataSyncResponse() +{ + sourceDatabaseName_ = ""; + sourceDatabaseNameIsSet_ = false; + targetDatabaseName_ = ""; + targetDatabaseNameIsSet_ = false; + sourceDbConfigCheckResultsIsSet_ = false; + tblConfigCheckResultsIsSet_ = false; + taskName_ = ""; + taskNameIsSet_ = false; + jobId_ = ""; + jobIdIsSet_ = false; +} + +ModifyDataSyncResponse::~ModifyDataSyncResponse() = default; + +void ModifyDataSyncResponse::validate() +{ +} + +web::json::value ModifyDataSyncResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(sourceDatabaseNameIsSet_) { + val[utility::conversions::to_string_t("source_database_name")] = ModelBase::toJson(sourceDatabaseName_); + } + if(targetDatabaseNameIsSet_) { + val[utility::conversions::to_string_t("target_database_name")] = ModelBase::toJson(targetDatabaseName_); + } + if(sourceDbConfigCheckResultsIsSet_) { + val[utility::conversions::to_string_t("source_db_config_check_results")] = ModelBase::toJson(sourceDbConfigCheckResults_); + } + if(tblConfigCheckResultsIsSet_) { + val[utility::conversions::to_string_t("tbl_config_check_results")] = ModelBase::toJson(tblConfigCheckResults_); + } + if(taskNameIsSet_) { + val[utility::conversions::to_string_t("task_name")] = ModelBase::toJson(taskName_); + } + if(jobIdIsSet_) { + val[utility::conversions::to_string_t("job_id")] = ModelBase::toJson(jobId_); + } + + return val; +} +bool ModifyDataSyncResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("source_database_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("source_database_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSourceDatabaseName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("target_database_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("target_database_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTargetDatabaseName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("source_db_config_check_results"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("source_db_config_check_results")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSourceDbConfigCheckResults(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("tbl_config_check_results"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("tbl_config_check_results")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTblConfigCheckResults(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("task_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("task_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTaskName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("job_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("job_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setJobId(refVal); + } + } + return ok; +} + + +std::string ModifyDataSyncResponse::getSourceDatabaseName() const +{ + return sourceDatabaseName_; +} + +void ModifyDataSyncResponse::setSourceDatabaseName(const std::string& value) +{ + sourceDatabaseName_ = value; + sourceDatabaseNameIsSet_ = true; +} + +bool ModifyDataSyncResponse::sourceDatabaseNameIsSet() const +{ + return sourceDatabaseNameIsSet_; +} + +void ModifyDataSyncResponse::unsetsourceDatabaseName() +{ + sourceDatabaseNameIsSet_ = false; +} + +std::string ModifyDataSyncResponse::getTargetDatabaseName() const +{ + return targetDatabaseName_; +} + +void ModifyDataSyncResponse::setTargetDatabaseName(const std::string& value) +{ + targetDatabaseName_ = value; + targetDatabaseNameIsSet_ = true; +} + +bool ModifyDataSyncResponse::targetDatabaseNameIsSet() const +{ + return targetDatabaseNameIsSet_; +} + +void ModifyDataSyncResponse::unsettargetDatabaseName() +{ + targetDatabaseNameIsSet_ = false; +} + +std::vector& ModifyDataSyncResponse::getSourceDbConfigCheckResults() +{ + return sourceDbConfigCheckResults_; +} + +void ModifyDataSyncResponse::setSourceDbConfigCheckResults(const std::vector& value) +{ + sourceDbConfigCheckResults_ = value; + sourceDbConfigCheckResultsIsSet_ = true; +} + +bool ModifyDataSyncResponse::sourceDbConfigCheckResultsIsSet() const +{ + return sourceDbConfigCheckResultsIsSet_; +} + +void ModifyDataSyncResponse::unsetsourceDbConfigCheckResults() +{ + sourceDbConfigCheckResultsIsSet_ = false; +} + +std::vector& ModifyDataSyncResponse::getTblConfigCheckResults() +{ + return tblConfigCheckResults_; +} + +void ModifyDataSyncResponse::setTblConfigCheckResults(const std::vector& value) +{ + tblConfigCheckResults_ = value; + tblConfigCheckResultsIsSet_ = true; +} + +bool ModifyDataSyncResponse::tblConfigCheckResultsIsSet() const +{ + return tblConfigCheckResultsIsSet_; +} + +void ModifyDataSyncResponse::unsettblConfigCheckResults() +{ + tblConfigCheckResultsIsSet_ = false; +} + +std::string ModifyDataSyncResponse::getTaskName() const +{ + return taskName_; +} + +void ModifyDataSyncResponse::setTaskName(const std::string& value) +{ + taskName_ = value; + taskNameIsSet_ = true; +} + +bool ModifyDataSyncResponse::taskNameIsSet() const +{ + return taskNameIsSet_; +} + +void ModifyDataSyncResponse::unsettaskName() +{ + taskNameIsSet_ = false; +} + +std::string ModifyDataSyncResponse::getJobId() const +{ + return jobId_; +} + +void ModifyDataSyncResponse::setJobId(const std::string& value) +{ + jobId_ = value; + jobIdIsSet_ = true; +} + +bool ModifyDataSyncResponse::jobIdIsSet() const +{ + return jobIdIsSet_; +} + +void ModifyDataSyncResponse::unsetjobId() +{ + jobIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/gaussdb/src/v3/model/UpgradeSrKernelVersionRequest.cpp b/gaussdb/src/v3/model/UpgradeSrKernelVersionRequest.cpp new file mode 100644 index 000000000..cda3ef554 --- /dev/null +++ b/gaussdb/src/v3/model/UpgradeSrKernelVersionRequest.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/gaussdb/v3/model/UpgradeSrKernelVersionRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + + + + +UpgradeSrKernelVersionRequest::UpgradeSrKernelVersionRequest() +{ + xLanguage_ = ""; + xLanguageIsSet_ = false; + instanceId_ = ""; + instanceIdIsSet_ = false; + bodyIsSet_ = false; +} + +UpgradeSrKernelVersionRequest::~UpgradeSrKernelVersionRequest() = default; + +void UpgradeSrKernelVersionRequest::validate() +{ +} + +web::json::value UpgradeSrKernelVersionRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + if(instanceIdIsSet_) { + val[utility::conversions::to_string_t("instance_id")] = ModelBase::toJson(instanceId_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool UpgradeSrKernelVersionRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("X-Language"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("X-Language")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setXLanguage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + UpgradeSrKernelVersionRequestV3 refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string UpgradeSrKernelVersionRequest::getXLanguage() const +{ + return xLanguage_; +} + +void UpgradeSrKernelVersionRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool UpgradeSrKernelVersionRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void UpgradeSrKernelVersionRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +std::string UpgradeSrKernelVersionRequest::getInstanceId() const +{ + return instanceId_; +} + +void UpgradeSrKernelVersionRequest::setInstanceId(const std::string& value) +{ + instanceId_ = value; + instanceIdIsSet_ = true; +} + +bool UpgradeSrKernelVersionRequest::instanceIdIsSet() const +{ + return instanceIdIsSet_; +} + +void UpgradeSrKernelVersionRequest::unsetinstanceId() +{ + instanceIdIsSet_ = false; +} + +UpgradeSrKernelVersionRequestV3 UpgradeSrKernelVersionRequest::getBody() const +{ + return body_; +} + +void UpgradeSrKernelVersionRequest::setBody(const UpgradeSrKernelVersionRequestV3& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UpgradeSrKernelVersionRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UpgradeSrKernelVersionRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/gaussdb/src/v3/model/UpgradeSrKernelVersionRequestV3.cpp b/gaussdb/src/v3/model/UpgradeSrKernelVersionRequestV3.cpp new file mode 100644 index 000000000..abf33e629 --- /dev/null +++ b/gaussdb/src/v3/model/UpgradeSrKernelVersionRequestV3.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/gaussdb/v3/model/UpgradeSrKernelVersionRequestV3.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + + + + +UpgradeSrKernelVersionRequestV3::UpgradeSrKernelVersionRequestV3() +{ + delay_ = ""; + delayIsSet_ = false; + isSkipValidate_ = ""; + isSkipValidateIsSet_ = false; +} + +UpgradeSrKernelVersionRequestV3::~UpgradeSrKernelVersionRequestV3() = default; + +void UpgradeSrKernelVersionRequestV3::validate() +{ +} + +web::json::value UpgradeSrKernelVersionRequestV3::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(delayIsSet_) { + val[utility::conversions::to_string_t("delay")] = ModelBase::toJson(delay_); + } + if(isSkipValidateIsSet_) { + val[utility::conversions::to_string_t("is_skip_validate")] = ModelBase::toJson(isSkipValidate_); + } + + return val; +} +bool UpgradeSrKernelVersionRequestV3::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("delay"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("delay")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDelay(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("is_skip_validate"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_skip_validate")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsSkipValidate(refVal); + } + } + return ok; +} + + +std::string UpgradeSrKernelVersionRequestV3::getDelay() const +{ + return delay_; +} + +void UpgradeSrKernelVersionRequestV3::setDelay(const std::string& value) +{ + delay_ = value; + delayIsSet_ = true; +} + +bool UpgradeSrKernelVersionRequestV3::delayIsSet() const +{ + return delayIsSet_; +} + +void UpgradeSrKernelVersionRequestV3::unsetdelay() +{ + delayIsSet_ = false; +} + +std::string UpgradeSrKernelVersionRequestV3::getIsSkipValidate() const +{ + return isSkipValidate_; +} + +void UpgradeSrKernelVersionRequestV3::setIsSkipValidate(const std::string& value) +{ + isSkipValidate_ = value; + isSkipValidateIsSet_ = true; +} + +bool UpgradeSrKernelVersionRequestV3::isSkipValidateIsSet() const +{ + return isSkipValidateIsSet_; +} + +void UpgradeSrKernelVersionRequestV3::unsetisSkipValidate() +{ + isSkipValidateIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/gaussdb/src/v3/model/UpgradeSrKernelVersionResponse.cpp b/gaussdb/src/v3/model/UpgradeSrKernelVersionResponse.cpp new file mode 100644 index 000000000..925aed1bd --- /dev/null +++ b/gaussdb/src/v3/model/UpgradeSrKernelVersionResponse.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/gaussdb/v3/model/UpgradeSrKernelVersionResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdb { +namespace V3 { +namespace Model { + + + + +UpgradeSrKernelVersionResponse::UpgradeSrKernelVersionResponse() +{ + jobId_ = ""; + jobIdIsSet_ = false; +} + +UpgradeSrKernelVersionResponse::~UpgradeSrKernelVersionResponse() = default; + +void UpgradeSrKernelVersionResponse::validate() +{ +} + +web::json::value UpgradeSrKernelVersionResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(jobIdIsSet_) { + val[utility::conversions::to_string_t("job_id")] = ModelBase::toJson(jobId_); + } + + return val; +} +bool UpgradeSrKernelVersionResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("job_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("job_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setJobId(refVal); + } + } + return ok; +} + + +std::string UpgradeSrKernelVersionResponse::getJobId() const +{ + return jobId_; +} + +void UpgradeSrKernelVersionResponse::setJobId(const std::string& value) +{ + jobId_ = value; + jobIdIsSet_ = true; +} + +bool UpgradeSrKernelVersionResponse::jobIdIsSet() const +{ + return jobIdIsSet_; +} + +void UpgradeSrKernelVersionResponse::unsetjobId() +{ + jobIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/kms/include/huaweicloud/kms/v2/KmsRegion.h b/kms/include/huaweicloud/kms/v2/KmsRegion.h index 93a1538da..96eec0beb 100644 --- a/kms/include/huaweicloud/kms/v2/KmsRegion.h +++ b/kms/include/huaweicloud/kms/v2/KmsRegion.h @@ -122,6 +122,14 @@ class HUAWEICLOUD_KMS_V2_EXPORT KmsRegion { { "https://kms.cn-east-4.myhuaweicloud.com" }); + regions["me-east-1"] = Region("me-east-1", + { + "https://kms.me-east-1.myhuaweicloud.com" + }); + regions["ap-southeast-5"] = Region("ap-southeast-5", + { + "https://kms.ap-southeast-5.myhuaweicloud.com" + }); return regions; } private: diff --git a/ocr/include/huaweicloud/ocr/v1/model/GeneralTextRequestBody.h b/ocr/include/huaweicloud/ocr/v1/model/GeneralTextRequestBody.h index df004d9cf..a90e20363 100644 --- a/ocr/include/huaweicloud/ocr/v1/model/GeneralTextRequestBody.h +++ b/ocr/include/huaweicloud/ocr/v1/model/GeneralTextRequestBody.h @@ -93,7 +93,7 @@ class HUAWEICLOUD_OCR_V1_EXPORT GeneralTextRequestBody void setLanguage(const std::string& value); /// - /// 单朝向模式开关。可选值包括: - true:打开单朝向模式 - false:关闭单朝向模式 图片文字方向一致时,打开该开关可提升识别精度;图片文字方向不一致时,关闭该开关可支持多朝向文字识别。未传入该参数时默认为false,即默认图片中的字段为多朝向。 + /// 单朝向模式开关。可选值包括: - true:打开单朝向模式 - false:关闭单朝向模式 图片文字方向一致时,打开该开关可提升识别精度;图片文字方向不一致时,关闭该开关可支持多朝向文字识别。未传入该参数时默认为false,即默认图片中的字段为多朝向。 /// bool isSingleOrientationMode() const; diff --git a/ocr/include/huaweicloud/ocr/v1/model/InvoiceVerificationRequestBody.h b/ocr/include/huaweicloud/ocr/v1/model/InvoiceVerificationRequestBody.h index 547551c5b..48645ca37 100644 --- a/ocr/include/huaweicloud/ocr/v1/model/InvoiceVerificationRequestBody.h +++ b/ocr/include/huaweicloud/ocr/v1/model/InvoiceVerificationRequestBody.h @@ -75,7 +75,7 @@ class HUAWEICLOUD_OCR_V1_EXPORT InvoiceVerificationRequestBody void setCheckCode(const std::string& value); /// - /// 合计金额。和票据上的金额的有效数字保持一致,例如票据上的金额为88.00,则需要输入字符串为“88.00”,才能验真成功。如果输入“88”或“88.0”可能会产生\"result_code\": \"1010\", \" Parameter error.\"报错。 - 以下种类发票,参数不可为空 增值税专用发票、增值税电子专用发票、机动车销售统一发票、二手车销售统一发票、区块链电子发票、全电发票。 - 填写发票合计金额(不含税) 增值税专用发票、增值税电子专用发票、机动车销售统一发票、区块链电子发票。 - 填写发票车价合计 二手车发票。 - 填写发票合计金额 全电发票。 + /// 合计金额。和票据上的金额的有效数字保持一致,例如票据上的金额为88.00,则需要输入字符串为“88.00”,才能验真成功。如果输入“88”或“88.0”可能会产生\"result_code\": \"1010\", \" Parameter error.\"报错。 - 以下种类发票,参数不可为空 增值税专用发票、增值税电子专用发票、机动车销售统一发票、二手车销售统一发票、区块链电子发票、全电发票。 - 填写发票合计金额(不含税) 增值税专用发票、增值税电子专用发票、机动车销售统一发票、区块链电子发票。 - 填写发票车价合计 二手车发票。 - 填写发票合计金额 全电发票。 - 填写票价或者退票费 全电发票(铁路电子客票) /// std::string getSubtotalAmount() const; diff --git a/ocr/include/huaweicloud/ocr/v1/model/RecognizeInvoiceVerificationResponse.h b/ocr/include/huaweicloud/ocr/v1/model/RecognizeInvoiceVerificationResponse.h index 39330bc1a..934614286 100644 --- a/ocr/include/huaweicloud/ocr/v1/model/RecognizeInvoiceVerificationResponse.h +++ b/ocr/include/huaweicloud/ocr/v1/model/RecognizeInvoiceVerificationResponse.h @@ -40,7 +40,7 @@ class HUAWEICLOUD_OCR_V1_EXPORT RecognizeInvoiceVerificationResponse /// RecognizeInvoiceVerificationResponse members /// - /// 调用成功时表示调用结果,详情参见[响应参数](https://support.huaweicloud.com/api-ocr/ocr_03_0134.html#ocr_03_0134__table266mcpsimp)。 调用失败时无此字段。 依据发票类型不同,返回参数不同。 - 增值税发票 含增值税专用发票、增值税普通发票、增值税普通发票(卷式)、增值税电子专用发票、增值税电子普通发票、增值税电子普通发票(通行费)、区块链电子发票。 - 机动车销售统一发票 - 二手车销售统一发票 + /// 调用成功时表示调用结果,详情参见[响应参数](https://support.huaweicloud.com/api-ocr/ocr_03_0134.html#ocr_03_0134__table266mcpsimp)。 调用失败时无此字段。 依据发票类型不同,返回参数不同。 - 增值税发票 含增值税专用发票、增值税普通发票、增值税普通发票(卷式)、增值税电子专用发票、增值税电子普通发票、增值税电子普通发票(通行费)、区块链电子发票。 - 机动车销售统一发票 - 二手车销售统一发票 - 航空运输电子客票行程单 - 铁路电子客票 /// Object getResult() const; diff --git a/ocr/include/huaweicloud/ocr/v1/model/VehicleLicenseRequestBody.h b/ocr/include/huaweicloud/ocr/v1/model/VehicleLicenseRequestBody.h index 512183008..64d55f797 100644 --- a/ocr/include/huaweicloud/ocr/v1/model/VehicleLicenseRequestBody.h +++ b/ocr/include/huaweicloud/ocr/v1/model/VehicleLicenseRequestBody.h @@ -75,7 +75,7 @@ class HUAWEICLOUD_OCR_V1_EXPORT VehicleLicenseRequestBody void setReturnIssuingAuthority(bool value); /// - /// 识别到的文字块的区域位置信息。可选值包括: - true:返回各个文字块区域 - false:不返回各个文字块区域 如果无该参数,系统默认不返回文字块区域。如果输入参数不是Boolean类型,则会报非法参数错误。 + /// 识别到的文字块的区域位置信息。取值范围: - true:返回各个文字块区域 - false:不返回各个文字块区域 如果无该参数,系统默认不返回文字块区域。如果输入参数不是Boolean类型,则会报非法参数错误。 /// bool isReturnTextLocation() const; @@ -83,6 +83,15 @@ class HUAWEICLOUD_OCR_V1_EXPORT VehicleLicenseRequestBody void unsetreturnTextLocation(); void setReturnTextLocation(bool value); + /// + /// 是否支持识别电子行驶证,取值范围: - true:支持识别电子行驶证 - false:不支持识别电子行驶证 默认不支持识别电子行驶证。如果输入参数不是Boolean类型,则会报非法参数错误。 + /// + + bool isRecognizeElectronicLicense() const; + bool recognizeElectronicLicenseIsSet() const; + void unsetrecognizeElectronicLicense(); + void setRecognizeElectronicLicense(bool value); + protected: std::string image_; @@ -95,6 +104,8 @@ class HUAWEICLOUD_OCR_V1_EXPORT VehicleLicenseRequestBody bool returnIssuingAuthorityIsSet_; bool returnTextLocation_; bool returnTextLocationIsSet_; + bool recognizeElectronicLicense_; + bool recognizeElectronicLicenseIsSet_; }; diff --git a/ocr/include/huaweicloud/ocr/v1/model/VehicleLicenseResult.h b/ocr/include/huaweicloud/ocr/v1/model/VehicleLicenseResult.h index bbdba2c88..321507ba1 100644 --- a/ocr/include/huaweicloud/ocr/v1/model/VehicleLicenseResult.h +++ b/ocr/include/huaweicloud/ocr/v1/model/VehicleLicenseResult.h @@ -13,6 +13,7 @@ #include #include #include +#include namespace HuaweiCloud { namespace Sdk { @@ -41,6 +42,15 @@ class HUAWEICLOUD_OCR_V1_EXPORT VehicleLicenseResult ///////////////////////////////////////////// /// VehicleLicenseResult members + /// + /// 行驶证类型: - normal: 纸质行驶证 - electronic: 电子行驶证 + /// + + std::string getType() const; + bool typeIsSet() const; + void unsettype(); + void setType(const std::string& value); + /// /// 号牌号码。 /// @@ -248,6 +258,33 @@ class HUAWEICLOUD_OCR_V1_EXPORT VehicleLicenseResult void unsetenergyType(); void setEnergyType(const std::string& value); + /// + /// 车身颜色。 + /// + + std::string getColor() const; + bool colorIsSet() const; + void unsetcolor(); + void setColor(const std::string& value); + + /// + /// 强制报废日期。 + /// + + std::string getMandatoryScrappingDate() const; + bool mandatoryScrappingDateIsSet() const; + void unsetmandatoryScrappingDate(); + void setMandatoryScrappingDate(const std::string& value); + + /// + /// 状态。 + /// + + std::vector& getStatus(); + bool statusIsSet() const; + void unsetstatus(); + void setStatus(const std::vector& value); + /// /// /// @@ -268,6 +305,8 @@ class HUAWEICLOUD_OCR_V1_EXPORT VehicleLicenseResult protected: + std::string type_; + bool typeIsSet_; std::string number_; bool numberIsSet_; std::string vehicleType_; @@ -314,6 +353,12 @@ class HUAWEICLOUD_OCR_V1_EXPORT VehicleLicenseResult bool textLocationIsSet_; std::string energyType_; bool energyTypeIsSet_; + std::string color_; + bool colorIsSet_; + std::string mandatoryScrappingDate_; + bool mandatoryScrappingDateIsSet_; + std::vector status_; + bool statusIsSet_; VehicleLicenseFront front_; bool frontIsSet_; VehicleLicenseback back_; diff --git a/ocr/src/v1/model/VehicleLicenseRequestBody.cpp b/ocr/src/v1/model/VehicleLicenseRequestBody.cpp index 277e21e9b..9f6939b90 100644 --- a/ocr/src/v1/model/VehicleLicenseRequestBody.cpp +++ b/ocr/src/v1/model/VehicleLicenseRequestBody.cpp @@ -22,6 +22,8 @@ VehicleLicenseRequestBody::VehicleLicenseRequestBody() returnIssuingAuthorityIsSet_ = false; returnTextLocation_ = false; returnTextLocationIsSet_ = false; + recognizeElectronicLicense_ = false; + recognizeElectronicLicenseIsSet_ = false; } VehicleLicenseRequestBody::~VehicleLicenseRequestBody() = default; @@ -49,6 +51,9 @@ web::json::value VehicleLicenseRequestBody::toJson() const if(returnTextLocationIsSet_) { val[utility::conversions::to_string_t("return_text_location")] = ModelBase::toJson(returnTextLocation_); } + if(recognizeElectronicLicenseIsSet_) { + val[utility::conversions::to_string_t("recognize_electronic_license")] = ModelBase::toJson(recognizeElectronicLicense_); + } return val; } @@ -101,6 +106,15 @@ bool VehicleLicenseRequestBody::fromJson(const web::json::value& val) setReturnTextLocation(refVal); } } + if(val.has_field(utility::conversions::to_string_t("recognize_electronic_license"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("recognize_electronic_license")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRecognizeElectronicLicense(refVal); + } + } return ok; } @@ -210,6 +224,27 @@ void VehicleLicenseRequestBody::unsetreturnTextLocation() returnTextLocationIsSet_ = false; } +bool VehicleLicenseRequestBody::isRecognizeElectronicLicense() const +{ + return recognizeElectronicLicense_; +} + +void VehicleLicenseRequestBody::setRecognizeElectronicLicense(bool value) +{ + recognizeElectronicLicense_ = value; + recognizeElectronicLicenseIsSet_ = true; +} + +bool VehicleLicenseRequestBody::recognizeElectronicLicenseIsSet() const +{ + return recognizeElectronicLicenseIsSet_; +} + +void VehicleLicenseRequestBody::unsetrecognizeElectronicLicense() +{ + recognizeElectronicLicenseIsSet_ = false; +} + } } } diff --git a/ocr/src/v1/model/VehicleLicenseResult.cpp b/ocr/src/v1/model/VehicleLicenseResult.cpp index 38d1696f3..55a829e6f 100644 --- a/ocr/src/v1/model/VehicleLicenseResult.cpp +++ b/ocr/src/v1/model/VehicleLicenseResult.cpp @@ -12,6 +12,8 @@ namespace Model { VehicleLicenseResult::VehicleLicenseResult() { + type_ = ""; + typeIsSet_ = false; number_ = ""; numberIsSet_ = false; vehicleType_ = ""; @@ -57,6 +59,11 @@ VehicleLicenseResult::VehicleLicenseResult() textLocationIsSet_ = false; energyType_ = ""; energyTypeIsSet_ = false; + color_ = ""; + colorIsSet_ = false; + mandatoryScrappingDate_ = ""; + mandatoryScrappingDateIsSet_ = false; + statusIsSet_ = false; frontIsSet_ = false; backIsSet_ = false; } @@ -71,6 +78,9 @@ web::json::value VehicleLicenseResult::toJson() const { web::json::value val = web::json::value::object(); + if(typeIsSet_) { + val[utility::conversions::to_string_t("type")] = ModelBase::toJson(type_); + } if(numberIsSet_) { val[utility::conversions::to_string_t("number")] = ModelBase::toJson(number_); } @@ -140,6 +150,15 @@ web::json::value VehicleLicenseResult::toJson() const if(energyTypeIsSet_) { val[utility::conversions::to_string_t("energy_type")] = ModelBase::toJson(energyType_); } + if(colorIsSet_) { + val[utility::conversions::to_string_t("color")] = ModelBase::toJson(color_); + } + if(mandatoryScrappingDateIsSet_) { + val[utility::conversions::to_string_t("mandatory_scrapping_date")] = ModelBase::toJson(mandatoryScrappingDate_); + } + if(statusIsSet_) { + val[utility::conversions::to_string_t("status")] = ModelBase::toJson(status_); + } if(frontIsSet_) { val[utility::conversions::to_string_t("front")] = ModelBase::toJson(front_); } @@ -153,6 +172,15 @@ bool VehicleLicenseResult::fromJson(const web::json::value& val) { bool ok = true; + if(val.has_field(utility::conversions::to_string_t("type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setType(refVal); + } + } if(val.has_field(utility::conversions::to_string_t("number"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("number")); if(!fieldValue.is_null()) @@ -360,6 +388,33 @@ bool VehicleLicenseResult::fromJson(const web::json::value& val) setEnergyType(refVal); } } + if(val.has_field(utility::conversions::to_string_t("color"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("color")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setColor(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("mandatory_scrapping_date"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("mandatory_scrapping_date")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setMandatoryScrappingDate(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("status")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStatus(refVal); + } + } if(val.has_field(utility::conversions::to_string_t("front"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("front")); if(!fieldValue.is_null()) @@ -382,6 +437,27 @@ bool VehicleLicenseResult::fromJson(const web::json::value& val) } +std::string VehicleLicenseResult::getType() const +{ + return type_; +} + +void VehicleLicenseResult::setType(const std::string& value) +{ + type_ = value; + typeIsSet_ = true; +} + +bool VehicleLicenseResult::typeIsSet() const +{ + return typeIsSet_; +} + +void VehicleLicenseResult::unsettype() +{ + typeIsSet_ = false; +} + std::string VehicleLicenseResult::getNumber() const { return number_; @@ -865,6 +941,69 @@ void VehicleLicenseResult::unsetenergyType() energyTypeIsSet_ = false; } +std::string VehicleLicenseResult::getColor() const +{ + return color_; +} + +void VehicleLicenseResult::setColor(const std::string& value) +{ + color_ = value; + colorIsSet_ = true; +} + +bool VehicleLicenseResult::colorIsSet() const +{ + return colorIsSet_; +} + +void VehicleLicenseResult::unsetcolor() +{ + colorIsSet_ = false; +} + +std::string VehicleLicenseResult::getMandatoryScrappingDate() const +{ + return mandatoryScrappingDate_; +} + +void VehicleLicenseResult::setMandatoryScrappingDate(const std::string& value) +{ + mandatoryScrappingDate_ = value; + mandatoryScrappingDateIsSet_ = true; +} + +bool VehicleLicenseResult::mandatoryScrappingDateIsSet() const +{ + return mandatoryScrappingDateIsSet_; +} + +void VehicleLicenseResult::unsetmandatoryScrappingDate() +{ + mandatoryScrappingDateIsSet_ = false; +} + +std::vector& VehicleLicenseResult::getStatus() +{ + return status_; +} + +void VehicleLicenseResult::setStatus(const std::vector& value) +{ + status_ = value; + statusIsSet_ = true; +} + +bool VehicleLicenseResult::statusIsSet() const +{ + return statusIsSet_; +} + +void VehicleLicenseResult::unsetstatus() +{ + statusIsSet_ = false; +} + VehicleLicenseFront VehicleLicenseResult::getFront() const { return front_; diff --git a/smn/include/huaweicloud/smn/v2/SmnClient.h b/smn/include/huaweicloud/smn/v2/SmnClient.h index eacfbbda5..4644e6c16 100644 --- a/smn/include/huaweicloud/smn/v2/SmnClient.h +++ b/smn/include/huaweicloud/smn/v2/SmnClient.h @@ -31,6 +31,8 @@ #include #include #include +#include +#include #include #include #include @@ -41,6 +43,8 @@ #include #include #include +#include +#include #include #include #include @@ -77,6 +81,7 @@ #include #include #include +#include #include #include #include @@ -84,12 +89,16 @@ #include #include #include +#include +#include #include #include #include #include #include #include +#include +#include #include #include #include @@ -232,6 +241,14 @@ class HUAWEICLOUD_SMN_V2_EXPORT SmnClient : public Client std::shared_ptr createMessageTemplate( CreateMessageTemplateRequest &request ); + // 创建通知策略 + // + // 创建通知策略 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr createNotifyPolicy( + CreateNotifyPolicyRequest &request + ); // 添加资源标签 // // 一个资源上最多有10个标签。此接口为幂等接口:创建时,如果创建的标签已经存在(key相同),则覆盖。 @@ -265,6 +282,14 @@ class HUAWEICLOUD_SMN_V2_EXPORT SmnClient : public Client std::shared_ptr deleteMessageTemplate( DeleteMessageTemplateRequest &request ); + // 删除通知策略 + // + // 删除通知策略 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr deleteNotifyPolicy( + DeleteNotifyPolicyRequest &request + ); // 删除资源标签 // // 幂等接口:删除时,不对标签做校验。删除的key不存在报404,key不能为空或者空字符串。 @@ -411,7 +436,8 @@ class HUAWEICLOUD_SMN_V2_EXPORT SmnClient : public Client ); // 消息发布 // - // 将消息发送给Topic的所有订阅端点。当返回消息ID时,该消息已被保存并开始尝试将其推送给Topic的订阅者。三种消息发送方式 + // 将消息发送给Topic的所有订阅端点。当返回消息ID时,该消息已被保存并开始尝试将其推送给Topic的订阅者。为确保您的消息能够成功推送到各个订阅者,请确保您的消息内容符合当地法律法规要求。 + // 三种消息发送方式 // // message // @@ -434,6 +460,14 @@ class HUAWEICLOUD_SMN_V2_EXPORT SmnClient : public Client std::shared_ptr showHttpDetectResult( ShowHttpDetectResultRequest &request ); + // 查询通知策略 + // + // 查询通知策略 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showNotifyPolicy( + ShowNotifyPolicyRequest &request + ); // 更新云日志 // // 更新指定Topic绑定的云日志。 @@ -450,6 +484,14 @@ class HUAWEICLOUD_SMN_V2_EXPORT SmnClient : public Client std::shared_ptr updateMessageTemplate( UpdateMessageTemplateRequest &request ); + // 修改通知策略 + // + // 修改通知策略,该接口仅支持全量修改,不支持部分修改。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr updateNotifyPolicy( + UpdateNotifyPolicyRequest &request + ); // 更新订阅者 // // 更新订阅者备注。 diff --git a/smn/include/huaweicloud/smn/v2/SmnMeta.h b/smn/include/huaweicloud/smn/v2/SmnMeta.h index c9d3cedfb..99dc81f1e 100644 --- a/smn/include/huaweicloud/smn/v2/SmnMeta.h +++ b/smn/include/huaweicloud/smn/v2/SmnMeta.h @@ -22,10 +22,12 @@ class HUAWEICLOUD_SMN_V2_EXPORT SmnMeta { static HttpRequestDef genRequestDefForCancelSubscription(); static HttpRequestDef genRequestDefForCreateLogtank(); static HttpRequestDef genRequestDefForCreateMessageTemplate(); + static HttpRequestDef genRequestDefForCreateNotifyPolicy(); static HttpRequestDef genRequestDefForCreateResourceTag(); static HttpRequestDef genRequestDefForCreateTopic(); static HttpRequestDef genRequestDefForDeleteLogtank(); static HttpRequestDef genRequestDefForDeleteMessageTemplate(); + static HttpRequestDef genRequestDefForDeleteNotifyPolicy(); static HttpRequestDef genRequestDefForDeleteResourceTag(); static HttpRequestDef genRequestDefForDeleteTopic(); static HttpRequestDef genRequestDefForDeleteTopicAttributeByName(); @@ -46,8 +48,10 @@ class HUAWEICLOUD_SMN_V2_EXPORT SmnMeta { static HttpRequestDef genRequestDefForPublishHttpDetect(); static HttpRequestDef genRequestDefForPublishMessage(); static HttpRequestDef genRequestDefForShowHttpDetectResult(); + static HttpRequestDef genRequestDefForShowNotifyPolicy(); static HttpRequestDef genRequestDefForUpdateLogtank(); static HttpRequestDef genRequestDefForUpdateMessageTemplate(); + static HttpRequestDef genRequestDefForUpdateNotifyPolicy(); static HttpRequestDef genRequestDefForUpdateSubscription(); static HttpRequestDef genRequestDefForUpdateTopic(); static HttpRequestDef genRequestDefForUpdateTopicAttribute(); diff --git a/smn/include/huaweicloud/smn/v2/model/AddSubscriptionRequestBody.h b/smn/include/huaweicloud/smn/v2/model/AddSubscriptionRequestBody.h index 23ee58a81..0fea222ec 100644 --- a/smn/include/huaweicloud/smn/v2/model/AddSubscriptionRequestBody.h +++ b/smn/include/huaweicloud/smn/v2/model/AddSubscriptionRequestBody.h @@ -9,8 +9,10 @@ #include #include +#include #include #include +#include namespace HuaweiCloud { namespace Sdk { @@ -40,7 +42,7 @@ class HUAWEICLOUD_SMN_V2_EXPORT AddSubscriptionRequestBody /// AddSubscriptionRequestBody members /// - /// 不同协议对应不同的endpoint(接受消息的接入点)。 目前支持的协议包括: “email”:邮件传输协议,endpoint为邮箱地址。 “sms”:短信传输协议,endpoint为手机号码。 “functionstage”:FunctionGraph(函数)传输协议,endpoint为一个函数。 “functiongraph”:FunctionGraph(工作流)传输协议,endpoint为由一组函数编排成的工作流。 “http”、“https”:HTTP/HTTPS传输协议,endpoint为URL。 “callnotify”:语音通知传输协议,endpoint为手机号码。 “wechat”:微信群机器人传输协议。 “dingding”:钉钉群机器人传输协议。 “feishu”:飞书群机器人传输协议。 “welink”:welink群机器人传输协议。 + /// 不同协议对应不同的endpoint(接受消息的接入点)。 目前支持的协议包括: “email”:邮件传输协议,endpoint为邮箱地址。 “sms”:短信传输协议,endpoint为手机号码。 “functionstage”:FunctionGraph(函数)传输协议,endpoint为一个函数。 “functiongraph”:FunctionGraph(工作流)传输协议,endpoint为由一组函数编排成的工作流。 “http”、“https”:HTTP/HTTPS传输协议,endpoint为URL。 “callnotify”:语音通知传输协议,endpoint为手机号码。 “wechat”:微信群机器人传输协议。 “dingding”:钉钉群机器人传输协议。 “feishu”:飞书群机器人传输协议。 “welink”:welink群机器人传输协议。 “dingTalkBot”:个人钉钉传输协议。 /// std::string getProtocol() const; @@ -49,7 +51,7 @@ class HUAWEICLOUD_SMN_V2_EXPORT AddSubscriptionRequestBody void setProtocol(const std::string& value); /// - /// 说明: http协议,接入点必须以“http://”开头。 https协议,接入点必须以“https://”开头。 email协议,接入点必须是邮件地址。 sms协议,接入点必须是一个电话号码。 functionstage协议,接入点必须是一个函数。 functiongraph协议,接入点必须是一个函数工作流。 dms协议,接入点必须是一个消息队列。 application协议,接入点必须是一个应用平台的设备终端。 callnotify协议,接入点必须是一个电话号码。 dingding协议,接入点必须是一个钉钉群机器人的地址。 wechat协议,接入点必须是一个微信群机器人的地址。 feishu协议,接入点必须是一个飞书群机器人的地址。 welink协议,接入点必须是一个welink的群号。 + /// 说明: http协议,接入点必须以“http://”开头。 https协议,接入点必须以“https://”开头。 email协议,接入点必须是邮件地址。 sms协议,接入点必须是一个电话号码。 functionstage协议,接入点必须是一个函数。 functiongraph协议,接入点必须是一个函数工作流。 callnotify协议,接入点必须是一个电话号码。 dingding协议,接入点必须是一个钉钉自定义群机器人的地址,或添加了钉钉企业内部机器人的群组openConversationId。添加钉钉企业内部机器人对应的群组openConversationId时,该字段不能以“http://”或“https://”为开头。 wechat协议,接入点必须是一个微信群机器人的地址。 feishu协议,接入点必须是一个飞书群机器人的地址。 welink协议,接入点必须是一个welink的群号。 dingTalkBot协议,接入点必须是一个钉钉企业用户的userId。 /// std::string getEndpoint() const; @@ -75,6 +77,15 @@ class HUAWEICLOUD_SMN_V2_EXPORT AddSubscriptionRequestBody void unsetextension(); void setExtension(const SubscriptionExtension& value); + /// + /// 当需要批量创建订阅时,需要传入该字段。SMN支持一次最多创建50个订阅。 + /// + + std::vector& getSubscriptions(); + bool subscriptionsIsSet() const; + void unsetsubscriptions(); + void setSubscriptions(const std::vector& value); + protected: std::string protocol_; @@ -85,6 +96,8 @@ class HUAWEICLOUD_SMN_V2_EXPORT AddSubscriptionRequestBody bool remarkIsSet_; SubscriptionExtension extension_; bool extensionIsSet_; + std::vector subscriptions_; + bool subscriptionsIsSet_; }; diff --git a/smn/include/huaweicloud/smn/v2/model/BatchAddSubscriptionsRequestBody.h b/smn/include/huaweicloud/smn/v2/model/BatchAddSubscriptionsRequestBody.h new file mode 100644 index 000000000..308851663 --- /dev/null +++ b/smn/include/huaweicloud/smn/v2/model/BatchAddSubscriptionsRequestBody.h @@ -0,0 +1,98 @@ + +#ifndef HUAWEICLOUD_SDK_SMN_V2_MODEL_BatchAddSubscriptionsRequestBody_H_ +#define HUAWEICLOUD_SDK_SMN_V2_MODEL_BatchAddSubscriptionsRequestBody_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_SMN_V2_EXPORT BatchAddSubscriptionsRequestBody + : public ModelBase +{ +public: + BatchAddSubscriptionsRequestBody(); + virtual ~BatchAddSubscriptionsRequestBody(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// BatchAddSubscriptionsRequestBody members + + /// + /// 不同协议对应不同的endpoint(接受消息的接入点)。 目前支持的协议包括: “email”:邮件传输协议,endpoint为邮箱地址。 “sms”:短信传输协议,endpoint为手机号码。 “functionstage”:FunctionGraph(函数)传输协议,endpoint为一个函数。 “functiongraph”:FunctionGraph(工作流)传输协议,endpoint为由一组函数编排成的工作流。 “http”、“https”:HTTP/HTTPS传输协议,endpoint为URL。 “callnotify”:语音通知传输协议,endpoint为手机号码。 “wechat”:微信群机器人传输协议。 “dingding”:钉钉群机器人传输协议。 “feishu”:飞书群机器人传输协议。 “welink”:welink群机器人传输协议。 + /// + + std::string getProtocol() const; + bool protocolIsSet() const; + void unsetprotocol(); + void setProtocol(const std::string& value); + + /// + /// 说明: http协议,接入点必须以“http://”开头。 https协议,接入点必须以“https://”开头。 email协议,接入点必须是邮件地址。 sms协议,接入点必须是一个电话号码。 functionstage协议,接入点必须是一个函数。 functiongraph协议,接入点必须是一个函数工作流。 callnotify协议,接入点必须是一个电话号码。 dingding协议,接入点必须是一个钉钉自定义群机器人的地址,或添加了钉钉企业内部机器人的群组openConversationId。添加钉钉企业内部机器人对应的群组openConversationId时,该字段不能以“http://”或“https://”为开头。 wechat协议,接入点必须是一个微信群机器人的地址。 feishu协议,接入点必须是一个飞书群机器人的地址。 welink协议,接入点必须是一个welink的群号。 + /// + + std::string getEndpoint() const; + bool endpointIsSet() const; + void unsetendpoint(); + void setEndpoint(const std::string& value); + + /// + /// 备注。最大支持128字节,约42个中文,必须是UTF-8编码的字符串,否则无法正常显示中文。 + /// + + std::string getRemark() const; + bool remarkIsSet() const; + void unsetremark(); + void setRemark(const std::string& value); + + /// + /// + /// + + SubscriptionExtension getExtension() const; + bool extensionIsSet() const; + void unsetextension(); + void setExtension(const SubscriptionExtension& value); + + +protected: + std::string protocol_; + bool protocolIsSet_; + std::string endpoint_; + bool endpointIsSet_; + std::string remark_; + bool remarkIsSet_; + SubscriptionExtension extension_; + bool extensionIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_SMN_V2_MODEL_BatchAddSubscriptionsRequestBody_H_ diff --git a/smn/include/huaweicloud/smn/v2/model/CreateMessageTemplateRequestBody.h b/smn/include/huaweicloud/smn/v2/model/CreateMessageTemplateRequestBody.h index 9deec60e2..b722e0e0f 100644 --- a/smn/include/huaweicloud/smn/v2/model/CreateMessageTemplateRequestBody.h +++ b/smn/include/huaweicloud/smn/v2/model/CreateMessageTemplateRequestBody.h @@ -48,7 +48,7 @@ class HUAWEICLOUD_SMN_V2_EXPORT CreateMessageTemplateRequestBody void setMessageTemplateName(const std::string& value); /// - /// 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + /// 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 /// std::string getProtocol() const; diff --git a/smn/include/huaweicloud/smn/v2/model/CreateNotifyPolicyRequest.h b/smn/include/huaweicloud/smn/v2/model/CreateNotifyPolicyRequest.h new file mode 100644 index 000000000..096bba5d8 --- /dev/null +++ b/smn/include/huaweicloud/smn/v2/model/CreateNotifyPolicyRequest.h @@ -0,0 +1,83 @@ + +#ifndef HUAWEICLOUD_SDK_SMN_V2_MODEL_CreateNotifyPolicyRequest_H_ +#define HUAWEICLOUD_SDK_SMN_V2_MODEL_CreateNotifyPolicyRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_SMN_V2_EXPORT CreateNotifyPolicyRequest + : public ModelBase +{ +public: + CreateNotifyPolicyRequest(); + virtual ~CreateNotifyPolicyRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateNotifyPolicyRequest members + + /// + /// Topic的唯一的资源标识,可通过[查询主题列表](smn_api_51004.xml)获取该标识。 + /// + + std::string getTopicUrn() const; + bool topicUrnIsSet() const; + void unsettopicUrn(); + void setTopicUrn(const std::string& value); + + /// + /// + /// + + NotifyPolicyRequestBody getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const NotifyPolicyRequestBody& value); + + +protected: + std::string topicUrn_; + bool topicUrnIsSet_; + NotifyPolicyRequestBody body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + CreateNotifyPolicyRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_SMN_V2_MODEL_CreateNotifyPolicyRequest_H_ diff --git a/smn/include/huaweicloud/smn/v2/model/CreateNotifyPolicyResponse.h b/smn/include/huaweicloud/smn/v2/model/CreateNotifyPolicyResponse.h new file mode 100644 index 000000000..711812af0 --- /dev/null +++ b/smn/include/huaweicloud/smn/v2/model/CreateNotifyPolicyResponse.h @@ -0,0 +1,78 @@ + +#ifndef HUAWEICLOUD_SDK_SMN_V2_MODEL_CreateNotifyPolicyResponse_H_ +#define HUAWEICLOUD_SDK_SMN_V2_MODEL_CreateNotifyPolicyResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_SMN_V2_EXPORT CreateNotifyPolicyResponse + : public ModelBase, public HttpResponse +{ +public: + CreateNotifyPolicyResponse(); + virtual ~CreateNotifyPolicyResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateNotifyPolicyResponse members + + /// + /// 请求的唯一标识ID + /// + + std::string getRequestId() const; + bool requestIdIsSet() const; + void unsetrequestId(); + void setRequestId(const std::string& value); + + /// + /// 通知策略ID + /// + + std::string getId() const; + bool idIsSet() const; + void unsetid(); + void setId(const std::string& value); + + +protected: + std::string requestId_; + bool requestIdIsSet_; + std::string id_; + bool idIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_SMN_V2_MODEL_CreateNotifyPolicyResponse_H_ diff --git a/smn/include/huaweicloud/smn/v2/model/DeleteNotifyPolicyRequest.h b/smn/include/huaweicloud/smn/v2/model/DeleteNotifyPolicyRequest.h new file mode 100644 index 000000000..4128c30b5 --- /dev/null +++ b/smn/include/huaweicloud/smn/v2/model/DeleteNotifyPolicyRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_SMN_V2_MODEL_DeleteNotifyPolicyRequest_H_ +#define HUAWEICLOUD_SDK_SMN_V2_MODEL_DeleteNotifyPolicyRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_SMN_V2_EXPORT DeleteNotifyPolicyRequest + : public ModelBase +{ +public: + DeleteNotifyPolicyRequest(); + virtual ~DeleteNotifyPolicyRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteNotifyPolicyRequest members + + /// + /// Topic的唯一的资源标识,可通过[查询主题列表](smn_api_51004.xml)获取该标识。 + /// + + std::string getTopicUrn() const; + bool topicUrnIsSet() const; + void unsettopicUrn(); + void setTopicUrn(const std::string& value); + + /// + /// 通知策略ID。 + /// + + std::string getNotifyPolicyId() const; + bool notifyPolicyIdIsSet() const; + void unsetnotifyPolicyId(); + void setNotifyPolicyId(const std::string& value); + + +protected: + std::string topicUrn_; + bool topicUrnIsSet_; + std::string notifyPolicyId_; + bool notifyPolicyIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + DeleteNotifyPolicyRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_SMN_V2_MODEL_DeleteNotifyPolicyRequest_H_ diff --git a/smn/include/huaweicloud/smn/v2/model/DeleteNotifyPolicyResponse.h b/smn/include/huaweicloud/smn/v2/model/DeleteNotifyPolicyResponse.h new file mode 100644 index 000000000..aeac5adf0 --- /dev/null +++ b/smn/include/huaweicloud/smn/v2/model/DeleteNotifyPolicyResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_SMN_V2_MODEL_DeleteNotifyPolicyResponse_H_ +#define HUAWEICLOUD_SDK_SMN_V2_MODEL_DeleteNotifyPolicyResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_SMN_V2_EXPORT DeleteNotifyPolicyResponse + : public ModelBase, public HttpResponse +{ +public: + DeleteNotifyPolicyResponse(); + virtual ~DeleteNotifyPolicyResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteNotifyPolicyResponse members + + /// + /// + /// + + std::string getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const std::string& value); + + +protected: + std::string body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_SMN_V2_MODEL_DeleteNotifyPolicyResponse_H_ diff --git a/smn/include/huaweicloud/smn/v2/model/ListInstanceRequestBody.h b/smn/include/huaweicloud/smn/v2/model/ListInstanceRequestBody.h index 727e6cb62..6aef943ec 100644 --- a/smn/include/huaweicloud/smn/v2/model/ListInstanceRequestBody.h +++ b/smn/include/huaweicloud/smn/v2/model/ListInstanceRequestBody.h @@ -113,6 +113,15 @@ class HUAWEICLOUD_SMN_V2_EXPORT ListInstanceRequestBody void unsetmatches(); void setMatches(const std::vector& value); + /// + /// 不包含任意一个标签。该字段为true时查询所有不带标签的资源,此时忽略“tags”、“tags_any”、“not_tags”、“not_tags_any”字段。 + /// + + bool isWithoutAnyTag() const; + bool withoutAnyTagIsSet() const; + void unsetwithoutAnyTag(); + void setWithoutAnyTag(bool value); + protected: std::vector tags_; @@ -131,6 +140,8 @@ class HUAWEICLOUD_SMN_V2_EXPORT ListInstanceRequestBody bool actionIsSet_; std::vector matches_; bool matchesIsSet_; + bool withoutAnyTag_; + bool withoutAnyTagIsSet_; }; diff --git a/smn/include/huaweicloud/smn/v2/model/ListMessageTemplateDetailsResponse.h b/smn/include/huaweicloud/smn/v2/model/ListMessageTemplateDetailsResponse.h index 0b73f67dc..17af9385c 100644 --- a/smn/include/huaweicloud/smn/v2/model/ListMessageTemplateDetailsResponse.h +++ b/smn/include/huaweicloud/smn/v2/model/ListMessageTemplateDetailsResponse.h @@ -58,7 +58,7 @@ class HUAWEICLOUD_SMN_V2_EXPORT ListMessageTemplateDetailsResponse void setMessageTemplateName(const std::string& value); /// - /// 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + /// 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 /// std::string getProtocol() const; diff --git a/smn/include/huaweicloud/smn/v2/model/ListMessageTemplatesRequest.h b/smn/include/huaweicloud/smn/v2/model/ListMessageTemplatesRequest.h index 945a4902b..fd963bd2d 100644 --- a/smn/include/huaweicloud/smn/v2/model/ListMessageTemplatesRequest.h +++ b/smn/include/huaweicloud/smn/v2/model/ListMessageTemplatesRequest.h @@ -66,7 +66,7 @@ class HUAWEICLOUD_SMN_V2_EXPORT ListMessageTemplatesRequest void setMessageTemplateName(const std::string& value); /// - /// 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + /// 模板支持的协议类型。 目前支持的协议包括: “default”:默认协议。 “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 /// std::string getProtocol() const; diff --git a/smn/include/huaweicloud/smn/v2/model/ListSubscriptionsRequest.h b/smn/include/huaweicloud/smn/v2/model/ListSubscriptionsRequest.h index a0233ebbe..574605854 100644 --- a/smn/include/huaweicloud/smn/v2/model/ListSubscriptionsRequest.h +++ b/smn/include/huaweicloud/smn/v2/model/ListSubscriptionsRequest.h @@ -57,7 +57,7 @@ class HUAWEICLOUD_SMN_V2_EXPORT ListSubscriptionsRequest void setLimit(int32_t value); /// - /// 协议名称, 枚举值:http、https、sms、email、functionstage、dms、application。 + /// 协议名称, 枚举值:http、https、sms、email、functionstage。 /// std::string getProtocol() const; diff --git a/smn/include/huaweicloud/smn/v2/model/ListTopicsRequest.h b/smn/include/huaweicloud/smn/v2/model/ListTopicsRequest.h index f6493588e..2a26e7b34 100644 --- a/smn/include/huaweicloud/smn/v2/model/ListTopicsRequest.h +++ b/smn/include/huaweicloud/smn/v2/model/ListTopicsRequest.h @@ -57,7 +57,7 @@ class HUAWEICLOUD_SMN_V2_EXPORT ListTopicsRequest void setLimit(int32_t value); /// - /// 企业项目id,默认企业项目id为0。 + /// 企业项目id。 /// std::string getEnterpriseProjectId() const; diff --git a/smn/include/huaweicloud/smn/v2/model/MessageTemplate.h b/smn/include/huaweicloud/smn/v2/model/MessageTemplate.h index b2e76ebec..c1534e2b4 100644 --- a/smn/include/huaweicloud/smn/v2/model/MessageTemplate.h +++ b/smn/include/huaweicloud/smn/v2/model/MessageTemplate.h @@ -58,7 +58,7 @@ class HUAWEICLOUD_SMN_V2_EXPORT MessageTemplate void setMessageTemplateName(const std::string& value); /// - /// 模板协议类型。 目前支持的协议包括: “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “dms”:DMS传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 + /// 模板协议类型。 目前支持的协议包括: “email”:邮件传输协议。 “sms”:短信传输协议。 “functionstage”:FunctionGraph(函数)传输协议。 “http”、“https”:HTTP/HTTPS传输协议。 /// std::string getProtocol() const; diff --git a/smn/include/huaweicloud/smn/v2/model/NotifyPolicyRequestBody.h b/smn/include/huaweicloud/smn/v2/model/NotifyPolicyRequestBody.h new file mode 100644 index 000000000..dd86ee01e --- /dev/null +++ b/smn/include/huaweicloud/smn/v2/model/NotifyPolicyRequestBody.h @@ -0,0 +1,77 @@ + +#ifndef HUAWEICLOUD_SDK_SMN_V2_MODEL_NotifyPolicyRequestBody_H_ +#define HUAWEICLOUD_SDK_SMN_V2_MODEL_NotifyPolicyRequestBody_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 通知策略请求体 +/// +class HUAWEICLOUD_SMN_V2_EXPORT NotifyPolicyRequestBody + : public ModelBase +{ +public: + NotifyPolicyRequestBody(); + virtual ~NotifyPolicyRequestBody(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// NotifyPolicyRequestBody members + + /// + /// 通知策略类型,当前仅支持语音。 + /// + + std::string getProtocol() const; + bool protocolIsSet() const; + void unsetprotocol(); + void setProtocol(const std::string& value); + + /// + /// 轮询策略订阅终端。 + /// + + std::vector& getPolling(); + bool pollingIsSet() const; + void unsetpolling(); + void setPolling(const std::vector& value); + + +protected: + std::string protocol_; + bool protocolIsSet_; + std::vector polling_; + bool pollingIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_SMN_V2_MODEL_NotifyPolicyRequestBody_H_ diff --git a/smn/include/huaweicloud/smn/v2/model/PollingPolicyRequest.h b/smn/include/huaweicloud/smn/v2/model/PollingPolicyRequest.h new file mode 100644 index 000000000..6467eaebe --- /dev/null +++ b/smn/include/huaweicloud/smn/v2/model/PollingPolicyRequest.h @@ -0,0 +1,76 @@ + +#ifndef HUAWEICLOUD_SDK_SMN_V2_MODEL_PollingPolicyRequest_H_ +#define HUAWEICLOUD_SDK_SMN_V2_MODEL_PollingPolicyRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_SMN_V2_EXPORT PollingPolicyRequest + : public ModelBase +{ +public: + PollingPolicyRequest(); + virtual ~PollingPolicyRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// PollingPolicyRequest members + + /// + /// 当前轮询的序号。 + /// + + int32_t getOrder() const; + bool orderIsSet() const; + void unsetorder(); + void setOrder(int32_t value); + + /// + /// 订阅终端urn列表。 + /// + + std::vector& getSubscriptionUrns(); + bool subscriptionUrnsIsSet() const; + void unsetsubscriptionUrns(); + void setSubscriptionUrns(const std::vector& value); + + +protected: + int32_t order_; + bool orderIsSet_; + std::vector subscriptionUrns_; + bool subscriptionUrnsIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_SMN_V2_MODEL_PollingPolicyRequest_H_ diff --git a/smn/include/huaweicloud/smn/v2/model/PollingPolicyResponse.h b/smn/include/huaweicloud/smn/v2/model/PollingPolicyResponse.h new file mode 100644 index 000000000..36b5fe0e0 --- /dev/null +++ b/smn/include/huaweicloud/smn/v2/model/PollingPolicyResponse.h @@ -0,0 +1,76 @@ + +#ifndef HUAWEICLOUD_SDK_SMN_V2_MODEL_PollingPolicyResponse_H_ +#define HUAWEICLOUD_SDK_SMN_V2_MODEL_PollingPolicyResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_SMN_V2_EXPORT PollingPolicyResponse + : public ModelBase +{ +public: + PollingPolicyResponse(); + virtual ~PollingPolicyResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// PollingPolicyResponse members + + /// + /// 当前轮询的序号。 + /// + + int32_t getOrder() const; + bool orderIsSet() const; + void unsetorder(); + void setOrder(int32_t value); + + /// + /// 订阅终端urn列表。 + /// + + std::vector& getSubscriptions(); + bool subscriptionsIsSet() const; + void unsetsubscriptions(); + void setSubscriptions(const std::vector& value); + + +protected: + int32_t order_; + bool orderIsSet_; + std::vector subscriptions_; + bool subscriptionsIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_SMN_V2_MODEL_PollingPolicyResponse_H_ diff --git a/smn/include/huaweicloud/smn/v2/model/PollingPolicySubscriptionDetails.h b/smn/include/huaweicloud/smn/v2/model/PollingPolicySubscriptionDetails.h new file mode 100644 index 000000000..7c0652ce0 --- /dev/null +++ b/smn/include/huaweicloud/smn/v2/model/PollingPolicySubscriptionDetails.h @@ -0,0 +1,97 @@ + +#ifndef HUAWEICLOUD_SDK_SMN_V2_MODEL_PollingPolicySubscriptionDetails_H_ +#define HUAWEICLOUD_SDK_SMN_V2_MODEL_PollingPolicySubscriptionDetails_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_SMN_V2_EXPORT PollingPolicySubscriptionDetails + : public ModelBase +{ +public: + PollingPolicySubscriptionDetails(); + virtual ~PollingPolicySubscriptionDetails(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// PollingPolicySubscriptionDetails members + + /// + /// 当前轮询的序号。 + /// + + std::string getSubscriptionUrn() const; + bool subscriptionUrnIsSet() const; + void unsetsubscriptionUrn(); + void setSubscriptionUrn(const std::string& value); + + /// + /// 订阅终端urn列表。 + /// + + std::string getEndpoint() const; + bool endpointIsSet() const; + void unsetendpoint(); + void setEndpoint(const std::string& value); + + /// + /// 备注。 + /// + + std::string getRemark() const; + bool remarkIsSet() const; + void unsetremark(); + void setRemark(const std::string& value); + + /// + /// 订阅者状态:0表示订阅还未确认,1表示已经确认,3表示已经取消确认。 + /// + + int32_t getStatus() const; + bool statusIsSet() const; + void unsetstatus(); + void setStatus(int32_t value); + + +protected: + std::string subscriptionUrn_; + bool subscriptionUrnIsSet_; + std::string endpoint_; + bool endpointIsSet_; + std::string remark_; + bool remarkIsSet_; + int32_t status_; + bool statusIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_SMN_V2_MODEL_PollingPolicySubscriptionDetails_H_ diff --git a/smn/include/huaweicloud/smn/v2/model/PublishMessageRequestBody.h b/smn/include/huaweicloud/smn/v2/model/PublishMessageRequestBody.h index 8d44d31f5..b6999f980 100644 --- a/smn/include/huaweicloud/smn/v2/model/PublishMessageRequestBody.h +++ b/smn/include/huaweicloud/smn/v2/model/PublishMessageRequestBody.h @@ -51,7 +51,7 @@ class HUAWEICLOUD_SMN_V2_EXPORT PublishMessageRequestBody void setSubject(const std::string& value); /// - /// 发送的消息。消息体必须是UTF-8编码的字符串,大小至多256KB。如果订阅者是手机号码,长度不超过490个字符,超出部分系统自动截断。短信内容不能包含“[]”或者“【】”符号。 对于移动推送订阅者推送消息,message消息必须符合移动推送平台的消息格式,消息格式请参见application消息体格式。否则移动app无法收到消息,目前支持的平台有HMS、APNS、APNS_SANDBOX。 说明: 三种消息发送方式 message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 + /// 发送的消息。消息体必须是UTF-8编码的字符串,大小至多256KB。如果订阅者是手机号码,短信长度限制为490字,超出则可能被运营商拦截。短信内容不能包含“[]”或者“【】”符号。 说明: 三种消息发送方式:message、message_structure、message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 /// std::string getMessage() const; @@ -60,7 +60,7 @@ class HUAWEICLOUD_SMN_V2_EXPORT PublishMessageRequestBody void setMessage(const std::string& value); /// - /// Json格式的字符串。支持“email”、“sms”、 “http”、“https”、“dms”、“functiongraph”、“functionstage”、“HMS”、“APNS”、“APNS_SANDBOX”、 \"dingding\", \"wechat\",”feishu“, \"welink\"。其中,“HMS”、“APNS”以及“APNS_SANDBOX”三种消息的格式请参见application消息体格式。必须设置默认的消息“default”,当匹配不到消息协议时,按“default”中的内容发送。其中,钉钉、微信、飞书、welink协议类型的消息需指定msgType字段;钉钉,微信和飞书机器人协议支持msgType为text(纯文本)和markdown(MD)格式消息,welink和红版welink机器人类型暂仅支持msgType为text的纯文本消息。 说明: 三种消息发送方式 message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 华为透传消息 { \"hps\": { \"msg\": { \"type\": 1, \"body\": { \"key\": \"value\" } } } } 华为系统通知栏消息 { \"hps\": { \"msg\": { \"type\": 3, \"body\": { \"content\": \"Push message content\", \"title\": \"Push message content\" }, \"action\": { \"type\": 1, \"param\": { \"intent\": \"#Intent;compo=com.rvr/.Activity;S.W=U;end\" } } }, \"ext\": { \"biTag\": \"Trump\", \"icon\": \"http://upload.w.org/00/150pxsvg.png\" } } } 苹果平台消息格式 { \"aps\": { \"alert\": \"hello world\" } } + /// Json格式的字符串。支持“email”、“sms”、“http”、“https”、“functiongraph”、“functionstage”、“dingding”、“wechat”、“feishu”、“welink”。必须设置默认的消息“default”,当匹配不到消息协议时,按“default”中的内容发送。其中,钉钉、微信、飞书、welink协议类型的消息需指定msgType字段;钉钉,微信和飞书机器人协议支持msgType为text(纯文本)和markdown(MD)格式消息,welink和红版welink机器人类型暂仅支持msgType为text的纯文本消息。 钉钉机器人协议支持通过at字段实现@群组成员。当您需要@群成员时,可以在isAtAll字段中传入布尔值,表示是否需要@群组内所有人。您可以在atMobiles字段中传入需要@的人的手机号列表,或在atUserIds字段中传入需要@的钉钉userID列表。当您使用atMobiles字段或atUserIds字段时,需要在消息内容中同时传入@对应手机号或userID的信息。展示效果请参考钉钉官方文档。 说明: 三种消息发送方式:message、message_structure、message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 /// std::string getMessageStructure() const; @@ -69,7 +69,7 @@ class HUAWEICLOUD_SMN_V2_EXPORT PublishMessageRequestBody void setMessageStructure(const std::string& value); /// - /// 消息模板名称,可通过[查询消息模板列表](ListMessageTemplates.xml)获取名称。 说明: 三种消息发送方式: message message_structure message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 + /// 消息模板名称,可通过[查询消息模板列表](ListMessageTemplates.xml)获取名称。 说明: 三种消息发送方式:message、message_structure、message_template_name 至少设置其中一个,如果同时设置,生效的优先级为 message_structure > message_template_name > message。 /// std::string getMessageTemplateName() const; @@ -104,6 +104,15 @@ class HUAWEICLOUD_SMN_V2_EXPORT PublishMessageRequestBody void unsetmessageAttributes(); void setMessageAttributes(const std::vector& value); + /// + /// 语言,发送出去的消息中SMN附加系统内容的语言,若没传入,使用账号的语言。取值范围是该局点支持的语言,比如:zh-cn,en-us等 + /// + + std::string getLocale() const; + bool localeIsSet() const; + void unsetlocale(); + void setLocale(const std::string& value); + protected: std::string subject_; @@ -120,6 +129,8 @@ class HUAWEICLOUD_SMN_V2_EXPORT PublishMessageRequestBody bool timeToLiveIsSet_; std::vector messageAttributes_; bool messageAttributesIsSet_; + std::string locale_; + bool localeIsSet_; }; diff --git a/smn/include/huaweicloud/smn/v2/model/ShowNotifyPolicyRequest.h b/smn/include/huaweicloud/smn/v2/model/ShowNotifyPolicyRequest.h new file mode 100644 index 000000000..2031e7a23 --- /dev/null +++ b/smn/include/huaweicloud/smn/v2/model/ShowNotifyPolicyRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_SMN_V2_MODEL_ShowNotifyPolicyRequest_H_ +#define HUAWEICLOUD_SDK_SMN_V2_MODEL_ShowNotifyPolicyRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_SMN_V2_EXPORT ShowNotifyPolicyRequest + : public ModelBase +{ +public: + ShowNotifyPolicyRequest(); + virtual ~ShowNotifyPolicyRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowNotifyPolicyRequest members + + /// + /// Topic的唯一的资源标识,可通过[查询主题列表](smn_api_51004.xml)获取该标识。 + /// + + std::string getTopicUrn() const; + bool topicUrnIsSet() const; + void unsettopicUrn(); + void setTopicUrn(const std::string& value); + + +protected: + std::string topicUrn_; + bool topicUrnIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowNotifyPolicyRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_SMN_V2_MODEL_ShowNotifyPolicyRequest_H_ diff --git a/smn/include/huaweicloud/smn/v2/model/ShowNotifyPolicyResponse.h b/smn/include/huaweicloud/smn/v2/model/ShowNotifyPolicyResponse.h new file mode 100644 index 000000000..7f261ace7 --- /dev/null +++ b/smn/include/huaweicloud/smn/v2/model/ShowNotifyPolicyResponse.h @@ -0,0 +1,102 @@ + +#ifndef HUAWEICLOUD_SDK_SMN_V2_MODEL_ShowNotifyPolicyResponse_H_ +#define HUAWEICLOUD_SDK_SMN_V2_MODEL_ShowNotifyPolicyResponse_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_SMN_V2_EXPORT ShowNotifyPolicyResponse + : public ModelBase, public HttpResponse +{ +public: + ShowNotifyPolicyResponse(); + virtual ~ShowNotifyPolicyResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowNotifyPolicyResponse members + + /// + /// 请求ID。 + /// + + std::string getRequestId() const; + bool requestIdIsSet() const; + void unsetrequestId(); + void setRequestId(const std::string& value); + + /// + /// 通知策略ID。 + /// + + std::string getId() const; + bool idIsSet() const; + void unsetid(); + void setId(const std::string& value); + + /// + /// 通知策略类型,当前仅支持语音。 + /// + + std::string getProtocol() const; + bool protocolIsSet() const; + void unsetprotocol(); + void setProtocol(const std::string& value); + + /// + /// 轮询策略订阅终端。 + /// + + std::vector& getPolling(); + bool pollingIsSet() const; + void unsetpolling(); + void setPolling(const std::vector& value); + + +protected: + std::string requestId_; + bool requestIdIsSet_; + std::string id_; + bool idIsSet_; + std::string protocol_; + bool protocolIsSet_; + std::vector polling_; + bool pollingIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_SMN_V2_MODEL_ShowNotifyPolicyResponse_H_ diff --git a/smn/include/huaweicloud/smn/v2/model/Statement.h b/smn/include/huaweicloud/smn/v2/model/Statement.h index cd2d4b638..6f33f121f 100644 --- a/smn/include/huaweicloud/smn/v2/model/Statement.h +++ b/smn/include/huaweicloud/smn/v2/model/Statement.h @@ -57,7 +57,7 @@ class HUAWEICLOUD_SMN_V2_EXPORT Statement void setEffect(const std::string& value); /// - /// Statement语句作用的对象。 目前支持“CSP”和“Service”两类对象。 “CSP”对象指的是其他用户,可以作用于多个用户。 “Service”对象指的是云服务,可以作用于多个云服务。 Principal元素和NotPrincipal元素两者任选其一。选定后, “CSP”对象填写内容的格式为urn:csp:iam::domainId:root或“\\*”,其中domainId为其他用户的“帐号ID”,“\\*”指作用于所有人。 “Service”对象填写内容的格式为小写的云服务名称缩写。 + /// Statement语句作用的对象。 目前支持“CSP”、“OrgPath”和“Service”三类对象。 “CSP”对象指的是其他用户,可以作用于多个用户。 “OrgPath”对象指的是用户组织路径,可以作用于多个组织路径。 “Service”对象指的是云服务,可以作用于多个云服务。 Principal元素和NotPrincipal元素两者任选其一。选定后, “CSP”对象填写内容的格式为urn:csp:iam::domainId:root或“\\*”,其中domainId为其他用户的“账号ID”,“\\*”指作用于所有人。 “OrgPath”对象填写内容的格式为{orgId}/{rootOuId}/{OuId}。 “Service”对象填写内容的格式为小写的云服务名称缩写。 /// std::string getPrincipal() const; @@ -66,7 +66,7 @@ class HUAWEICLOUD_SMN_V2_EXPORT Statement void setPrincipal(const std::string& value); /// - /// NotPrincipal:Statement语句排除作用的对象。 目前支持“CSP”和“Service”两类对象。 “CSP”对象指的是其他用户,可以作用于多个用户。 “Service”对象指的是云服务,可以作用于多个云服务。 Principal元素和NotPrincipal元素两者任选其一。选定后, “CSP”对象填写内容的格式为urn:csp:iam::domainId:root或“\\*”,其中domainId为其他用户的“帐号ID”,“\\*”指作用于所有人。 “Service”对象填写内容的格式为小写的云服务名称缩写。 + /// NotPrincipal:Statement语句排除作用的对象。 目前支持“CSP”、“OrgPath”和“Service”三类对象。 “CSP”对象指的是其他用户,可以作用于多个用户。 “OrgPath”对象指的是用户组织路径,可以作用于多个组织路径。 “Service”对象指的是云服务,可以作用于多个云服务。 Principal元素和NotPrincipal元素两者任选其一。选定后, “CSP”对象填写内容的格式为urn:csp:iam::domainId:root或“\\*”,其中domainId为其他用户的“账号ID”,“\\*”指作用于所有人。 “OrgPath”对象填写内容的格式为{orgId}/{rootOuId}/{OuId}。 “Service”对象填写内容的格式为小写的云服务名称缩写。 /// std::string getNotPrincipal() const; diff --git a/smn/include/huaweicloud/smn/v2/model/SubscriptionExtension.h b/smn/include/huaweicloud/smn/v2/model/SubscriptionExtension.h index 9dbd4f65f..4cb33be9a 100644 --- a/smn/include/huaweicloud/smn/v2/model/SubscriptionExtension.h +++ b/smn/include/huaweicloud/smn/v2/model/SubscriptionExtension.h @@ -10,6 +10,8 @@ #include #include +#include +#include namespace HuaweiCloud { namespace Sdk { @@ -39,7 +41,7 @@ class HUAWEICLOUD_SMN_V2_EXPORT SubscriptionExtension /// SubscriptionExtension members /// - /// 该字段为welink订阅下的租户ID字段,由租户从welink方获取。当protocol值为welink时,该字段为必填字段。 + /// 这是应用ID字段。当protocol值为welink时,该字段为必填字段,从welink方获取。 /// std::string getClientId() const; @@ -48,7 +50,7 @@ class HUAWEICLOUD_SMN_V2_EXPORT SubscriptionExtension void setClientId(const std::string& value); /// - /// 该字段为welink订阅下的租户获取的client secret字段,由租户从welink方获取。当protocol值为welink时,该字段为必填字段。 + /// 该字段为应用secret字段。当protocol值为welink时,该字段为必填字段,从welink方获取。 /// std::string getClientSecret() const; @@ -57,7 +59,7 @@ class HUAWEICLOUD_SMN_V2_EXPORT SubscriptionExtension void setClientSecret(const std::string& value); /// - /// 该字段为关键字字段。当protocol协议为feishu时,这里的keyword字段和sign_secret字段二者必选其一。当用户在飞书或钉钉机器人端添加关键字校验的安全策略时,这里的关键字必须是飞书或钉钉端所填写的关键字之一。 + /// 该字段为关键字字段。当protocol值为feishu时,这里的keyword字段和sign_secret字段二者必选其一。当用户在飞书或钉钉自定义机器人端添加关键字校验的安全策略时,这里的关键字必须是飞书或钉钉自定义机器人中所填写的关键字之一。 /// std::string getKeyword() const; @@ -66,7 +68,7 @@ class HUAWEICLOUD_SMN_V2_EXPORT SubscriptionExtension void setKeyword(const std::string& value); /// - /// 这是加签密钥字段。当protocol协议为feishu或dingding时,这个字段和keyword字段二者必选且只能选其一,密钥配置必须与客户在飞书或钉钉客户端的密钥配置完全一致。例如,如果在飞书端配置了密钥并且没有配置关键字,则在此处填入从飞书获取的密钥字段,如果在飞书端没有配置密钥并且配置了关键字,则不填写该字段。 + /// 这是加签密钥字段。当protocol协议为feishu时,这个字段和keyword字段二者必选且只能选其一。密钥配置必须与客户在飞书或钉钉自定义机器人的密钥配置完全一致。例如,如果在飞书端配置了密钥并且没有配置关键字,则在此处填入从飞书获取的密钥字段,如果在飞书端没有配置密钥并且配置了关键字,则不填写该字段。 /// std::string getSignSecret() const; @@ -74,6 +76,42 @@ class HUAWEICLOUD_SMN_V2_EXPORT SubscriptionExtension void unsetsignSecret(); void setSignSecret(const std::string& value); + /// + /// 该字段为http header字段,用户可以在字段限制范围内自定义http header,header字段内容以KV对形式存在。当使用主题发送时,已确认的订阅发送消息会携带用户自定义的http header。 header应满足如下要求: key值限定为:包含英文字母([A-Za-z])、数字([0-9])、中划线(-)hyphens,中划线不得作为结尾,不得连续出现。 K/V不得超过10个 key需要以\"x-\"开头,不能以\"x-smn\"开头,正确示例:x-abc-cba, x-abc 所有K/V长度总和不得超过1024个字符 key不区分大小写 key值不可重复 value值限定为ASCII码,不支持中文或其他Unicode,支持空格 + /// + + std::map& getHeader(); + bool headerIsSet() const; + void unsetheader(); + void setHeader(const std::map& value); + + /// + /// 个人钉钉appKey字段,字符长度限制64个,仅支持字母、数字、中划线(-)、下划线(_)。当订阅协议为dingTalkBot时,该字段必选。 + /// + + std::string getAppKey() const; + bool appKeyIsSet() const; + void unsetappKey(); + void setAppKey(const std::string& value); + + /// + /// 个人钉钉appSecret字段,字符长度限制128个,仅支持字母、数字、中划线(-)、下划线(_)。当订阅协议为dingTalkBot时,该字段必选。 + /// + + std::string getAppSecret() const; + bool appSecretIsSet() const; + void unsetappSecret(); + void setAppSecret(const std::string& value); + + /// + /// 个人钉钉robotCode字段,名称:机器人编码,字符长度限制64个,仅支持字母、数字、中划线(-)、下划线(_),一般与appKey一致。当订阅协议为dingTalkBot时,该字段必选。 + /// + + std::string getRobotCode() const; + bool robotCodeIsSet() const; + void unsetrobotCode(); + void setRobotCode(const std::string& value); + protected: std::string clientId_; @@ -84,6 +122,14 @@ class HUAWEICLOUD_SMN_V2_EXPORT SubscriptionExtension bool keywordIsSet_; std::string signSecret_; bool signSecretIsSet_; + std::map header_; + bool headerIsSet_; + std::string appKey_; + bool appKeyIsSet_; + std::string appSecret_; + bool appSecretIsSet_; + std::string robotCode_; + bool robotCodeIsSet_; }; diff --git a/smn/include/huaweicloud/smn/v2/model/UpdateNotifyPolicyRequest.h b/smn/include/huaweicloud/smn/v2/model/UpdateNotifyPolicyRequest.h new file mode 100644 index 000000000..605d2016a --- /dev/null +++ b/smn/include/huaweicloud/smn/v2/model/UpdateNotifyPolicyRequest.h @@ -0,0 +1,94 @@ + +#ifndef HUAWEICLOUD_SDK_SMN_V2_MODEL_UpdateNotifyPolicyRequest_H_ +#define HUAWEICLOUD_SDK_SMN_V2_MODEL_UpdateNotifyPolicyRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_SMN_V2_EXPORT UpdateNotifyPolicyRequest + : public ModelBase +{ +public: + UpdateNotifyPolicyRequest(); + virtual ~UpdateNotifyPolicyRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateNotifyPolicyRequest members + + /// + /// Topic的唯一的资源标识,可通过[查询主题列表](smn_api_51004.xml)获取该标识。 + /// + + std::string getTopicUrn() const; + bool topicUrnIsSet() const; + void unsettopicUrn(); + void setTopicUrn(const std::string& value); + + /// + /// 通知策略ID。 + /// + + std::string getNotifyPolicyId() const; + bool notifyPolicyIdIsSet() const; + void unsetnotifyPolicyId(); + void setNotifyPolicyId(const std::string& value); + + /// + /// + /// + + NotifyPolicyRequestBody getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const NotifyPolicyRequestBody& value); + + +protected: + std::string topicUrn_; + bool topicUrnIsSet_; + std::string notifyPolicyId_; + bool notifyPolicyIdIsSet_; + NotifyPolicyRequestBody body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + UpdateNotifyPolicyRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_SMN_V2_MODEL_UpdateNotifyPolicyRequest_H_ diff --git a/smn/include/huaweicloud/smn/v2/model/UpdateNotifyPolicyResponse.h b/smn/include/huaweicloud/smn/v2/model/UpdateNotifyPolicyResponse.h new file mode 100644 index 000000000..99988cf13 --- /dev/null +++ b/smn/include/huaweicloud/smn/v2/model/UpdateNotifyPolicyResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_SMN_V2_MODEL_UpdateNotifyPolicyResponse_H_ +#define HUAWEICLOUD_SDK_SMN_V2_MODEL_UpdateNotifyPolicyResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_SMN_V2_EXPORT UpdateNotifyPolicyResponse + : public ModelBase, public HttpResponse +{ +public: + UpdateNotifyPolicyResponse(); + virtual ~UpdateNotifyPolicyResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateNotifyPolicyResponse members + + /// + /// + /// + + std::string getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const std::string& value); + + +protected: + std::string body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_SMN_V2_MODEL_UpdateNotifyPolicyResponse_H_ diff --git a/smn/src/v2/SmnClient.cpp b/smn/src/v2/SmnClient.cpp index 4e6a60aa5..7094c1364 100644 --- a/smn/src/v2/SmnClient.cpp +++ b/smn/src/v2/SmnClient.cpp @@ -395,6 +395,48 @@ std::shared_ptr SmnClient::createMessageTemplate( return localVarResult; } +std::shared_ptr SmnClient::createNotifyPolicy(CreateNotifyPolicyRequest &request) +{ + std::string localVarPath = "/v2/{project_id}/notifications/topics/{topic_urn}/notify-policy"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["topic_urn"] = parameterToString(request.getTopicUrn()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json;charset=UTF-8", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + std::string localVarHttpBody; + if (isJson) { + // handle json input + web::json::value localVarJson; + localVarJson = ModelBase::toJson(request.getBody()); + localVarHttpBody = utility::conversions::to_utf8string(localVarJson.serialize()); + } + + std::unique_ptr res = callApi("POST", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, SmnMeta::genRequestDefForCreateNotifyPolicy()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + if (!res->getHttpBody().empty()) { + spdlog::info("parse json format response"); + utility::string_t localVarResponse = utility::conversions::to_string_t(res->getHttpBody()); + web::json::value localVarJson = web::json::value::parse(localVarResponse); + localVarResult->fromJson(localVarJson); + } + + return localVarResult; +} std::shared_ptr SmnClient::createResourceTag(CreateResourceTagRequest &request) { std::string localVarPath = "/v2/{project_id}/{resource_type}/{resource_id}/tags"; @@ -540,6 +582,37 @@ std::shared_ptr SmnClient::deleteMessageTemplate( return localVarResult; } +std::shared_ptr SmnClient::deleteNotifyPolicy(DeleteNotifyPolicyRequest &request) +{ + std::string localVarPath = "/v2/{project_id}/notifications/topics/{topic_urn}/notify-policy/{notify_policy_id}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["topic_urn"] = parameterToString(request.getTopicUrn()); + localVarPathParams["notify_policy_id"] = parameterToString(request.getNotifyPolicyId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("DELETE", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, SmnMeta::genRequestDefForDeleteNotifyPolicy()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr SmnClient::deleteResourceTag(DeleteResourceTagRequest &request) { std::string localVarPath = "/v2/{project_id}/{resource_type}/{resource_id}/tags/{key}"; @@ -1239,6 +1312,36 @@ std::shared_ptr SmnClient::showHttpDetectResult(Sh return localVarResult; } +std::shared_ptr SmnClient::showNotifyPolicy(ShowNotifyPolicyRequest &request) +{ + std::string localVarPath = "/v2/{project_id}/notifications/topics/{topic_urn}/notify-policy"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["topic_urn"] = parameterToString(request.getTopicUrn()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, SmnMeta::genRequestDefForShowNotifyPolicy()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr SmnClient::updateLogtank(UpdateLogtankRequest &request) { std::string localVarPath = "/v2/{project_id}/notifications/topics/{topic_urn}/logtanks/{logtank_id}"; @@ -1324,6 +1427,49 @@ std::shared_ptr SmnClient::updateMessageTemplate( return localVarResult; } +std::shared_ptr SmnClient::updateNotifyPolicy(UpdateNotifyPolicyRequest &request) +{ + std::string localVarPath = "/v2/{project_id}/notifications/topics/{topic_urn}/notify-policy/{notify_policy_id}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["topic_urn"] = parameterToString(request.getTopicUrn()); + localVarPathParams["notify_policy_id"] = parameterToString(request.getNotifyPolicyId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json;charset=UTF-8", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + std::string localVarHttpBody; + if (isJson) { + // handle json input + web::json::value localVarJson; + localVarJson = ModelBase::toJson(request.getBody()); + localVarHttpBody = utility::conversions::to_utf8string(localVarJson.serialize()); + } + + std::unique_ptr res = callApi("PUT", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, SmnMeta::genRequestDefForUpdateNotifyPolicy()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + if (!res->getHttpBody().empty()) { + spdlog::info("parse json format response"); + utility::string_t localVarResponse = utility::conversions::to_string_t(res->getHttpBody()); + web::json::value localVarJson = web::json::value::parse(localVarResponse); + localVarResult->fromJson(localVarJson); + } + + return localVarResult; +} std::shared_ptr SmnClient::updateSubscription(UpdateSubscriptionRequest &request) { std::string localVarPath = "/v2/{project_id}/notifications/topics/{topic_urn}/subscriptions/{subscription_urn}"; diff --git a/smn/src/v2/SmnMeta.cpp b/smn/src/v2/SmnMeta.cpp index e651b9fcd..7289b374a 100644 --- a/smn/src/v2/SmnMeta.cpp +++ b/smn/src/v2/SmnMeta.cpp @@ -85,6 +85,15 @@ HttpRequestDef SmnMeta::genRequestDefForCreateMessageTemplate() { return reqDefBuilder; } +HttpRequestDef SmnMeta::genRequestDefForCreateNotifyPolicy() { + HttpRequestDef reqDefBuilder; + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef SmnMeta::genRequestDefForCreateResourceTag() { HttpRequestDef reqDefBuilder; FieldDef bodyParam; @@ -113,6 +122,11 @@ HttpRequestDef SmnMeta::genRequestDefForDeleteMessageTemplate() { return reqDefBuilder; } +HttpRequestDef SmnMeta::genRequestDefForDeleteNotifyPolicy() { + HttpRequestDef reqDefBuilder; + return reqDefBuilder; +} + HttpRequestDef SmnMeta::genRequestDefForDeleteResourceTag() { HttpRequestDef reqDefBuilder; return reqDefBuilder; @@ -288,6 +302,11 @@ HttpRequestDef SmnMeta::genRequestDefForShowHttpDetectResult() { return reqDefBuilder; } +HttpRequestDef SmnMeta::genRequestDefForShowNotifyPolicy() { + HttpRequestDef reqDefBuilder; + return reqDefBuilder; +} + HttpRequestDef SmnMeta::genRequestDefForUpdateLogtank() { HttpRequestDef reqDefBuilder; FieldDef bodyParam; @@ -306,6 +325,15 @@ HttpRequestDef SmnMeta::genRequestDefForUpdateMessageTemplate() { return reqDefBuilder; } +HttpRequestDef SmnMeta::genRequestDefForUpdateNotifyPolicy() { + HttpRequestDef reqDefBuilder; + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef SmnMeta::genRequestDefForUpdateSubscription() { HttpRequestDef reqDefBuilder; FieldDef bodyParam; diff --git a/smn/src/v2/model/AddSubscriptionRequestBody.cpp b/smn/src/v2/model/AddSubscriptionRequestBody.cpp index 60dedae71..cac2baf7d 100644 --- a/smn/src/v2/model/AddSubscriptionRequestBody.cpp +++ b/smn/src/v2/model/AddSubscriptionRequestBody.cpp @@ -19,6 +19,7 @@ AddSubscriptionRequestBody::AddSubscriptionRequestBody() remark_ = ""; remarkIsSet_ = false; extensionIsSet_ = false; + subscriptionsIsSet_ = false; } AddSubscriptionRequestBody::~AddSubscriptionRequestBody() = default; @@ -43,6 +44,9 @@ web::json::value AddSubscriptionRequestBody::toJson() const if(extensionIsSet_) { val[utility::conversions::to_string_t("extension")] = ModelBase::toJson(extension_); } + if(subscriptionsIsSet_) { + val[utility::conversions::to_string_t("subscriptions")] = ModelBase::toJson(subscriptions_); + } return val; } @@ -86,6 +90,15 @@ bool AddSubscriptionRequestBody::fromJson(const web::json::value& val) setExtension(refVal); } } + if(val.has_field(utility::conversions::to_string_t("subscriptions"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("subscriptions")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSubscriptions(refVal); + } + } return ok; } @@ -174,6 +187,27 @@ void AddSubscriptionRequestBody::unsetextension() extensionIsSet_ = false; } +std::vector& AddSubscriptionRequestBody::getSubscriptions() +{ + return subscriptions_; +} + +void AddSubscriptionRequestBody::setSubscriptions(const std::vector& value) +{ + subscriptions_ = value; + subscriptionsIsSet_ = true; +} + +bool AddSubscriptionRequestBody::subscriptionsIsSet() const +{ + return subscriptionsIsSet_; +} + +void AddSubscriptionRequestBody::unsetsubscriptions() +{ + subscriptionsIsSet_ = false; +} + } } } diff --git a/smn/src/v2/model/BatchAddSubscriptionsRequestBody.cpp b/smn/src/v2/model/BatchAddSubscriptionsRequestBody.cpp new file mode 100644 index 000000000..283ce46b6 --- /dev/null +++ b/smn/src/v2/model/BatchAddSubscriptionsRequestBody.cpp @@ -0,0 +1,183 @@ + + +#include "huaweicloud/smn/v2/model/BatchAddSubscriptionsRequestBody.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + + + + +BatchAddSubscriptionsRequestBody::BatchAddSubscriptionsRequestBody() +{ + protocol_ = ""; + protocolIsSet_ = false; + endpoint_ = ""; + endpointIsSet_ = false; + remark_ = ""; + remarkIsSet_ = false; + extensionIsSet_ = false; +} + +BatchAddSubscriptionsRequestBody::~BatchAddSubscriptionsRequestBody() = default; + +void BatchAddSubscriptionsRequestBody::validate() +{ +} + +web::json::value BatchAddSubscriptionsRequestBody::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(protocolIsSet_) { + val[utility::conversions::to_string_t("protocol")] = ModelBase::toJson(protocol_); + } + if(endpointIsSet_) { + val[utility::conversions::to_string_t("endpoint")] = ModelBase::toJson(endpoint_); + } + if(remarkIsSet_) { + val[utility::conversions::to_string_t("remark")] = ModelBase::toJson(remark_); + } + if(extensionIsSet_) { + val[utility::conversions::to_string_t("extension")] = ModelBase::toJson(extension_); + } + + return val; +} +bool BatchAddSubscriptionsRequestBody::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("protocol"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("protocol")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setProtocol(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("endpoint"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("endpoint")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEndpoint(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("remark"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("remark")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRemark(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("extension"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("extension")); + if(!fieldValue.is_null()) + { + SubscriptionExtension refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setExtension(refVal); + } + } + return ok; +} + + +std::string BatchAddSubscriptionsRequestBody::getProtocol() const +{ + return protocol_; +} + +void BatchAddSubscriptionsRequestBody::setProtocol(const std::string& value) +{ + protocol_ = value; + protocolIsSet_ = true; +} + +bool BatchAddSubscriptionsRequestBody::protocolIsSet() const +{ + return protocolIsSet_; +} + +void BatchAddSubscriptionsRequestBody::unsetprotocol() +{ + protocolIsSet_ = false; +} + +std::string BatchAddSubscriptionsRequestBody::getEndpoint() const +{ + return endpoint_; +} + +void BatchAddSubscriptionsRequestBody::setEndpoint(const std::string& value) +{ + endpoint_ = value; + endpointIsSet_ = true; +} + +bool BatchAddSubscriptionsRequestBody::endpointIsSet() const +{ + return endpointIsSet_; +} + +void BatchAddSubscriptionsRequestBody::unsetendpoint() +{ + endpointIsSet_ = false; +} + +std::string BatchAddSubscriptionsRequestBody::getRemark() const +{ + return remark_; +} + +void BatchAddSubscriptionsRequestBody::setRemark(const std::string& value) +{ + remark_ = value; + remarkIsSet_ = true; +} + +bool BatchAddSubscriptionsRequestBody::remarkIsSet() const +{ + return remarkIsSet_; +} + +void BatchAddSubscriptionsRequestBody::unsetremark() +{ + remarkIsSet_ = false; +} + +SubscriptionExtension BatchAddSubscriptionsRequestBody::getExtension() const +{ + return extension_; +} + +void BatchAddSubscriptionsRequestBody::setExtension(const SubscriptionExtension& value) +{ + extension_ = value; + extensionIsSet_ = true; +} + +bool BatchAddSubscriptionsRequestBody::extensionIsSet() const +{ + return extensionIsSet_; +} + +void BatchAddSubscriptionsRequestBody::unsetextension() +{ + extensionIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/smn/src/v2/model/CreateNotifyPolicyRequest.cpp b/smn/src/v2/model/CreateNotifyPolicyRequest.cpp new file mode 100644 index 000000000..18c802d2b --- /dev/null +++ b/smn/src/v2/model/CreateNotifyPolicyRequest.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/smn/v2/model/CreateNotifyPolicyRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + + + + +CreateNotifyPolicyRequest::CreateNotifyPolicyRequest() +{ + topicUrn_ = ""; + topicUrnIsSet_ = false; + bodyIsSet_ = false; +} + +CreateNotifyPolicyRequest::~CreateNotifyPolicyRequest() = default; + +void CreateNotifyPolicyRequest::validate() +{ +} + +web::json::value CreateNotifyPolicyRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(topicUrnIsSet_) { + val[utility::conversions::to_string_t("topic_urn")] = ModelBase::toJson(topicUrn_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool CreateNotifyPolicyRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("topic_urn"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("topic_urn")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTopicUrn(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + NotifyPolicyRequestBody refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string CreateNotifyPolicyRequest::getTopicUrn() const +{ + return topicUrn_; +} + +void CreateNotifyPolicyRequest::setTopicUrn(const std::string& value) +{ + topicUrn_ = value; + topicUrnIsSet_ = true; +} + +bool CreateNotifyPolicyRequest::topicUrnIsSet() const +{ + return topicUrnIsSet_; +} + +void CreateNotifyPolicyRequest::unsettopicUrn() +{ + topicUrnIsSet_ = false; +} + +NotifyPolicyRequestBody CreateNotifyPolicyRequest::getBody() const +{ + return body_; +} + +void CreateNotifyPolicyRequest::setBody(const NotifyPolicyRequestBody& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool CreateNotifyPolicyRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void CreateNotifyPolicyRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/smn/src/v2/model/CreateNotifyPolicyResponse.cpp b/smn/src/v2/model/CreateNotifyPolicyResponse.cpp new file mode 100644 index 000000000..524f8088f --- /dev/null +++ b/smn/src/v2/model/CreateNotifyPolicyResponse.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/smn/v2/model/CreateNotifyPolicyResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + + + + +CreateNotifyPolicyResponse::CreateNotifyPolicyResponse() +{ + requestId_ = ""; + requestIdIsSet_ = false; + id_ = ""; + idIsSet_ = false; +} + +CreateNotifyPolicyResponse::~CreateNotifyPolicyResponse() = default; + +void CreateNotifyPolicyResponse::validate() +{ +} + +web::json::value CreateNotifyPolicyResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(requestIdIsSet_) { + val[utility::conversions::to_string_t("request_id")] = ModelBase::toJson(requestId_); + } + if(idIsSet_) { + val[utility::conversions::to_string_t("id")] = ModelBase::toJson(id_); + } + + return val; +} +bool CreateNotifyPolicyResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("request_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("request_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRequestId(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; +} + + +std::string CreateNotifyPolicyResponse::getRequestId() const +{ + return requestId_; +} + +void CreateNotifyPolicyResponse::setRequestId(const std::string& value) +{ + requestId_ = value; + requestIdIsSet_ = true; +} + +bool CreateNotifyPolicyResponse::requestIdIsSet() const +{ + return requestIdIsSet_; +} + +void CreateNotifyPolicyResponse::unsetrequestId() +{ + requestIdIsSet_ = false; +} + +std::string CreateNotifyPolicyResponse::getId() const +{ + return id_; +} + +void CreateNotifyPolicyResponse::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool CreateNotifyPolicyResponse::idIsSet() const +{ + return idIsSet_; +} + +void CreateNotifyPolicyResponse::unsetid() +{ + idIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/smn/src/v2/model/DeleteNotifyPolicyRequest.cpp b/smn/src/v2/model/DeleteNotifyPolicyRequest.cpp new file mode 100644 index 000000000..5848936d6 --- /dev/null +++ b/smn/src/v2/model/DeleteNotifyPolicyRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/smn/v2/model/DeleteNotifyPolicyRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + + + + +DeleteNotifyPolicyRequest::DeleteNotifyPolicyRequest() +{ + topicUrn_ = ""; + topicUrnIsSet_ = false; + notifyPolicyId_ = ""; + notifyPolicyIdIsSet_ = false; +} + +DeleteNotifyPolicyRequest::~DeleteNotifyPolicyRequest() = default; + +void DeleteNotifyPolicyRequest::validate() +{ +} + +web::json::value DeleteNotifyPolicyRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(topicUrnIsSet_) { + val[utility::conversions::to_string_t("topic_urn")] = ModelBase::toJson(topicUrn_); + } + if(notifyPolicyIdIsSet_) { + val[utility::conversions::to_string_t("notify_policy_id")] = ModelBase::toJson(notifyPolicyId_); + } + + return val; +} +bool DeleteNotifyPolicyRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("topic_urn"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("topic_urn")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTopicUrn(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("notify_policy_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("notify_policy_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNotifyPolicyId(refVal); + } + } + return ok; +} + + +std::string DeleteNotifyPolicyRequest::getTopicUrn() const +{ + return topicUrn_; +} + +void DeleteNotifyPolicyRequest::setTopicUrn(const std::string& value) +{ + topicUrn_ = value; + topicUrnIsSet_ = true; +} + +bool DeleteNotifyPolicyRequest::topicUrnIsSet() const +{ + return topicUrnIsSet_; +} + +void DeleteNotifyPolicyRequest::unsettopicUrn() +{ + topicUrnIsSet_ = false; +} + +std::string DeleteNotifyPolicyRequest::getNotifyPolicyId() const +{ + return notifyPolicyId_; +} + +void DeleteNotifyPolicyRequest::setNotifyPolicyId(const std::string& value) +{ + notifyPolicyId_ = value; + notifyPolicyIdIsSet_ = true; +} + +bool DeleteNotifyPolicyRequest::notifyPolicyIdIsSet() const +{ + return notifyPolicyIdIsSet_; +} + +void DeleteNotifyPolicyRequest::unsetnotifyPolicyId() +{ + notifyPolicyIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/smn/src/v2/model/DeleteNotifyPolicyResponse.cpp b/smn/src/v2/model/DeleteNotifyPolicyResponse.cpp new file mode 100644 index 000000000..6f966167e --- /dev/null +++ b/smn/src/v2/model/DeleteNotifyPolicyResponse.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/smn/v2/model/DeleteNotifyPolicyResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + + + + +DeleteNotifyPolicyResponse::DeleteNotifyPolicyResponse() +{ + body_ = ""; + bodyIsSet_ = false; +} + +DeleteNotifyPolicyResponse::~DeleteNotifyPolicyResponse() = default; + +void DeleteNotifyPolicyResponse::validate() +{ +} + +web::json::value DeleteNotifyPolicyResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool DeleteNotifyPolicyResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string DeleteNotifyPolicyResponse::getBody() const +{ + return body_; +} + +void DeleteNotifyPolicyResponse::setBody(const std::string& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool DeleteNotifyPolicyResponse::bodyIsSet() const +{ + return bodyIsSet_; +} + +void DeleteNotifyPolicyResponse::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/smn/src/v2/model/ListInstanceRequestBody.cpp b/smn/src/v2/model/ListInstanceRequestBody.cpp index 4c9c49e1c..df2e08ed0 100644 --- a/smn/src/v2/model/ListInstanceRequestBody.cpp +++ b/smn/src/v2/model/ListInstanceRequestBody.cpp @@ -23,6 +23,8 @@ ListInstanceRequestBody::ListInstanceRequestBody() action_ = ""; actionIsSet_ = false; matchesIsSet_ = false; + withoutAnyTag_ = false; + withoutAnyTagIsSet_ = false; } ListInstanceRequestBody::~ListInstanceRequestBody() = default; @@ -59,6 +61,9 @@ web::json::value ListInstanceRequestBody::toJson() const if(matchesIsSet_) { val[utility::conversions::to_string_t("matches")] = ModelBase::toJson(matches_); } + if(withoutAnyTagIsSet_) { + val[utility::conversions::to_string_t("without_any_tag")] = ModelBase::toJson(withoutAnyTag_); + } return val; } @@ -138,6 +143,15 @@ bool ListInstanceRequestBody::fromJson(const web::json::value& val) setMatches(refVal); } } + if(val.has_field(utility::conversions::to_string_t("without_any_tag"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("without_any_tag")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setWithoutAnyTag(refVal); + } + } return ok; } @@ -310,6 +324,27 @@ void ListInstanceRequestBody::unsetmatches() matchesIsSet_ = false; } +bool ListInstanceRequestBody::isWithoutAnyTag() const +{ + return withoutAnyTag_; +} + +void ListInstanceRequestBody::setWithoutAnyTag(bool value) +{ + withoutAnyTag_ = value; + withoutAnyTagIsSet_ = true; +} + +bool ListInstanceRequestBody::withoutAnyTagIsSet() const +{ + return withoutAnyTagIsSet_; +} + +void ListInstanceRequestBody::unsetwithoutAnyTag() +{ + withoutAnyTagIsSet_ = false; +} + } } } diff --git a/smn/src/v2/model/NotifyPolicyRequestBody.cpp b/smn/src/v2/model/NotifyPolicyRequestBody.cpp new file mode 100644 index 000000000..170e5515c --- /dev/null +++ b/smn/src/v2/model/NotifyPolicyRequestBody.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/smn/v2/model/NotifyPolicyRequestBody.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + + + + +NotifyPolicyRequestBody::NotifyPolicyRequestBody() +{ + protocol_ = ""; + protocolIsSet_ = false; + pollingIsSet_ = false; +} + +NotifyPolicyRequestBody::~NotifyPolicyRequestBody() = default; + +void NotifyPolicyRequestBody::validate() +{ +} + +web::json::value NotifyPolicyRequestBody::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(protocolIsSet_) { + val[utility::conversions::to_string_t("protocol")] = ModelBase::toJson(protocol_); + } + if(pollingIsSet_) { + val[utility::conversions::to_string_t("polling")] = ModelBase::toJson(polling_); + } + + return val; +} +bool NotifyPolicyRequestBody::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("protocol"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("protocol")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setProtocol(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("polling"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("polling")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPolling(refVal); + } + } + return ok; +} + + +std::string NotifyPolicyRequestBody::getProtocol() const +{ + return protocol_; +} + +void NotifyPolicyRequestBody::setProtocol(const std::string& value) +{ + protocol_ = value; + protocolIsSet_ = true; +} + +bool NotifyPolicyRequestBody::protocolIsSet() const +{ + return protocolIsSet_; +} + +void NotifyPolicyRequestBody::unsetprotocol() +{ + protocolIsSet_ = false; +} + +std::vector& NotifyPolicyRequestBody::getPolling() +{ + return polling_; +} + +void NotifyPolicyRequestBody::setPolling(const std::vector& value) +{ + polling_ = value; + pollingIsSet_ = true; +} + +bool NotifyPolicyRequestBody::pollingIsSet() const +{ + return pollingIsSet_; +} + +void NotifyPolicyRequestBody::unsetpolling() +{ + pollingIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/smn/src/v2/model/PollingPolicyRequest.cpp b/smn/src/v2/model/PollingPolicyRequest.cpp new file mode 100644 index 000000000..5762003b9 --- /dev/null +++ b/smn/src/v2/model/PollingPolicyRequest.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/smn/v2/model/PollingPolicyRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + + + + +PollingPolicyRequest::PollingPolicyRequest() +{ + order_ = 0; + orderIsSet_ = false; + subscriptionUrnsIsSet_ = false; +} + +PollingPolicyRequest::~PollingPolicyRequest() = default; + +void PollingPolicyRequest::validate() +{ +} + +web::json::value PollingPolicyRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(orderIsSet_) { + val[utility::conversions::to_string_t("order")] = ModelBase::toJson(order_); + } + if(subscriptionUrnsIsSet_) { + val[utility::conversions::to_string_t("subscription_urns")] = ModelBase::toJson(subscriptionUrns_); + } + + return val; +} +bool PollingPolicyRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("order"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("order")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOrder(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("subscription_urns"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("subscription_urns")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSubscriptionUrns(refVal); + } + } + return ok; +} + + +int32_t PollingPolicyRequest::getOrder() const +{ + return order_; +} + +void PollingPolicyRequest::setOrder(int32_t value) +{ + order_ = value; + orderIsSet_ = true; +} + +bool PollingPolicyRequest::orderIsSet() const +{ + return orderIsSet_; +} + +void PollingPolicyRequest::unsetorder() +{ + orderIsSet_ = false; +} + +std::vector& PollingPolicyRequest::getSubscriptionUrns() +{ + return subscriptionUrns_; +} + +void PollingPolicyRequest::setSubscriptionUrns(const std::vector& value) +{ + subscriptionUrns_ = value; + subscriptionUrnsIsSet_ = true; +} + +bool PollingPolicyRequest::subscriptionUrnsIsSet() const +{ + return subscriptionUrnsIsSet_; +} + +void PollingPolicyRequest::unsetsubscriptionUrns() +{ + subscriptionUrnsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/smn/src/v2/model/PollingPolicyResponse.cpp b/smn/src/v2/model/PollingPolicyResponse.cpp new file mode 100644 index 000000000..dd30789e2 --- /dev/null +++ b/smn/src/v2/model/PollingPolicyResponse.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/smn/v2/model/PollingPolicyResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + + + + +PollingPolicyResponse::PollingPolicyResponse() +{ + order_ = 0; + orderIsSet_ = false; + subscriptionsIsSet_ = false; +} + +PollingPolicyResponse::~PollingPolicyResponse() = default; + +void PollingPolicyResponse::validate() +{ +} + +web::json::value PollingPolicyResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(orderIsSet_) { + val[utility::conversions::to_string_t("order")] = ModelBase::toJson(order_); + } + if(subscriptionsIsSet_) { + val[utility::conversions::to_string_t("subscriptions")] = ModelBase::toJson(subscriptions_); + } + + return val; +} +bool PollingPolicyResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("order"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("order")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOrder(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("subscriptions"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("subscriptions")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSubscriptions(refVal); + } + } + return ok; +} + + +int32_t PollingPolicyResponse::getOrder() const +{ + return order_; +} + +void PollingPolicyResponse::setOrder(int32_t value) +{ + order_ = value; + orderIsSet_ = true; +} + +bool PollingPolicyResponse::orderIsSet() const +{ + return orderIsSet_; +} + +void PollingPolicyResponse::unsetorder() +{ + orderIsSet_ = false; +} + +std::vector& PollingPolicyResponse::getSubscriptions() +{ + return subscriptions_; +} + +void PollingPolicyResponse::setSubscriptions(const std::vector& value) +{ + subscriptions_ = value; + subscriptionsIsSet_ = true; +} + +bool PollingPolicyResponse::subscriptionsIsSet() const +{ + return subscriptionsIsSet_; +} + +void PollingPolicyResponse::unsetsubscriptions() +{ + subscriptionsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/smn/src/v2/model/PollingPolicySubscriptionDetails.cpp b/smn/src/v2/model/PollingPolicySubscriptionDetails.cpp new file mode 100644 index 000000000..dd808044e --- /dev/null +++ b/smn/src/v2/model/PollingPolicySubscriptionDetails.cpp @@ -0,0 +1,184 @@ + + +#include "huaweicloud/smn/v2/model/PollingPolicySubscriptionDetails.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + + + + +PollingPolicySubscriptionDetails::PollingPolicySubscriptionDetails() +{ + subscriptionUrn_ = ""; + subscriptionUrnIsSet_ = false; + endpoint_ = ""; + endpointIsSet_ = false; + remark_ = ""; + remarkIsSet_ = false; + status_ = 0; + statusIsSet_ = false; +} + +PollingPolicySubscriptionDetails::~PollingPolicySubscriptionDetails() = default; + +void PollingPolicySubscriptionDetails::validate() +{ +} + +web::json::value PollingPolicySubscriptionDetails::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(subscriptionUrnIsSet_) { + val[utility::conversions::to_string_t("subscription_urn")] = ModelBase::toJson(subscriptionUrn_); + } + if(endpointIsSet_) { + val[utility::conversions::to_string_t("endpoint")] = ModelBase::toJson(endpoint_); + } + if(remarkIsSet_) { + val[utility::conversions::to_string_t("remark")] = ModelBase::toJson(remark_); + } + if(statusIsSet_) { + val[utility::conversions::to_string_t("status")] = ModelBase::toJson(status_); + } + + return val; +} +bool PollingPolicySubscriptionDetails::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("subscription_urn"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("subscription_urn")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSubscriptionUrn(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("endpoint"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("endpoint")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEndpoint(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("remark"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("remark")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRemark(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("status")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStatus(refVal); + } + } + return ok; +} + + +std::string PollingPolicySubscriptionDetails::getSubscriptionUrn() const +{ + return subscriptionUrn_; +} + +void PollingPolicySubscriptionDetails::setSubscriptionUrn(const std::string& value) +{ + subscriptionUrn_ = value; + subscriptionUrnIsSet_ = true; +} + +bool PollingPolicySubscriptionDetails::subscriptionUrnIsSet() const +{ + return subscriptionUrnIsSet_; +} + +void PollingPolicySubscriptionDetails::unsetsubscriptionUrn() +{ + subscriptionUrnIsSet_ = false; +} + +std::string PollingPolicySubscriptionDetails::getEndpoint() const +{ + return endpoint_; +} + +void PollingPolicySubscriptionDetails::setEndpoint(const std::string& value) +{ + endpoint_ = value; + endpointIsSet_ = true; +} + +bool PollingPolicySubscriptionDetails::endpointIsSet() const +{ + return endpointIsSet_; +} + +void PollingPolicySubscriptionDetails::unsetendpoint() +{ + endpointIsSet_ = false; +} + +std::string PollingPolicySubscriptionDetails::getRemark() const +{ + return remark_; +} + +void PollingPolicySubscriptionDetails::setRemark(const std::string& value) +{ + remark_ = value; + remarkIsSet_ = true; +} + +bool PollingPolicySubscriptionDetails::remarkIsSet() const +{ + return remarkIsSet_; +} + +void PollingPolicySubscriptionDetails::unsetremark() +{ + remarkIsSet_ = false; +} + +int32_t PollingPolicySubscriptionDetails::getStatus() const +{ + return status_; +} + +void PollingPolicySubscriptionDetails::setStatus(int32_t value) +{ + status_ = value; + statusIsSet_ = true; +} + +bool PollingPolicySubscriptionDetails::statusIsSet() const +{ + return statusIsSet_; +} + +void PollingPolicySubscriptionDetails::unsetstatus() +{ + statusIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/smn/src/v2/model/PublishMessageRequestBody.cpp b/smn/src/v2/model/PublishMessageRequestBody.cpp index b96c31fc4..c9b762c56 100644 --- a/smn/src/v2/model/PublishMessageRequestBody.cpp +++ b/smn/src/v2/model/PublishMessageRequestBody.cpp @@ -24,6 +24,8 @@ PublishMessageRequestBody::PublishMessageRequestBody() timeToLive_ = ""; timeToLiveIsSet_ = false; messageAttributesIsSet_ = false; + locale_ = ""; + localeIsSet_ = false; } PublishMessageRequestBody::~PublishMessageRequestBody() = default; @@ -57,6 +59,9 @@ web::json::value PublishMessageRequestBody::toJson() const if(messageAttributesIsSet_) { val[utility::conversions::to_string_t("message_attributes")] = ModelBase::toJson(messageAttributes_); } + if(localeIsSet_) { + val[utility::conversions::to_string_t("locale")] = ModelBase::toJson(locale_); + } return val; } @@ -127,6 +132,15 @@ bool PublishMessageRequestBody::fromJson(const web::json::value& val) setMessageAttributes(refVal); } } + if(val.has_field(utility::conversions::to_string_t("locale"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("locale")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLocale(refVal); + } + } return ok; } @@ -278,6 +292,27 @@ void PublishMessageRequestBody::unsetmessageAttributes() messageAttributesIsSet_ = false; } +std::string PublishMessageRequestBody::getLocale() const +{ + return locale_; +} + +void PublishMessageRequestBody::setLocale(const std::string& value) +{ + locale_ = value; + localeIsSet_ = true; +} + +bool PublishMessageRequestBody::localeIsSet() const +{ + return localeIsSet_; +} + +void PublishMessageRequestBody::unsetlocale() +{ + localeIsSet_ = false; +} + } } } diff --git a/smn/src/v2/model/ShowNotifyPolicyRequest.cpp b/smn/src/v2/model/ShowNotifyPolicyRequest.cpp new file mode 100644 index 000000000..ce4598673 --- /dev/null +++ b/smn/src/v2/model/ShowNotifyPolicyRequest.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/smn/v2/model/ShowNotifyPolicyRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + + + + +ShowNotifyPolicyRequest::ShowNotifyPolicyRequest() +{ + topicUrn_ = ""; + topicUrnIsSet_ = false; +} + +ShowNotifyPolicyRequest::~ShowNotifyPolicyRequest() = default; + +void ShowNotifyPolicyRequest::validate() +{ +} + +web::json::value ShowNotifyPolicyRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(topicUrnIsSet_) { + val[utility::conversions::to_string_t("topic_urn")] = ModelBase::toJson(topicUrn_); + } + + return val; +} +bool ShowNotifyPolicyRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("topic_urn"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("topic_urn")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTopicUrn(refVal); + } + } + return ok; +} + + +std::string ShowNotifyPolicyRequest::getTopicUrn() const +{ + return topicUrn_; +} + +void ShowNotifyPolicyRequest::setTopicUrn(const std::string& value) +{ + topicUrn_ = value; + topicUrnIsSet_ = true; +} + +bool ShowNotifyPolicyRequest::topicUrnIsSet() const +{ + return topicUrnIsSet_; +} + +void ShowNotifyPolicyRequest::unsettopicUrn() +{ + topicUrnIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/smn/src/v2/model/ShowNotifyPolicyResponse.cpp b/smn/src/v2/model/ShowNotifyPolicyResponse.cpp new file mode 100644 index 000000000..f1bea6f73 --- /dev/null +++ b/smn/src/v2/model/ShowNotifyPolicyResponse.cpp @@ -0,0 +1,183 @@ + + +#include "huaweicloud/smn/v2/model/ShowNotifyPolicyResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + + + + +ShowNotifyPolicyResponse::ShowNotifyPolicyResponse() +{ + requestId_ = ""; + requestIdIsSet_ = false; + id_ = ""; + idIsSet_ = false; + protocol_ = ""; + protocolIsSet_ = false; + pollingIsSet_ = false; +} + +ShowNotifyPolicyResponse::~ShowNotifyPolicyResponse() = default; + +void ShowNotifyPolicyResponse::validate() +{ +} + +web::json::value ShowNotifyPolicyResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(requestIdIsSet_) { + val[utility::conversions::to_string_t("request_id")] = ModelBase::toJson(requestId_); + } + if(idIsSet_) { + val[utility::conversions::to_string_t("id")] = ModelBase::toJson(id_); + } + if(protocolIsSet_) { + val[utility::conversions::to_string_t("protocol")] = ModelBase::toJson(protocol_); + } + if(pollingIsSet_) { + val[utility::conversions::to_string_t("polling")] = ModelBase::toJson(polling_); + } + + return val; +} +bool ShowNotifyPolicyResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("request_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("request_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRequestId(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); + } + } + if(val.has_field(utility::conversions::to_string_t("protocol"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("protocol")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setProtocol(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("polling"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("polling")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPolling(refVal); + } + } + return ok; +} + + +std::string ShowNotifyPolicyResponse::getRequestId() const +{ + return requestId_; +} + +void ShowNotifyPolicyResponse::setRequestId(const std::string& value) +{ + requestId_ = value; + requestIdIsSet_ = true; +} + +bool ShowNotifyPolicyResponse::requestIdIsSet() const +{ + return requestIdIsSet_; +} + +void ShowNotifyPolicyResponse::unsetrequestId() +{ + requestIdIsSet_ = false; +} + +std::string ShowNotifyPolicyResponse::getId() const +{ + return id_; +} + +void ShowNotifyPolicyResponse::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool ShowNotifyPolicyResponse::idIsSet() const +{ + return idIsSet_; +} + +void ShowNotifyPolicyResponse::unsetid() +{ + idIsSet_ = false; +} + +std::string ShowNotifyPolicyResponse::getProtocol() const +{ + return protocol_; +} + +void ShowNotifyPolicyResponse::setProtocol(const std::string& value) +{ + protocol_ = value; + protocolIsSet_ = true; +} + +bool ShowNotifyPolicyResponse::protocolIsSet() const +{ + return protocolIsSet_; +} + +void ShowNotifyPolicyResponse::unsetprotocol() +{ + protocolIsSet_ = false; +} + +std::vector& ShowNotifyPolicyResponse::getPolling() +{ + return polling_; +} + +void ShowNotifyPolicyResponse::setPolling(const std::vector& value) +{ + polling_ = value; + pollingIsSet_ = true; +} + +bool ShowNotifyPolicyResponse::pollingIsSet() const +{ + return pollingIsSet_; +} + +void ShowNotifyPolicyResponse::unsetpolling() +{ + pollingIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/smn/src/v2/model/SubscriptionExtension.cpp b/smn/src/v2/model/SubscriptionExtension.cpp index d6b263b44..1ce62102f 100644 --- a/smn/src/v2/model/SubscriptionExtension.cpp +++ b/smn/src/v2/model/SubscriptionExtension.cpp @@ -20,6 +20,13 @@ SubscriptionExtension::SubscriptionExtension() keywordIsSet_ = false; signSecret_ = ""; signSecretIsSet_ = false; + headerIsSet_ = false; + appKey_ = ""; + appKeyIsSet_ = false; + appSecret_ = ""; + appSecretIsSet_ = false; + robotCode_ = ""; + robotCodeIsSet_ = false; } SubscriptionExtension::~SubscriptionExtension() = default; @@ -44,6 +51,18 @@ web::json::value SubscriptionExtension::toJson() const if(signSecretIsSet_) { val[utility::conversions::to_string_t("sign_secret")] = ModelBase::toJson(signSecret_); } + if(headerIsSet_) { + val[utility::conversions::to_string_t("header")] = ModelBase::toJson(header_); + } + if(appKeyIsSet_) { + val[utility::conversions::to_string_t("app_key")] = ModelBase::toJson(appKey_); + } + if(appSecretIsSet_) { + val[utility::conversions::to_string_t("app_secret")] = ModelBase::toJson(appSecret_); + } + if(robotCodeIsSet_) { + val[utility::conversions::to_string_t("robot_code")] = ModelBase::toJson(robotCode_); + } return val; } @@ -87,6 +106,42 @@ bool SubscriptionExtension::fromJson(const web::json::value& val) setSignSecret(refVal); } } + if(val.has_field(utility::conversions::to_string_t("header"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("header")); + if(!fieldValue.is_null()) + { + std::map refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setHeader(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("app_key"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("app_key")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAppKey(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("app_secret"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("app_secret")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAppSecret(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("robot_code"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("robot_code")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRobotCode(refVal); + } + } return ok; } @@ -175,6 +230,90 @@ void SubscriptionExtension::unsetsignSecret() signSecretIsSet_ = false; } +std::map& SubscriptionExtension::getHeader() +{ + return header_; +} + +void SubscriptionExtension::setHeader(const std::map& value) +{ + header_ = value; + headerIsSet_ = true; +} + +bool SubscriptionExtension::headerIsSet() const +{ + return headerIsSet_; +} + +void SubscriptionExtension::unsetheader() +{ + headerIsSet_ = false; +} + +std::string SubscriptionExtension::getAppKey() const +{ + return appKey_; +} + +void SubscriptionExtension::setAppKey(const std::string& value) +{ + appKey_ = value; + appKeyIsSet_ = true; +} + +bool SubscriptionExtension::appKeyIsSet() const +{ + return appKeyIsSet_; +} + +void SubscriptionExtension::unsetappKey() +{ + appKeyIsSet_ = false; +} + +std::string SubscriptionExtension::getAppSecret() const +{ + return appSecret_; +} + +void SubscriptionExtension::setAppSecret(const std::string& value) +{ + appSecret_ = value; + appSecretIsSet_ = true; +} + +bool SubscriptionExtension::appSecretIsSet() const +{ + return appSecretIsSet_; +} + +void SubscriptionExtension::unsetappSecret() +{ + appSecretIsSet_ = false; +} + +std::string SubscriptionExtension::getRobotCode() const +{ + return robotCode_; +} + +void SubscriptionExtension::setRobotCode(const std::string& value) +{ + robotCode_ = value; + robotCodeIsSet_ = true; +} + +bool SubscriptionExtension::robotCodeIsSet() const +{ + return robotCodeIsSet_; +} + +void SubscriptionExtension::unsetrobotCode() +{ + robotCodeIsSet_ = false; +} + } } } diff --git a/smn/src/v2/model/UpdateNotifyPolicyRequest.cpp b/smn/src/v2/model/UpdateNotifyPolicyRequest.cpp new file mode 100644 index 000000000..aa1c7d618 --- /dev/null +++ b/smn/src/v2/model/UpdateNotifyPolicyRequest.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/smn/v2/model/UpdateNotifyPolicyRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + + + + +UpdateNotifyPolicyRequest::UpdateNotifyPolicyRequest() +{ + topicUrn_ = ""; + topicUrnIsSet_ = false; + notifyPolicyId_ = ""; + notifyPolicyIdIsSet_ = false; + bodyIsSet_ = false; +} + +UpdateNotifyPolicyRequest::~UpdateNotifyPolicyRequest() = default; + +void UpdateNotifyPolicyRequest::validate() +{ +} + +web::json::value UpdateNotifyPolicyRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(topicUrnIsSet_) { + val[utility::conversions::to_string_t("topic_urn")] = ModelBase::toJson(topicUrn_); + } + if(notifyPolicyIdIsSet_) { + val[utility::conversions::to_string_t("notify_policy_id")] = ModelBase::toJson(notifyPolicyId_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool UpdateNotifyPolicyRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("topic_urn"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("topic_urn")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTopicUrn(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("notify_policy_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("notify_policy_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNotifyPolicyId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + NotifyPolicyRequestBody refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string UpdateNotifyPolicyRequest::getTopicUrn() const +{ + return topicUrn_; +} + +void UpdateNotifyPolicyRequest::setTopicUrn(const std::string& value) +{ + topicUrn_ = value; + topicUrnIsSet_ = true; +} + +bool UpdateNotifyPolicyRequest::topicUrnIsSet() const +{ + return topicUrnIsSet_; +} + +void UpdateNotifyPolicyRequest::unsettopicUrn() +{ + topicUrnIsSet_ = false; +} + +std::string UpdateNotifyPolicyRequest::getNotifyPolicyId() const +{ + return notifyPolicyId_; +} + +void UpdateNotifyPolicyRequest::setNotifyPolicyId(const std::string& value) +{ + notifyPolicyId_ = value; + notifyPolicyIdIsSet_ = true; +} + +bool UpdateNotifyPolicyRequest::notifyPolicyIdIsSet() const +{ + return notifyPolicyIdIsSet_; +} + +void UpdateNotifyPolicyRequest::unsetnotifyPolicyId() +{ + notifyPolicyIdIsSet_ = false; +} + +NotifyPolicyRequestBody UpdateNotifyPolicyRequest::getBody() const +{ + return body_; +} + +void UpdateNotifyPolicyRequest::setBody(const NotifyPolicyRequestBody& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UpdateNotifyPolicyRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UpdateNotifyPolicyRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/smn/src/v2/model/UpdateNotifyPolicyResponse.cpp b/smn/src/v2/model/UpdateNotifyPolicyResponse.cpp new file mode 100644 index 000000000..eb8afefc7 --- /dev/null +++ b/smn/src/v2/model/UpdateNotifyPolicyResponse.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/smn/v2/model/UpdateNotifyPolicyResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Smn { +namespace V2 { +namespace Model { + + + + +UpdateNotifyPolicyResponse::UpdateNotifyPolicyResponse() +{ + body_ = ""; + bodyIsSet_ = false; +} + +UpdateNotifyPolicyResponse::~UpdateNotifyPolicyResponse() = default; + +void UpdateNotifyPolicyResponse::validate() +{ +} + +web::json::value UpdateNotifyPolicyResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool UpdateNotifyPolicyResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string UpdateNotifyPolicyResponse::getBody() const +{ + return body_; +} + +void UpdateNotifyPolicyResponse::setBody(const std::string& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UpdateNotifyPolicyResponse::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UpdateNotifyPolicyResponse::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + +