diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bd0c01a..d57a763f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,199 @@ +# 3.1.117 2024-12-26 + +### HuaweiCloud SDK CBR + +- _API Version_ + - V1 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ListVault** + - changes of response param + - `+ vaults.billing.object_type: enum value [turbo]` + - `+ vaults.billing.spec_code: enum value [vault.backup.turbo.normal,vault.backup.database.normal,vault.hybrid.server.normal,vault.replication.server.normal]` + - **CreateVault** + - changes of response param + - `+ vault.billing.object_type: enum value [turbo]` + - `+ vault.billing.spec_code: enum value [vault.backup.turbo.normal,vault.backup.database.normal,vault.hybrid.server.normal,vault.replication.server.normal]` + - **ShowVault** + - changes of response param + - `+ vault.billing.object_type: enum value [turbo]` + - `+ vault.billing.spec_code: enum value [vault.backup.turbo.normal,vault.backup.database.normal,vault.hybrid.server.normal,vault.replication.server.normal]` + - **UpdateVault** + - changes of response param + - `+ vault.billing.object_type: enum value [turbo]` + - `+ vault.billing.spec_code: enum value [vault.backup.turbo.normal,vault.backup.database.normal,vault.hybrid.server.normal,vault.replication.server.normal]` + - **ListExternalVault** + - changes of response param + - `+ vaults.billing.object_type: enum value [turbo]` + - `+ vaults.billing.spec_code: enum value [vault.backup.turbo.normal,vault.backup.database.normal,vault.hybrid.server.normal,vault.replication.server.normal]` + - **ListProtectable** + - changes of response param + - `+ instances.protectable.vault.billing.object_type: enum value [turbo]` + - `+ instances.protectable.vault.billing.spec_code: enum value [vault.backup.turbo.normal,vault.backup.database.normal,vault.hybrid.server.normal,vault.replication.server.normal]` + - **ShowProtectable** + - changes of response param + - `+ instance.protectable.vault.billing.object_type: enum value [turbo]` + - `+ instance.protectable.vault.billing.spec_code: enum value [vault.backup.turbo.normal,vault.backup.database.normal,vault.hybrid.server.normal,vault.replication.server.normal]` + - **ShowVaultResourceInstances** + - changes of request param + - `+ object_type: enum value [turbo,workspace,vmware,rds,file]` + - changes of response param + - `+ resources.resource_detail.vault.billing.object_type: enum value [turbo]` + - `+ resources.resource_detail.vault.billing.spec_code: enum value [vault.backup.turbo.normal,vault.backup.database.normal,vault.hybrid.server.normal,vault.replication.server.normal]` + +### HuaweiCloud SDK CFW + +- _API Version_ + - V1 +- _Features_ + - Support the following APIs: + - `ShowDomainSetDetail` + - `ListDomainParseIp` + - `BatchDeleteDomainSet` + - `ListRegions` + - `ShowImportStatus` + - `ShowAntiVirusSwitch` + - `UpdateAntiVirusSwitch` + - `ShowAntiVirusRule` + - `UpdateAntiVirusRule` + - `ShowAlarmConfig` + - `UpdateAlarmConfig` + - `ListAlarmWhitelist` + - `SwitchAutoProtectStatus` + - `ShowAutoProtectStatus` + - `ListProjectTags` + - `ChangeIpsRuleMode` + - `UpdateAdvancedIpsRule` + - `ListIpsRules` + - `ListIpsRules1` + - `ShowIpsUpdateTime` + - `ListCustomerIps` + - `ListResourceTags` + - `SaveTags` +- _Bug Fix_ + - None +- _Change_ + - None + +### HuaweiCloud SDK GaussDBforopenGauss + +- _API Version_ + - V3 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **AllowDbRolePrivileges** + - changes of request param + - `+ user.name` + - `+ user.schema` + - `+ user.readonly` + - `+ user.default_privilege_grantee` + - `* user: object -> object` + - **ListDatabaseRoles** + - changes of response param + - `* total_count: int64 -> int32` + - `+ roles.attribute.rolsuper` + - `+ roles.attribute.rolinherit` + - `+ roles.attribute.rolcreaterole` + - `+ roles.attribute.rolcreatedb` + - `+ roles.attribute.rolcanlogin` + - `+ roles.attribute.rolconnlimit` + - `+ roles.attribute.rolreplication` + - `+ roles.attribute.rolbypassrls` + - `+ roles.attribute.rolpassworddeadline` + - `* roles.attribute: object -> object` + +### HuaweiCloud SDK IMS + +- _API Version_ + - V2 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **CreateImage** + - changes of request param + - `+ hw_firmware_type` + - **ImportImageQuick** + - changes of request param + - `+ hw_firmware_type` + +### HuaweiCloud SDK LTS + +- _API Version_ + - V2 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ListLogStreams** + - changes of request param + - `- offset` + - `- limit` + - **CreateLogGroup** + - changes of request param + - `+ log_group_name_alias` + - **UpdateLogStream** + - changes of request param + - `- ttl_in_days: enum value [7]` + - **UpdateTransfer** + - changes of request param + - `+ log_transfer_info.log_transfer_detail.lts_tags` + - `+ log_transfer_info.log_transfer_detail.stream_tags` + - `+ log_transfer_info.log_transfer_detail.struct_fields` + - `+ log_transfer_info.log_transfer_detail.invalid_field_value` + - changes of response param + - `+ log_transfer_info.log_transfer_detail.lts_tags` + - `+ log_transfer_info.log_transfer_detail.stream_tags` + - `+ log_transfer_info.log_transfer_detail.struct_fields` + - `+ log_transfer_info.log_transfer_detail.invalid_field_value` + - **CreateTransfer** + - changes of request param + - `+ log_transfer_info.log_transfer_detail.lts_tags` + - `+ log_transfer_info.log_transfer_detail.stream_tags` + - `+ log_transfer_info.log_transfer_detail.struct_fields` + - `+ log_transfer_info.log_transfer_detail.invalid_field_value` + - changes of response param + - `+ log_transfer_info.log_transfer_detail.lts_tags` + - `+ log_transfer_info.log_transfer_detail.stream_tags` + - `+ log_transfer_info.log_transfer_detail.struct_fields` + - `+ log_transfer_info.log_transfer_detail.invalid_field_value` + - **DeleteTransfer** + - changes of response param + - `+ log_transfer_info.log_transfer_detail.lts_tags` + - `+ log_transfer_info.log_transfer_detail.stream_tags` + - `+ log_transfer_info.log_transfer_detail.struct_fields` + - `+ log_transfer_info.log_transfer_detail.invalid_field_value` + - **ListTransfers** + - changes of response param + - `+ log_transfers.log_transfer_info.log_transfer_detail.lts_tags` + - `+ log_transfers.log_transfer_info.log_transfer_detail.stream_tags` + - `+ log_transfers.log_transfer_info.log_transfer_detail.struct_fields` + - `+ log_transfers.log_transfer_info.log_transfer_detail.invalid_field_value` + - **UpdateAccessConfig** + - changes of request param + - `+ access_config_name` + +### HuaweiCloud SDK RDS + +- _API Version_ + - V3 +- _Features_ + - Support the API `ListDrInfos` +- _Bug Fix_ + - None +- _Change_ + - **ListUpdateBackupEnhancePolicy** + - changes of response param + - `* policies.retention_days: string -> int32` + # 3.1.116 2024-12-19 ### HuaweiCloud SDK AAD diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index bc86d0d5..ccd079dc 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,3 +1,199 @@ +# 3.1.117 2024-12-26 + +### HuaweiCloud SDK CBR + +- _接口版本_ + - V1 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ListVault** + - 响应参数变更 + - `+ vaults.billing.object_type: enum value [turbo]` + - `+ vaults.billing.spec_code: enum value [vault.backup.turbo.normal,vault.backup.database.normal,vault.hybrid.server.normal,vault.replication.server.normal]` + - **CreateVault** + - 响应参数变更 + - `+ vault.billing.object_type: enum value [turbo]` + - `+ vault.billing.spec_code: enum value [vault.backup.turbo.normal,vault.backup.database.normal,vault.hybrid.server.normal,vault.replication.server.normal]` + - **ShowVault** + - 响应参数变更 + - `+ vault.billing.object_type: enum value [turbo]` + - `+ vault.billing.spec_code: enum value [vault.backup.turbo.normal,vault.backup.database.normal,vault.hybrid.server.normal,vault.replication.server.normal]` + - **UpdateVault** + - 响应参数变更 + - `+ vault.billing.object_type: enum value [turbo]` + - `+ vault.billing.spec_code: enum value [vault.backup.turbo.normal,vault.backup.database.normal,vault.hybrid.server.normal,vault.replication.server.normal]` + - **ListExternalVault** + - 响应参数变更 + - `+ vaults.billing.object_type: enum value [turbo]` + - `+ vaults.billing.spec_code: enum value [vault.backup.turbo.normal,vault.backup.database.normal,vault.hybrid.server.normal,vault.replication.server.normal]` + - **ListProtectable** + - 响应参数变更 + - `+ instances.protectable.vault.billing.object_type: enum value [turbo]` + - `+ instances.protectable.vault.billing.spec_code: enum value [vault.backup.turbo.normal,vault.backup.database.normal,vault.hybrid.server.normal,vault.replication.server.normal]` + - **ShowProtectable** + - 响应参数变更 + - `+ instance.protectable.vault.billing.object_type: enum value [turbo]` + - `+ instance.protectable.vault.billing.spec_code: enum value [vault.backup.turbo.normal,vault.backup.database.normal,vault.hybrid.server.normal,vault.replication.server.normal]` + - **ShowVaultResourceInstances** + - 请求参数变更 + - `+ object_type: enum value [turbo,workspace,vmware,rds,file]` + - 响应参数变更 + - `+ resources.resource_detail.vault.billing.object_type: enum value [turbo]` + - `+ resources.resource_detail.vault.billing.spec_code: enum value [vault.backup.turbo.normal,vault.backup.database.normal,vault.hybrid.server.normal,vault.replication.server.normal]` + +### HuaweiCloud SDK CFW + +- _接口版本_ + - V1 +- _新增特性_ + - 支持以下接口: + - `ShowDomainSetDetail` + - `ListDomainParseIp` + - `BatchDeleteDomainSet` + - `ListRegions` + - `ShowImportStatus` + - `ShowAntiVirusSwitch` + - `UpdateAntiVirusSwitch` + - `ShowAntiVirusRule` + - `UpdateAntiVirusRule` + - `ShowAlarmConfig` + - `UpdateAlarmConfig` + - `ListAlarmWhitelist` + - `SwitchAutoProtectStatus` + - `ShowAutoProtectStatus` + - `ListProjectTags` + - `ChangeIpsRuleMode` + - `UpdateAdvancedIpsRule` + - `ListIpsRules` + - `ListIpsRules1` + - `ShowIpsUpdateTime` + - `ListCustomerIps` + - `ListResourceTags` + - `SaveTags` +- _解决问题_ + - 无 +- _特性变更_ + - 无 + +### HuaweiCloud SDK GaussDBforopenGauss + +- _接口版本_ + - V3 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **AllowDbRolePrivileges** + - 请求参数变更 + - `+ user.name` + - `+ user.schema` + - `+ user.readonly` + - `+ user.default_privilege_grantee` + - `* user: object -> object` + - **ListDatabaseRoles** + - 响应参数变更 + - `* total_count: int64 -> int32` + - `+ roles.attribute.rolsuper` + - `+ roles.attribute.rolinherit` + - `+ roles.attribute.rolcreaterole` + - `+ roles.attribute.rolcreatedb` + - `+ roles.attribute.rolcanlogin` + - `+ roles.attribute.rolconnlimit` + - `+ roles.attribute.rolreplication` + - `+ roles.attribute.rolbypassrls` + - `+ roles.attribute.rolpassworddeadline` + - `* roles.attribute: object -> object` + +### HuaweiCloud SDK IMS + +- _接口版本_ + - V2 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **CreateImage** + - 请求参数变更 + - `+ hw_firmware_type` + - **ImportImageQuick** + - 请求参数变更 + - `+ hw_firmware_type` + +### HuaweiCloud SDK LTS + +- _接口版本_ + - V2 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ListLogStreams** + - 请求参数变更 + - `- offset` + - `- limit` + - **CreateLogGroup** + - 请求参数变更 + - `+ log_group_name_alias` + - **UpdateLogStream** + - 请求参数变更 + - `- ttl_in_days: enum value [7]` + - **UpdateTransfer** + - 请求参数变更 + - `+ log_transfer_info.log_transfer_detail.lts_tags` + - `+ log_transfer_info.log_transfer_detail.stream_tags` + - `+ log_transfer_info.log_transfer_detail.struct_fields` + - `+ log_transfer_info.log_transfer_detail.invalid_field_value` + - 响应参数变更 + - `+ log_transfer_info.log_transfer_detail.lts_tags` + - `+ log_transfer_info.log_transfer_detail.stream_tags` + - `+ log_transfer_info.log_transfer_detail.struct_fields` + - `+ log_transfer_info.log_transfer_detail.invalid_field_value` + - **CreateTransfer** + - 请求参数变更 + - `+ log_transfer_info.log_transfer_detail.lts_tags` + - `+ log_transfer_info.log_transfer_detail.stream_tags` + - `+ log_transfer_info.log_transfer_detail.struct_fields` + - `+ log_transfer_info.log_transfer_detail.invalid_field_value` + - 响应参数变更 + - `+ log_transfer_info.log_transfer_detail.lts_tags` + - `+ log_transfer_info.log_transfer_detail.stream_tags` + - `+ log_transfer_info.log_transfer_detail.struct_fields` + - `+ log_transfer_info.log_transfer_detail.invalid_field_value` + - **DeleteTransfer** + - 响应参数变更 + - `+ log_transfer_info.log_transfer_detail.lts_tags` + - `+ log_transfer_info.log_transfer_detail.stream_tags` + - `+ log_transfer_info.log_transfer_detail.struct_fields` + - `+ log_transfer_info.log_transfer_detail.invalid_field_value` + - **ListTransfers** + - 响应参数变更 + - `+ log_transfers.log_transfer_info.log_transfer_detail.lts_tags` + - `+ log_transfers.log_transfer_info.log_transfer_detail.stream_tags` + - `+ log_transfers.log_transfer_info.log_transfer_detail.struct_fields` + - `+ log_transfers.log_transfer_info.log_transfer_detail.invalid_field_value` + - **UpdateAccessConfig** + - 请求参数变更 + - `+ access_config_name` + +### HuaweiCloud SDK RDS + +- _接口版本_ + - V3 +- _新增特性_ + - 支持接口`ListDrInfos` +- _解决问题_ + - 无 +- _特性变更_ + - **ListUpdateBackupEnhancePolicy** + - 响应参数变更 + - `* policies.retention_days: string -> int32` + # 3.1.116 2024-12-19 ### HuaweiCloud SDK AAD diff --git a/CMakeLists.txt b/CMakeLists.txt index 1aee5202..8e671f41 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ if(ENABLE_BSON) add_definitions(-DHUAWEICLOUD_SDK_BSON_) endif() -SET(BUILD_SERVICE image) +SET(BUILD_SERVICE cfw) SET(SERVICE_VERSION v2) if(BUILD_SERVICE STREQUAL "all" OR BUILD_SERVICE STREQUAL "") diff --git a/VERSION b/VERSION index 4f092be4..14a3dc38 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.116 +3.1.117 diff --git a/cfw/include/huaweicloud/cfw/v1/CfwClient.h b/cfw/include/huaweicloud/cfw/v1/CfwClient.h index 0e45ebc7..4d34bad3 100644 --- a/cfw/include/huaweicloud/cfw/v1/CfwClient.h +++ b/cfw/include/huaweicloud/cfw/v1/CfwClient.h @@ -29,8 +29,13 @@ #include #include #include +#include +#include #include #include +#include +#include +#include #include #include #include @@ -96,6 +101,8 @@ #include #include #include +#include +#include #include #include #include @@ -112,8 +119,12 @@ #include #include #include +#include +#include #include #include +#include +#include #include #include #include @@ -122,9 +133,26 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -158,10 +186,14 @@ #include #include #include +#include +#include #include #include #include #include +#include +#include #include #include #include @@ -173,22 +205,43 @@ #include #include #include +#include +#include #include #include #include #include +#include +#include +#include +#include +#include #include +#include #include #include +#include +#include #include #include #include +#include #include +#include +#include #include #include +#include +#include +#include +#include #include #include +#include +#include +#include +#include #include #include @@ -287,6 +340,14 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwClient : public Client std::shared_ptr batchDeleteAddressItems( BatchDeleteAddressItemsRequest &request ); + // 批量删除域名组 + // + // 批量删除域名组 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr batchDeleteDomainSet( + BatchDeleteDomainSetRequest &request + ); // 批量删除服务组成员信息 // // 批量删除服务组成员信息 @@ -503,6 +564,14 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwClient : public Client std::shared_ptr listDomainParseDetail( ListDomainParseDetailRequest &request ); + // 获取域名地址解析结果 + // + // 获取域名地址解析结果 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listDomainParseIp( + ListDomainParseIpRequest &request + ); // 查询域名组列表 // // 查询域名组列表 @@ -567,6 +636,14 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwClient : public Client std::shared_ptr listLogConfig( ListLogConfigRequest &request ); + // 查询标签信息 + // + // 查询标签信息 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listProjectTags( + ListProjectTagsRequest &request + ); // 查询防护VPC数 // // 查询防护vpc信息 @@ -575,6 +652,14 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwClient : public Client std::shared_ptr listProtectedVpcs( ListProtectedVpcsRequest &request ); + // 查询资源标签信息 + // + // 查询资源标签信息 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listResourceTags( + ListResourceTagsRequest &request + ); // 查询服务成员列表 // // 查询服务组成员列表 @@ -599,6 +684,46 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwClient : public Client std::shared_ptr listServiceSets( ListServiceSetsRequest &request ); + // 保存资源标签接口 + // + // 保存资源标签接口 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr saveTags( + SaveTagsRequest &request + ); + // 获取告警配置信息 + // + // 获取告警配置信息 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showAlarmConfig( + ShowAlarmConfigRequest &request + ); + // 获取防火墙反病毒规则信息 + // + // 获取防火墙反病毒规则信息 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showAntiVirusRule( + ShowAntiVirusRuleRequest &request + ); + // 查看反病毒开关 + // + // 查看反病毒开关 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showAntiVirusSwitch( + ShowAntiVirusSwitchRequest &request + ); + // 查看域名组详情 + // + // 查看域名组详情 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showDomainSetDetail( + ShowDomainSetDetailRequest &request + ); // 更新地址组信息 // // 更新地址组信息 @@ -607,6 +732,30 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwClient : public Client std::shared_ptr updateAddressSet( UpdateAddressSetRequest &request ); + // 修改告警配置接口 + // + // 修改告警配置接口 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr updateAlarmConfig( + UpdateAlarmConfigRequest &request + ); + // 修改反病毒规则 + // + // 修改反病毒规则 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr updateAntiVirusRule( + UpdateAntiVirusRuleRequest &request + ); + // 修改反病毒开关 + // + // 修改反病毒开关 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr updateAntiVirusSwitch( + UpdateAntiVirusSwitchRequest &request + ); // 更新黑白名单列表 // // 更新黑白名单列表 @@ -704,6 +853,14 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwClient : public Client std::shared_ptr listAclRules( ListAclRulesRequest &request ); + // 查看region列表 + // + // 查看region列表 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listRegions( + ListRegionsRequest &request + ); // 查询规则标签 // // 查询规则标签 @@ -712,6 +869,14 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwClient : public Client std::shared_ptr listRuleAclTags( ListRuleAclTagsRequest &request ); + // 查看导入状态接口 + // + // 查看导入状态接口 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showImportStatus( + ShowImportStatusRequest &request + ); // 更新ACL规则 // // 更新ACL规则 @@ -737,6 +902,14 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwClient : public Client std::shared_ptr changeEipStatus( ChangeEipStatusRequest &request ); + // 查看eip告警白名单 + // + // 查看eip告警白名单 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listAlarmWhitelist( + ListAlarmWhitelistRequest &request + ); // 查询Eip个数 // // 查询Eip个数 @@ -753,6 +926,22 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwClient : public Client std::shared_ptr listEips( ListEipsRequest &request ); + // 获取eip自动防护状态信息 + // + // 获取eip自动防护状态信息 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showAutoProtectStatus( + ShowAutoProtectStatusRequest &request + ); + // 修改eip自动防护开关 + // + // 修改eip自动防护开关 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr switchAutoProtectStatus( + SwitchAutoProtectStatusRequest &request + ); // 切换防护模式 // @@ -762,6 +951,14 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwClient : public Client std::shared_ptr changeIpsProtectMode( ChangeIpsProtectModeRequest &request ); + // 改变ips规则模式 + // + // 改变ips规则模式 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr changeIpsRuleMode( + ChangeIpsRuleModeRequest &request + ); // IPS特性开关操作 // // 切换开关状态 @@ -770,6 +967,14 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwClient : public Client std::shared_ptr changeIpsSwitchStatus( ChangeIpsSwitchStatusRequest &request ); + // 获取自定义ips规则 + // + // 获取自定义ips规则 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listCustomerIps( + ListCustomerIpsRequest &request + ); // 查询防护模式 // // 查询防护模式 @@ -778,6 +983,22 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwClient : public Client std::shared_ptr listIpsProtectMode( ListIpsProtectModeRequest &request ); + // 查询频率ips规则信息 + // + // 查询频率ips规则信息 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listIpsRules( + ListIpsRulesRequest &request + ); + // 获取ips规则列表 + // + // 获取ips规则列表 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listIpsRules1( + ListIpsRules1Request &request + ); // 查询IPS特性开关状态 // // 查询IPS特性开关状态 @@ -786,6 +1007,22 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwClient : public Client std::shared_ptr listIpsSwitchStatus( ListIpsSwitchStatusRequest &request ); + // 获取ips规则细节 + // + // 获取ips规则细节 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showIpsUpdateTime( + ShowIpsUpdateTimeRequest &request + ); + // 创建频率ips规则 + // + // 创建频率ips规则 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr updateAdvancedIpsRule( + UpdateAdvancedIpsRuleRequest &request + ); private: diff --git a/cfw/include/huaweicloud/cfw/v1/CfwMeta.h b/cfw/include/huaweicloud/cfw/v1/CfwMeta.h index 016f11dc..2c02d160 100644 --- a/cfw/include/huaweicloud/cfw/v1/CfwMeta.h +++ b/cfw/include/huaweicloud/cfw/v1/CfwMeta.h @@ -22,6 +22,7 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwMeta { static HttpRequestDef genRequestDefForAddServiceItems(); static HttpRequestDef genRequestDefForAddServiceSet(); static HttpRequestDef genRequestDefForBatchDeleteAddressItems(); + static HttpRequestDef genRequestDefForBatchDeleteDomainSet(); static HttpRequestDef genRequestDefForBatchDeleteServiceItems(); static HttpRequestDef genRequestDefForCancelCaptureTask(); static HttpRequestDef genRequestDefForChangeEastWestFirewallStatus(); @@ -49,6 +50,7 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwMeta { static HttpRequestDef genRequestDefForListCaptureTask(); static HttpRequestDef genRequestDefForListDnsServers(); static HttpRequestDef genRequestDefForListDomainParseDetail(); + static HttpRequestDef genRequestDefForListDomainParseIp(); static HttpRequestDef genRequestDefForListDomainSets(); static HttpRequestDef genRequestDefForListDomains(); static HttpRequestDef genRequestDefForListEastWestFirewall(); @@ -57,11 +59,21 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwMeta { static HttpRequestDef genRequestDefForListFlowLogs(); static HttpRequestDef genRequestDefForListJob(); static HttpRequestDef genRequestDefForListLogConfig(); + static HttpRequestDef genRequestDefForListProjectTags(); static HttpRequestDef genRequestDefForListProtectedVpcs(); + static HttpRequestDef genRequestDefForListResourceTags(); static HttpRequestDef genRequestDefForListServiceItems(); static HttpRequestDef genRequestDefForListServiceSetDetail(); static HttpRequestDef genRequestDefForListServiceSets(); + static HttpRequestDef genRequestDefForSaveTags(); + static HttpRequestDef genRequestDefForShowAlarmConfig(); + static HttpRequestDef genRequestDefForShowAntiVirusRule(); + static HttpRequestDef genRequestDefForShowAntiVirusSwitch(); + static HttpRequestDef genRequestDefForShowDomainSetDetail(); static HttpRequestDef genRequestDefForUpdateAddressSet(); + static HttpRequestDef genRequestDefForUpdateAlarmConfig(); + static HttpRequestDef genRequestDefForUpdateAntiVirusRule(); + static HttpRequestDef genRequestDefForUpdateAntiVirusSwitch(); static HttpRequestDef genRequestDefForUpdateBlackWhiteList(); static HttpRequestDef genRequestDefForUpdateDnsServers(); static HttpRequestDef genRequestDefForUpdateDomainSet(); @@ -74,16 +86,27 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwMeta { static HttpRequestDef genRequestDefForDeleteAclRuleHitCount(); static HttpRequestDef genRequestDefForListAclRuleHitCount(); static HttpRequestDef genRequestDefForListAclRules(); + static HttpRequestDef genRequestDefForListRegions(); static HttpRequestDef genRequestDefForListRuleAclTags(); + static HttpRequestDef genRequestDefForShowImportStatus(); static HttpRequestDef genRequestDefForUpdateAclRule(); static HttpRequestDef genRequestDefForUpdateAclRuleOrder(); static HttpRequestDef genRequestDefForChangeEipStatus(); + static HttpRequestDef genRequestDefForListAlarmWhitelist(); static HttpRequestDef genRequestDefForListEipCount(); static HttpRequestDef genRequestDefForListEips(); + static HttpRequestDef genRequestDefForShowAutoProtectStatus(); + static HttpRequestDef genRequestDefForSwitchAutoProtectStatus(); static HttpRequestDef genRequestDefForChangeIpsProtectMode(); + static HttpRequestDef genRequestDefForChangeIpsRuleMode(); static HttpRequestDef genRequestDefForChangeIpsSwitchStatus(); + static HttpRequestDef genRequestDefForListCustomerIps(); static HttpRequestDef genRequestDefForListIpsProtectMode(); + static HttpRequestDef genRequestDefForListIpsRules(); + static HttpRequestDef genRequestDefForListIpsRules1(); static HttpRequestDef genRequestDefForListIpsSwitchStatus(); + static HttpRequestDef genRequestDefForShowIpsUpdateTime(); + static HttpRequestDef genRequestDefForUpdateAdvancedIpsRule(); }; } diff --git a/cfw/include/huaweicloud/cfw/v1/model/AdvancedIpsRuleDto.h b/cfw/include/huaweicloud/cfw/v1/model/AdvancedIpsRuleDto.h new file mode 100644 index 00000000..6da53b43 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/AdvancedIpsRuleDto.h @@ -0,0 +1,119 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_AdvancedIpsRuleDto_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_AdvancedIpsRuleDto_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT AdvancedIpsRuleDto + : public ModelBase +{ +public: + AdvancedIpsRuleDto(); + virtual ~AdvancedIpsRuleDto(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// AdvancedIpsRuleDto members + + /// + /// 动作:0表示仅记录日志、1表示拦截session、2表示拦截ip + /// + + int32_t getAction() const; + bool actionIsSet() const; + void unsetaction(); + void setAction(int32_t value); + + /// + /// 高级ips规则id + /// + + std::string getIpsRuleId() const; + bool ipsRuleIdIsSet() const; + void unsetipsRuleId(); + void setIpsRuleId(const std::string& value); + + /// + /// ips规则类型:0表示敏感目录扫描、1表示反弹xshell + /// + + int32_t getIpsRuleType() const; + bool ipsRuleTypeIsSet() const; + void unsetipsRuleType(); + void setIpsRuleType(int32_t value); + + /// + /// 防护对象id + /// + + std::string getObjectId() const; + bool objectIdIsSet() const; + void unsetobjectId(); + void setObjectId(const std::string& value); + + /// + /// 包含特殊参数的JSON字符串 + /// + + std::string getParam() const; + bool paramIsSet() const; + void unsetparam(); + void setParam(const std::string& value); + + /// + /// + /// + + int32_t getStatus() const; + bool statusIsSet() const; + void unsetstatus(); + void setStatus(int32_t value); + + +protected: + int32_t action_; + bool actionIsSet_; + std::string ipsRuleId_; + bool ipsRuleIdIsSet_; + int32_t ipsRuleType_; + bool ipsRuleTypeIsSet_; + std::string objectId_; + bool objectIdIsSet_; + std::string param_; + bool paramIsSet_; + int32_t status_; + bool statusIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_AdvancedIpsRuleDto_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/AdvancedIpsRuleListVo.h b/cfw/include/huaweicloud/cfw/v1/model/AdvancedIpsRuleListVo.h new file mode 100644 index 00000000..03858187 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/AdvancedIpsRuleListVo.h @@ -0,0 +1,76 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_AdvancedIpsRuleListVo_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_AdvancedIpsRuleListVo_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT AdvancedIpsRuleListVo + : public ModelBase +{ +public: + AdvancedIpsRuleListVo(); + virtual ~AdvancedIpsRuleListVo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// AdvancedIpsRuleListVo members + + /// + /// + /// + + std::vector& getAdvancedIpsRules(); + bool advancedIpsRulesIsSet() const; + void unsetadvancedIpsRules(); + void setAdvancedIpsRules(const std::vector& value); + + /// + /// + /// + + int32_t getTotal() const; + bool totalIsSet() const; + void unsettotal(); + void setTotal(int32_t value); + + +protected: + std::vector advancedIpsRules_; + bool advancedIpsRulesIsSet_; + int32_t total_; + bool totalIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_AdvancedIpsRuleListVo_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/AdvancedIpsRuleVo.h b/cfw/include/huaweicloud/cfw/v1/model/AdvancedIpsRuleVo.h new file mode 100644 index 00000000..899df7d1 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/AdvancedIpsRuleVo.h @@ -0,0 +1,108 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_AdvancedIpsRuleVo_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_AdvancedIpsRuleVo_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT AdvancedIpsRuleVo + : public ModelBase +{ +public: + AdvancedIpsRuleVo(); + virtual ~AdvancedIpsRuleVo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// AdvancedIpsRuleVo members + + /// + /// 动作:0表示仅记录日志、1表示拦截session、2表示拦截ip + /// + + int32_t getAction() const; + bool actionIsSet() const; + void unsetaction(); + void setAction(int32_t value); + + /// + /// 高级ips规则id + /// + + std::string getIpsRuleId() const; + bool ipsRuleIdIsSet() const; + void unsetipsRuleId(); + void setIpsRuleId(const std::string& value); + + /// + /// ips规则类型:0表示敏感目录扫描、1表示反弹xshell + /// + + int32_t getIpsRuleType() const; + bool ipsRuleTypeIsSet() const; + void unsetipsRuleType(); + void setIpsRuleType(int32_t value); + + /// + /// 包含特殊参数的JSON字符串 + /// + + std::string getParam() const; + bool paramIsSet() const; + void unsetparam(); + void setParam(const std::string& value); + + /// + /// + /// + + int32_t getStatus() const; + bool statusIsSet() const; + void unsetstatus(); + void setStatus(int32_t value); + + +protected: + int32_t action_; + bool actionIsSet_; + std::string ipsRuleId_; + bool ipsRuleIdIsSet_; + int32_t ipsRuleType_; + bool ipsRuleTypeIsSet_; + std::string param_; + bool paramIsSet_; + int32_t status_; + bool statusIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_AdvancedIpsRuleVo_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/AlarmConfig.h b/cfw/include/huaweicloud/cfw/v1/model/AlarmConfig.h new file mode 100644 index 00000000..0dc88a8f --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/AlarmConfig.h @@ -0,0 +1,185 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_AlarmConfig_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_AlarmConfig_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT AlarmConfig + : public ModelBase +{ +public: + AlarmConfig(); + virtual ~AlarmConfig(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// AlarmConfig members + + /// + /// 账号名称 + /// + + std::string getAccountName() const; + bool accountNameIsSet() const; + void unsetaccountName(); + void setAccountName(const std::string& value); + + /// + /// 告警id + /// + + std::string getAlarmId() const; + bool alarmIdIsSet() const; + void unsetalarmId(); + void setAlarmId(const std::string& value); + + /// + /// 告警周期,0:全天,1:8时到22时 + /// + + int32_t getAlarmTimePeriod() const; + bool alarmTimePeriodIsSet() const; + void unsetalarmTimePeriod(); + void setAlarmTimePeriod(int32_t value); + + /// + /// 告警类型 0:攻击告警; 1:流量超额预警; 2:EIP未防护告警; 3:威胁情报告警 + /// + + int32_t getAlarmType() const; + bool alarmTypeIsSet() const; + void unsetalarmType(); + void setAlarmType(int32_t value); + + /// + /// 告警状态 0:失效; 1:生效 + /// + + int32_t getEnableStatus() const; + bool enableStatusIsSet() const; + void unsetenableStatus(); + void setEnableStatus(int32_t value); + + /// + /// 告警触发频次 + /// + + int32_t getFrequencyCount() const; + bool frequencyCountIsSet() const; + void unsetfrequencyCount(); + void setFrequencyCount(int32_t value); + + /// + /// 告警频次时间范围 + /// + + int32_t getFrequencyTime() const; + bool frequencyTimeIsSet() const; + void unsetfrequencyTime(); + void setFrequencyTime(int32_t value); + + /// + /// 告警语言 + /// + + std::string getLanguage() const; + bool languageIsSet() const; + void unsetlanguage(); + void setLanguage(const std::string& value); + + /// + /// 告警主题名称 + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + /// + /// 告警等级 + /// + + std::string getSeverity() const; + bool severityIsSet() const; + void unsetseverity(); + void setSeverity(const std::string& value); + + /// + /// 告警urn + /// + + std::string getTopicUrn() const; + bool topicUrnIsSet() const; + void unsettopicUrn(); + void setTopicUrn(const std::string& value); + + /// + /// 用户名称 + /// + + std::string getUsername() const; + bool usernameIsSet() const; + void unsetusername(); + void setUsername(const std::string& value); + + +protected: + std::string accountName_; + bool accountNameIsSet_; + std::string alarmId_; + bool alarmIdIsSet_; + int32_t alarmTimePeriod_; + bool alarmTimePeriodIsSet_; + int32_t alarmType_; + bool alarmTypeIsSet_; + int32_t enableStatus_; + bool enableStatusIsSet_; + int32_t frequencyCount_; + bool frequencyCountIsSet_; + int32_t frequencyTime_; + bool frequencyTimeIsSet_; + std::string language_; + bool languageIsSet_; + std::string name_; + bool nameIsSet_; + std::string severity_; + bool severityIsSet_; + std::string topicUrn_; + bool topicUrnIsSet_; + std::string username_; + bool usernameIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_AlarmConfig_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/AntiVirusRuleDto.h b/cfw/include/huaweicloud/cfw/v1/model/AntiVirusRuleDto.h new file mode 100644 index 00000000..fbf0f0b6 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/AntiVirusRuleDto.h @@ -0,0 +1,77 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_AntiVirusRuleDto_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_AntiVirusRuleDto_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT AntiVirusRuleDto + : public ModelBase +{ +public: + AntiVirusRuleDto(); + virtual ~AntiVirusRuleDto(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// AntiVirusRuleDto members + + /// + /// 防护对象ID + /// + + std::string getObjectId() const; + bool objectIdIsSet() const; + void unsetobjectId(); + void setObjectId(const std::string& value); + + /// + /// 扫描协议配置 + /// + + std::vector& getScanProtocolConfigs(); + bool scanProtocolConfigsIsSet() const; + void unsetscanProtocolConfigs(); + void setScanProtocolConfigs(const std::vector& value); + + +protected: + std::string objectId_; + bool objectIdIsSet_; + std::vector scanProtocolConfigs_; + bool scanProtocolConfigsIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_AntiVirusRuleDto_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/AntiVirusRuleVO.h b/cfw/include/huaweicloud/cfw/v1/model/AntiVirusRuleVO.h new file mode 100644 index 00000000..a2264451 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/AntiVirusRuleVO.h @@ -0,0 +1,99 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_AntiVirusRuleVO_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_AntiVirusRuleVO_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT AntiVirusRuleVO + : public ModelBase +{ +public: + AntiVirusRuleVO(); + virtual ~AntiVirusRuleVO(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// AntiVirusRuleVO members + + /// + /// + /// + + std::string getId() const; + bool idIsSet() const; + void unsetid(); + void setId(const std::string& value); + + /// + /// + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + /// + /// + /// + + std::vector& getScanProtocolConfigs(); + bool scanProtocolConfigsIsSet() const; + void unsetscanProtocolConfigs(); + void setScanProtocolConfigs(const std::vector& value); + + /// + /// + /// + + int32_t getTotal() const; + bool totalIsSet() const; + void unsettotal(); + void setTotal(int32_t value); + + +protected: + std::string id_; + bool idIsSet_; + std::string name_; + bool nameIsSet_; + std::vector scanProtocolConfigs_; + bool scanProtocolConfigsIsSet_; + int32_t total_; + bool totalIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_AntiVirusRuleVO_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/AntiVirusSwitchDto.h b/cfw/include/huaweicloud/cfw/v1/model/AntiVirusSwitchDto.h new file mode 100644 index 00000000..539124c1 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/AntiVirusSwitchDto.h @@ -0,0 +1,75 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_AntiVirusSwitchDto_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_AntiVirusSwitchDto_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT AntiVirusSwitchDto + : public ModelBase +{ +public: + AntiVirusSwitchDto(); + virtual ~AntiVirusSwitchDto(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// AntiVirusSwitchDto members + + /// + /// 反病毒开关状态 + /// + + int32_t getAntiVirusStatus() const; + bool antiVirusStatusIsSet() const; + void unsetantiVirusStatus(); + void setAntiVirusStatus(int32_t value); + + /// + /// 防护对象ID + /// + + std::string getObjectId() const; + bool objectIdIsSet() const; + void unsetobjectId(); + void setObjectId(const std::string& value); + + +protected: + int32_t antiVirusStatus_; + bool antiVirusStatusIsSet_; + std::string objectId_; + bool objectIdIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_AntiVirusSwitchDto_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/AntiVirusVO.h b/cfw/include/huaweicloud/cfw/v1/model/AntiVirusVO.h new file mode 100644 index 00000000..7c9739bb --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/AntiVirusVO.h @@ -0,0 +1,86 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_AntiVirusVO_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_AntiVirusVO_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT AntiVirusVO + : public ModelBase +{ +public: + AntiVirusVO(); + virtual ~AntiVirusVO(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// AntiVirusVO members + + /// + /// 反病毒开关状态,0表示关闭,1表示开启 + /// + + int32_t getAntiVirusStatus() const; + bool antiVirusStatusIsSet() const; + void unsetantiVirusStatus(); + void setAntiVirusStatus(int32_t value); + + /// + /// 防护对象id + /// + + std::string getId() const; + bool idIsSet() const; + void unsetid(); + void setId(const std::string& value); + + /// + /// + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + +protected: + int32_t antiVirusStatus_; + bool antiVirusStatusIsSet_; + std::string id_; + bool idIsSet_; + std::string name_; + bool nameIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_AntiVirusVO_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/BatchDeleteDomainSetRequest.h b/cfw/include/huaweicloud/cfw/v1/model/BatchDeleteDomainSetRequest.h new file mode 100644 index 00000000..1c8d61a0 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/BatchDeleteDomainSetRequest.h @@ -0,0 +1,94 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_BatchDeleteDomainSetRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_BatchDeleteDomainSetRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT BatchDeleteDomainSetRequest + : public ModelBase +{ +public: + BatchDeleteDomainSetRequest(); + virtual ~BatchDeleteDomainSetRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// BatchDeleteDomainSetRequest members + + /// + /// 防火墙ID,可通过[防火墙ID获取方式](cfw_02_0028.xml)获取 + /// + + std::string getFwInstanceId() const; + bool fwInstanceIdIsSet() const; + void unsetfwInstanceId(); + void setFwInstanceId(const std::string& value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + /// + /// + /// + + BatchDeleteDomainSetsDto getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const BatchDeleteDomainSetsDto& value); + + +protected: + std::string fwInstanceId_; + bool fwInstanceIdIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + BatchDeleteDomainSetsDto body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + BatchDeleteDomainSetRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_BatchDeleteDomainSetRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/BatchDeleteDomainSetResponse.h b/cfw/include/huaweicloud/cfw/v1/model/BatchDeleteDomainSetResponse.h new file mode 100644 index 00000000..7cdc2ea9 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/BatchDeleteDomainSetResponse.h @@ -0,0 +1,69 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_BatchDeleteDomainSetResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_BatchDeleteDomainSetResponse_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT BatchDeleteDomainSetResponse + : public ModelBase, public HttpResponse +{ +public: + BatchDeleteDomainSetResponse(); + virtual ~BatchDeleteDomainSetResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// BatchDeleteDomainSetResponse members + + /// + /// + /// + + std::map>& getData(); + bool dataIsSet() const; + void unsetdata(); + void setData(const std::map>& value); + + +protected: + std::map> data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_BatchDeleteDomainSetResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/BatchDeleteDomainSetsDto.h b/cfw/include/huaweicloud/cfw/v1/model/BatchDeleteDomainSetsDto.h new file mode 100644 index 00000000..3d60f3e0 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/BatchDeleteDomainSetsDto.h @@ -0,0 +1,76 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_BatchDeleteDomainSetsDto_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_BatchDeleteDomainSetsDto_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT BatchDeleteDomainSetsDto + : public ModelBase +{ +public: + BatchDeleteDomainSetsDto(); + virtual ~BatchDeleteDomainSetsDto(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// BatchDeleteDomainSetsDto members + + /// + /// 防护对象id + /// + + std::string getObjectId() const; + bool objectIdIsSet() const; + void unsetobjectId(); + void setObjectId(const std::string& value); + + /// + /// 域名组id + /// + + std::vector& getSetIds(); + bool setIdsIsSet() const; + void unsetsetIds(); + void setSetIds(const std::vector& value); + + +protected: + std::string objectId_; + bool objectIdIsSet_; + std::vector setIds_; + bool setIdsIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_BatchDeleteDomainSetsDto_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ChangeIpsRuleModeRequest.h b/cfw/include/huaweicloud/cfw/v1/model/ChangeIpsRuleModeRequest.h new file mode 100644 index 00000000..a673603b --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ChangeIpsRuleModeRequest.h @@ -0,0 +1,83 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ChangeIpsRuleModeRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ChangeIpsRuleModeRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ChangeIpsRuleModeRequest + : public ModelBase +{ +public: + ChangeIpsRuleModeRequest(); + virtual ~ChangeIpsRuleModeRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ChangeIpsRuleModeRequest members + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + /// + /// + /// + + IpsRuleChangeDto getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const IpsRuleChangeDto& value); + + +protected: + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + IpsRuleChangeDto body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ChangeIpsRuleModeRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ChangeIpsRuleModeRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ChangeIpsRuleModeResponse.h b/cfw/include/huaweicloud/cfw/v1/model/ChangeIpsRuleModeResponse.h new file mode 100644 index 00000000..e149e067 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ChangeIpsRuleModeResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ChangeIpsRuleModeResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ChangeIpsRuleModeResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ChangeIpsRuleModeResponse + : public ModelBase, public HttpResponse +{ +public: + ChangeIpsRuleModeResponse(); + virtual ~ChangeIpsRuleModeResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ChangeIpsRuleModeResponse members + + /// + /// + /// + + IpsRuleChangeRespBody getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const IpsRuleChangeRespBody& value); + + +protected: + IpsRuleChangeRespBody data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ChangeIpsRuleModeResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/CustomerIpsListVO.h b/cfw/include/huaweicloud/cfw/v1/model/CustomerIpsListVO.h new file mode 100644 index 00000000..ea4e22a6 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/CustomerIpsListVO.h @@ -0,0 +1,229 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_CustomerIpsListVO_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_CustomerIpsListVO_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT CustomerIpsListVO + : public ModelBase +{ +public: + CustomerIpsListVO(); + virtual ~CustomerIpsListVO(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CustomerIpsListVO members + + /// + /// 动作(0:只记录日志,1:重置/拦截) + /// + + int32_t getAction() const; + bool actionIsSet() const; + void unsetaction(); + void setAction(int32_t value); + + /// + /// 操作系统 + /// + + int32_t getAffectedOs() const; + bool affectedOsIsSet() const; + void unsetaffectedOs(); + void setAffectedOs(int32_t value); + + /// + /// 攻击类型 + /// + + int32_t getAttackType() const; + bool attackTypeIsSet() const; + void unsetattackType(); + void setAttackType(int32_t value); + + /// + /// 规则状态(0:初始化,1:配置中,2:配置成功,3:配置失败) + /// + + int32_t getConfigStatus() const; + bool configStatusIsSet() const; + void unsetconfigStatus(); + void setConfigStatus(int32_t value); + + /// + /// 内容json存储 + /// + + std::string getContent() const; + bool contentIsSet() const; + void unsetcontent(); + void setContent(const std::string& value); + + /// + /// 目的端口类型 + /// + + int32_t getDstPortType() const; + bool dstPortTypeIsSet() const; + void unsetdstPortType(); + void setDstPortType(int32_t value); + + /// + /// 目的端口 + /// + + std::string getDstPorts() const; + bool dstPortsIsSet() const; + void unsetdstPorts(); + void setDstPorts(const std::string& value); + + /// + /// 防火墙集群id + /// + + std::string getGroupId() const; + bool groupIdIsSet() const; + void unsetgroupId(); + void setGroupId(const std::string& value); + + /// + /// cfw侧自定义ips规则id + /// + + std::string getIpsCfwId() const; + bool ipsCfwIdIsSet() const; + void unsetipsCfwId(); + void setIpsCfwId(const std::string& value); + + /// + /// 山石侧规则id + /// + + std::string getIpsId() const; + bool ipsIdIsSet() const; + void unsetipsId(); + void setIpsId(const std::string& value); + + /// + /// ips规则名称 + /// + + std::string getIpsName() const; + bool ipsNameIsSet() const; + void unsetipsName(); + void setIpsName(const std::string& value); + + /// + /// 协议 + /// + + int32_t getProtocol() const; + bool protocolIsSet() const; + void unsetprotocol(); + void setProtocol(int32_t value); + + /// + /// 严重程度(critical:致命,high:高危,medium:中危,low:低危) + /// + + int32_t getSeverity() const; + bool severityIsSet() const; + void unsetseverity(); + void setSeverity(int32_t value); + + /// + /// 影响软件 + /// + + int32_t getSoftware() const; + bool softwareIsSet() const; + void unsetsoftware(); + void setSoftware(int32_t value); + + /// + /// 源端口类型 + /// + + int32_t getSrcPortType() const; + bool srcPortTypeIsSet() const; + void unsetsrcPortType(); + void setSrcPortType(int32_t value); + + /// + /// 源端口 + /// + + std::string getSrcPorts() const; + bool srcPortsIsSet() const; + void unsetsrcPorts(); + void setSrcPorts(const std::string& value); + + +protected: + int32_t action_; + bool actionIsSet_; + int32_t affectedOs_; + bool affectedOsIsSet_; + int32_t attackType_; + bool attackTypeIsSet_; + int32_t configStatus_; + bool configStatusIsSet_; + std::string content_; + bool contentIsSet_; + int32_t dstPortType_; + bool dstPortTypeIsSet_; + std::string dstPorts_; + bool dstPortsIsSet_; + std::string groupId_; + bool groupIdIsSet_; + std::string ipsCfwId_; + bool ipsCfwIdIsSet_; + std::string ipsId_; + bool ipsIdIsSet_; + std::string ipsName_; + bool ipsNameIsSet_; + int32_t protocol_; + bool protocolIsSet_; + int32_t severity_; + bool severityIsSet_; + int32_t software_; + bool softwareIsSet_; + int32_t srcPortType_; + bool srcPortTypeIsSet_; + std::string srcPorts_; + bool srcPortsIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_CustomerIpsListVO_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/FirewallStatusVO.h b/cfw/include/huaweicloud/cfw/v1/model/FirewallStatusVO.h new file mode 100644 index 00000000..6c99da12 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/FirewallStatusVO.h @@ -0,0 +1,130 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_FirewallStatusVO_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_FirewallStatusVO_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT FirewallStatusVO + : public ModelBase +{ +public: + FirewallStatusVO(); + virtual ~FirewallStatusVO(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// FirewallStatusVO members + + /// + /// 可防护eip数量 + /// + + int32_t getAvailableEipCount() const; + bool availableEipCountIsSet() const; + void unsetavailableEipCount(); + void setAvailableEipCount(int32_t value); + + /// + /// 是否超出eip数量限制 + /// + + bool isBeyondMaxCount() const; + bool beyondMaxCountIsSet() const; + void unsetbeyondMaxCount(); + void setBeyondMaxCount(bool value); + + /// + /// 已防护eip数量 + /// + + int32_t getEipProtectedSelf() const; + bool eipProtectedSelfIsSet() const; + void unseteipProtectedSelf(); + void setEipProtectedSelf(int32_t value); + + /// + /// eip总数 + /// + + int32_t getEipTotal() const; + bool eipTotalIsSet() const; + void unseteipTotal(); + void setEipTotal(int32_t value); + + /// + /// 未防护eip数量 + /// + + int32_t getEipUnProtected() const; + bool eipUnProtectedIsSet() const; + void unseteipUnProtected(); + void setEipUnProtected(int32_t value); + + /// + /// 防护对象id + /// + + std::string getObjectId() const; + bool objectIdIsSet() const; + void unsetobjectId(); + void setObjectId(const std::string& value); + + /// + /// 是否开启新增eip自动防护,1;是,0:否 + /// + + int32_t getStatus() const; + bool statusIsSet() const; + void unsetstatus(); + void setStatus(int32_t value); + + +protected: + int32_t availableEipCount_; + bool availableEipCountIsSet_; + bool beyondMaxCount_; + bool beyondMaxCountIsSet_; + int32_t eipProtectedSelf_; + bool eipProtectedSelfIsSet_; + int32_t eipTotal_; + bool eipTotalIsSet_; + int32_t eipUnProtected_; + bool eipUnProtectedIsSet_; + std::string objectId_; + bool objectIdIsSet_; + int32_t status_; + bool statusIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_FirewallStatusVO_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/IpsRuleChangeDto.h b/cfw/include/huaweicloud/cfw/v1/model/IpsRuleChangeDto.h new file mode 100644 index 00000000..eb18c4bd --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/IpsRuleChangeDto.h @@ -0,0 +1,87 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_IpsRuleChangeDto_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_IpsRuleChangeDto_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT IpsRuleChangeDto + : public ModelBase +{ +public: + IpsRuleChangeDto(); + virtual ~IpsRuleChangeDto(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// IpsRuleChangeDto members + + /// + /// ips的id列表 + /// + + std::vector& getIpsIds(); + bool ipsIdsIsSet() const; + void unsetipsIds(); + void setIpsIds(const std::vector& value); + + /// + /// 防护对象id + /// + + std::string getObjectId() const; + bool objectIdIsSet() const; + void unsetobjectId(); + void setObjectId(const std::string& value); + + /// + /// ips规则状态 + /// + + std::string getStatus() const; + bool statusIsSet() const; + void unsetstatus(); + void setStatus(const std::string& value); + + +protected: + std::vector ipsIds_; + bool ipsIdsIsSet_; + std::string objectId_; + bool objectIdIsSet_; + std::string status_; + bool statusIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_IpsRuleChangeDto_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/IpsRuleChangeRespBody.h b/cfw/include/huaweicloud/cfw/v1/model/IpsRuleChangeRespBody.h new file mode 100644 index 00000000..7d6d30aa --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/IpsRuleChangeRespBody.h @@ -0,0 +1,120 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_IpsRuleChangeRespBody_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_IpsRuleChangeRespBody_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT IpsRuleChangeRespBody + : public ModelBase +{ +public: + IpsRuleChangeRespBody(); + virtual ~IpsRuleChangeRespBody(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// IpsRuleChangeRespBody members + + /// + /// 错误代码 + /// + + std::string getErrorCode() const; + bool errorCodeIsSet() const; + void unseterrorCode(); + void setErrorCode(const std::string& value); + + /// + /// 错误信息 + /// + + std::string getErrorMsg() const; + bool errorMsgIsSet() const; + void unseterrorMsg(); + void setErrorMsg(const std::string& value); + + /// + /// 分组id + /// + + std::string getGroupId() const; + bool groupIdIsSet() const; + void unsetgroupId(); + void setGroupId(const std::string& value); + + /// + /// 防火墙id + /// + + std::string getId() const; + bool idIsSet() const; + void unsetid(); + void setId(const std::string& value); + + /// + /// ips的id列表 + /// + + std::vector& getIpsIds(); + bool ipsIdsIsSet() const; + void unsetipsIds(); + void setIpsIds(const std::vector& value); + + /// + /// 修改结果 + /// + + bool isResult() const; + bool resultIsSet() const; + void unsetresult(); + void setResult(bool value); + + +protected: + std::string errorCode_; + bool errorCodeIsSet_; + std::string errorMsg_; + bool errorMsgIsSet_; + std::string groupId_; + bool groupIdIsSet_; + std::string id_; + bool idIsSet_; + std::vector ipsIds_; + bool ipsIdsIsSet_; + bool result_; + bool resultIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_IpsRuleChangeRespBody_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/IpsRuleListVO.h b/cfw/include/huaweicloud/cfw/v1/model/IpsRuleListVO.h new file mode 100644 index 00000000..abb4d5c7 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/IpsRuleListVO.h @@ -0,0 +1,121 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_IpsRuleListVO_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_IpsRuleListVO_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT IpsRuleListVO + : public ModelBase +{ +public: + IpsRuleListVO(); + virtual ~IpsRuleListVO(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// IpsRuleListVO members + + /// + /// + /// + + std::string getFwInstanceId() const; + bool fwInstanceIdIsSet() const; + void unsetfwInstanceId(); + void setFwInstanceId(const std::string& value); + + /// + /// + /// + + int32_t getLimit() const; + bool limitIsSet() const; + void unsetlimit(); + void setLimit(int32_t value); + + /// + /// + /// + + std::string getObjectId() const; + bool objectIdIsSet() const; + void unsetobjectId(); + void setObjectId(const std::string& value); + + /// + /// + /// + + int32_t getOffset() const; + bool offsetIsSet() const; + void unsetoffset(); + void setOffset(int32_t value); + + /// + /// + /// + + std::vector& getRecords(); + bool recordsIsSet() const; + void unsetrecords(); + void setRecords(const std::vector& value); + + /// + /// + /// + + int32_t getTotal() const; + bool totalIsSet() const; + void unsettotal(); + void setTotal(int32_t value); + + +protected: + std::string fwInstanceId_; + bool fwInstanceIdIsSet_; + int32_t limit_; + bool limitIsSet_; + std::string objectId_; + bool objectIdIsSet_; + int32_t offset_; + bool offsetIsSet_; + std::vector records_; + bool recordsIsSet_; + int32_t total_; + bool totalIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_IpsRuleListVO_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/IpsRuleUpdateTimeVO.h b/cfw/include/huaweicloud/cfw/v1/model/IpsRuleUpdateTimeVO.h new file mode 100644 index 00000000..920e2557 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/IpsRuleUpdateTimeVO.h @@ -0,0 +1,86 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_IpsRuleUpdateTimeVO_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_IpsRuleUpdateTimeVO_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT IpsRuleUpdateTimeVO + : public ModelBase +{ +public: + IpsRuleUpdateTimeVO(); + virtual ~IpsRuleUpdateTimeVO(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// IpsRuleUpdateTimeVO members + + /// + /// + /// + + int32_t getIpsType() const; + bool ipsTypeIsSet() const; + void unsetipsType(); + void setIpsType(int32_t value); + + /// + /// + /// + + std::string getIpsVersion() const; + bool ipsVersionIsSet() const; + void unsetipsVersion(); + void setIpsVersion(const std::string& value); + + /// + /// + /// + + int64_t getUpdateTime() const; + bool updateTimeIsSet() const; + void unsetupdateTime(); + void setUpdateTime(int64_t value); + + +protected: + int32_t ipsType_; + bool ipsTypeIsSet_; + std::string ipsVersion_; + bool ipsVersionIsSet_; + int64_t updateTime_; + bool updateTimeIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_IpsRuleUpdateTimeVO_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/IpsRuleVO.h b/cfw/include/huaweicloud/cfw/v1/model/IpsRuleVO.h new file mode 100644 index 00000000..d0dc2571 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/IpsRuleVO.h @@ -0,0 +1,163 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_IpsRuleVO_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_IpsRuleVO_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT IpsRuleVO + : public ModelBase +{ +public: + IpsRuleVO(); + virtual ~IpsRuleVO(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// IpsRuleVO members + + /// + /// + /// + + std::string getAffectedApplication() const; + bool affectedApplicationIsSet() const; + void unsetaffectedApplication(); + void setAffectedApplication(const std::string& value); + + /// + /// + /// + + std::string getCreateTime() const; + bool createTimeIsSet() const; + void unsetcreateTime(); + void setCreateTime(const std::string& value); + + /// + /// + /// + + std::string getDefaultStatus() const; + bool defaultStatusIsSet() const; + void unsetdefaultStatus(); + void setDefaultStatus(const std::string& value); + + /// + /// + /// + + std::string getIpsCve() const; + bool ipsCveIsSet() const; + void unsetipsCve(); + void setIpsCve(const std::string& value); + + /// + /// + /// + + std::string getIpsGroup() const; + bool ipsGroupIsSet() const; + void unsetipsGroup(); + void setIpsGroup(const std::string& value); + + /// + /// + /// + + std::string getIpsId() const; + bool ipsIdIsSet() const; + void unsetipsId(); + void setIpsId(const std::string& value); + + /// + /// + /// + + std::string getIpsLevel() const; + bool ipsLevelIsSet() const; + void unsetipsLevel(); + void setIpsLevel(const std::string& value); + + /// + /// + /// + + std::string getIpsName() const; + bool ipsNameIsSet() const; + void unsetipsName(); + void setIpsName(const std::string& value); + + /// + /// + /// + + std::string getIpsRulesType() const; + bool ipsRulesTypeIsSet() const; + void unsetipsRulesType(); + void setIpsRulesType(const std::string& value); + + /// + /// + /// + + std::string getIpsStatus() const; + bool ipsStatusIsSet() const; + void unsetipsStatus(); + void setIpsStatus(const std::string& value); + + +protected: + std::string affectedApplication_; + bool affectedApplicationIsSet_; + std::string createTime_; + bool createTimeIsSet_; + std::string defaultStatus_; + bool defaultStatusIsSet_; + std::string ipsCve_; + bool ipsCveIsSet_; + std::string ipsGroup_; + bool ipsGroupIsSet_; + std::string ipsId_; + bool ipsIdIsSet_; + std::string ipsLevel_; + bool ipsLevelIsSet_; + std::string ipsName_; + bool ipsNameIsSet_; + std::string ipsRulesType_; + bool ipsRulesTypeIsSet_; + std::string ipsStatus_; + bool ipsStatusIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_IpsRuleVO_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListAlarmWhitelistRequest.h b/cfw/include/huaweicloud/cfw/v1/model/ListAlarmWhitelistRequest.h new file mode 100644 index 00000000..d9936ff5 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListAlarmWhitelistRequest.h @@ -0,0 +1,115 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListAlarmWhitelistRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListAlarmWhitelistRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListAlarmWhitelistRequest + : public ModelBase +{ +public: + ListAlarmWhitelistRequest(); + virtual ~ListAlarmWhitelistRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListAlarmWhitelistRequest members + + /// + /// 防火墙ID,可通过[防火墙ID获取方式](cfw_02_0028.xml)获取 + /// + + std::string getFwInstanceId() const; + bool fwInstanceIdIsSet() const; + void unsetfwInstanceId(); + void setFwInstanceId(const std::string& value); + + /// + /// IP地址 + /// + + std::string getIpAddress() const; + bool ipAddressIsSet() const; + void unsetipAddress(); + void setIpAddress(const std::string& value); + + /// + /// 分页查询数据量限制 + /// + + int32_t getLimit() const; + bool limitIsSet() const; + void unsetlimit(); + void setLimit(int32_t value); + + /// + /// 查询偏移量 + /// + + int32_t getOffset() const; + bool offsetIsSet() const; + void unsetoffset(); + void setOffset(int32_t value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + std::string fwInstanceId_; + bool fwInstanceIdIsSet_; + std::string ipAddress_; + bool ipAddressIsSet_; + int32_t limit_; + bool limitIsSet_; + int32_t offset_; + bool offsetIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListAlarmWhitelistRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListAlarmWhitelistRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListAlarmWhitelistResponse.h b/cfw/include/huaweicloud/cfw/v1/model/ListAlarmWhitelistResponse.h new file mode 100644 index 00000000..b79738ae --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListAlarmWhitelistResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListAlarmWhitelistResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListAlarmWhitelistResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListAlarmWhitelistResponse + : public ModelBase, public HttpResponse +{ +public: + ListAlarmWhitelistResponse(); + virtual ~ListAlarmWhitelistResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListAlarmWhitelistResponse members + + /// + /// + /// + + PageInfo getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const PageInfo& value); + + +protected: + PageInfo data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListAlarmWhitelistResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListCustomerIpsRequest.h b/cfw/include/huaweicloud/cfw/v1/model/ListCustomerIpsRequest.h new file mode 100644 index 00000000..5528caaa --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListCustomerIpsRequest.h @@ -0,0 +1,192 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListCustomerIpsRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListCustomerIpsRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListCustomerIpsRequest + : public ModelBase +{ +public: + ListCustomerIpsRequest(); + virtual ~ListCustomerIpsRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListCustomerIpsRequest members + + /// + /// 动作(0:只记录日志,1:重置/拦截) + /// + + int32_t getActionType() const; + bool actionTypeIsSet() const; + void unsetactionType(); + void setActionType(int32_t value); + + /// + /// 操作系统 + /// + + int32_t getAffectedOs() const; + bool affectedOsIsSet() const; + void unsetaffectedOs(); + void setAffectedOs(int32_t value); + + /// + /// 攻击类型 + /// + + int32_t getAttackType() const; + bool attackTypeIsSet() const; + void unsetattackType(); + void setAttackType(int32_t value); + + /// + /// 防火墙ID,可通过[防火墙ID获取方式](cfw_02_0028.xml)获取 + /// + + std::string getFwInstanceId() const; + bool fwInstanceIdIsSet() const; + void unsetfwInstanceId(); + void setFwInstanceId(const std::string& value); + + /// + /// ips规则名称 + /// + + std::string getIpsName() const; + bool ipsNameIsSet() const; + void unsetipsName(); + void setIpsName(const std::string& value); + + /// + /// 分页查询数据量限制 + /// + + int32_t getLimit() const; + bool limitIsSet() const; + void unsetlimit(); + void setLimit(int32_t value); + + /// + /// 防护对象ID,是创建云防火墙后用于区分互联网边界防护和VPC边界防护的标志id,可通过调用[查询防火墙实例接口](ListFirewallDetail.xml)获得,通过返回值中的data.records.protect_objects.object_id(.表示各对象之间层级的区分)获得,注意type为0的为互联网边界防护对象id,type为1的为VPC边界防护对象id。此处仅取type为1的防护对象id,可通过data.records.protect_objects.type(.表示各对象之间层级的区分)获得。 + /// + + std::string getObjectId() const; + bool objectIdIsSet() const; + void unsetobjectId(); + void setObjectId(const std::string& value); + + /// + /// 查询偏移量 + /// + + int32_t getOffset() const; + bool offsetIsSet() const; + void unsetoffset(); + void setOffset(int32_t value); + + /// + /// 协议 + /// + + int32_t getProtocol() const; + bool protocolIsSet() const; + void unsetprotocol(); + void setProtocol(int32_t value); + + /// + /// 严重程度(critical:致命,high:高危,medium:中危,low:低危) + /// + + int32_t getSeverity() const; + bool severityIsSet() const; + void unsetseverity(); + void setSeverity(int32_t value); + + /// + /// 影响软件 + /// + + int32_t getSoftware() const; + bool softwareIsSet() const; + void unsetsoftware(); + void setSoftware(int32_t value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + int32_t actionType_; + bool actionTypeIsSet_; + int32_t affectedOs_; + bool affectedOsIsSet_; + int32_t attackType_; + bool attackTypeIsSet_; + std::string fwInstanceId_; + bool fwInstanceIdIsSet_; + std::string ipsName_; + bool ipsNameIsSet_; + int32_t limit_; + bool limitIsSet_; + std::string objectId_; + bool objectIdIsSet_; + int32_t offset_; + bool offsetIsSet_; + int32_t protocol_; + bool protocolIsSet_; + int32_t severity_; + bool severityIsSet_; + int32_t software_; + bool softwareIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListCustomerIpsRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListCustomerIpsRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListCustomerIpsResponse.h b/cfw/include/huaweicloud/cfw/v1/model/ListCustomerIpsResponse.h new file mode 100644 index 00000000..913d6b46 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListCustomerIpsResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListCustomerIpsResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListCustomerIpsResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListCustomerIpsResponse + : public ModelBase, public HttpResponse +{ +public: + ListCustomerIpsResponse(); + virtual ~ListCustomerIpsResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListCustomerIpsResponse members + + /// + /// + /// + + PageInfoCustomerIpsListVO getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const PageInfoCustomerIpsListVO& value); + + +protected: + PageInfoCustomerIpsListVO data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListCustomerIpsResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListDomainParseIpRequest.h b/cfw/include/huaweicloud/cfw/v1/model/ListDomainParseIpRequest.h new file mode 100644 index 00000000..9619685d --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListDomainParseIpRequest.h @@ -0,0 +1,115 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListDomainParseIpRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListDomainParseIpRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListDomainParseIpRequest + : public ModelBase +{ +public: + ListDomainParseIpRequest(); + virtual ~ListDomainParseIpRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListDomainParseIpRequest members + + /// + /// 地址类型,0 ipv4,1 ipv6 + /// + + int32_t getAddressType() const; + bool addressTypeIsSet() const; + void unsetaddressType(); + void setAddressType(int32_t value); + + /// + /// 域名id,域名id可通过[获取域名组下域名列表接口](ListDomains.xml)查询获得,通过返回值中的data.records.domain_address_id(.表示各对象之间层级的区分)获取 + /// + + std::string getDomainAddressId() const; + bool domainAddressIdIsSet() const; + void unsetdomainAddressId(); + void setDomainAddressId(const std::string& value); + + /// + /// 域名组ID,可通过[查询域名组列表接口](ListDomainSets.xml)查询获得,通过返回值中的data.records.set_id(.表示各对象之间层级的区分)获取 + /// + + std::string getDomainSetId() const; + bool domainSetIdIsSet() const; + void unsetdomainSetId(); + void setDomainSetId(const std::string& value); + + /// + /// 防火墙ID,可通过[防火墙ID获取方式](cfw_02_0028.xml)获取 + /// + + std::string getFwInstanceId() const; + bool fwInstanceIdIsSet() const; + void unsetfwInstanceId(); + void setFwInstanceId(const std::string& value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + int32_t addressType_; + bool addressTypeIsSet_; + std::string domainAddressId_; + bool domainAddressIdIsSet_; + std::string domainSetId_; + bool domainSetIdIsSet_; + std::string fwInstanceId_; + bool fwInstanceIdIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListDomainParseIpRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListDomainParseIpRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListDomainParseIpResponse.h b/cfw/include/huaweicloud/cfw/v1/model/ListDomainParseIpResponse.h new file mode 100644 index 00000000..137757cc --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListDomainParseIpResponse.h @@ -0,0 +1,68 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListDomainParseIpResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListDomainParseIpResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListDomainParseIpResponse + : public ModelBase, public HttpResponse +{ +public: + ListDomainParseIpResponse(); + virtual ~ListDomainParseIpResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListDomainParseIpResponse members + + /// + /// 域名解析数据 + /// + + std::vector& getData(); + bool dataIsSet() const; + void unsetdata(); + void setData(const std::vector& value); + + +protected: + std::vector data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListDomainParseIpResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListIpsRules1Request.h b/cfw/include/huaweicloud/cfw/v1/model/ListIpsRules1Request.h new file mode 100644 index 00000000..b35c59a6 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListIpsRules1Request.h @@ -0,0 +1,225 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListIpsRules1Request_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListIpsRules1Request_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListIpsRules1Request + : public ModelBase +{ +public: + ListIpsRules1Request(); + virtual ~ListIpsRules1Request(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListIpsRules1Request members + + /// + /// 攻击对象 + /// + + int32_t getAffectedApplicationLike() const; + bool affectedApplicationLikeIsSet() const; + void unsetaffectedApplicationLike(); + void setAffectedApplicationLike(int32_t value); + + /// + /// 创建时间 + /// + + int32_t getCreateTime() const; + bool createTimeIsSet() const; + void unsetcreateTime(); + void setCreateTime(int32_t value); + + /// + /// 防火墙ID,可通过[防火墙ID获取方式](cfw_02_0028.xml)获取 + /// + + std::string getFwInstanceId() const; + bool fwInstanceIdIsSet() const; + void unsetfwInstanceId(); + void setFwInstanceId(const std::string& value); + + /// + /// cve + /// + + int32_t getIpsCveLike() const; + bool ipsCveLikeIsSet() const; + void unsetipsCveLike(); + void setIpsCveLike(int32_t value); + + /// + /// ips组 + /// + + int32_t getIpsGroup() const; + bool ipsGroupIsSet() const; + void unsetipsGroup(); + void setIpsGroup(int32_t value); + + /// + /// ips规则id + /// + + std::string getIpsId() const; + bool ipsIdIsSet() const; + void unsetipsId(); + void setIpsId(const std::string& value); + + /// + /// ips等级 + /// + + int32_t getIpsLevel() const; + bool ipsLevelIsSet() const; + void unsetipsLevel(); + void setIpsLevel(int32_t value); + + /// + /// ips规则名称 + /// + + std::string getIpsNameLike() const; + bool ipsNameLikeIsSet() const; + void unsetipsNameLike(); + void setIpsNameLike(const std::string& value); + + /// + /// ips规则类型 + /// + + int32_t getIpsRulesTypeLike() const; + bool ipsRulesTypeLikeIsSet() const; + void unsetipsRulesTypeLike(); + void setIpsRulesTypeLike(int32_t value); + + /// + /// ips规则状态 + /// + + std::string getIpsStatus() const; + bool ipsStatusIsSet() const; + void unsetipsStatus(); + void setIpsStatus(const std::string& value); + + /// + /// 是否查新更新规则 + /// + + bool isIsUpdatedIpsRuleQueried() const; + bool isUpdatedIpsRuleQueriedIsSet() const; + void unsetisUpdatedIpsRuleQueried(); + void setIsUpdatedIpsRuleQueried(bool value); + + /// + /// 分页查询数据量限制 + /// + + int32_t getLimit() const; + bool limitIsSet() const; + void unsetlimit(); + void setLimit(int32_t value); + + /// + /// 防护对象ID,是创建云防火墙后用于区分互联网边界防护和VPC边界防护的标志id,可通过调用[查询防火墙实例接口](ListFirewallDetail.xml)获得,通过返回值中的data.records.protect_objects.object_id(.表示各对象之间层级的区分)获得,注意type为0的为互联网边界防护对象id,type为1的为VPC边界防护对象id。此处仅取type为1的防护对象id,可通过data.records.protect_objects.type(.表示各对象之间层级的区分)获得。 + /// + + std::string getObjectId() const; + bool objectIdIsSet() const; + void unsetobjectId(); + void setObjectId(const std::string& value); + + /// + /// 查询偏移量 + /// + + int32_t getOffset() const; + bool offsetIsSet() const; + void unsetoffset(); + void setOffset(int32_t value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + int32_t affectedApplicationLike_; + bool affectedApplicationLikeIsSet_; + int32_t createTime_; + bool createTimeIsSet_; + std::string fwInstanceId_; + bool fwInstanceIdIsSet_; + int32_t ipsCveLike_; + bool ipsCveLikeIsSet_; + int32_t ipsGroup_; + bool ipsGroupIsSet_; + std::string ipsId_; + bool ipsIdIsSet_; + int32_t ipsLevel_; + bool ipsLevelIsSet_; + std::string ipsNameLike_; + bool ipsNameLikeIsSet_; + int32_t ipsRulesTypeLike_; + bool ipsRulesTypeLikeIsSet_; + std::string ipsStatus_; + bool ipsStatusIsSet_; + bool isUpdatedIpsRuleQueried_; + bool isUpdatedIpsRuleQueriedIsSet_; + int32_t limit_; + bool limitIsSet_; + std::string objectId_; + bool objectIdIsSet_; + int32_t offset_; + bool offsetIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListIpsRules1Request& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListIpsRules1Request_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListIpsRules1Response.h b/cfw/include/huaweicloud/cfw/v1/model/ListIpsRules1Response.h new file mode 100644 index 00000000..cff40891 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListIpsRules1Response.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListIpsRules1Response_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListIpsRules1Response_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListIpsRules1Response + : public ModelBase, public HttpResponse +{ +public: + ListIpsRules1Response(); + virtual ~ListIpsRules1Response(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListIpsRules1Response members + + /// + /// + /// + + IpsRuleListVO getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const IpsRuleListVO& value); + + +protected: + IpsRuleListVO data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListIpsRules1Response_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListIpsRulesRequest.h b/cfw/include/huaweicloud/cfw/v1/model/ListIpsRulesRequest.h new file mode 100644 index 00000000..5a1f6f0e --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListIpsRulesRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListIpsRulesRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListIpsRulesRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListIpsRulesRequest + : public ModelBase +{ +public: + ListIpsRulesRequest(); + virtual ~ListIpsRulesRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListIpsRulesRequest members + + /// + /// 防护对象ID,是创建云防火墙后用于区分互联网边界防护和VPC边界防护的标志id,可通过调用[查询防火墙实例接口](ListFirewallDetail.xml)获得,通过返回值中的data.records.protect_objects.object_id(.表示各对象之间层级的区分)获得,注意type为0的为互联网边界防护对象id,type为1的为VPC边界防护对象id。此处仅取type为1的防护对象id,可通过data.records.protect_objects.type(.表示各对象之间层级的区分)获得。 + /// + + std::string getObjectId() const; + bool objectIdIsSet() const; + void unsetobjectId(); + void setObjectId(const std::string& value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + std::string objectId_; + bool objectIdIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListIpsRulesRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListIpsRulesRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListIpsRulesResponse.h b/cfw/include/huaweicloud/cfw/v1/model/ListIpsRulesResponse.h new file mode 100644 index 00000000..21686f11 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListIpsRulesResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListIpsRulesResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListIpsRulesResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListIpsRulesResponse + : public ModelBase, public HttpResponse +{ +public: + ListIpsRulesResponse(); + virtual ~ListIpsRulesResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListIpsRulesResponse members + + /// + /// + /// + + AdvancedIpsRuleListVo getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const AdvancedIpsRuleListVo& value); + + +protected: + AdvancedIpsRuleListVo data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListIpsRulesResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListProjectTagsRequest.h b/cfw/include/huaweicloud/cfw/v1/model/ListProjectTagsRequest.h new file mode 100644 index 00000000..4dddc4de --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListProjectTagsRequest.h @@ -0,0 +1,93 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListProjectTagsRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListProjectTagsRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListProjectTagsRequest + : public ModelBase +{ +public: + ListProjectTagsRequest(); + virtual ~ListProjectTagsRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListProjectTagsRequest members + + /// + /// 分页查询数据限制 + /// + + int32_t getLimit() const; + bool limitIsSet() const; + void unsetlimit(); + void setLimit(int32_t value); + + /// + /// 查询偏移量 + /// + + int32_t getOffset() const; + bool offsetIsSet() const; + void unsetoffset(); + void setOffset(int32_t value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + int32_t limit_; + bool limitIsSet_; + int32_t offset_; + bool offsetIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListProjectTagsRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListProjectTagsRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListProjectTagsResponse.h b/cfw/include/huaweicloud/cfw/v1/model/ListProjectTagsResponse.h new file mode 100644 index 00000000..5037b34d --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListProjectTagsResponse.h @@ -0,0 +1,68 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListProjectTagsResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListProjectTagsResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListProjectTagsResponse + : public ModelBase, public HttpResponse +{ +public: + ListProjectTagsResponse(); + virtual ~ListProjectTagsResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListProjectTagsResponse members + + /// + /// tag列表 + /// + + std::vector& getTags(); + bool tagsIsSet() const; + void unsettags(); + void setTags(const std::vector& value); + + +protected: + std::vector tags_; + bool tagsIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListProjectTagsResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListRegionsRequest.h b/cfw/include/huaweicloud/cfw/v1/model/ListRegionsRequest.h new file mode 100644 index 00000000..d241308e --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListRegionsRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListRegionsRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListRegionsRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListRegionsRequest + : public ModelBase +{ +public: + ListRegionsRequest(); + virtual ~ListRegionsRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListRegionsRequest members + + /// + /// 防火墙ID,可通过[防火墙ID获取方式](cfw_02_0028.xml)获取 + /// + + std::string getFwInstanceId() const; + bool fwInstanceIdIsSet() const; + void unsetfwInstanceId(); + void setFwInstanceId(const std::string& value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + std::string fwInstanceId_; + bool fwInstanceIdIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListRegionsRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListRegionsRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListRegionsResponse.h b/cfw/include/huaweicloud/cfw/v1/model/ListRegionsResponse.h new file mode 100644 index 00000000..d0032ff0 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListRegionsResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListRegionsResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListRegionsResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListRegionsResponse + : public ModelBase, public HttpResponse +{ +public: + ListRegionsResponse(); + virtual ~ListRegionsResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListRegionsResponse members + + /// + /// region列表 + /// + + Object getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const Object& value); + + +protected: + Object data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListRegionsResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListResourceTagsRequest.h b/cfw/include/huaweicloud/cfw/v1/model/ListResourceTagsRequest.h new file mode 100644 index 00000000..6a4864d9 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListResourceTagsRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListResourceTagsRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListResourceTagsRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListResourceTagsRequest + : public ModelBase +{ +public: + ListResourceTagsRequest(); + virtual ~ListResourceTagsRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListResourceTagsRequest members + + /// + /// 防火墙ID,可通过[防火墙ID获取方式](cfw_02_0028.xml)获取 + /// + + std::string getFwInstanceId() const; + bool fwInstanceIdIsSet() const; + void unsetfwInstanceId(); + void setFwInstanceId(const std::string& value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + std::string fwInstanceId_; + bool fwInstanceIdIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListResourceTagsRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListResourceTagsRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ListResourceTagsResponse.h b/cfw/include/huaweicloud/cfw/v1/model/ListResourceTagsResponse.h new file mode 100644 index 00000000..022bf6b3 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ListResourceTagsResponse.h @@ -0,0 +1,91 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ListResourceTagsResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ListResourceTagsResponse_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ListResourceTagsResponse + : public ModelBase, public HttpResponse +{ +public: + ListResourceTagsResponse(); + virtual ~ListResourceTagsResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListResourceTagsResponse members + + /// + /// + /// + + std::string getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const std::string& value); + + /// + /// + /// + + std::vector& getSysTags(); + bool sysTagsIsSet() const; + void unsetsysTags(); + void setSysTags(const std::vector& value); + + /// + /// + /// + + std::vector& getTags(); + bool tagsIsSet() const; + void unsettags(); + void setTags(const std::vector& value); + + +protected: + std::string data_; + bool dataIsSet_; + std::vector sysTags_; + bool sysTagsIsSet_; + std::vector tags_; + bool tagsIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ListResourceTagsResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/Mapstringstring.h b/cfw/include/huaweicloud/cfw/v1/model/Mapstringstring.h new file mode 100644 index 00000000..7aa0384a --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/Mapstringstring.h @@ -0,0 +1,52 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_Mapstringstring_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_Mapstringstring_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT Mapstringstring + : public ModelBase +{ +public: + Mapstringstring(); + virtual ~Mapstringstring(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// Mapstringstring members + + +protected: + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_Mapstringstring_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/PageInfo.h b/cfw/include/huaweicloud/cfw/v1/model/PageInfo.h new file mode 100644 index 00000000..e7c55956 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/PageInfo.h @@ -0,0 +1,252 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_PageInfo_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_PageInfo_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT PageInfo + : public ModelBase +{ +public: + PageInfo(); + virtual ~PageInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// PageInfo members + + /// + /// + /// + + int64_t getEndRow() const; + bool endRowIsSet() const; + void unsetendRow(); + void setEndRow(int64_t value); + + /// + /// + /// + + bool isHasNextPage() const; + bool hasNextPageIsSet() const; + void unsethasNextPage(); + void setHasNextPage(bool value); + + /// + /// + /// + + bool isHasPreviousPage() const; + bool hasPreviousPageIsSet() const; + void unsethasPreviousPage(); + void setHasPreviousPage(bool value); + + /// + /// + /// + + bool isIsFirstPage() const; + bool isFirstPageIsSet() const; + void unsetisFirstPage(); + void setIsFirstPage(bool value); + + /// + /// + /// + + bool isIsLastPage() const; + bool isLastPageIsSet() const; + void unsetisLastPage(); + void setIsLastPage(bool value); + + /// + /// + /// + + std::vector& getList(); + bool listIsSet() const; + void unsetlist(); + void setList(const std::vector& value); + + /// + /// + /// + + int32_t getNavigateFirstPage() const; + bool navigateFirstPageIsSet() const; + void unsetnavigateFirstPage(); + void setNavigateFirstPage(int32_t value); + + /// + /// + /// + + int32_t getNavigateLastPage() const; + bool navigateLastPageIsSet() const; + void unsetnavigateLastPage(); + void setNavigateLastPage(int32_t value); + + /// + /// + /// + + int32_t getNavigatePages() const; + bool navigatePagesIsSet() const; + void unsetnavigatePages(); + void setNavigatePages(int32_t value); + + /// + /// + /// + + std::vector& getNavigatepageNums(); + bool navigatepageNumsIsSet() const; + void unsetnavigatepageNums(); + void setNavigatepageNums(std::vector value); + + /// + /// + /// + + int32_t getNextPage() const; + bool nextPageIsSet() const; + void unsetnextPage(); + void setNextPage(int32_t value); + + /// + /// + /// + + int32_t getPageNum() const; + bool pageNumIsSet() const; + void unsetpageNum(); + void setPageNum(int32_t value); + + /// + /// + /// + + int32_t getPageSize() const; + bool pageSizeIsSet() const; + void unsetpageSize(); + void setPageSize(int32_t value); + + /// + /// + /// + + int32_t getPages() const; + bool pagesIsSet() const; + void unsetpages(); + void setPages(int32_t value); + + /// + /// + /// + + int32_t getPrePage() const; + bool prePageIsSet() const; + void unsetprePage(); + void setPrePage(int32_t value); + + /// + /// + /// + + int32_t getSize() const; + bool sizeIsSet() const; + void unsetsize(); + void setSize(int32_t value); + + /// + /// + /// + + int64_t getStartRow() const; + bool startRowIsSet() const; + void unsetstartRow(); + void setStartRow(int64_t value); + + /// + /// + /// + + int64_t getTotal() const; + bool totalIsSet() const; + void unsettotal(); + void setTotal(int64_t value); + + +protected: + int64_t endRow_; + bool endRowIsSet_; + bool hasNextPage_; + bool hasNextPageIsSet_; + bool hasPreviousPage_; + bool hasPreviousPageIsSet_; + bool isFirstPage_; + bool isFirstPageIsSet_; + bool isLastPage_; + bool isLastPageIsSet_; + std::vector list_; + bool listIsSet_; + int32_t navigateFirstPage_; + bool navigateFirstPageIsSet_; + int32_t navigateLastPage_; + bool navigateLastPageIsSet_; + int32_t navigatePages_; + bool navigatePagesIsSet_; + std::vector navigatepageNums_; + bool navigatepageNumsIsSet_; + int32_t nextPage_; + bool nextPageIsSet_; + int32_t pageNum_; + bool pageNumIsSet_; + int32_t pageSize_; + bool pageSizeIsSet_; + int32_t pages_; + bool pagesIsSet_; + int32_t prePage_; + bool prePageIsSet_; + int32_t size_; + bool sizeIsSet_; + int64_t startRow_; + bool startRowIsSet_; + int64_t total_; + bool totalIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_PageInfo_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/PageInfoCustomerIpsListVO.h b/cfw/include/huaweicloud/cfw/v1/model/PageInfoCustomerIpsListVO.h new file mode 100644 index 00000000..74bdbbc6 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/PageInfoCustomerIpsListVO.h @@ -0,0 +1,98 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_PageInfoCustomerIpsListVO_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_PageInfoCustomerIpsListVO_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT PageInfoCustomerIpsListVO + : public ModelBase +{ +public: + PageInfoCustomerIpsListVO(); + virtual ~PageInfoCustomerIpsListVO(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// PageInfoCustomerIpsListVO members + + /// + /// + /// + + int32_t getLimit() const; + bool limitIsSet() const; + void unsetlimit(); + void setLimit(int32_t value); + + /// + /// + /// + + int32_t getOffset() const; + bool offsetIsSet() const; + void unsetoffset(); + void setOffset(int32_t value); + + /// + /// + /// + + std::vector& getRecords(); + bool recordsIsSet() const; + void unsetrecords(); + void setRecords(const std::vector& value); + + /// + /// + /// + + int32_t getTotal() const; + bool totalIsSet() const; + void unsettotal(); + void setTotal(int32_t value); + + +protected: + int32_t limit_; + bool limitIsSet_; + int32_t offset_; + bool offsetIsSet_; + std::vector records_; + bool recordsIsSet_; + int32_t total_; + bool totalIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_PageInfoCustomerIpsListVO_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ResponseData.h b/cfw/include/huaweicloud/cfw/v1/model/ResponseData.h new file mode 100644 index 00000000..ea5a9e68 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ResponseData.h @@ -0,0 +1,64 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ResponseData_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ResponseData_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 通用返回体 +/// +class HUAWEICLOUD_CFW_V1_EXPORT ResponseData + : public ModelBase +{ +public: + ResponseData(); + virtual ~ResponseData(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ResponseData members + + /// + /// 数据id + /// + + std::string getId() const; + bool idIsSet() const; + void unsetid(); + void setId(const std::string& value); + + +protected: + std::string id_; + bool idIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ResponseData_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/SaveTagsRequest.h b/cfw/include/huaweicloud/cfw/v1/model/SaveTagsRequest.h new file mode 100644 index 00000000..24466912 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/SaveTagsRequest.h @@ -0,0 +1,94 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_SaveTagsRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_SaveTagsRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT SaveTagsRequest + : public ModelBase +{ +public: + SaveTagsRequest(); + virtual ~SaveTagsRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// SaveTagsRequest members + + /// + /// 防火墙ID,可通过[防火墙ID获取方式](cfw_02_0028.xml)获取 + /// + + std::string getFwInstanceId() const; + bool fwInstanceIdIsSet() const; + void unsetfwInstanceId(); + void setFwInstanceId(const std::string& value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + /// + /// + /// + + CreateTagsDto getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const CreateTagsDto& value); + + +protected: + std::string fwInstanceId_; + bool fwInstanceIdIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + CreateTagsDto body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + SaveTagsRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_SaveTagsRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/SaveTagsResponse.h b/cfw/include/huaweicloud/cfw/v1/model/SaveTagsResponse.h new file mode 100644 index 00000000..6fd688b2 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/SaveTagsResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_SaveTagsResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_SaveTagsResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT SaveTagsResponse + : public ModelBase, public HttpResponse +{ +public: + SaveTagsResponse(); + virtual ~SaveTagsResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// SaveTagsResponse members + + /// + /// + /// + + std::string getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const std::string& value); + + +protected: + std::string data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_SaveTagsResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ScanProtocolConfig.h b/cfw/include/huaweicloud/cfw/v1/model/ScanProtocolConfig.h new file mode 100644 index 00000000..97896111 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ScanProtocolConfig.h @@ -0,0 +1,74 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ScanProtocolConfig_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ScanProtocolConfig_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT ScanProtocolConfig + : public ModelBase +{ +public: + ScanProtocolConfig(); + virtual ~ScanProtocolConfig(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ScanProtocolConfig members + + /// + /// 反病毒动作,0:观察 1:拦截 2:禁用 + /// + + int32_t getAction() const; + bool actionIsSet() const; + void unsetaction(); + void setAction(int32_t value); + + /// + /// 协议类型 + /// + + int32_t getProtocolType() const; + bool protocolTypeIsSet() const; + void unsetprotocolType(); + void setProtocolType(int32_t value); + + +protected: + int32_t action_; + bool actionIsSet_; + int32_t protocolType_; + bool protocolTypeIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ScanProtocolConfig_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ShowAlarmConfigRequest.h b/cfw/include/huaweicloud/cfw/v1/model/ShowAlarmConfigRequest.h new file mode 100644 index 00000000..5bbc5189 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ShowAlarmConfigRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAlarmConfigRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAlarmConfigRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ShowAlarmConfigRequest + : public ModelBase +{ +public: + ShowAlarmConfigRequest(); + virtual ~ShowAlarmConfigRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowAlarmConfigRequest members + + /// + /// 防火墙ID,可通过[防火墙ID获取方式](cfw_02_0028.xml)获取 + /// + + std::string getFwInstanceId() const; + bool fwInstanceIdIsSet() const; + void unsetfwInstanceId(); + void setFwInstanceId(const std::string& value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + std::string fwInstanceId_; + bool fwInstanceIdIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowAlarmConfigRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAlarmConfigRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ShowAlarmConfigResponse.h b/cfw/include/huaweicloud/cfw/v1/model/ShowAlarmConfigResponse.h new file mode 100644 index 00000000..72d97d3e --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ShowAlarmConfigResponse.h @@ -0,0 +1,80 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAlarmConfigResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAlarmConfigResponse_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ShowAlarmConfigResponse + : public ModelBase, public HttpResponse +{ +public: + ShowAlarmConfigResponse(); + virtual ~ShowAlarmConfigResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowAlarmConfigResponse members + + /// + /// 告警配置列表 + /// + + std::vector& getAlarmConfigs(); + bool alarmConfigsIsSet() const; + void unsetalarmConfigs(); + void setAlarmConfigs(const std::vector& value); + + /// + /// + /// + + Object getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const Object& value); + + +protected: + std::vector alarmConfigs_; + bool alarmConfigsIsSet_; + Object data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAlarmConfigResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ShowAntiVirusRuleRequest.h b/cfw/include/huaweicloud/cfw/v1/model/ShowAntiVirusRuleRequest.h new file mode 100644 index 00000000..73d3c7e9 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ShowAntiVirusRuleRequest.h @@ -0,0 +1,115 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAntiVirusRuleRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAntiVirusRuleRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ShowAntiVirusRuleRequest + : public ModelBase +{ +public: + ShowAntiVirusRuleRequest(); + virtual ~ShowAntiVirusRuleRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowAntiVirusRuleRequest members + + /// + /// 防护对象ID,是创建云防火墙后用于区分互联网边界防护和VPC边界防护的标志id,可通过调用[查询防火墙实例接口](ListFirewallDetail.xml)获得,通过返回值中的data.records.protect_objects.object_id(.表示各对象之间层级的区分)获得,注意type为0的为互联网边界防护对象id,type为1的为VPC边界防护对象id。此处仅取type为1的防护对象id,可通过data.records.protect_objects.type(.表示各对象之间层级的区分)获得。 + /// + + std::string getObjectId() const; + bool objectIdIsSet() const; + void unsetobjectId(); + void setObjectId(const std::string& value); + + /// + /// 防火墙类型 + /// + + int32_t getEngineType() const; + bool engineTypeIsSet() const; + void unsetengineType(); + void setEngineType(int32_t value); + + /// + /// 每页显示的数据量 + /// + + int32_t getLimit() const; + bool limitIsSet() const; + void unsetlimit(); + void setLimit(int32_t value); + + /// + /// 查询偏移量 + /// + + int32_t getOffset() const; + bool offsetIsSet() const; + void unsetoffset(); + void setOffset(int32_t value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + std::string objectId_; + bool objectIdIsSet_; + int32_t engineType_; + bool engineTypeIsSet_; + int32_t limit_; + bool limitIsSet_; + int32_t offset_; + bool offsetIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowAntiVirusRuleRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAntiVirusRuleRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ShowAntiVirusRuleResponse.h b/cfw/include/huaweicloud/cfw/v1/model/ShowAntiVirusRuleResponse.h new file mode 100644 index 00000000..9156546a --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ShowAntiVirusRuleResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAntiVirusRuleResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAntiVirusRuleResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ShowAntiVirusRuleResponse + : public ModelBase, public HttpResponse +{ +public: + ShowAntiVirusRuleResponse(); + virtual ~ShowAntiVirusRuleResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowAntiVirusRuleResponse members + + /// + /// + /// + + AntiVirusRuleVO getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const AntiVirusRuleVO& value); + + +protected: + AntiVirusRuleVO data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAntiVirusRuleResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ShowAntiVirusSwitchRequest.h b/cfw/include/huaweicloud/cfw/v1/model/ShowAntiVirusSwitchRequest.h new file mode 100644 index 00000000..44803b82 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ShowAntiVirusSwitchRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAntiVirusSwitchRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAntiVirusSwitchRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ShowAntiVirusSwitchRequest + : public ModelBase +{ +public: + ShowAntiVirusSwitchRequest(); + virtual ~ShowAntiVirusSwitchRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowAntiVirusSwitchRequest members + + /// + /// 防护对象ID,是创建云防火墙后用于区分互联网边界防护和VPC边界防护的标志id,可通过调用[查询防火墙实例接口](ListFirewallDetail.xml)获得,通过返回值中的data.records.protect_objects.object_id(.表示各对象之间层级的区分)获得,注意type为0的为互联网边界防护对象id,type为1的为VPC边界防护对象id。此处仅取type为1的防护对象id,可通过data.records.protect_objects.type(.表示各对象之间层级的区分)获得。 + /// + + std::string getObjectId() const; + bool objectIdIsSet() const; + void unsetobjectId(); + void setObjectId(const std::string& value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + std::string objectId_; + bool objectIdIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowAntiVirusSwitchRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAntiVirusSwitchRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ShowAntiVirusSwitchResponse.h b/cfw/include/huaweicloud/cfw/v1/model/ShowAntiVirusSwitchResponse.h new file mode 100644 index 00000000..24b12f2e --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ShowAntiVirusSwitchResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAntiVirusSwitchResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAntiVirusSwitchResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ShowAntiVirusSwitchResponse + : public ModelBase, public HttpResponse +{ +public: + ShowAntiVirusSwitchResponse(); + virtual ~ShowAntiVirusSwitchResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowAntiVirusSwitchResponse members + + /// + /// + /// + + AntiVirusVO getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const AntiVirusVO& value); + + +protected: + AntiVirusVO data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAntiVirusSwitchResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ShowAutoProtectStatusRequest.h b/cfw/include/huaweicloud/cfw/v1/model/ShowAutoProtectStatusRequest.h new file mode 100644 index 00000000..78bf20b1 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ShowAutoProtectStatusRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAutoProtectStatusRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAutoProtectStatusRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ShowAutoProtectStatusRequest + : public ModelBase +{ +public: + ShowAutoProtectStatusRequest(); + virtual ~ShowAutoProtectStatusRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowAutoProtectStatusRequest members + + /// + /// 防护对象ID,是创建云防火墙后用于区分互联网边界防护和VPC边界防护的标志id,可通过调用[查询防火墙实例接口](ListFirewallDetail.xml)获得,通过返回值中的data.records.protect_objects.object_id(.表示各对象之间层级的区分)获得,注意type为0的为互联网边界防护对象id,type为1的为VPC边界防护对象id。此处仅取type为1的防护对象id,可通过data.records.protect_objects.type(.表示各对象之间层级的区分)获得。 + /// + + std::string getObjectId() const; + bool objectIdIsSet() const; + void unsetobjectId(); + void setObjectId(const std::string& value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + std::string objectId_; + bool objectIdIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowAutoProtectStatusRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAutoProtectStatusRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ShowAutoProtectStatusResponse.h b/cfw/include/huaweicloud/cfw/v1/model/ShowAutoProtectStatusResponse.h new file mode 100644 index 00000000..26c8ce10 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ShowAutoProtectStatusResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAutoProtectStatusResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAutoProtectStatusResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ShowAutoProtectStatusResponse + : public ModelBase, public HttpResponse +{ +public: + ShowAutoProtectStatusResponse(); + virtual ~ShowAutoProtectStatusResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowAutoProtectStatusResponse members + + /// + /// + /// + + FirewallStatusVO getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const FirewallStatusVO& value); + + +protected: + FirewallStatusVO data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowAutoProtectStatusResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ShowDomainSetDetailRequest.h b/cfw/include/huaweicloud/cfw/v1/model/ShowDomainSetDetailRequest.h new file mode 100644 index 00000000..c4abf827 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ShowDomainSetDetailRequest.h @@ -0,0 +1,93 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowDomainSetDetailRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowDomainSetDetailRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ShowDomainSetDetailRequest + : public ModelBase +{ +public: + ShowDomainSetDetailRequest(); + virtual ~ShowDomainSetDetailRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowDomainSetDetailRequest members + + /// + /// 防火墙ID,可通过[防火墙ID获取方式](cfw_02_0028.xml)获取 + /// + + std::string getFwInstanceId() const; + bool fwInstanceIdIsSet() const; + void unsetfwInstanceId(); + void setFwInstanceId(const std::string& value); + + /// + /// 域名组ID,可通过[查询域名组列表接口](ListDomainSets.xml)查询获得,通过返回值中的data.records.set_id(.表示各对象之间层级的区分)获取 + /// + + std::string getDomainSetId() const; + bool domainSetIdIsSet() const; + void unsetdomainSetId(); + void setDomainSetId(const std::string& value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + std::string fwInstanceId_; + bool fwInstanceIdIsSet_; + std::string domainSetId_; + bool domainSetIdIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowDomainSetDetailRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowDomainSetDetailRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ShowDomainSetDetailResponse.h b/cfw/include/huaweicloud/cfw/v1/model/ShowDomainSetDetailResponse.h new file mode 100644 index 00000000..4c50443d --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ShowDomainSetDetailResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowDomainSetDetailResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowDomainSetDetailResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ShowDomainSetDetailResponse + : public ModelBase, public HttpResponse +{ +public: + ShowDomainSetDetailResponse(); + virtual ~ShowDomainSetDetailResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowDomainSetDetailResponse members + + /// + /// + /// + + DomainSetVo getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const DomainSetVo& value); + + +protected: + DomainSetVo data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowDomainSetDetailResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ShowImportStatusRequest.h b/cfw/include/huaweicloud/cfw/v1/model/ShowImportStatusRequest.h new file mode 100644 index 00000000..ecf24957 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ShowImportStatusRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowImportStatusRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowImportStatusRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ShowImportStatusRequest + : public ModelBase +{ +public: + ShowImportStatusRequest(); + virtual ~ShowImportStatusRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowImportStatusRequest members + + /// + /// 防护对象ID,是创建云防火墙后用于区分互联网边界防护和VPC边界防护的标志id,可通过调用[查询防火墙实例接口](ListFirewallDetail.xml)获得,通过返回值中的data.records.protect_objects.object_id(.表示各对象之间层级的区分)获得,注意type为0的为互联网边界防护对象id,type为1的为VPC边界防护对象id。此处仅取type为1的防护对象id,可通过data.records.protect_objects.type(.表示各对象之间层级的区分)获得。 + /// + + std::string getObjectId() const; + bool objectIdIsSet() const; + void unsetobjectId(); + void setObjectId(const std::string& value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + std::string objectId_; + bool objectIdIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowImportStatusRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowImportStatusRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ShowImportStatusResponse.h b/cfw/include/huaweicloud/cfw/v1/model/ShowImportStatusResponse.h new file mode 100644 index 00000000..5ffdafa8 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ShowImportStatusResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowImportStatusResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowImportStatusResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ShowImportStatusResponse + : public ModelBase, public HttpResponse +{ +public: + ShowImportStatusResponse(); + virtual ~ShowImportStatusResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowImportStatusResponse members + + /// + /// + /// + + Object getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const Object& value); + + +protected: + Object data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowImportStatusResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ShowIpsUpdateTimeRequest.h b/cfw/include/huaweicloud/cfw/v1/model/ShowIpsUpdateTimeRequest.h new file mode 100644 index 00000000..8924db62 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ShowIpsUpdateTimeRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowIpsUpdateTimeRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowIpsUpdateTimeRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ShowIpsUpdateTimeRequest + : public ModelBase +{ +public: + ShowIpsUpdateTimeRequest(); + virtual ~ShowIpsUpdateTimeRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowIpsUpdateTimeRequest members + + /// + /// 防火墙ID,可通过[防火墙ID获取方式](cfw_02_0028.xml)获取 + /// + + std::string getFwInstanceId() const; + bool fwInstanceIdIsSet() const; + void unsetfwInstanceId(); + void setFwInstanceId(const std::string& value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + std::string fwInstanceId_; + bool fwInstanceIdIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowIpsUpdateTimeRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowIpsUpdateTimeRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/ShowIpsUpdateTimeResponse.h b/cfw/include/huaweicloud/cfw/v1/model/ShowIpsUpdateTimeResponse.h new file mode 100644 index 00000000..9e8a6bba --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/ShowIpsUpdateTimeResponse.h @@ -0,0 +1,135 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowIpsUpdateTimeResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowIpsUpdateTimeResponse_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT ShowIpsUpdateTimeResponse + : public ModelBase, public HttpResponse +{ +public: + ShowIpsUpdateTimeResponse(); + virtual ~ShowIpsUpdateTimeResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowIpsUpdateTimeResponse members + + /// + /// + /// + + std::vector& getData(); + bool dataIsSet() const; + void unsetdata(); + void setData(const std::vector& value); + + /// + /// + /// + + std::string getErrorCode() const; + bool errorCodeIsSet() const; + void unseterrorCode(); + void setErrorCode(const std::string& value); + + /// + /// + /// + + std::string getErrorDescription() const; + bool errorDescriptionIsSet() const; + void unseterrorDescription(); + void setErrorDescription(const std::string& value); + + /// + /// + /// + + std::string getFailReason() const; + bool failReasonIsSet() const; + void unsetfailReason(); + void setFailReason(const std::string& value); + + /// + /// + /// + + std::string getJobId() const; + bool jobIdIsSet() const; + void unsetjobId(); + void setJobId(const std::string& value); + + /// + /// + /// + + std::string getOrderId() const; + bool orderIdIsSet() const; + void unsetorderId(); + void setOrderId(const std::string& value); + + /// + /// + /// + + std::string getTraceId() const; + bool traceIdIsSet() const; + void unsettraceId(); + void setTraceId(const std::string& value); + + +protected: + std::vector data_; + bool dataIsSet_; + std::string errorCode_; + bool errorCodeIsSet_; + std::string errorDescription_; + bool errorDescriptionIsSet_; + std::string failReason_; + bool failReasonIsSet_; + std::string jobId_; + bool jobIdIsSet_; + std::string orderId_; + bool orderIdIsSet_; + std::string traceId_; + bool traceIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_ShowIpsUpdateTimeResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/SwitchAutoProtectStatusRequest.h b/cfw/include/huaweicloud/cfw/v1/model/SwitchAutoProtectStatusRequest.h new file mode 100644 index 00000000..5493b87c --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/SwitchAutoProtectStatusRequest.h @@ -0,0 +1,83 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_SwitchAutoProtectStatusRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_SwitchAutoProtectStatusRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT SwitchAutoProtectStatusRequest + : public ModelBase +{ +public: + SwitchAutoProtectStatusRequest(); + virtual ~SwitchAutoProtectStatusRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// SwitchAutoProtectStatusRequest members + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + /// + /// + /// + + SwitchEipStatusDto getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const SwitchEipStatusDto& value); + + +protected: + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + SwitchEipStatusDto body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + SwitchAutoProtectStatusRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_SwitchAutoProtectStatusRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/SwitchAutoProtectStatusResponse.h b/cfw/include/huaweicloud/cfw/v1/model/SwitchAutoProtectStatusResponse.h new file mode 100644 index 00000000..04499823 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/SwitchAutoProtectStatusResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_SwitchAutoProtectStatusResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_SwitchAutoProtectStatusResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT SwitchAutoProtectStatusResponse + : public ModelBase, public HttpResponse +{ +public: + SwitchAutoProtectStatusResponse(); + virtual ~SwitchAutoProtectStatusResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// SwitchAutoProtectStatusResponse members + + /// + /// + /// + + std::string getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const std::string& value); + + +protected: + std::string data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_SwitchAutoProtectStatusResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/SwitchEipStatusDto.h b/cfw/include/huaweicloud/cfw/v1/model/SwitchEipStatusDto.h new file mode 100644 index 00000000..0d9523ea --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/SwitchEipStatusDto.h @@ -0,0 +1,86 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_SwitchEipStatusDto_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_SwitchEipStatusDto_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT SwitchEipStatusDto + : public ModelBase +{ +public: + SwitchEipStatusDto(); + virtual ~SwitchEipStatusDto(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// SwitchEipStatusDto members + + /// + /// 防火墙id + /// + + std::string getFwInstanceId() const; + bool fwInstanceIdIsSet() const; + void unsetfwInstanceId(); + void setFwInstanceId(const std::string& value); + + /// + /// 防护对象id + /// + + std::string getObjectId() const; + bool objectIdIsSet() const; + void unsetobjectId(); + void setObjectId(const std::string& value); + + /// + /// 是否开启新增eip自动防护,1;是,0:否 + /// + + int32_t getStatus() const; + bool statusIsSet() const; + void unsetstatus(); + void setStatus(int32_t value); + + +protected: + std::string fwInstanceId_; + bool fwInstanceIdIsSet_; + std::string objectId_; + bool objectIdIsSet_; + int32_t status_; + bool statusIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_SwitchEipStatusDto_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/TagValue.h b/cfw/include/huaweicloud/cfw/v1/model/TagValue.h new file mode 100644 index 00000000..6a87efa8 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/TagValue.h @@ -0,0 +1,76 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_TagValue_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_TagValue_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT TagValue + : public ModelBase +{ +public: + TagValue(); + virtual ~TagValue(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// TagValue members + + /// + /// tag键 + /// + + std::string getKey() const; + bool keyIsSet() const; + void unsetkey(); + void setKey(const std::string& value); + + /// + /// tag值 + /// + + std::vector& getValue(); + bool valueIsSet() const; + void unsetvalue(); + void setValue(const std::vector& value); + + +protected: + std::string key_; + bool keyIsSet_; + std::vector value_; + bool valueIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_TagValue_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/UpdateAdvancedIpsRuleRequest.h b/cfw/include/huaweicloud/cfw/v1/model/UpdateAdvancedIpsRuleRequest.h new file mode 100644 index 00000000..e37f3f54 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/UpdateAdvancedIpsRuleRequest.h @@ -0,0 +1,94 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAdvancedIpsRuleRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAdvancedIpsRuleRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT UpdateAdvancedIpsRuleRequest + : public ModelBase +{ +public: + UpdateAdvancedIpsRuleRequest(); + virtual ~UpdateAdvancedIpsRuleRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateAdvancedIpsRuleRequest members + + /// + /// 防火墙ID,可通过[防火墙ID获取方式](cfw_02_0028.xml)获取 + /// + + std::string getFwInstanceId() const; + bool fwInstanceIdIsSet() const; + void unsetfwInstanceId(); + void setFwInstanceId(const std::string& value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + /// + /// + /// + + AdvancedIpsRuleDto getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const AdvancedIpsRuleDto& value); + + +protected: + std::string fwInstanceId_; + bool fwInstanceIdIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + AdvancedIpsRuleDto body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + UpdateAdvancedIpsRuleRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAdvancedIpsRuleRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/UpdateAdvancedIpsRuleResponse.h b/cfw/include/huaweicloud/cfw/v1/model/UpdateAdvancedIpsRuleResponse.h new file mode 100644 index 00000000..12755b40 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/UpdateAdvancedIpsRuleResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAdvancedIpsRuleResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAdvancedIpsRuleResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT UpdateAdvancedIpsRuleResponse + : public ModelBase, public HttpResponse +{ +public: + UpdateAdvancedIpsRuleResponse(); + virtual ~UpdateAdvancedIpsRuleResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateAdvancedIpsRuleResponse members + + /// + /// + /// + + ResponseData getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const ResponseData& value); + + +protected: + ResponseData data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAdvancedIpsRuleResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/UpdateAlarmConfigRequest.h b/cfw/include/huaweicloud/cfw/v1/model/UpdateAlarmConfigRequest.h new file mode 100644 index 00000000..ab532272 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/UpdateAlarmConfigRequest.h @@ -0,0 +1,94 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAlarmConfigRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAlarmConfigRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT UpdateAlarmConfigRequest + : public ModelBase +{ +public: + UpdateAlarmConfigRequest(); + virtual ~UpdateAlarmConfigRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateAlarmConfigRequest members + + /// + /// 防火墙ID,可通过[防火墙ID获取方式](cfw_02_0028.xml)获取 + /// + + std::string getFwInstanceId() const; + bool fwInstanceIdIsSet() const; + void unsetfwInstanceId(); + void setFwInstanceId(const std::string& value); + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + /// + /// + /// + + UpdateAttackLogAlarmConfigDto getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const UpdateAttackLogAlarmConfigDto& value); + + +protected: + std::string fwInstanceId_; + bool fwInstanceIdIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + UpdateAttackLogAlarmConfigDto body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + UpdateAlarmConfigRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAlarmConfigRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/UpdateAlarmConfigResponse.h b/cfw/include/huaweicloud/cfw/v1/model/UpdateAlarmConfigResponse.h new file mode 100644 index 00000000..96a37327 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/UpdateAlarmConfigResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAlarmConfigResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAlarmConfigResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT UpdateAlarmConfigResponse + : public ModelBase, public HttpResponse +{ +public: + UpdateAlarmConfigResponse(); + virtual ~UpdateAlarmConfigResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateAlarmConfigResponse members + + /// + /// + /// + + ResponseData getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const ResponseData& value); + + +protected: + ResponseData data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAlarmConfigResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/UpdateAntiVirusRuleRequest.h b/cfw/include/huaweicloud/cfw/v1/model/UpdateAntiVirusRuleRequest.h new file mode 100644 index 00000000..9595f8d1 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/UpdateAntiVirusRuleRequest.h @@ -0,0 +1,83 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAntiVirusRuleRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAntiVirusRuleRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT UpdateAntiVirusRuleRequest + : public ModelBase +{ +public: + UpdateAntiVirusRuleRequest(); + virtual ~UpdateAntiVirusRuleRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateAntiVirusRuleRequest members + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + /// + /// + /// + + AntiVirusRuleDto getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const AntiVirusRuleDto& value); + + +protected: + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + AntiVirusRuleDto body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + UpdateAntiVirusRuleRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAntiVirusRuleRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/UpdateAntiVirusRuleResponse.h b/cfw/include/huaweicloud/cfw/v1/model/UpdateAntiVirusRuleResponse.h new file mode 100644 index 00000000..7a4844fa --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/UpdateAntiVirusRuleResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAntiVirusRuleResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAntiVirusRuleResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT UpdateAntiVirusRuleResponse + : public ModelBase, public HttpResponse +{ +public: + UpdateAntiVirusRuleResponse(); + virtual ~UpdateAntiVirusRuleResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateAntiVirusRuleResponse members + + /// + /// + /// + + ResponseData getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const ResponseData& value); + + +protected: + ResponseData data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAntiVirusRuleResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/UpdateAntiVirusSwitchRequest.h b/cfw/include/huaweicloud/cfw/v1/model/UpdateAntiVirusSwitchRequest.h new file mode 100644 index 00000000..7a022f18 --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/UpdateAntiVirusSwitchRequest.h @@ -0,0 +1,83 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAntiVirusSwitchRequest_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAntiVirusSwitchRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT UpdateAntiVirusSwitchRequest + : public ModelBase +{ +public: + UpdateAntiVirusSwitchRequest(); + virtual ~UpdateAntiVirusSwitchRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateAntiVirusSwitchRequest members + + /// + /// 企业项目ID,用户根据组织规划企业项目,对应的ID为企业项目ID,可通过[如何获取企业项目ID](cfw_02_0027.xml)获取,用户未开启企业项目时为0 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + /// + /// + /// + + AntiVirusSwitchDto getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const AntiVirusSwitchDto& value); + + +protected: + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + AntiVirusSwitchDto body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + UpdateAntiVirusSwitchRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAntiVirusSwitchRequest_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/UpdateAntiVirusSwitchResponse.h b/cfw/include/huaweicloud/cfw/v1/model/UpdateAntiVirusSwitchResponse.h new file mode 100644 index 00000000..6d9c6e5e --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/UpdateAntiVirusSwitchResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAntiVirusSwitchResponse_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAntiVirusSwitchResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_CFW_V1_EXPORT UpdateAntiVirusSwitchResponse + : public ModelBase, public HttpResponse +{ +public: + UpdateAntiVirusSwitchResponse(); + virtual ~UpdateAntiVirusSwitchResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateAntiVirusSwitchResponse members + + /// + /// + /// + + ResponseData getData() const; + bool dataIsSet() const; + void unsetdata(); + void setData(const ResponseData& value); + + +protected: + ResponseData data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAntiVirusSwitchResponse_H_ diff --git a/cfw/include/huaweicloud/cfw/v1/model/UpdateAttackLogAlarmConfigDto.h b/cfw/include/huaweicloud/cfw/v1/model/UpdateAttackLogAlarmConfigDto.h new file mode 100644 index 00000000..8a7a88cc --- /dev/null +++ b/cfw/include/huaweicloud/cfw/v1/model/UpdateAttackLogAlarmConfigDto.h @@ -0,0 +1,174 @@ + +#ifndef HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAttackLogAlarmConfigDto_H_ +#define HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAttackLogAlarmConfigDto_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_CFW_V1_EXPORT UpdateAttackLogAlarmConfigDto + : public ModelBase +{ +public: + UpdateAttackLogAlarmConfigDto(); + virtual ~UpdateAttackLogAlarmConfigDto(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateAttackLogAlarmConfigDto members + + /// + /// 账号名称 + /// + + std::string getAccountName() const; + bool accountNameIsSet() const; + void unsetaccountName(); + void setAccountName(const std::string& value); + + /// + /// 告警id + /// + + std::string getAlarmId() const; + bool alarmIdIsSet() const; + void unsetalarmId(); + void setAlarmId(const std::string& value); + + /// + /// 告警周期,0:全天,1:8时到22时 + /// + + int32_t getAlarmTimePeriod() const; + bool alarmTimePeriodIsSet() const; + void unsetalarmTimePeriod(); + void setAlarmTimePeriod(int32_t value); + + /// + /// 告警类型 0:攻击告警; 1:流量超额预警; 2:EIP未防护告警; 3:威胁情报告警 + /// + + int32_t getAlarmType() const; + bool alarmTypeIsSet() const; + void unsetalarmType(); + void setAlarmType(int32_t value); + + /// + /// 告警状态 0:失效; 1:生效 + /// + + int32_t getEnableStatus() const; + bool enableStatusIsSet() const; + void unsetenableStatus(); + void setEnableStatus(int32_t value); + + /// + /// 告警触发频次 + /// + + int32_t getFrequencyCount() const; + bool frequencyCountIsSet() const; + void unsetfrequencyCount(); + void setFrequencyCount(int32_t value); + + /// + /// 告警频次时间范围 + /// + + int32_t getFrequencyTime() const; + bool frequencyTimeIsSet() const; + void unsetfrequencyTime(); + void setFrequencyTime(int32_t value); + + /// + /// 告警语言 + /// + + std::string getLanguage() const; + bool languageIsSet() const; + void unsetlanguage(); + void setLanguage(const std::string& value); + + /// + /// 告警等级 + /// + + std::string getSeverity() const; + bool severityIsSet() const; + void unsetseverity(); + void setSeverity(const std::string& value); + + /// + /// 告警urn + /// + + std::string getTopicUrn() const; + bool topicUrnIsSet() const; + void unsettopicUrn(); + void setTopicUrn(const std::string& value); + + /// + /// 用户名称 + /// + + std::string getUsername() const; + bool usernameIsSet() const; + void unsetusername(); + void setUsername(const std::string& value); + + +protected: + std::string accountName_; + bool accountNameIsSet_; + std::string alarmId_; + bool alarmIdIsSet_; + int32_t alarmTimePeriod_; + bool alarmTimePeriodIsSet_; + int32_t alarmType_; + bool alarmTypeIsSet_; + int32_t enableStatus_; + bool enableStatusIsSet_; + int32_t frequencyCount_; + bool frequencyCountIsSet_; + int32_t frequencyTime_; + bool frequencyTimeIsSet_; + std::string language_; + bool languageIsSet_; + std::string severity_; + bool severityIsSet_; + std::string topicUrn_; + bool topicUrnIsSet_; + std::string username_; + bool usernameIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_CFW_V1_MODEL_UpdateAttackLogAlarmConfigDto_H_ diff --git a/cfw/src/v1/CfwClient.cpp b/cfw/src/v1/CfwClient.cpp index 43f7a007..59da0135 100644 --- a/cfw/src/v1/CfwClient.cpp +++ b/cfw/src/v1/CfwClient.cpp @@ -456,6 +456,53 @@ std::shared_ptr CfwClient::batchDeleteAddressIt return localVarResult; } +std::shared_ptr CfwClient::batchDeleteDomainSet(BatchDeleteDomainSetRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/domain-sets/batch-delete"; + + 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; + + if (request.fwInstanceIdIsSet()) { + localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + + 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, CfwMeta::genRequestDefForBatchDeleteDomainSet()); + + 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 CfwClient::batchDeleteServiceItems(BatchDeleteServiceItemsRequest &request) { std::string localVarPath = "/v1/{project_id}/service-items"; @@ -1749,6 +1796,48 @@ std::shared_ptr CfwClient::listDomainParseDetail( return localVarResult; } +std::shared_ptr CfwClient::listDomainParseIp(ListDomainParseIpRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/domain/parse-ip-list/{domain_address_id}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["domain_address_id"] = parameterToString(request.getDomainAddressId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.addressTypeIsSet()) { + localVarQueryParams["address_type"] = parameterToString(request.getAddressType()); + } + if (request.domainSetIdIsSet()) { + localVarQueryParams["domain_set_id"] = parameterToString(request.getDomainSetId()); + } + if (request.fwInstanceIdIsSet()) { + localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForListDomainParseIp()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr CfwClient::listDomainSets(ListDomainSetsRequest &request) { std::string localVarPath = "/v1/{project_id}/domain-sets"; @@ -2145,6 +2234,44 @@ std::shared_ptr CfwClient::listLogConfig(ListLogConfigReq return localVarResult; } +std::shared_ptr CfwClient::listProjectTags(ListProjectTagsRequest &request) +{ + std::string localVarPath = "/v2/{project_id}/cfw-cfw/tags"; + + 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; + + if (request.limitIsSet()) { + localVarQueryParams["limit"] = parameterToString(request.getLimit()); + } + if (request.offsetIsSet()) { + localVarQueryParams["offset"] = parameterToString(request.getOffset()); + } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForListProjectTags()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr CfwClient::listProtectedVpcs(ListProtectedVpcsRequest &request) { std::string localVarPath = "/v1/{project_id}/vpcs/protection"; @@ -2183,6 +2310,39 @@ std::shared_ptr CfwClient::listProtectedVpcs(ListProt return localVarResult; } +std::shared_ptr CfwClient::listResourceTags(ListResourceTagsRequest &request) +{ + std::string localVarPath = "/v2/{project_id}/cfw-cfw/{fw_instance_id}/tags"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForListResourceTags()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr CfwClient::listServiceItems(ListServiceItemsRequest &request) { std::string localVarPath = "/v1/{project_id}/service-items"; @@ -2322,16 +2482,16 @@ std::shared_ptr CfwClient::listServiceSets(ListServiceS return localVarResult; } -std::shared_ptr CfwClient::updateAddressSet(UpdateAddressSetRequest &request) +std::shared_ptr CfwClient::saveTags(SaveTagsRequest &request) { - std::string localVarPath = "/v1/{project_id}/address-sets/{set_id}"; + std::string localVarPath = "/v2/{project_id}/cfw-cfw/{fw_instance_id}/tags/save"; std::map localVarQueryParams; std::map localVarHeaderParams; std::map localVarFormParams; std::map localVarPathParams; - localVarPathParams["set_id"] = parameterToString(request.getSetId()); + localVarPathParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); bool isJson = false; bool isMultiPart = false; @@ -2342,9 +2502,6 @@ std::shared_ptr CfwClient::updateAddressSet(UpdateAddr if (request.enterpriseProjectIdIsSet()) { localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); } - if (request.fwInstanceIdIsSet()) { - localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); - } std::string localVarHttpBody; if (isJson) { @@ -2355,9 +2512,9 @@ std::shared_ptr CfwClient::updateAddressSet(UpdateAddr } std::unique_ptr res = callApi("PUT", localVarPath, localVarPathParams, localVarQueryParams, - localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForUpdateAddressSet()); + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForSaveTags()); - std::shared_ptr localVarResult = std::make_shared(); + std::shared_ptr localVarResult = std::make_shared(); localVarResult->setStatusCode(res->getStatusCode()); localVarResult->setHeaderParams(res->getHeaderParams()); localVarResult->setHttpBody(res->getHttpBody()); @@ -2370,16 +2527,15 @@ std::shared_ptr CfwClient::updateAddressSet(UpdateAddr return localVarResult; } -std::shared_ptr CfwClient::updateBlackWhiteList(UpdateBlackWhiteListRequest &request) +std::shared_ptr CfwClient::showAlarmConfig(ShowAlarmConfigRequest &request) { - std::string localVarPath = "/v1/{project_id}/black-white-list/{list_id}"; + std::string localVarPath = "/v1/{project_id}/cfw/alarm/config"; std::map localVarQueryParams; std::map localVarHeaderParams; std::map localVarFormParams; std::map localVarPathParams; - localVarPathParams["list_id"] = parameterToString(request.getListId()); bool isJson = false; bool isMultiPart = false; @@ -2387,40 +2543,28 @@ std::shared_ptr CfwClient::updateBlackWhiteList(Up std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); localVarHeaderParams["Content-Type"] = contentType; - if (request.enterpriseProjectIdIsSet()) { - localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); - } if (request.fwInstanceIdIsSet()) { localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } 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, CfwMeta::genRequestDefForUpdateBlackWhiteList()); + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForShowAlarmConfig()); - std::shared_ptr localVarResult = std::make_shared(); + 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 CfwClient::updateDnsServers(UpdateDnsServersRequest &request) +std::shared_ptr CfwClient::showAntiVirusRule(ShowAntiVirusRuleRequest &request) { - std::string localVarPath = "/v1/{project_id}/dns/servers"; + std::string localVarPath = "/v1/{project_id}/anti-virus/rule"; std::map localVarQueryParams; std::map localVarHeaderParams; @@ -2434,47 +2578,43 @@ std::shared_ptr CfwClient::updateDnsServers(UpdateDnsS std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); localVarHeaderParams["Content-Type"] = contentType; - if (request.fwInstanceIdIsSet()) { - localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + if (request.objectIdIsSet()) { + localVarQueryParams["object_id"] = parameterToString(request.getObjectId()); + } + if (request.engineTypeIsSet()) { + localVarQueryParams["engine_type"] = parameterToString(request.getEngineType()); + } + if (request.limitIsSet()) { + localVarQueryParams["limit"] = parameterToString(request.getLimit()); + } + if (request.offsetIsSet()) { + localVarQueryParams["offset"] = parameterToString(request.getOffset()); } if (request.enterpriseProjectIdIsSet()) { localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); } 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, CfwMeta::genRequestDefForUpdateDnsServers()); + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForShowAntiVirusRule()); - std::shared_ptr localVarResult = std::make_shared(); + 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 CfwClient::updateDomainSet(UpdateDomainSetRequest &request) +std::shared_ptr CfwClient::showAntiVirusSwitch(ShowAntiVirusSwitchRequest &request) { - std::string localVarPath = "/v1/{project_id}/domain-set/{set_id}"; + std::string localVarPath = "/v1/{project_id}/anti-virus/switch"; std::map localVarQueryParams; std::map localVarHeaderParams; std::map localVarFormParams; std::map localVarPathParams; - localVarPathParams["set_id"] = parameterToString(request.getSetId()); bool isJson = false; bool isMultiPart = false; @@ -2482,46 +2622,35 @@ std::shared_ptr CfwClient::updateDomainSet(UpdateDomain std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); localVarHeaderParams["Content-Type"] = contentType; + if (request.objectIdIsSet()) { + localVarQueryParams["object_id"] = parameterToString(request.getObjectId()); + } if (request.enterpriseProjectIdIsSet()) { localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); } - if (request.fwInstanceIdIsSet()) { - localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); - } 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, CfwMeta::genRequestDefForUpdateDomainSet()); + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForShowAntiVirusSwitch()); - std::shared_ptr localVarResult = std::make_shared(); + 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 CfwClient::updateLogConfig(UpdateLogConfigRequest &request) +std::shared_ptr CfwClient::showDomainSetDetail(ShowDomainSetDetailRequest &request) { - std::string localVarPath = "/v1/{project_id}/cfw/logs/configuration"; + std::string localVarPath = "/v1/{project_id}/domain-set/{domain_set_id}"; std::map localVarQueryParams; std::map localVarHeaderParams; std::map localVarFormParams; std::map localVarPathParams; + localVarPathParams["domain_set_id"] = parameterToString(request.getDomainSetId()); bool isJson = false; bool isMultiPart = false; @@ -2537,32 +2666,20 @@ std::shared_ptr CfwClient::updateLogConfig(UpdateLogCon } 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, CfwMeta::genRequestDefForUpdateLogConfig()); + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForShowDomainSetDetail()); - std::shared_ptr localVarResult = std::make_shared(); + 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 CfwClient::updateServiceSet(UpdateServiceSetRequest &request) +std::shared_ptr CfwClient::updateAddressSet(UpdateAddressSetRequest &request) { - std::string localVarPath = "/v1/{project_id}/service-sets/{set_id}"; + std::string localVarPath = "/v1/{project_id}/address-sets/{set_id}"; std::map localVarQueryParams; std::map localVarHeaderParams; @@ -2593,9 +2710,9 @@ std::shared_ptr CfwClient::updateServiceSet(UpdateServ } std::unique_ptr res = callApi("PUT", localVarPath, localVarPathParams, localVarQueryParams, - localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForUpdateServiceSet()); + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForUpdateAddressSet()); - std::shared_ptr localVarResult = std::make_shared(); + std::shared_ptr localVarResult = std::make_shared(); localVarResult->setStatusCode(res->getStatusCode()); localVarResult->setHeaderParams(res->getHeaderParams()); localVarResult->setHttpBody(res->getHttpBody()); @@ -2608,9 +2725,9 @@ std::shared_ptr CfwClient::updateServiceSet(UpdateServ return localVarResult; } -std::shared_ptr CfwClient::addAclRule(AddAclRuleRequest &request) +std::shared_ptr CfwClient::updateAlarmConfig(UpdateAlarmConfigRequest &request) { - std::string localVarPath = "/v1/{project_id}/acl-rule"; + std::string localVarPath = "/v1/{project_id}/cfw/alarm/config"; std::map localVarQueryParams; std::map localVarHeaderParams; @@ -2624,12 +2741,12 @@ std::shared_ptr CfwClient::addAclRule(AddAclRuleRequest &req std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); localVarHeaderParams["Content-Type"] = contentType; - if (request.enterpriseProjectIdIsSet()) { - localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); - } if (request.fwInstanceIdIsSet()) { localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } std::string localVarHttpBody; if (isJson) { @@ -2639,10 +2756,10 @@ std::shared_ptr CfwClient::addAclRule(AddAclRuleRequest &req localVarHttpBody = utility::conversions::to_utf8string(localVarJson.serialize()); } - std::unique_ptr res = callApi("POST", localVarPath, localVarPathParams, localVarQueryParams, - localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForAddAclRule()); + std::unique_ptr res = callApi("PUT", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForUpdateAlarmConfig()); - std::shared_ptr localVarResult = std::make_shared(); + std::shared_ptr localVarResult = std::make_shared(); localVarResult->setStatusCode(res->getStatusCode()); localVarResult->setHeaderParams(res->getHeaderParams()); localVarResult->setHttpBody(res->getHttpBody()); @@ -2655,9 +2772,9 @@ std::shared_ptr CfwClient::addAclRule(AddAclRuleRequest &req return localVarResult; } -std::shared_ptr CfwClient::batchDeleteAclRules(BatchDeleteAclRulesRequest &request) +std::shared_ptr CfwClient::updateAntiVirusRule(UpdateAntiVirusRuleRequest &request) { - std::string localVarPath = "/v1/{project_id}/acl-rule"; + std::string localVarPath = "/v1/{project_id}/anti-virus/rule"; std::map localVarQueryParams; std::map localVarHeaderParams; @@ -2674,9 +2791,6 @@ std::shared_ptr CfwClient::batchDeleteAclRules(Batc if (request.enterpriseProjectIdIsSet()) { localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); } - if (request.fwInstanceIdIsSet()) { - localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); - } std::string localVarHttpBody; if (isJson) { @@ -2686,10 +2800,10 @@ std::shared_ptr CfwClient::batchDeleteAclRules(Batc localVarHttpBody = utility::conversions::to_utf8string(localVarJson.serialize()); } - std::unique_ptr res = callApi("DELETE", localVarPath, localVarPathParams, localVarQueryParams, - localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForBatchDeleteAclRules()); + std::unique_ptr res = callApi("PUT", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForUpdateAntiVirusRule()); - std::shared_ptr localVarResult = std::make_shared(); + std::shared_ptr localVarResult = std::make_shared(); localVarResult->setStatusCode(res->getStatusCode()); localVarResult->setHeaderParams(res->getHeaderParams()); localVarResult->setHttpBody(res->getHttpBody()); @@ -2702,9 +2816,9 @@ std::shared_ptr CfwClient::batchDeleteAclRules(Batc return localVarResult; } -std::shared_ptr CfwClient::batchUpdateAclRuleActions(BatchUpdateAclRuleActionsRequest &request) +std::shared_ptr CfwClient::updateAntiVirusSwitch(UpdateAntiVirusSwitchRequest &request) { - std::string localVarPath = "/v1/{project_id}/acl-rule/action"; + std::string localVarPath = "/v1/{project_id}/anti-virus/switch"; std::map localVarQueryParams; std::map localVarHeaderParams; @@ -2721,9 +2835,6 @@ std::shared_ptr CfwClient::batchUpdateAclRule if (request.enterpriseProjectIdIsSet()) { localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); } - if (request.fwInstanceIdIsSet()) { - localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); - } std::string localVarHttpBody; if (isJson) { @@ -2734,9 +2845,9 @@ std::shared_ptr CfwClient::batchUpdateAclRule } std::unique_ptr res = callApi("PUT", localVarPath, localVarPathParams, localVarQueryParams, - localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForBatchUpdateAclRuleActions()); + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForUpdateAntiVirusSwitch()); - std::shared_ptr localVarResult = std::make_shared(); + std::shared_ptr localVarResult = std::make_shared(); localVarResult->setStatusCode(res->getStatusCode()); localVarResult->setHeaderParams(res->getHeaderParams()); localVarResult->setHttpBody(res->getHttpBody()); @@ -2749,16 +2860,16 @@ std::shared_ptr CfwClient::batchUpdateAclRule return localVarResult; } -std::shared_ptr CfwClient::deleteAclRule(DeleteAclRuleRequest &request) +std::shared_ptr CfwClient::updateBlackWhiteList(UpdateBlackWhiteListRequest &request) { - std::string localVarPath = "/v1/{project_id}/acl-rule/{acl_rule_id}"; + std::string localVarPath = "/v1/{project_id}/black-white-list/{list_id}"; std::map localVarQueryParams; std::map localVarHeaderParams; std::map localVarFormParams; std::map localVarPathParams; - localVarPathParams["acl_rule_id"] = parameterToString(request.getAclRuleId()); + localVarPathParams["list_id"] = parameterToString(request.getListId()); bool isJson = false; bool isMultiPart = false; @@ -2774,20 +2885,32 @@ std::shared_ptr CfwClient::deleteAclRule(DeleteAclRuleReq } 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("DELETE", localVarPath, localVarPathParams, localVarQueryParams, - localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForDeleteAclRule()); + std::unique_ptr res = callApi("PUT", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForUpdateBlackWhiteList()); - std::shared_ptr localVarResult = std::make_shared(); + 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 CfwClient::deleteAclRuleHitCount(DeleteAclRuleHitCountRequest &request) +std::shared_ptr CfwClient::updateDnsServers(UpdateDnsServersRequest &request) { - std::string localVarPath = "/v1/{project_id}/acl-rule/count"; + std::string localVarPath = "/v1/{project_id}/dns/servers"; std::map localVarQueryParams; std::map localVarHeaderParams; @@ -2801,12 +2924,12 @@ std::shared_ptr CfwClient::deleteAclRuleHitCount( std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); localVarHeaderParams["Content-Type"] = contentType; - if (request.enterpriseProjectIdIsSet()) { - localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); - } if (request.fwInstanceIdIsSet()) { localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } std::string localVarHttpBody; if (isJson) { @@ -2816,10 +2939,10 @@ std::shared_ptr CfwClient::deleteAclRuleHitCount( localVarHttpBody = utility::conversions::to_utf8string(localVarJson.serialize()); } - std::unique_ptr res = callApi("DELETE", localVarPath, localVarPathParams, localVarQueryParams, - localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForDeleteAclRuleHitCount()); + std::unique_ptr res = callApi("PUT", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForUpdateDnsServers()); - std::shared_ptr localVarResult = std::make_shared(); + std::shared_ptr localVarResult = std::make_shared(); localVarResult->setStatusCode(res->getStatusCode()); localVarResult->setHeaderParams(res->getHeaderParams()); localVarResult->setHttpBody(res->getHttpBody()); @@ -2832,15 +2955,16 @@ std::shared_ptr CfwClient::deleteAclRuleHitCount( return localVarResult; } -std::shared_ptr CfwClient::listAclRuleHitCount(ListAclRuleHitCountRequest &request) +std::shared_ptr CfwClient::updateDomainSet(UpdateDomainSetRequest &request) { - std::string localVarPath = "/v1/{project_id}/acl-rule/count"; + std::string localVarPath = "/v1/{project_id}/domain-set/{set_id}"; std::map localVarQueryParams; std::map localVarHeaderParams; std::map localVarFormParams; std::map localVarPathParams; + localVarPathParams["set_id"] = parameterToString(request.getSetId()); bool isJson = false; bool isMultiPart = false; @@ -2863,10 +2987,10 @@ std::shared_ptr CfwClient::listAclRuleHitCount(List localVarHttpBody = utility::conversions::to_utf8string(localVarJson.serialize()); } - std::unique_ptr res = callApi("POST", localVarPath, localVarPathParams, localVarQueryParams, - localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForListAclRuleHitCount()); + std::unique_ptr res = callApi("PUT", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForUpdateDomainSet()); - std::shared_ptr localVarResult = std::make_shared(); + std::shared_ptr localVarResult = std::make_shared(); localVarResult->setStatusCode(res->getStatusCode()); localVarResult->setHeaderParams(res->getHeaderParams()); localVarResult->setHttpBody(res->getHttpBody()); @@ -2879,9 +3003,9 @@ std::shared_ptr CfwClient::listAclRuleHitCount(List return localVarResult; } -std::shared_ptr CfwClient::listAclRules(ListAclRulesRequest &request) +std::shared_ptr CfwClient::updateLogConfig(UpdateLogConfigRequest &request) { - std::string localVarPath = "/v1/{project_id}/acl-rules"; + std::string localVarPath = "/v1/{project_id}/cfw/logs/configuration"; std::map localVarQueryParams; std::map localVarHeaderParams; @@ -2895,79 +3019,47 @@ std::shared_ptr CfwClient::listAclRules(ListAclRulesReques std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); localVarHeaderParams["Content-Type"] = contentType; - if (request.objectIdIsSet()) { - localVarQueryParams["object_id"] = parameterToString(request.getObjectId()); - } - if (request.typeIsSet()) { - localVarQueryParams["type"] = parameterToString(request.getType()); - } - if (request.ipIsSet()) { - localVarQueryParams["ip"] = parameterToString(request.getIp()); - } - if (request.nameIsSet()) { - localVarQueryParams["name"] = parameterToString(request.getName()); - } - if (request.directionIsSet()) { - localVarQueryParams["direction"] = parameterToString(request.getDirection()); - } - if (request.statusIsSet()) { - localVarQueryParams["status"] = parameterToString(request.getStatus()); - } - if (request.actionTypeIsSet()) { - localVarQueryParams["action_type"] = parameterToString(request.getActionType()); - } - if (request.addressTypeIsSet()) { - localVarQueryParams["address_type"] = parameterToString(request.getAddressType()); - } - if (request.limitIsSet()) { - localVarQueryParams["limit"] = parameterToString(request.getLimit()); - } - if (request.offsetIsSet()) { - localVarQueryParams["offset"] = parameterToString(request.getOffset()); - } - if (request.enterpriseProjectIdIsSet()) { - localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); - } if (request.fwInstanceIdIsSet()) { localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); } - if (request.tagsIdIsSet()) { - localVarQueryParams["tags_id"] = parameterToString(request.getTagsId()); - } - if (request.sourceIsSet()) { - localVarQueryParams["source"] = parameterToString(request.getSource()); - } - if (request.destinationIsSet()) { - localVarQueryParams["destination"] = parameterToString(request.getDestination()); - } - if (request.serviceIsSet()) { - localVarQueryParams["service"] = parameterToString(request.getService()); - } - if (request.applicationIsSet()) { - localVarQueryParams["application"] = parameterToString(request.getApplication()); + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); } 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("GET", localVarPath, localVarPathParams, localVarQueryParams, - localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForListAclRules()); + std::unique_ptr res = callApi("PUT", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForUpdateLogConfig()); - std::shared_ptr localVarResult = std::make_shared(); + 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 CfwClient::listRuleAclTags(ListRuleAclTagsRequest &request) +std::shared_ptr CfwClient::updateServiceSet(UpdateServiceSetRequest &request) { - std::string localVarPath = "/v2/{project_id}/cfw-acl/tags"; + std::string localVarPath = "/v1/{project_id}/service-sets/{set_id}"; std::map localVarQueryParams; std::map localVarHeaderParams; std::map localVarFormParams; std::map localVarPathParams; + localVarPathParams["set_id"] = parameterToString(request.getSetId()); bool isJson = false; bool isMultiPart = false; @@ -2981,35 +3073,40 @@ std::shared_ptr CfwClient::listRuleAclTags(ListRuleAclT if (request.fwInstanceIdIsSet()) { localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); } - if (request.offsetIsSet()) { - localVarQueryParams["offset"] = parameterToString(request.getOffset()); - } - if (request.limitIsSet()) { - localVarQueryParams["limit"] = parameterToString(request.getLimit()); - } 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("GET", localVarPath, localVarPathParams, localVarQueryParams, - localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForListRuleAclTags()); + std::unique_ptr res = callApi("PUT", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForUpdateServiceSet()); - std::shared_ptr localVarResult = std::make_shared(); + 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 CfwClient::updateAclRule(UpdateAclRuleRequest &request) +std::shared_ptr CfwClient::addAclRule(AddAclRuleRequest &request) { - std::string localVarPath = "/v1/{project_id}/acl-rule/{acl_rule_id}"; + std::string localVarPath = "/v1/{project_id}/acl-rule"; std::map localVarQueryParams; std::map localVarHeaderParams; std::map localVarFormParams; std::map localVarPathParams; - localVarPathParams["acl_rule_id"] = parameterToString(request.getAclRuleId()); bool isJson = false; bool isMultiPart = false; @@ -3032,10 +3129,10 @@ std::shared_ptr CfwClient::updateAclRule(UpdateAclRuleReq localVarHttpBody = utility::conversions::to_utf8string(localVarJson.serialize()); } - std::unique_ptr res = callApi("PUT", localVarPath, localVarPathParams, localVarQueryParams, - localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForUpdateAclRule()); + std::unique_ptr res = callApi("POST", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForAddAclRule()); - std::shared_ptr localVarResult = std::make_shared(); + std::shared_ptr localVarResult = std::make_shared(); localVarResult->setStatusCode(res->getStatusCode()); localVarResult->setHeaderParams(res->getHeaderParams()); localVarResult->setHttpBody(res->getHttpBody()); @@ -3048,16 +3145,15 @@ std::shared_ptr CfwClient::updateAclRule(UpdateAclRuleReq return localVarResult; } -std::shared_ptr CfwClient::updateAclRuleOrder(UpdateAclRuleOrderRequest &request) +std::shared_ptr CfwClient::batchDeleteAclRules(BatchDeleteAclRulesRequest &request) { - std::string localVarPath = "/v1/{project_id}/acl-rule/order/{acl_rule_id}"; + std::string localVarPath = "/v1/{project_id}/acl-rule"; std::map localVarQueryParams; std::map localVarHeaderParams; std::map localVarFormParams; std::map localVarPathParams; - localVarPathParams["acl_rule_id"] = parameterToString(request.getAclRuleId()); bool isJson = false; bool isMultiPart = false; @@ -3080,10 +3176,10 @@ std::shared_ptr CfwClient::updateAclRuleOrder(Update localVarHttpBody = utility::conversions::to_utf8string(localVarJson.serialize()); } - std::unique_ptr res = callApi("PUT", localVarPath, localVarPathParams, localVarQueryParams, - localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForUpdateAclRuleOrder()); + std::unique_ptr res = callApi("DELETE", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForBatchDeleteAclRules()); - std::shared_ptr localVarResult = std::make_shared(); + std::shared_ptr localVarResult = std::make_shared(); localVarResult->setStatusCode(res->getStatusCode()); localVarResult->setHeaderParams(res->getHeaderParams()); localVarResult->setHttpBody(res->getHttpBody()); @@ -3096,9 +3192,9 @@ std::shared_ptr CfwClient::updateAclRuleOrder(Update return localVarResult; } -std::shared_ptr CfwClient::changeEipStatus(ChangeEipStatusRequest &request) +std::shared_ptr CfwClient::batchUpdateAclRuleActions(BatchUpdateAclRuleActionsRequest &request) { - std::string localVarPath = "/v1/{project_id}/eip/protect"; + std::string localVarPath = "/v1/{project_id}/acl-rule/action"; std::map localVarQueryParams; std::map localVarHeaderParams; @@ -3127,10 +3223,10 @@ std::shared_ptr CfwClient::changeEipStatus(ChangeEipSta localVarHttpBody = utility::conversions::to_utf8string(localVarJson.serialize()); } - std::unique_ptr res = callApi("POST", localVarPath, localVarPathParams, localVarQueryParams, - localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForChangeEipStatus()); + std::unique_ptr res = callApi("PUT", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForBatchUpdateAclRuleActions()); - std::shared_ptr localVarResult = std::make_shared(); + std::shared_ptr localVarResult = std::make_shared(); localVarResult->setStatusCode(res->getStatusCode()); localVarResult->setHeaderParams(res->getHeaderParams()); localVarResult->setHttpBody(res->getHttpBody()); @@ -3143,16 +3239,16 @@ std::shared_ptr CfwClient::changeEipStatus(ChangeEipSta return localVarResult; } -std::shared_ptr CfwClient::listEipCount(ListEipCountRequest &request) +std::shared_ptr CfwClient::deleteAclRule(DeleteAclRuleRequest &request) { - std::string localVarPath = "/v1/{project_id}/eip-count/{object_id}"; + std::string localVarPath = "/v1/{project_id}/acl-rule/{acl_rule_id}"; std::map localVarQueryParams; std::map localVarHeaderParams; std::map localVarFormParams; std::map localVarPathParams; - localVarPathParams["object_id"] = parameterToString(request.getObjectId()); + localVarPathParams["acl_rule_id"] = parameterToString(request.getAclRuleId()); bool isJson = false; bool isMultiPart = false; @@ -3169,19 +3265,19 @@ std::shared_ptr CfwClient::listEipCount(ListEipCountReques std::string localVarHttpBody; - std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, - localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForListEipCount()); + std::unique_ptr res = callApi("DELETE", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForDeleteAclRule()); - std::shared_ptr localVarResult = std::make_shared(); + std::shared_ptr localVarResult = std::make_shared(); localVarResult->setStatusCode(res->getStatusCode()); localVarResult->setHeaderParams(res->getHeaderParams()); localVarResult->setHttpBody(res->getHttpBody()); return localVarResult; } -std::shared_ptr CfwClient::listEips(ListEipsRequest &request) +std::shared_ptr CfwClient::deleteAclRuleHitCount(DeleteAclRuleHitCountRequest &request) { - std::string localVarPath = "/v1/{project_id}/eips/protect"; + std::string localVarPath = "/v1/{project_id}/acl-rule/count"; std::map localVarQueryParams; std::map localVarHeaderParams; @@ -3195,41 +3291,547 @@ std::shared_ptr CfwClient::listEips(ListEipsRequest &request) std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); localVarHeaderParams["Content-Type"] = contentType; - if (request.objectIdIsSet()) { - localVarQueryParams["object_id"] = parameterToString(request.getObjectId()); - } - if (request.keyWordIsSet()) { - localVarQueryParams["key_word"] = parameterToString(request.getKeyWord()); - } - if (request.statusIsSet()) { - localVarQueryParams["status"] = parameterToString(request.getStatus()); - } - if (request.syncIsSet()) { - localVarQueryParams["sync"] = parameterToString(request.getSync()); - } - if (request.limitIsSet()) { - localVarQueryParams["limit"] = parameterToString(request.getLimit()); - } - if (request.offsetIsSet()) { - localVarQueryParams["offset"] = parameterToString(request.getOffset()); - } if (request.enterpriseProjectIdIsSet()) { localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); } - if (request.deviceKeyIsSet()) { - localVarQueryParams["device_key"] = parameterToString(request.getDeviceKey()); - } - if (request.addressTypeIsSet()) { - localVarQueryParams["address_type"] = parameterToString(request.getAddressType()); - } if (request.fwInstanceIdIsSet()) { localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); } - if (request.fwKeyWordIsSet()) { - localVarQueryParams["fw_key_word"] = parameterToString(request.getFwKeyWord()); - } - if (request.epsIdIsSet()) { - localVarQueryParams["eps_id"] = parameterToString(request.getEpsId()); + + 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("DELETE", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForDeleteAclRuleHitCount()); + + 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 CfwClient::listAclRuleHitCount(ListAclRuleHitCountRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/acl-rule/count"; + + 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; + + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + if (request.fwInstanceIdIsSet()) { + localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + } + + 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, CfwMeta::genRequestDefForListAclRuleHitCount()); + + 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 CfwClient::listAclRules(ListAclRulesRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/acl-rules"; + + 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; + + if (request.objectIdIsSet()) { + localVarQueryParams["object_id"] = parameterToString(request.getObjectId()); + } + if (request.typeIsSet()) { + localVarQueryParams["type"] = parameterToString(request.getType()); + } + if (request.ipIsSet()) { + localVarQueryParams["ip"] = parameterToString(request.getIp()); + } + if (request.nameIsSet()) { + localVarQueryParams["name"] = parameterToString(request.getName()); + } + if (request.directionIsSet()) { + localVarQueryParams["direction"] = parameterToString(request.getDirection()); + } + if (request.statusIsSet()) { + localVarQueryParams["status"] = parameterToString(request.getStatus()); + } + if (request.actionTypeIsSet()) { + localVarQueryParams["action_type"] = parameterToString(request.getActionType()); + } + if (request.addressTypeIsSet()) { + localVarQueryParams["address_type"] = parameterToString(request.getAddressType()); + } + if (request.limitIsSet()) { + localVarQueryParams["limit"] = parameterToString(request.getLimit()); + } + if (request.offsetIsSet()) { + localVarQueryParams["offset"] = parameterToString(request.getOffset()); + } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + if (request.fwInstanceIdIsSet()) { + localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + } + if (request.tagsIdIsSet()) { + localVarQueryParams["tags_id"] = parameterToString(request.getTagsId()); + } + if (request.sourceIsSet()) { + localVarQueryParams["source"] = parameterToString(request.getSource()); + } + if (request.destinationIsSet()) { + localVarQueryParams["destination"] = parameterToString(request.getDestination()); + } + if (request.serviceIsSet()) { + localVarQueryParams["service"] = parameterToString(request.getService()); + } + if (request.applicationIsSet()) { + localVarQueryParams["application"] = parameterToString(request.getApplication()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForListAclRules()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr CfwClient::listRegions(ListRegionsRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/regions"; + + 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; + + if (request.fwInstanceIdIsSet()) { + localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForListRegions()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr CfwClient::listRuleAclTags(ListRuleAclTagsRequest &request) +{ + std::string localVarPath = "/v2/{project_id}/cfw-acl/tags"; + + 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; + + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + if (request.fwInstanceIdIsSet()) { + localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + } + if (request.offsetIsSet()) { + localVarQueryParams["offset"] = parameterToString(request.getOffset()); + } + if (request.limitIsSet()) { + localVarQueryParams["limit"] = parameterToString(request.getLimit()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForListRuleAclTags()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr CfwClient::showImportStatus(ShowImportStatusRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/acl-rule/import-status"; + + 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; + + if (request.objectIdIsSet()) { + localVarQueryParams["object_id"] = parameterToString(request.getObjectId()); + } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForShowImportStatus()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr CfwClient::updateAclRule(UpdateAclRuleRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/acl-rule/{acl_rule_id}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["acl_rule_id"] = parameterToString(request.getAclRuleId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + if (request.fwInstanceIdIsSet()) { + localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + } + + 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, CfwMeta::genRequestDefForUpdateAclRule()); + + 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 CfwClient::updateAclRuleOrder(UpdateAclRuleOrderRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/acl-rule/order/{acl_rule_id}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["acl_rule_id"] = parameterToString(request.getAclRuleId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + if (request.fwInstanceIdIsSet()) { + localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + } + + 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, CfwMeta::genRequestDefForUpdateAclRuleOrder()); + + 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 CfwClient::changeEipStatus(ChangeEipStatusRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/eip/protect"; + + 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; + + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + if (request.fwInstanceIdIsSet()) { + localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + } + + 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, CfwMeta::genRequestDefForChangeEipStatus()); + + 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 CfwClient::listAlarmWhitelist(ListAlarmWhitelistRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/eip/alarm-whitelist/{fw_instance_id}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.ipAddressIsSet()) { + localVarQueryParams["ip_address"] = parameterToString(request.getIpAddress()); + } + if (request.limitIsSet()) { + localVarQueryParams["limit"] = parameterToString(request.getLimit()); + } + if (request.offsetIsSet()) { + localVarQueryParams["offset"] = parameterToString(request.getOffset()); + } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForListAlarmWhitelist()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr CfwClient::listEipCount(ListEipCountRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/eip-count/{object_id}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["object_id"] = parameterToString(request.getObjectId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + if (request.fwInstanceIdIsSet()) { + localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForListEipCount()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr CfwClient::listEips(ListEipsRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/eips/protect"; + + 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; + + if (request.objectIdIsSet()) { + localVarQueryParams["object_id"] = parameterToString(request.getObjectId()); + } + if (request.keyWordIsSet()) { + localVarQueryParams["key_word"] = parameterToString(request.getKeyWord()); + } + if (request.statusIsSet()) { + localVarQueryParams["status"] = parameterToString(request.getStatus()); + } + if (request.syncIsSet()) { + localVarQueryParams["sync"] = parameterToString(request.getSync()); + } + if (request.limitIsSet()) { + localVarQueryParams["limit"] = parameterToString(request.getLimit()); + } + if (request.offsetIsSet()) { + localVarQueryParams["offset"] = parameterToString(request.getOffset()); + } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + if (request.deviceKeyIsSet()) { + localVarQueryParams["device_key"] = parameterToString(request.getDeviceKey()); + } + if (request.addressTypeIsSet()) { + localVarQueryParams["address_type"] = parameterToString(request.getAddressType()); + } + if (request.fwInstanceIdIsSet()) { + localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + } + if (request.fwKeyWordIsSet()) { + localVarQueryParams["fw_key_word"] = parameterToString(request.getFwKeyWord()); + } + if (request.epsIdIsSet()) { + localVarQueryParams["eps_id"] = parameterToString(request.getEpsId()); } if (request.tagsIsSet()) { localVarQueryParams["tags"] = parameterToString(request.getTags()); @@ -3240,10 +3842,87 @@ std::shared_ptr CfwClient::listEips(ListEipsRequest &request) std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForListEips()); - std::shared_ptr localVarResult = std::make_shared(); + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr CfwClient::showAutoProtectStatus(ShowAutoProtectStatusRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/eip/auto-protect-status/{object_id}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["object_id"] = parameterToString(request.getObjectId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForShowAutoProtectStatus()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr CfwClient::switchAutoProtectStatus(SwitchAutoProtectStatusRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/eip/auto-protect-status/switch"; + + 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; + + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + + 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, CfwMeta::genRequestDefForSwitchAutoProtectStatus()); + + 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; } @@ -3294,6 +3973,50 @@ std::shared_ptr CfwClient::changeIpsProtectMode(Ch return localVarResult; } +std::shared_ptr CfwClient::changeIpsRuleMode(ChangeIpsRuleModeRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/ips-rule/mode"; + + 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; + + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + + 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, CfwMeta::genRequestDefForChangeIpsRuleMode()); + + 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 CfwClient::changeIpsSwitchStatus(ChangeIpsSwitchStatusRequest &request) { std::string localVarPath = "/v1/{project_id}/ips/switch"; @@ -3341,6 +4064,71 @@ std::shared_ptr CfwClient::changeIpsSwitchStatus( return localVarResult; } +std::shared_ptr CfwClient::listCustomerIps(ListCustomerIpsRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/ips/custom-rule"; + + 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; + + if (request.actionTypeIsSet()) { + localVarQueryParams["action_type"] = parameterToString(request.getActionType()); + } + if (request.affectedOsIsSet()) { + localVarQueryParams["affected_os"] = parameterToString(request.getAffectedOs()); + } + if (request.attackTypeIsSet()) { + localVarQueryParams["attack_type"] = parameterToString(request.getAttackType()); + } + if (request.fwInstanceIdIsSet()) { + localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + } + if (request.ipsNameIsSet()) { + localVarQueryParams["ips_name"] = parameterToString(request.getIpsName()); + } + if (request.limitIsSet()) { + localVarQueryParams["limit"] = parameterToString(request.getLimit()); + } + if (request.objectIdIsSet()) { + localVarQueryParams["object_id"] = parameterToString(request.getObjectId()); + } + if (request.offsetIsSet()) { + localVarQueryParams["offset"] = parameterToString(request.getOffset()); + } + if (request.protocolIsSet()) { + localVarQueryParams["protocol"] = parameterToString(request.getProtocol()); + } + if (request.severityIsSet()) { + localVarQueryParams["severity"] = parameterToString(request.getSeverity()); + } + if (request.softwareIsSet()) { + localVarQueryParams["software"] = parameterToString(request.getSoftware()); + } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForListCustomerIps()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr CfwClient::listIpsProtectMode(ListIpsProtectModeRequest &request) { std::string localVarPath = "/v1/{project_id}/ips/protect"; @@ -3379,6 +4167,115 @@ std::shared_ptr CfwClient::listIpsProtectMode(ListIp return localVarResult; } +std::shared_ptr CfwClient::listIpsRules(ListIpsRulesRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/advanced-ips-rules"; + + 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; + + if (request.objectIdIsSet()) { + localVarQueryParams["object_id"] = parameterToString(request.getObjectId()); + } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForListIpsRules()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr CfwClient::listIpsRules1(ListIpsRules1Request &request) +{ + std::string localVarPath = "/v1/{project_id}/ips-rule"; + + 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; + + if (request.affectedApplicationLikeIsSet()) { + localVarQueryParams["affected_application_like"] = parameterToString(request.getAffectedApplicationLike()); + } + if (request.createTimeIsSet()) { + localVarQueryParams["create_time"] = parameterToString(request.getCreateTime()); + } + if (request.fwInstanceIdIsSet()) { + localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + } + if (request.ipsCveLikeIsSet()) { + localVarQueryParams["ips_cve_like"] = parameterToString(request.getIpsCveLike()); + } + if (request.ipsGroupIsSet()) { + localVarQueryParams["ips_group"] = parameterToString(request.getIpsGroup()); + } + if (request.ipsIdIsSet()) { + localVarQueryParams["ips_id"] = parameterToString(request.getIpsId()); + } + if (request.ipsLevelIsSet()) { + localVarQueryParams["ips_level"] = parameterToString(request.getIpsLevel()); + } + if (request.ipsNameLikeIsSet()) { + localVarQueryParams["ips_name_like"] = parameterToString(request.getIpsNameLike()); + } + if (request.ipsRulesTypeLikeIsSet()) { + localVarQueryParams["ips_rules_type_like"] = parameterToString(request.getIpsRulesTypeLike()); + } + if (request.ipsStatusIsSet()) { + localVarQueryParams["ips_status"] = parameterToString(request.getIpsStatus()); + } + if (request.isUpdatedIpsRuleQueriedIsSet()) { + localVarQueryParams["is_updated_ips_rule_queried"] = parameterToString(request.isIsUpdatedIpsRuleQueried()); + } + if (request.limitIsSet()) { + localVarQueryParams["limit"] = parameterToString(request.getLimit()); + } + if (request.objectIdIsSet()) { + localVarQueryParams["object_id"] = parameterToString(request.getObjectId()); + } + if (request.offsetIsSet()) { + localVarQueryParams["offset"] = parameterToString(request.getOffset()); + } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForListIpsRules1()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr CfwClient::listIpsSwitchStatus(ListIpsSwitchStatusRequest &request) { std::string localVarPath = "/v1/{project_id}/ips/switch"; @@ -3417,6 +4314,88 @@ std::shared_ptr CfwClient::listIpsSwitchStatus(List return localVarResult; } +std::shared_ptr CfwClient::showIpsUpdateTime(ShowIpsUpdateTimeRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/ips-rule/detail"; + + 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; + + if (request.fwInstanceIdIsSet()) { + localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, CfwMeta::genRequestDefForShowIpsUpdateTime()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr CfwClient::updateAdvancedIpsRule(UpdateAdvancedIpsRuleRequest &request) +{ + std::string localVarPath = "/v1/{project_id}/advanced-ips-rule"; + + 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; + + if (request.fwInstanceIdIsSet()) { + localVarQueryParams["fw_instance_id"] = parameterToString(request.getFwInstanceId()); + } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + + 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, CfwMeta::genRequestDefForUpdateAdvancedIpsRule()); + + 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; +} #if defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) std::string CfwClient::parameterToString(utility::string_t value) { diff --git a/cfw/src/v1/CfwMeta.cpp b/cfw/src/v1/CfwMeta.cpp index b3a9e92e..21cdac34 100644 --- a/cfw/src/v1/CfwMeta.cpp +++ b/cfw/src/v1/CfwMeta.cpp @@ -143,6 +143,21 @@ HttpRequestDef CfwMeta::genRequestDefForBatchDeleteAddressItems() { return reqDefBuilder; } +HttpRequestDef CfwMeta::genRequestDefForBatchDeleteDomainSet() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("FwInstanceId") + .withJsonTag("fw_instance_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef CfwMeta::genRequestDefForBatchDeleteServiceItems() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") @@ -698,6 +713,23 @@ HttpRequestDef CfwMeta::genRequestDefForListDomainParseDetail() { return reqDefBuilder; } +HttpRequestDef CfwMeta::genRequestDefForListDomainParseIp() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("AddressType") + .withJsonTag("address_type") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("DomainSetId") + .withJsonTag("domain_set_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("FwInstanceId") + .withJsonTag("fw_instance_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + return reqDefBuilder; +} + HttpRequestDef CfwMeta::genRequestDefForListDomainSets() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") @@ -892,6 +924,20 @@ HttpRequestDef CfwMeta::genRequestDefForListLogConfig() { return reqDefBuilder; } +HttpRequestDef CfwMeta::genRequestDefForListProjectTags() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("Limit") + .withJsonTag("limit") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Offset") + .withJsonTag("offset") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + return reqDefBuilder; +} + HttpRequestDef CfwMeta::genRequestDefForListProtectedVpcs() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("ObjectId") @@ -906,6 +952,14 @@ HttpRequestDef CfwMeta::genRequestDefForListProtectedVpcs() { return reqDefBuilder; } +HttpRequestDef CfwMeta::genRequestDefForListResourceTags() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + return reqDefBuilder; +} + HttpRequestDef CfwMeta::genRequestDefForListServiceItems() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("SetId") @@ -972,6 +1026,71 @@ HttpRequestDef CfwMeta::genRequestDefForListServiceSets() { return reqDefBuilder; } +HttpRequestDef CfwMeta::genRequestDefForSaveTags() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + +HttpRequestDef CfwMeta::genRequestDefForShowAlarmConfig() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("FwInstanceId") + .withJsonTag("fw_instance_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef CfwMeta::genRequestDefForShowAntiVirusRule() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("ObjectId") + .withJsonTag("object_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EngineType") + .withJsonTag("engine_type") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Limit") + .withJsonTag("limit") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Offset") + .withJsonTag("offset") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef CfwMeta::genRequestDefForShowAntiVirusSwitch() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("ObjectId") + .withJsonTag("object_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef CfwMeta::genRequestDefForShowDomainSetDetail() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("FwInstanceId") + .withJsonTag("fw_instance_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + return reqDefBuilder; +} + HttpRequestDef CfwMeta::genRequestDefForUpdateAddressSet() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") @@ -987,6 +1106,45 @@ HttpRequestDef CfwMeta::genRequestDefForUpdateAddressSet() { return reqDefBuilder; } +HttpRequestDef CfwMeta::genRequestDefForUpdateAlarmConfig() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("FwInstanceId") + .withJsonTag("fw_instance_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + +HttpRequestDef CfwMeta::genRequestDefForUpdateAntiVirusRule() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + +HttpRequestDef CfwMeta::genRequestDefForUpdateAntiVirusSwitch() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef CfwMeta::genRequestDefForUpdateBlackWhiteList() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") @@ -1204,6 +1362,17 @@ HttpRequestDef CfwMeta::genRequestDefForListAclRules() { return reqDefBuilder; } +HttpRequestDef CfwMeta::genRequestDefForListRegions() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("FwInstanceId") + .withJsonTag("fw_instance_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + return reqDefBuilder; +} + HttpRequestDef CfwMeta::genRequestDefForListRuleAclTags() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") @@ -1221,6 +1390,17 @@ HttpRequestDef CfwMeta::genRequestDefForListRuleAclTags() { return reqDefBuilder; } +HttpRequestDef CfwMeta::genRequestDefForShowImportStatus() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("ObjectId") + .withJsonTag("object_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + return reqDefBuilder; +} + HttpRequestDef CfwMeta::genRequestDefForUpdateAclRule() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") @@ -1266,6 +1446,23 @@ HttpRequestDef CfwMeta::genRequestDefForChangeEipStatus() { return reqDefBuilder; } +HttpRequestDef CfwMeta::genRequestDefForListAlarmWhitelist() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("IpAddress") + .withJsonTag("ip_address") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Limit") + .withJsonTag("limit") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Offset") + .withJsonTag("offset") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + return reqDefBuilder; +} + HttpRequestDef CfwMeta::genRequestDefForListEipCount() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") @@ -1321,6 +1518,26 @@ HttpRequestDef CfwMeta::genRequestDefForListEips() { return reqDefBuilder; } +HttpRequestDef CfwMeta::genRequestDefForShowAutoProtectStatus() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef CfwMeta::genRequestDefForSwitchAutoProtectStatus() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef CfwMeta::genRequestDefForChangeIpsProtectMode() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") @@ -1336,6 +1553,18 @@ HttpRequestDef CfwMeta::genRequestDefForChangeIpsProtectMode() { return reqDefBuilder; } +HttpRequestDef CfwMeta::genRequestDefForChangeIpsRuleMode() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef CfwMeta::genRequestDefForChangeIpsSwitchStatus() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") @@ -1351,6 +1580,47 @@ HttpRequestDef CfwMeta::genRequestDefForChangeIpsSwitchStatus() { return reqDefBuilder; } +HttpRequestDef CfwMeta::genRequestDefForListCustomerIps() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("ActionType") + .withJsonTag("action_type") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("AffectedOs") + .withJsonTag("affected_os") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("AttackType") + .withJsonTag("attack_type") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("FwInstanceId") + .withJsonTag("fw_instance_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("IpsName") + .withJsonTag("ips_name") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Limit") + .withJsonTag("limit") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("ObjectId") + .withJsonTag("object_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Offset") + .withJsonTag("offset") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Protocol") + .withJsonTag("protocol") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Severity") + .withJsonTag("severity") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Software") + .withJsonTag("software") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + return reqDefBuilder; +} + HttpRequestDef CfwMeta::genRequestDefForListIpsProtectMode() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("ObjectId") @@ -1365,6 +1635,67 @@ HttpRequestDef CfwMeta::genRequestDefForListIpsProtectMode() { return reqDefBuilder; } +HttpRequestDef CfwMeta::genRequestDefForListIpsRules() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("ObjectId") + .withJsonTag("object_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef CfwMeta::genRequestDefForListIpsRules1() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("AffectedApplicationLike") + .withJsonTag("affected_application_like") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("CreateTime") + .withJsonTag("create_time") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("FwInstanceId") + .withJsonTag("fw_instance_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("IpsCveLike") + .withJsonTag("ips_cve_like") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("IpsGroup") + .withJsonTag("ips_group") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("IpsId") + .withJsonTag("ips_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("IpsLevel") + .withJsonTag("ips_level") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("IpsNameLike") + .withJsonTag("ips_name_like") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("IpsRulesTypeLike") + .withJsonTag("ips_rules_type_like") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("IpsStatus") + .withJsonTag("ips_status") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("IsUpdatedIpsRuleQueried") + .withJsonTag("is_updated_ips_rule_queried") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Limit") + .withJsonTag("limit") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("ObjectId") + .withJsonTag("object_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Offset") + .withJsonTag("offset") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + return reqDefBuilder; +} + HttpRequestDef CfwMeta::genRequestDefForListIpsSwitchStatus() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("ObjectId") @@ -1379,6 +1710,32 @@ HttpRequestDef CfwMeta::genRequestDefForListIpsSwitchStatus() { return reqDefBuilder; } +HttpRequestDef CfwMeta::genRequestDefForShowIpsUpdateTime() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("FwInstanceId") + .withJsonTag("fw_instance_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef CfwMeta::genRequestDefForUpdateAdvancedIpsRule() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("FwInstanceId") + .withJsonTag("fw_instance_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + } } diff --git a/cfw/src/v1/model/AdvancedIpsRuleDto.cpp b/cfw/src/v1/model/AdvancedIpsRuleDto.cpp new file mode 100644 index 00000000..a5e271fc --- /dev/null +++ b/cfw/src/v1/model/AdvancedIpsRuleDto.cpp @@ -0,0 +1,254 @@ + + +#include "huaweicloud/cfw/v1/model/AdvancedIpsRuleDto.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +AdvancedIpsRuleDto::AdvancedIpsRuleDto() +{ + action_ = 0; + actionIsSet_ = false; + ipsRuleId_ = ""; + ipsRuleIdIsSet_ = false; + ipsRuleType_ = 0; + ipsRuleTypeIsSet_ = false; + objectId_ = ""; + objectIdIsSet_ = false; + param_ = ""; + paramIsSet_ = false; + status_ = 0; + statusIsSet_ = false; +} + +AdvancedIpsRuleDto::~AdvancedIpsRuleDto() = default; + +void AdvancedIpsRuleDto::validate() +{ +} + +web::json::value AdvancedIpsRuleDto::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(actionIsSet_) { + val[utility::conversions::to_string_t("action")] = ModelBase::toJson(action_); + } + if(ipsRuleIdIsSet_) { + val[utility::conversions::to_string_t("ips_rule_id")] = ModelBase::toJson(ipsRuleId_); + } + if(ipsRuleTypeIsSet_) { + val[utility::conversions::to_string_t("ips_rule_type")] = ModelBase::toJson(ipsRuleType_); + } + if(objectIdIsSet_) { + val[utility::conversions::to_string_t("object_id")] = ModelBase::toJson(objectId_); + } + if(paramIsSet_) { + val[utility::conversions::to_string_t("param")] = ModelBase::toJson(param_); + } + if(statusIsSet_) { + val[utility::conversions::to_string_t("status")] = ModelBase::toJson(status_); + } + + return val; +} +bool AdvancedIpsRuleDto::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("action"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("action")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAction(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_rule_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_rule_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsRuleId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_rule_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_rule_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsRuleType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("object_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("object_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setObjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("param"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("param")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setParam(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; +} + + +int32_t AdvancedIpsRuleDto::getAction() const +{ + return action_; +} + +void AdvancedIpsRuleDto::setAction(int32_t value) +{ + action_ = value; + actionIsSet_ = true; +} + +bool AdvancedIpsRuleDto::actionIsSet() const +{ + return actionIsSet_; +} + +void AdvancedIpsRuleDto::unsetaction() +{ + actionIsSet_ = false; +} + +std::string AdvancedIpsRuleDto::getIpsRuleId() const +{ + return ipsRuleId_; +} + +void AdvancedIpsRuleDto::setIpsRuleId(const std::string& value) +{ + ipsRuleId_ = value; + ipsRuleIdIsSet_ = true; +} + +bool AdvancedIpsRuleDto::ipsRuleIdIsSet() const +{ + return ipsRuleIdIsSet_; +} + +void AdvancedIpsRuleDto::unsetipsRuleId() +{ + ipsRuleIdIsSet_ = false; +} + +int32_t AdvancedIpsRuleDto::getIpsRuleType() const +{ + return ipsRuleType_; +} + +void AdvancedIpsRuleDto::setIpsRuleType(int32_t value) +{ + ipsRuleType_ = value; + ipsRuleTypeIsSet_ = true; +} + +bool AdvancedIpsRuleDto::ipsRuleTypeIsSet() const +{ + return ipsRuleTypeIsSet_; +} + +void AdvancedIpsRuleDto::unsetipsRuleType() +{ + ipsRuleTypeIsSet_ = false; +} + +std::string AdvancedIpsRuleDto::getObjectId() const +{ + return objectId_; +} + +void AdvancedIpsRuleDto::setObjectId(const std::string& value) +{ + objectId_ = value; + objectIdIsSet_ = true; +} + +bool AdvancedIpsRuleDto::objectIdIsSet() const +{ + return objectIdIsSet_; +} + +void AdvancedIpsRuleDto::unsetobjectId() +{ + objectIdIsSet_ = false; +} + +std::string AdvancedIpsRuleDto::getParam() const +{ + return param_; +} + +void AdvancedIpsRuleDto::setParam(const std::string& value) +{ + param_ = value; + paramIsSet_ = true; +} + +bool AdvancedIpsRuleDto::paramIsSet() const +{ + return paramIsSet_; +} + +void AdvancedIpsRuleDto::unsetparam() +{ + paramIsSet_ = false; +} + +int32_t AdvancedIpsRuleDto::getStatus() const +{ + return status_; +} + +void AdvancedIpsRuleDto::setStatus(int32_t value) +{ + status_ = value; + statusIsSet_ = true; +} + +bool AdvancedIpsRuleDto::statusIsSet() const +{ + return statusIsSet_; +} + +void AdvancedIpsRuleDto::unsetstatus() +{ + statusIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/AdvancedIpsRuleListVo.cpp b/cfw/src/v1/model/AdvancedIpsRuleListVo.cpp new file mode 100644 index 00000000..a8cc65e4 --- /dev/null +++ b/cfw/src/v1/model/AdvancedIpsRuleListVo.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/cfw/v1/model/AdvancedIpsRuleListVo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +AdvancedIpsRuleListVo::AdvancedIpsRuleListVo() +{ + advancedIpsRulesIsSet_ = false; + total_ = 0; + totalIsSet_ = false; +} + +AdvancedIpsRuleListVo::~AdvancedIpsRuleListVo() = default; + +void AdvancedIpsRuleListVo::validate() +{ +} + +web::json::value AdvancedIpsRuleListVo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(advancedIpsRulesIsSet_) { + val[utility::conversions::to_string_t("advanced_ips_rules")] = ModelBase::toJson(advancedIpsRules_); + } + if(totalIsSet_) { + val[utility::conversions::to_string_t("total")] = ModelBase::toJson(total_); + } + + return val; +} +bool AdvancedIpsRuleListVo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("advanced_ips_rules"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("advanced_ips_rules")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAdvancedIpsRules(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("total"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("total")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTotal(refVal); + } + } + return ok; +} + + +std::vector& AdvancedIpsRuleListVo::getAdvancedIpsRules() +{ + return advancedIpsRules_; +} + +void AdvancedIpsRuleListVo::setAdvancedIpsRules(const std::vector& value) +{ + advancedIpsRules_ = value; + advancedIpsRulesIsSet_ = true; +} + +bool AdvancedIpsRuleListVo::advancedIpsRulesIsSet() const +{ + return advancedIpsRulesIsSet_; +} + +void AdvancedIpsRuleListVo::unsetadvancedIpsRules() +{ + advancedIpsRulesIsSet_ = false; +} + +int32_t AdvancedIpsRuleListVo::getTotal() const +{ + return total_; +} + +void AdvancedIpsRuleListVo::setTotal(int32_t value) +{ + total_ = value; + totalIsSet_ = true; +} + +bool AdvancedIpsRuleListVo::totalIsSet() const +{ + return totalIsSet_; +} + +void AdvancedIpsRuleListVo::unsettotal() +{ + totalIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/AdvancedIpsRuleVo.cpp b/cfw/src/v1/model/AdvancedIpsRuleVo.cpp new file mode 100644 index 00000000..9b74f572 --- /dev/null +++ b/cfw/src/v1/model/AdvancedIpsRuleVo.cpp @@ -0,0 +1,219 @@ + + +#include "huaweicloud/cfw/v1/model/AdvancedIpsRuleVo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +AdvancedIpsRuleVo::AdvancedIpsRuleVo() +{ + action_ = 0; + actionIsSet_ = false; + ipsRuleId_ = ""; + ipsRuleIdIsSet_ = false; + ipsRuleType_ = 0; + ipsRuleTypeIsSet_ = false; + param_ = ""; + paramIsSet_ = false; + status_ = 0; + statusIsSet_ = false; +} + +AdvancedIpsRuleVo::~AdvancedIpsRuleVo() = default; + +void AdvancedIpsRuleVo::validate() +{ +} + +web::json::value AdvancedIpsRuleVo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(actionIsSet_) { + val[utility::conversions::to_string_t("action")] = ModelBase::toJson(action_); + } + if(ipsRuleIdIsSet_) { + val[utility::conversions::to_string_t("ips_rule_id")] = ModelBase::toJson(ipsRuleId_); + } + if(ipsRuleTypeIsSet_) { + val[utility::conversions::to_string_t("ips_rule_type")] = ModelBase::toJson(ipsRuleType_); + } + if(paramIsSet_) { + val[utility::conversions::to_string_t("param")] = ModelBase::toJson(param_); + } + if(statusIsSet_) { + val[utility::conversions::to_string_t("status")] = ModelBase::toJson(status_); + } + + return val; +} +bool AdvancedIpsRuleVo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("action"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("action")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAction(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_rule_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_rule_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsRuleId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_rule_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_rule_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsRuleType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("param"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("param")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setParam(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; +} + + +int32_t AdvancedIpsRuleVo::getAction() const +{ + return action_; +} + +void AdvancedIpsRuleVo::setAction(int32_t value) +{ + action_ = value; + actionIsSet_ = true; +} + +bool AdvancedIpsRuleVo::actionIsSet() const +{ + return actionIsSet_; +} + +void AdvancedIpsRuleVo::unsetaction() +{ + actionIsSet_ = false; +} + +std::string AdvancedIpsRuleVo::getIpsRuleId() const +{ + return ipsRuleId_; +} + +void AdvancedIpsRuleVo::setIpsRuleId(const std::string& value) +{ + ipsRuleId_ = value; + ipsRuleIdIsSet_ = true; +} + +bool AdvancedIpsRuleVo::ipsRuleIdIsSet() const +{ + return ipsRuleIdIsSet_; +} + +void AdvancedIpsRuleVo::unsetipsRuleId() +{ + ipsRuleIdIsSet_ = false; +} + +int32_t AdvancedIpsRuleVo::getIpsRuleType() const +{ + return ipsRuleType_; +} + +void AdvancedIpsRuleVo::setIpsRuleType(int32_t value) +{ + ipsRuleType_ = value; + ipsRuleTypeIsSet_ = true; +} + +bool AdvancedIpsRuleVo::ipsRuleTypeIsSet() const +{ + return ipsRuleTypeIsSet_; +} + +void AdvancedIpsRuleVo::unsetipsRuleType() +{ + ipsRuleTypeIsSet_ = false; +} + +std::string AdvancedIpsRuleVo::getParam() const +{ + return param_; +} + +void AdvancedIpsRuleVo::setParam(const std::string& value) +{ + param_ = value; + paramIsSet_ = true; +} + +bool AdvancedIpsRuleVo::paramIsSet() const +{ + return paramIsSet_; +} + +void AdvancedIpsRuleVo::unsetparam() +{ + paramIsSet_ = false; +} + +int32_t AdvancedIpsRuleVo::getStatus() const +{ + return status_; +} + +void AdvancedIpsRuleVo::setStatus(int32_t value) +{ + status_ = value; + statusIsSet_ = true; +} + +bool AdvancedIpsRuleVo::statusIsSet() const +{ + return statusIsSet_; +} + +void AdvancedIpsRuleVo::unsetstatus() +{ + statusIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/AlarmConfig.cpp b/cfw/src/v1/model/AlarmConfig.cpp new file mode 100644 index 00000000..1b930c28 --- /dev/null +++ b/cfw/src/v1/model/AlarmConfig.cpp @@ -0,0 +1,464 @@ + + +#include "huaweicloud/cfw/v1/model/AlarmConfig.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +AlarmConfig::AlarmConfig() +{ + accountName_ = ""; + accountNameIsSet_ = false; + alarmId_ = ""; + alarmIdIsSet_ = false; + alarmTimePeriod_ = 0; + alarmTimePeriodIsSet_ = false; + alarmType_ = 0; + alarmTypeIsSet_ = false; + enableStatus_ = 0; + enableStatusIsSet_ = false; + frequencyCount_ = 0; + frequencyCountIsSet_ = false; + frequencyTime_ = 0; + frequencyTimeIsSet_ = false; + language_ = ""; + languageIsSet_ = false; + name_ = ""; + nameIsSet_ = false; + severity_ = ""; + severityIsSet_ = false; + topicUrn_ = ""; + topicUrnIsSet_ = false; + username_ = ""; + usernameIsSet_ = false; +} + +AlarmConfig::~AlarmConfig() = default; + +void AlarmConfig::validate() +{ +} + +web::json::value AlarmConfig::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(accountNameIsSet_) { + val[utility::conversions::to_string_t("account_name")] = ModelBase::toJson(accountName_); + } + if(alarmIdIsSet_) { + val[utility::conversions::to_string_t("alarm_id")] = ModelBase::toJson(alarmId_); + } + if(alarmTimePeriodIsSet_) { + val[utility::conversions::to_string_t("alarm_time_period")] = ModelBase::toJson(alarmTimePeriod_); + } + if(alarmTypeIsSet_) { + val[utility::conversions::to_string_t("alarm_type")] = ModelBase::toJson(alarmType_); + } + if(enableStatusIsSet_) { + val[utility::conversions::to_string_t("enable_status")] = ModelBase::toJson(enableStatus_); + } + if(frequencyCountIsSet_) { + val[utility::conversions::to_string_t("frequency_count")] = ModelBase::toJson(frequencyCount_); + } + if(frequencyTimeIsSet_) { + val[utility::conversions::to_string_t("frequency_time")] = ModelBase::toJson(frequencyTime_); + } + if(languageIsSet_) { + val[utility::conversions::to_string_t("language")] = ModelBase::toJson(language_); + } + if(nameIsSet_) { + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); + } + if(severityIsSet_) { + val[utility::conversions::to_string_t("severity")] = ModelBase::toJson(severity_); + } + if(topicUrnIsSet_) { + val[utility::conversions::to_string_t("topic_urn")] = ModelBase::toJson(topicUrn_); + } + if(usernameIsSet_) { + val[utility::conversions::to_string_t("username")] = ModelBase::toJson(username_); + } + + return val; +} +bool AlarmConfig::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("account_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("account_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAccountName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("alarm_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("alarm_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAlarmId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("alarm_time_period"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("alarm_time_period")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAlarmTimePeriod(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("alarm_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("alarm_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAlarmType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enable_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enable_status")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnableStatus(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("frequency_count"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("frequency_count")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFrequencyCount(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("frequency_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("frequency_time")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFrequencyTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("language"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("language")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLanguage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("severity"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("severity")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSeverity(refVal); + } + } + 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("username"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("username")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setUsername(refVal); + } + } + return ok; +} + + +std::string AlarmConfig::getAccountName() const +{ + return accountName_; +} + +void AlarmConfig::setAccountName(const std::string& value) +{ + accountName_ = value; + accountNameIsSet_ = true; +} + +bool AlarmConfig::accountNameIsSet() const +{ + return accountNameIsSet_; +} + +void AlarmConfig::unsetaccountName() +{ + accountNameIsSet_ = false; +} + +std::string AlarmConfig::getAlarmId() const +{ + return alarmId_; +} + +void AlarmConfig::setAlarmId(const std::string& value) +{ + alarmId_ = value; + alarmIdIsSet_ = true; +} + +bool AlarmConfig::alarmIdIsSet() const +{ + return alarmIdIsSet_; +} + +void AlarmConfig::unsetalarmId() +{ + alarmIdIsSet_ = false; +} + +int32_t AlarmConfig::getAlarmTimePeriod() const +{ + return alarmTimePeriod_; +} + +void AlarmConfig::setAlarmTimePeriod(int32_t value) +{ + alarmTimePeriod_ = value; + alarmTimePeriodIsSet_ = true; +} + +bool AlarmConfig::alarmTimePeriodIsSet() const +{ + return alarmTimePeriodIsSet_; +} + +void AlarmConfig::unsetalarmTimePeriod() +{ + alarmTimePeriodIsSet_ = false; +} + +int32_t AlarmConfig::getAlarmType() const +{ + return alarmType_; +} + +void AlarmConfig::setAlarmType(int32_t value) +{ + alarmType_ = value; + alarmTypeIsSet_ = true; +} + +bool AlarmConfig::alarmTypeIsSet() const +{ + return alarmTypeIsSet_; +} + +void AlarmConfig::unsetalarmType() +{ + alarmTypeIsSet_ = false; +} + +int32_t AlarmConfig::getEnableStatus() const +{ + return enableStatus_; +} + +void AlarmConfig::setEnableStatus(int32_t value) +{ + enableStatus_ = value; + enableStatusIsSet_ = true; +} + +bool AlarmConfig::enableStatusIsSet() const +{ + return enableStatusIsSet_; +} + +void AlarmConfig::unsetenableStatus() +{ + enableStatusIsSet_ = false; +} + +int32_t AlarmConfig::getFrequencyCount() const +{ + return frequencyCount_; +} + +void AlarmConfig::setFrequencyCount(int32_t value) +{ + frequencyCount_ = value; + frequencyCountIsSet_ = true; +} + +bool AlarmConfig::frequencyCountIsSet() const +{ + return frequencyCountIsSet_; +} + +void AlarmConfig::unsetfrequencyCount() +{ + frequencyCountIsSet_ = false; +} + +int32_t AlarmConfig::getFrequencyTime() const +{ + return frequencyTime_; +} + +void AlarmConfig::setFrequencyTime(int32_t value) +{ + frequencyTime_ = value; + frequencyTimeIsSet_ = true; +} + +bool AlarmConfig::frequencyTimeIsSet() const +{ + return frequencyTimeIsSet_; +} + +void AlarmConfig::unsetfrequencyTime() +{ + frequencyTimeIsSet_ = false; +} + +std::string AlarmConfig::getLanguage() const +{ + return language_; +} + +void AlarmConfig::setLanguage(const std::string& value) +{ + language_ = value; + languageIsSet_ = true; +} + +bool AlarmConfig::languageIsSet() const +{ + return languageIsSet_; +} + +void AlarmConfig::unsetlanguage() +{ + languageIsSet_ = false; +} + +std::string AlarmConfig::getName() const +{ + return name_; +} + +void AlarmConfig::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool AlarmConfig::nameIsSet() const +{ + return nameIsSet_; +} + +void AlarmConfig::unsetname() +{ + nameIsSet_ = false; +} + +std::string AlarmConfig::getSeverity() const +{ + return severity_; +} + +void AlarmConfig::setSeverity(const std::string& value) +{ + severity_ = value; + severityIsSet_ = true; +} + +bool AlarmConfig::severityIsSet() const +{ + return severityIsSet_; +} + +void AlarmConfig::unsetseverity() +{ + severityIsSet_ = false; +} + +std::string AlarmConfig::getTopicUrn() const +{ + return topicUrn_; +} + +void AlarmConfig::setTopicUrn(const std::string& value) +{ + topicUrn_ = value; + topicUrnIsSet_ = true; +} + +bool AlarmConfig::topicUrnIsSet() const +{ + return topicUrnIsSet_; +} + +void AlarmConfig::unsettopicUrn() +{ + topicUrnIsSet_ = false; +} + +std::string AlarmConfig::getUsername() const +{ + return username_; +} + +void AlarmConfig::setUsername(const std::string& value) +{ + username_ = value; + usernameIsSet_ = true; +} + +bool AlarmConfig::usernameIsSet() const +{ + return usernameIsSet_; +} + +void AlarmConfig::unsetusername() +{ + usernameIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/AntiVirusRuleDto.cpp b/cfw/src/v1/model/AntiVirusRuleDto.cpp new file mode 100644 index 00000000..0061729a --- /dev/null +++ b/cfw/src/v1/model/AntiVirusRuleDto.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/cfw/v1/model/AntiVirusRuleDto.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +AntiVirusRuleDto::AntiVirusRuleDto() +{ + objectId_ = ""; + objectIdIsSet_ = false; + scanProtocolConfigsIsSet_ = false; +} + +AntiVirusRuleDto::~AntiVirusRuleDto() = default; + +void AntiVirusRuleDto::validate() +{ +} + +web::json::value AntiVirusRuleDto::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(objectIdIsSet_) { + val[utility::conversions::to_string_t("object_id")] = ModelBase::toJson(objectId_); + } + if(scanProtocolConfigsIsSet_) { + val[utility::conversions::to_string_t("scan_protocol_configs")] = ModelBase::toJson(scanProtocolConfigs_); + } + + return val; +} +bool AntiVirusRuleDto::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("object_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("object_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setObjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("scan_protocol_configs"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("scan_protocol_configs")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setScanProtocolConfigs(refVal); + } + } + return ok; +} + + +std::string AntiVirusRuleDto::getObjectId() const +{ + return objectId_; +} + +void AntiVirusRuleDto::setObjectId(const std::string& value) +{ + objectId_ = value; + objectIdIsSet_ = true; +} + +bool AntiVirusRuleDto::objectIdIsSet() const +{ + return objectIdIsSet_; +} + +void AntiVirusRuleDto::unsetobjectId() +{ + objectIdIsSet_ = false; +} + +std::vector& AntiVirusRuleDto::getScanProtocolConfigs() +{ + return scanProtocolConfigs_; +} + +void AntiVirusRuleDto::setScanProtocolConfigs(const std::vector& value) +{ + scanProtocolConfigs_ = value; + scanProtocolConfigsIsSet_ = true; +} + +bool AntiVirusRuleDto::scanProtocolConfigsIsSet() const +{ + return scanProtocolConfigsIsSet_; +} + +void AntiVirusRuleDto::unsetscanProtocolConfigs() +{ + scanProtocolConfigsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/AntiVirusRuleVO.cpp b/cfw/src/v1/model/AntiVirusRuleVO.cpp new file mode 100644 index 00000000..50eda0d1 --- /dev/null +++ b/cfw/src/v1/model/AntiVirusRuleVO.cpp @@ -0,0 +1,183 @@ + + +#include "huaweicloud/cfw/v1/model/AntiVirusRuleVO.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +AntiVirusRuleVO::AntiVirusRuleVO() +{ + id_ = ""; + idIsSet_ = false; + name_ = ""; + nameIsSet_ = false; + scanProtocolConfigsIsSet_ = false; + total_ = 0; + totalIsSet_ = false; +} + +AntiVirusRuleVO::~AntiVirusRuleVO() = default; + +void AntiVirusRuleVO::validate() +{ +} + +web::json::value AntiVirusRuleVO::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(idIsSet_) { + val[utility::conversions::to_string_t("id")] = ModelBase::toJson(id_); + } + if(nameIsSet_) { + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); + } + if(scanProtocolConfigsIsSet_) { + val[utility::conversions::to_string_t("scan_protocol_configs")] = ModelBase::toJson(scanProtocolConfigs_); + } + if(totalIsSet_) { + val[utility::conversions::to_string_t("total")] = ModelBase::toJson(total_); + } + + return val; +} +bool AntiVirusRuleVO::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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("name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("scan_protocol_configs"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("scan_protocol_configs")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setScanProtocolConfigs(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("total"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("total")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTotal(refVal); + } + } + return ok; +} + + +std::string AntiVirusRuleVO::getId() const +{ + return id_; +} + +void AntiVirusRuleVO::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool AntiVirusRuleVO::idIsSet() const +{ + return idIsSet_; +} + +void AntiVirusRuleVO::unsetid() +{ + idIsSet_ = false; +} + +std::string AntiVirusRuleVO::getName() const +{ + return name_; +} + +void AntiVirusRuleVO::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool AntiVirusRuleVO::nameIsSet() const +{ + return nameIsSet_; +} + +void AntiVirusRuleVO::unsetname() +{ + nameIsSet_ = false; +} + +std::vector& AntiVirusRuleVO::getScanProtocolConfigs() +{ + return scanProtocolConfigs_; +} + +void AntiVirusRuleVO::setScanProtocolConfigs(const std::vector& value) +{ + scanProtocolConfigs_ = value; + scanProtocolConfigsIsSet_ = true; +} + +bool AntiVirusRuleVO::scanProtocolConfigsIsSet() const +{ + return scanProtocolConfigsIsSet_; +} + +void AntiVirusRuleVO::unsetscanProtocolConfigs() +{ + scanProtocolConfigsIsSet_ = false; +} + +int32_t AntiVirusRuleVO::getTotal() const +{ + return total_; +} + +void AntiVirusRuleVO::setTotal(int32_t value) +{ + total_ = value; + totalIsSet_ = true; +} + +bool AntiVirusRuleVO::totalIsSet() const +{ + return totalIsSet_; +} + +void AntiVirusRuleVO::unsettotal() +{ + totalIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/AntiVirusSwitchDto.cpp b/cfw/src/v1/model/AntiVirusSwitchDto.cpp new file mode 100644 index 00000000..737e4676 --- /dev/null +++ b/cfw/src/v1/model/AntiVirusSwitchDto.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/cfw/v1/model/AntiVirusSwitchDto.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +AntiVirusSwitchDto::AntiVirusSwitchDto() +{ + antiVirusStatus_ = 0; + antiVirusStatusIsSet_ = false; + objectId_ = ""; + objectIdIsSet_ = false; +} + +AntiVirusSwitchDto::~AntiVirusSwitchDto() = default; + +void AntiVirusSwitchDto::validate() +{ +} + +web::json::value AntiVirusSwitchDto::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(antiVirusStatusIsSet_) { + val[utility::conversions::to_string_t("anti_virus_status")] = ModelBase::toJson(antiVirusStatus_); + } + if(objectIdIsSet_) { + val[utility::conversions::to_string_t("object_id")] = ModelBase::toJson(objectId_); + } + + return val; +} +bool AntiVirusSwitchDto::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("anti_virus_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("anti_virus_status")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAntiVirusStatus(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("object_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("object_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setObjectId(refVal); + } + } + return ok; +} + + +int32_t AntiVirusSwitchDto::getAntiVirusStatus() const +{ + return antiVirusStatus_; +} + +void AntiVirusSwitchDto::setAntiVirusStatus(int32_t value) +{ + antiVirusStatus_ = value; + antiVirusStatusIsSet_ = true; +} + +bool AntiVirusSwitchDto::antiVirusStatusIsSet() const +{ + return antiVirusStatusIsSet_; +} + +void AntiVirusSwitchDto::unsetantiVirusStatus() +{ + antiVirusStatusIsSet_ = false; +} + +std::string AntiVirusSwitchDto::getObjectId() const +{ + return objectId_; +} + +void AntiVirusSwitchDto::setObjectId(const std::string& value) +{ + objectId_ = value; + objectIdIsSet_ = true; +} + +bool AntiVirusSwitchDto::objectIdIsSet() const +{ + return objectIdIsSet_; +} + +void AntiVirusSwitchDto::unsetobjectId() +{ + objectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/AntiVirusVO.cpp b/cfw/src/v1/model/AntiVirusVO.cpp new file mode 100644 index 00000000..d1e424f0 --- /dev/null +++ b/cfw/src/v1/model/AntiVirusVO.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/cfw/v1/model/AntiVirusVO.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +AntiVirusVO::AntiVirusVO() +{ + antiVirusStatus_ = 0; + antiVirusStatusIsSet_ = false; + id_ = ""; + idIsSet_ = false; + name_ = ""; + nameIsSet_ = false; +} + +AntiVirusVO::~AntiVirusVO() = default; + +void AntiVirusVO::validate() +{ +} + +web::json::value AntiVirusVO::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(antiVirusStatusIsSet_) { + val[utility::conversions::to_string_t("anti_virus_status")] = ModelBase::toJson(antiVirusStatus_); + } + if(idIsSet_) { + val[utility::conversions::to_string_t("id")] = ModelBase::toJson(id_); + } + if(nameIsSet_) { + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); + } + + return val; +} +bool AntiVirusVO::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("anti_virus_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("anti_virus_status")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAntiVirusStatus(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("name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setName(refVal); + } + } + return ok; +} + + +int32_t AntiVirusVO::getAntiVirusStatus() const +{ + return antiVirusStatus_; +} + +void AntiVirusVO::setAntiVirusStatus(int32_t value) +{ + antiVirusStatus_ = value; + antiVirusStatusIsSet_ = true; +} + +bool AntiVirusVO::antiVirusStatusIsSet() const +{ + return antiVirusStatusIsSet_; +} + +void AntiVirusVO::unsetantiVirusStatus() +{ + antiVirusStatusIsSet_ = false; +} + +std::string AntiVirusVO::getId() const +{ + return id_; +} + +void AntiVirusVO::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool AntiVirusVO::idIsSet() const +{ + return idIsSet_; +} + +void AntiVirusVO::unsetid() +{ + idIsSet_ = false; +} + +std::string AntiVirusVO::getName() const +{ + return name_; +} + +void AntiVirusVO::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool AntiVirusVO::nameIsSet() const +{ + return nameIsSet_; +} + +void AntiVirusVO::unsetname() +{ + nameIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/BatchDeleteDomainSetRequest.cpp b/cfw/src/v1/model/BatchDeleteDomainSetRequest.cpp new file mode 100644 index 00000000..88d8a38a --- /dev/null +++ b/cfw/src/v1/model/BatchDeleteDomainSetRequest.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/cfw/v1/model/BatchDeleteDomainSetRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +BatchDeleteDomainSetRequest::BatchDeleteDomainSetRequest() +{ + fwInstanceId_ = ""; + fwInstanceIdIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; + bodyIsSet_ = false; +} + +BatchDeleteDomainSetRequest::~BatchDeleteDomainSetRequest() = default; + +void BatchDeleteDomainSetRequest::validate() +{ +} + +web::json::value BatchDeleteDomainSetRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(fwInstanceIdIsSet_) { + val[utility::conversions::to_string_t("fw_instance_id")] = ModelBase::toJson(fwInstanceId_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool BatchDeleteDomainSetRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("fw_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fw_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFwInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(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()) + { + BatchDeleteDomainSetsDto refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string BatchDeleteDomainSetRequest::getFwInstanceId() const +{ + return fwInstanceId_; +} + +void BatchDeleteDomainSetRequest::setFwInstanceId(const std::string& value) +{ + fwInstanceId_ = value; + fwInstanceIdIsSet_ = true; +} + +bool BatchDeleteDomainSetRequest::fwInstanceIdIsSet() const +{ + return fwInstanceIdIsSet_; +} + +void BatchDeleteDomainSetRequest::unsetfwInstanceId() +{ + fwInstanceIdIsSet_ = false; +} + +std::string BatchDeleteDomainSetRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void BatchDeleteDomainSetRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool BatchDeleteDomainSetRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void BatchDeleteDomainSetRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +BatchDeleteDomainSetsDto BatchDeleteDomainSetRequest::getBody() const +{ + return body_; +} + +void BatchDeleteDomainSetRequest::setBody(const BatchDeleteDomainSetsDto& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool BatchDeleteDomainSetRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void BatchDeleteDomainSetRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/BatchDeleteDomainSetResponse.cpp b/cfw/src/v1/model/BatchDeleteDomainSetResponse.cpp new file mode 100644 index 00000000..8c24e172 --- /dev/null +++ b/cfw/src/v1/model/BatchDeleteDomainSetResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/BatchDeleteDomainSetResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +BatchDeleteDomainSetResponse::BatchDeleteDomainSetResponse() +{ + dataIsSet_ = false; +} + +BatchDeleteDomainSetResponse::~BatchDeleteDomainSetResponse() = default; + +void BatchDeleteDomainSetResponse::validate() +{ +} + +web::json::value BatchDeleteDomainSetResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool BatchDeleteDomainSetResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + std::map> refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +std::map>& BatchDeleteDomainSetResponse::getData() +{ + return data_; +} + +void BatchDeleteDomainSetResponse::setData(const std::map>& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool BatchDeleteDomainSetResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void BatchDeleteDomainSetResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/BatchDeleteDomainSetsDto.cpp b/cfw/src/v1/model/BatchDeleteDomainSetsDto.cpp new file mode 100644 index 00000000..c7e48cc7 --- /dev/null +++ b/cfw/src/v1/model/BatchDeleteDomainSetsDto.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/cfw/v1/model/BatchDeleteDomainSetsDto.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +BatchDeleteDomainSetsDto::BatchDeleteDomainSetsDto() +{ + objectId_ = ""; + objectIdIsSet_ = false; + setIdsIsSet_ = false; +} + +BatchDeleteDomainSetsDto::~BatchDeleteDomainSetsDto() = default; + +void BatchDeleteDomainSetsDto::validate() +{ +} + +web::json::value BatchDeleteDomainSetsDto::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(objectIdIsSet_) { + val[utility::conversions::to_string_t("object_id")] = ModelBase::toJson(objectId_); + } + if(setIdsIsSet_) { + val[utility::conversions::to_string_t("set_ids")] = ModelBase::toJson(setIds_); + } + + return val; +} +bool BatchDeleteDomainSetsDto::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("object_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("object_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setObjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("set_ids"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("set_ids")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSetIds(refVal); + } + } + return ok; +} + + +std::string BatchDeleteDomainSetsDto::getObjectId() const +{ + return objectId_; +} + +void BatchDeleteDomainSetsDto::setObjectId(const std::string& value) +{ + objectId_ = value; + objectIdIsSet_ = true; +} + +bool BatchDeleteDomainSetsDto::objectIdIsSet() const +{ + return objectIdIsSet_; +} + +void BatchDeleteDomainSetsDto::unsetobjectId() +{ + objectIdIsSet_ = false; +} + +std::vector& BatchDeleteDomainSetsDto::getSetIds() +{ + return setIds_; +} + +void BatchDeleteDomainSetsDto::setSetIds(const std::vector& value) +{ + setIds_ = value; + setIdsIsSet_ = true; +} + +bool BatchDeleteDomainSetsDto::setIdsIsSet() const +{ + return setIdsIsSet_; +} + +void BatchDeleteDomainSetsDto::unsetsetIds() +{ + setIdsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ChangeIpsRuleModeRequest.cpp b/cfw/src/v1/model/ChangeIpsRuleModeRequest.cpp new file mode 100644 index 00000000..862c57a4 --- /dev/null +++ b/cfw/src/v1/model/ChangeIpsRuleModeRequest.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/cfw/v1/model/ChangeIpsRuleModeRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ChangeIpsRuleModeRequest::ChangeIpsRuleModeRequest() +{ + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; + bodyIsSet_ = false; +} + +ChangeIpsRuleModeRequest::~ChangeIpsRuleModeRequest() = default; + +void ChangeIpsRuleModeRequest::validate() +{ +} + +web::json::value ChangeIpsRuleModeRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool ChangeIpsRuleModeRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(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()) + { + IpsRuleChangeDto refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string ChangeIpsRuleModeRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ChangeIpsRuleModeRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ChangeIpsRuleModeRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ChangeIpsRuleModeRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +IpsRuleChangeDto ChangeIpsRuleModeRequest::getBody() const +{ + return body_; +} + +void ChangeIpsRuleModeRequest::setBody(const IpsRuleChangeDto& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool ChangeIpsRuleModeRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void ChangeIpsRuleModeRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ChangeIpsRuleModeResponse.cpp b/cfw/src/v1/model/ChangeIpsRuleModeResponse.cpp new file mode 100644 index 00000000..b6323555 --- /dev/null +++ b/cfw/src/v1/model/ChangeIpsRuleModeResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/ChangeIpsRuleModeResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ChangeIpsRuleModeResponse::ChangeIpsRuleModeResponse() +{ + dataIsSet_ = false; +} + +ChangeIpsRuleModeResponse::~ChangeIpsRuleModeResponse() = default; + +void ChangeIpsRuleModeResponse::validate() +{ +} + +web::json::value ChangeIpsRuleModeResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool ChangeIpsRuleModeResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + IpsRuleChangeRespBody refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +IpsRuleChangeRespBody ChangeIpsRuleModeResponse::getData() const +{ + return data_; +} + +void ChangeIpsRuleModeResponse::setData(const IpsRuleChangeRespBody& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ChangeIpsRuleModeResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void ChangeIpsRuleModeResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/CustomerIpsListVO.cpp b/cfw/src/v1/model/CustomerIpsListVO.cpp new file mode 100644 index 00000000..309fd5c4 --- /dev/null +++ b/cfw/src/v1/model/CustomerIpsListVO.cpp @@ -0,0 +1,604 @@ + + +#include "huaweicloud/cfw/v1/model/CustomerIpsListVO.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +CustomerIpsListVO::CustomerIpsListVO() +{ + action_ = 0; + actionIsSet_ = false; + affectedOs_ = 0; + affectedOsIsSet_ = false; + attackType_ = 0; + attackTypeIsSet_ = false; + configStatus_ = 0; + configStatusIsSet_ = false; + content_ = ""; + contentIsSet_ = false; + dstPortType_ = 0; + dstPortTypeIsSet_ = false; + dstPorts_ = ""; + dstPortsIsSet_ = false; + groupId_ = ""; + groupIdIsSet_ = false; + ipsCfwId_ = ""; + ipsCfwIdIsSet_ = false; + ipsId_ = ""; + ipsIdIsSet_ = false; + ipsName_ = ""; + ipsNameIsSet_ = false; + protocol_ = 0; + protocolIsSet_ = false; + severity_ = 0; + severityIsSet_ = false; + software_ = 0; + softwareIsSet_ = false; + srcPortType_ = 0; + srcPortTypeIsSet_ = false; + srcPorts_ = ""; + srcPortsIsSet_ = false; +} + +CustomerIpsListVO::~CustomerIpsListVO() = default; + +void CustomerIpsListVO::validate() +{ +} + +web::json::value CustomerIpsListVO::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(actionIsSet_) { + val[utility::conversions::to_string_t("action")] = ModelBase::toJson(action_); + } + if(affectedOsIsSet_) { + val[utility::conversions::to_string_t("affected_os")] = ModelBase::toJson(affectedOs_); + } + if(attackTypeIsSet_) { + val[utility::conversions::to_string_t("attack_type")] = ModelBase::toJson(attackType_); + } + if(configStatusIsSet_) { + val[utility::conversions::to_string_t("config_status")] = ModelBase::toJson(configStatus_); + } + if(contentIsSet_) { + val[utility::conversions::to_string_t("content")] = ModelBase::toJson(content_); + } + if(dstPortTypeIsSet_) { + val[utility::conversions::to_string_t("dst_port_type")] = ModelBase::toJson(dstPortType_); + } + if(dstPortsIsSet_) { + val[utility::conversions::to_string_t("dst_ports")] = ModelBase::toJson(dstPorts_); + } + if(groupIdIsSet_) { + val[utility::conversions::to_string_t("group_id")] = ModelBase::toJson(groupId_); + } + if(ipsCfwIdIsSet_) { + val[utility::conversions::to_string_t("ips_cfw_id")] = ModelBase::toJson(ipsCfwId_); + } + if(ipsIdIsSet_) { + val[utility::conversions::to_string_t("ips_id")] = ModelBase::toJson(ipsId_); + } + if(ipsNameIsSet_) { + val[utility::conversions::to_string_t("ips_name")] = ModelBase::toJson(ipsName_); + } + if(protocolIsSet_) { + val[utility::conversions::to_string_t("protocol")] = ModelBase::toJson(protocol_); + } + if(severityIsSet_) { + val[utility::conversions::to_string_t("severity")] = ModelBase::toJson(severity_); + } + if(softwareIsSet_) { + val[utility::conversions::to_string_t("software")] = ModelBase::toJson(software_); + } + if(srcPortTypeIsSet_) { + val[utility::conversions::to_string_t("src_port_type")] = ModelBase::toJson(srcPortType_); + } + if(srcPortsIsSet_) { + val[utility::conversions::to_string_t("src_ports")] = ModelBase::toJson(srcPorts_); + } + + return val; +} +bool CustomerIpsListVO::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("action"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("action")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAction(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("affected_os"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("affected_os")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAffectedOs(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("attack_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("attack_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAttackType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("config_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("config_status")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConfigStatus(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("content"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("content")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setContent(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("dst_port_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("dst_port_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDstPortType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("dst_ports"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("dst_ports")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDstPorts(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("group_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("group_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setGroupId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_cfw_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_cfw_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsCfwId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsName(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()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setProtocol(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("severity"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("severity")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSeverity(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("software"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("software")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSoftware(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("src_port_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("src_port_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSrcPortType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("src_ports"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("src_ports")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSrcPorts(refVal); + } + } + return ok; +} + + +int32_t CustomerIpsListVO::getAction() const +{ + return action_; +} + +void CustomerIpsListVO::setAction(int32_t value) +{ + action_ = value; + actionIsSet_ = true; +} + +bool CustomerIpsListVO::actionIsSet() const +{ + return actionIsSet_; +} + +void CustomerIpsListVO::unsetaction() +{ + actionIsSet_ = false; +} + +int32_t CustomerIpsListVO::getAffectedOs() const +{ + return affectedOs_; +} + +void CustomerIpsListVO::setAffectedOs(int32_t value) +{ + affectedOs_ = value; + affectedOsIsSet_ = true; +} + +bool CustomerIpsListVO::affectedOsIsSet() const +{ + return affectedOsIsSet_; +} + +void CustomerIpsListVO::unsetaffectedOs() +{ + affectedOsIsSet_ = false; +} + +int32_t CustomerIpsListVO::getAttackType() const +{ + return attackType_; +} + +void CustomerIpsListVO::setAttackType(int32_t value) +{ + attackType_ = value; + attackTypeIsSet_ = true; +} + +bool CustomerIpsListVO::attackTypeIsSet() const +{ + return attackTypeIsSet_; +} + +void CustomerIpsListVO::unsetattackType() +{ + attackTypeIsSet_ = false; +} + +int32_t CustomerIpsListVO::getConfigStatus() const +{ + return configStatus_; +} + +void CustomerIpsListVO::setConfigStatus(int32_t value) +{ + configStatus_ = value; + configStatusIsSet_ = true; +} + +bool CustomerIpsListVO::configStatusIsSet() const +{ + return configStatusIsSet_; +} + +void CustomerIpsListVO::unsetconfigStatus() +{ + configStatusIsSet_ = false; +} + +std::string CustomerIpsListVO::getContent() const +{ + return content_; +} + +void CustomerIpsListVO::setContent(const std::string& value) +{ + content_ = value; + contentIsSet_ = true; +} + +bool CustomerIpsListVO::contentIsSet() const +{ + return contentIsSet_; +} + +void CustomerIpsListVO::unsetcontent() +{ + contentIsSet_ = false; +} + +int32_t CustomerIpsListVO::getDstPortType() const +{ + return dstPortType_; +} + +void CustomerIpsListVO::setDstPortType(int32_t value) +{ + dstPortType_ = value; + dstPortTypeIsSet_ = true; +} + +bool CustomerIpsListVO::dstPortTypeIsSet() const +{ + return dstPortTypeIsSet_; +} + +void CustomerIpsListVO::unsetdstPortType() +{ + dstPortTypeIsSet_ = false; +} + +std::string CustomerIpsListVO::getDstPorts() const +{ + return dstPorts_; +} + +void CustomerIpsListVO::setDstPorts(const std::string& value) +{ + dstPorts_ = value; + dstPortsIsSet_ = true; +} + +bool CustomerIpsListVO::dstPortsIsSet() const +{ + return dstPortsIsSet_; +} + +void CustomerIpsListVO::unsetdstPorts() +{ + dstPortsIsSet_ = false; +} + +std::string CustomerIpsListVO::getGroupId() const +{ + return groupId_; +} + +void CustomerIpsListVO::setGroupId(const std::string& value) +{ + groupId_ = value; + groupIdIsSet_ = true; +} + +bool CustomerIpsListVO::groupIdIsSet() const +{ + return groupIdIsSet_; +} + +void CustomerIpsListVO::unsetgroupId() +{ + groupIdIsSet_ = false; +} + +std::string CustomerIpsListVO::getIpsCfwId() const +{ + return ipsCfwId_; +} + +void CustomerIpsListVO::setIpsCfwId(const std::string& value) +{ + ipsCfwId_ = value; + ipsCfwIdIsSet_ = true; +} + +bool CustomerIpsListVO::ipsCfwIdIsSet() const +{ + return ipsCfwIdIsSet_; +} + +void CustomerIpsListVO::unsetipsCfwId() +{ + ipsCfwIdIsSet_ = false; +} + +std::string CustomerIpsListVO::getIpsId() const +{ + return ipsId_; +} + +void CustomerIpsListVO::setIpsId(const std::string& value) +{ + ipsId_ = value; + ipsIdIsSet_ = true; +} + +bool CustomerIpsListVO::ipsIdIsSet() const +{ + return ipsIdIsSet_; +} + +void CustomerIpsListVO::unsetipsId() +{ + ipsIdIsSet_ = false; +} + +std::string CustomerIpsListVO::getIpsName() const +{ + return ipsName_; +} + +void CustomerIpsListVO::setIpsName(const std::string& value) +{ + ipsName_ = value; + ipsNameIsSet_ = true; +} + +bool CustomerIpsListVO::ipsNameIsSet() const +{ + return ipsNameIsSet_; +} + +void CustomerIpsListVO::unsetipsName() +{ + ipsNameIsSet_ = false; +} + +int32_t CustomerIpsListVO::getProtocol() const +{ + return protocol_; +} + +void CustomerIpsListVO::setProtocol(int32_t value) +{ + protocol_ = value; + protocolIsSet_ = true; +} + +bool CustomerIpsListVO::protocolIsSet() const +{ + return protocolIsSet_; +} + +void CustomerIpsListVO::unsetprotocol() +{ + protocolIsSet_ = false; +} + +int32_t CustomerIpsListVO::getSeverity() const +{ + return severity_; +} + +void CustomerIpsListVO::setSeverity(int32_t value) +{ + severity_ = value; + severityIsSet_ = true; +} + +bool CustomerIpsListVO::severityIsSet() const +{ + return severityIsSet_; +} + +void CustomerIpsListVO::unsetseverity() +{ + severityIsSet_ = false; +} + +int32_t CustomerIpsListVO::getSoftware() const +{ + return software_; +} + +void CustomerIpsListVO::setSoftware(int32_t value) +{ + software_ = value; + softwareIsSet_ = true; +} + +bool CustomerIpsListVO::softwareIsSet() const +{ + return softwareIsSet_; +} + +void CustomerIpsListVO::unsetsoftware() +{ + softwareIsSet_ = false; +} + +int32_t CustomerIpsListVO::getSrcPortType() const +{ + return srcPortType_; +} + +void CustomerIpsListVO::setSrcPortType(int32_t value) +{ + srcPortType_ = value; + srcPortTypeIsSet_ = true; +} + +bool CustomerIpsListVO::srcPortTypeIsSet() const +{ + return srcPortTypeIsSet_; +} + +void CustomerIpsListVO::unsetsrcPortType() +{ + srcPortTypeIsSet_ = false; +} + +std::string CustomerIpsListVO::getSrcPorts() const +{ + return srcPorts_; +} + +void CustomerIpsListVO::setSrcPorts(const std::string& value) +{ + srcPorts_ = value; + srcPortsIsSet_ = true; +} + +bool CustomerIpsListVO::srcPortsIsSet() const +{ + return srcPortsIsSet_; +} + +void CustomerIpsListVO::unsetsrcPorts() +{ + srcPortsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/FirewallStatusVO.cpp b/cfw/src/v1/model/FirewallStatusVO.cpp new file mode 100644 index 00000000..4d67b8bf --- /dev/null +++ b/cfw/src/v1/model/FirewallStatusVO.cpp @@ -0,0 +1,289 @@ + + +#include "huaweicloud/cfw/v1/model/FirewallStatusVO.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +FirewallStatusVO::FirewallStatusVO() +{ + availableEipCount_ = 0; + availableEipCountIsSet_ = false; + beyondMaxCount_ = false; + beyondMaxCountIsSet_ = false; + eipProtectedSelf_ = 0; + eipProtectedSelfIsSet_ = false; + eipTotal_ = 0; + eipTotalIsSet_ = false; + eipUnProtected_ = 0; + eipUnProtectedIsSet_ = false; + objectId_ = ""; + objectIdIsSet_ = false; + status_ = 0; + statusIsSet_ = false; +} + +FirewallStatusVO::~FirewallStatusVO() = default; + +void FirewallStatusVO::validate() +{ +} + +web::json::value FirewallStatusVO::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(availableEipCountIsSet_) { + val[utility::conversions::to_string_t("available_eip_count")] = ModelBase::toJson(availableEipCount_); + } + if(beyondMaxCountIsSet_) { + val[utility::conversions::to_string_t("beyond_max_count")] = ModelBase::toJson(beyondMaxCount_); + } + if(eipProtectedSelfIsSet_) { + val[utility::conversions::to_string_t("eip_protected_self")] = ModelBase::toJson(eipProtectedSelf_); + } + if(eipTotalIsSet_) { + val[utility::conversions::to_string_t("eip_total")] = ModelBase::toJson(eipTotal_); + } + if(eipUnProtectedIsSet_) { + val[utility::conversions::to_string_t("eip_un_protected")] = ModelBase::toJson(eipUnProtected_); + } + if(objectIdIsSet_) { + val[utility::conversions::to_string_t("object_id")] = ModelBase::toJson(objectId_); + } + if(statusIsSet_) { + val[utility::conversions::to_string_t("status")] = ModelBase::toJson(status_); + } + + return val; +} +bool FirewallStatusVO::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("available_eip_count"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("available_eip_count")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAvailableEipCount(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("beyond_max_count"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("beyond_max_count")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBeyondMaxCount(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("eip_protected_self"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("eip_protected_self")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEipProtectedSelf(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("eip_total"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("eip_total")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEipTotal(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("eip_un_protected"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("eip_un_protected")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEipUnProtected(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("object_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("object_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setObjectId(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; +} + + +int32_t FirewallStatusVO::getAvailableEipCount() const +{ + return availableEipCount_; +} + +void FirewallStatusVO::setAvailableEipCount(int32_t value) +{ + availableEipCount_ = value; + availableEipCountIsSet_ = true; +} + +bool FirewallStatusVO::availableEipCountIsSet() const +{ + return availableEipCountIsSet_; +} + +void FirewallStatusVO::unsetavailableEipCount() +{ + availableEipCountIsSet_ = false; +} + +bool FirewallStatusVO::isBeyondMaxCount() const +{ + return beyondMaxCount_; +} + +void FirewallStatusVO::setBeyondMaxCount(bool value) +{ + beyondMaxCount_ = value; + beyondMaxCountIsSet_ = true; +} + +bool FirewallStatusVO::beyondMaxCountIsSet() const +{ + return beyondMaxCountIsSet_; +} + +void FirewallStatusVO::unsetbeyondMaxCount() +{ + beyondMaxCountIsSet_ = false; +} + +int32_t FirewallStatusVO::getEipProtectedSelf() const +{ + return eipProtectedSelf_; +} + +void FirewallStatusVO::setEipProtectedSelf(int32_t value) +{ + eipProtectedSelf_ = value; + eipProtectedSelfIsSet_ = true; +} + +bool FirewallStatusVO::eipProtectedSelfIsSet() const +{ + return eipProtectedSelfIsSet_; +} + +void FirewallStatusVO::unseteipProtectedSelf() +{ + eipProtectedSelfIsSet_ = false; +} + +int32_t FirewallStatusVO::getEipTotal() const +{ + return eipTotal_; +} + +void FirewallStatusVO::setEipTotal(int32_t value) +{ + eipTotal_ = value; + eipTotalIsSet_ = true; +} + +bool FirewallStatusVO::eipTotalIsSet() const +{ + return eipTotalIsSet_; +} + +void FirewallStatusVO::unseteipTotal() +{ + eipTotalIsSet_ = false; +} + +int32_t FirewallStatusVO::getEipUnProtected() const +{ + return eipUnProtected_; +} + +void FirewallStatusVO::setEipUnProtected(int32_t value) +{ + eipUnProtected_ = value; + eipUnProtectedIsSet_ = true; +} + +bool FirewallStatusVO::eipUnProtectedIsSet() const +{ + return eipUnProtectedIsSet_; +} + +void FirewallStatusVO::unseteipUnProtected() +{ + eipUnProtectedIsSet_ = false; +} + +std::string FirewallStatusVO::getObjectId() const +{ + return objectId_; +} + +void FirewallStatusVO::setObjectId(const std::string& value) +{ + objectId_ = value; + objectIdIsSet_ = true; +} + +bool FirewallStatusVO::objectIdIsSet() const +{ + return objectIdIsSet_; +} + +void FirewallStatusVO::unsetobjectId() +{ + objectIdIsSet_ = false; +} + +int32_t FirewallStatusVO::getStatus() const +{ + return status_; +} + +void FirewallStatusVO::setStatus(int32_t value) +{ + status_ = value; + statusIsSet_ = true; +} + +bool FirewallStatusVO::statusIsSet() const +{ + return statusIsSet_; +} + +void FirewallStatusVO::unsetstatus() +{ + statusIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/IpsRuleChangeDto.cpp b/cfw/src/v1/model/IpsRuleChangeDto.cpp new file mode 100644 index 00000000..d3320e94 --- /dev/null +++ b/cfw/src/v1/model/IpsRuleChangeDto.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/cfw/v1/model/IpsRuleChangeDto.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +IpsRuleChangeDto::IpsRuleChangeDto() +{ + ipsIdsIsSet_ = false; + objectId_ = ""; + objectIdIsSet_ = false; + status_ = ""; + statusIsSet_ = false; +} + +IpsRuleChangeDto::~IpsRuleChangeDto() = default; + +void IpsRuleChangeDto::validate() +{ +} + +web::json::value IpsRuleChangeDto::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(ipsIdsIsSet_) { + val[utility::conversions::to_string_t("ips_ids")] = ModelBase::toJson(ipsIds_); + } + if(objectIdIsSet_) { + val[utility::conversions::to_string_t("object_id")] = ModelBase::toJson(objectId_); + } + if(statusIsSet_) { + val[utility::conversions::to_string_t("status")] = ModelBase::toJson(status_); + } + + return val; +} +bool IpsRuleChangeDto::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("ips_ids"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_ids")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsIds(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("object_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("object_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setObjectId(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::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStatus(refVal); + } + } + return ok; +} + + +std::vector& IpsRuleChangeDto::getIpsIds() +{ + return ipsIds_; +} + +void IpsRuleChangeDto::setIpsIds(const std::vector& value) +{ + ipsIds_ = value; + ipsIdsIsSet_ = true; +} + +bool IpsRuleChangeDto::ipsIdsIsSet() const +{ + return ipsIdsIsSet_; +} + +void IpsRuleChangeDto::unsetipsIds() +{ + ipsIdsIsSet_ = false; +} + +std::string IpsRuleChangeDto::getObjectId() const +{ + return objectId_; +} + +void IpsRuleChangeDto::setObjectId(const std::string& value) +{ + objectId_ = value; + objectIdIsSet_ = true; +} + +bool IpsRuleChangeDto::objectIdIsSet() const +{ + return objectIdIsSet_; +} + +void IpsRuleChangeDto::unsetobjectId() +{ + objectIdIsSet_ = false; +} + +std::string IpsRuleChangeDto::getStatus() const +{ + return status_; +} + +void IpsRuleChangeDto::setStatus(const std::string& value) +{ + status_ = value; + statusIsSet_ = true; +} + +bool IpsRuleChangeDto::statusIsSet() const +{ + return statusIsSet_; +} + +void IpsRuleChangeDto::unsetstatus() +{ + statusIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/IpsRuleChangeRespBody.cpp b/cfw/src/v1/model/IpsRuleChangeRespBody.cpp new file mode 100644 index 00000000..ef626a57 --- /dev/null +++ b/cfw/src/v1/model/IpsRuleChangeRespBody.cpp @@ -0,0 +1,253 @@ + + +#include "huaweicloud/cfw/v1/model/IpsRuleChangeRespBody.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +IpsRuleChangeRespBody::IpsRuleChangeRespBody() +{ + errorCode_ = ""; + errorCodeIsSet_ = false; + errorMsg_ = ""; + errorMsgIsSet_ = false; + groupId_ = ""; + groupIdIsSet_ = false; + id_ = ""; + idIsSet_ = false; + ipsIdsIsSet_ = false; + result_ = false; + resultIsSet_ = false; +} + +IpsRuleChangeRespBody::~IpsRuleChangeRespBody() = default; + +void IpsRuleChangeRespBody::validate() +{ +} + +web::json::value IpsRuleChangeRespBody::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(errorCodeIsSet_) { + val[utility::conversions::to_string_t("error_code")] = ModelBase::toJson(errorCode_); + } + if(errorMsgIsSet_) { + val[utility::conversions::to_string_t("error_msg")] = ModelBase::toJson(errorMsg_); + } + if(groupIdIsSet_) { + val[utility::conversions::to_string_t("group_id")] = ModelBase::toJson(groupId_); + } + if(idIsSet_) { + val[utility::conversions::to_string_t("id")] = ModelBase::toJson(id_); + } + if(ipsIdsIsSet_) { + val[utility::conversions::to_string_t("ips_ids")] = ModelBase::toJson(ipsIds_); + } + if(resultIsSet_) { + val[utility::conversions::to_string_t("result")] = ModelBase::toJson(result_); + } + + return val; +} +bool IpsRuleChangeRespBody::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("error_code"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("error_code")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setErrorCode(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("error_msg"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("error_msg")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setErrorMsg(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("group_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("group_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setGroupId(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("ips_ids"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_ids")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsIds(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("result"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("result")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setResult(refVal); + } + } + return ok; +} + + +std::string IpsRuleChangeRespBody::getErrorCode() const +{ + return errorCode_; +} + +void IpsRuleChangeRespBody::setErrorCode(const std::string& value) +{ + errorCode_ = value; + errorCodeIsSet_ = true; +} + +bool IpsRuleChangeRespBody::errorCodeIsSet() const +{ + return errorCodeIsSet_; +} + +void IpsRuleChangeRespBody::unseterrorCode() +{ + errorCodeIsSet_ = false; +} + +std::string IpsRuleChangeRespBody::getErrorMsg() const +{ + return errorMsg_; +} + +void IpsRuleChangeRespBody::setErrorMsg(const std::string& value) +{ + errorMsg_ = value; + errorMsgIsSet_ = true; +} + +bool IpsRuleChangeRespBody::errorMsgIsSet() const +{ + return errorMsgIsSet_; +} + +void IpsRuleChangeRespBody::unseterrorMsg() +{ + errorMsgIsSet_ = false; +} + +std::string IpsRuleChangeRespBody::getGroupId() const +{ + return groupId_; +} + +void IpsRuleChangeRespBody::setGroupId(const std::string& value) +{ + groupId_ = value; + groupIdIsSet_ = true; +} + +bool IpsRuleChangeRespBody::groupIdIsSet() const +{ + return groupIdIsSet_; +} + +void IpsRuleChangeRespBody::unsetgroupId() +{ + groupIdIsSet_ = false; +} + +std::string IpsRuleChangeRespBody::getId() const +{ + return id_; +} + +void IpsRuleChangeRespBody::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool IpsRuleChangeRespBody::idIsSet() const +{ + return idIsSet_; +} + +void IpsRuleChangeRespBody::unsetid() +{ + idIsSet_ = false; +} + +std::vector& IpsRuleChangeRespBody::getIpsIds() +{ + return ipsIds_; +} + +void IpsRuleChangeRespBody::setIpsIds(const std::vector& value) +{ + ipsIds_ = value; + ipsIdsIsSet_ = true; +} + +bool IpsRuleChangeRespBody::ipsIdsIsSet() const +{ + return ipsIdsIsSet_; +} + +void IpsRuleChangeRespBody::unsetipsIds() +{ + ipsIdsIsSet_ = false; +} + +bool IpsRuleChangeRespBody::isResult() const +{ + return result_; +} + +void IpsRuleChangeRespBody::setResult(bool value) +{ + result_ = value; + resultIsSet_ = true; +} + +bool IpsRuleChangeRespBody::resultIsSet() const +{ + return resultIsSet_; +} + +void IpsRuleChangeRespBody::unsetresult() +{ + resultIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/IpsRuleListVO.cpp b/cfw/src/v1/model/IpsRuleListVO.cpp new file mode 100644 index 00000000..d479b18f --- /dev/null +++ b/cfw/src/v1/model/IpsRuleListVO.cpp @@ -0,0 +1,253 @@ + + +#include "huaweicloud/cfw/v1/model/IpsRuleListVO.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +IpsRuleListVO::IpsRuleListVO() +{ + fwInstanceId_ = ""; + fwInstanceIdIsSet_ = false; + limit_ = 0; + limitIsSet_ = false; + objectId_ = ""; + objectIdIsSet_ = false; + offset_ = 0; + offsetIsSet_ = false; + recordsIsSet_ = false; + total_ = 0; + totalIsSet_ = false; +} + +IpsRuleListVO::~IpsRuleListVO() = default; + +void IpsRuleListVO::validate() +{ +} + +web::json::value IpsRuleListVO::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(fwInstanceIdIsSet_) { + val[utility::conversions::to_string_t("fw_instance_id")] = ModelBase::toJson(fwInstanceId_); + } + if(limitIsSet_) { + val[utility::conversions::to_string_t("limit")] = ModelBase::toJson(limit_); + } + if(objectIdIsSet_) { + val[utility::conversions::to_string_t("object_id")] = ModelBase::toJson(objectId_); + } + if(offsetIsSet_) { + val[utility::conversions::to_string_t("offset")] = ModelBase::toJson(offset_); + } + if(recordsIsSet_) { + val[utility::conversions::to_string_t("records")] = ModelBase::toJson(records_); + } + if(totalIsSet_) { + val[utility::conversions::to_string_t("total")] = ModelBase::toJson(total_); + } + + return val; +} +bool IpsRuleListVO::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("fw_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fw_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFwInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("limit"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("limit")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLimit(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("object_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("object_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setObjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("offset"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("offset")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOffset(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("records"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("records")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRecords(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("total"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("total")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTotal(refVal); + } + } + return ok; +} + + +std::string IpsRuleListVO::getFwInstanceId() const +{ + return fwInstanceId_; +} + +void IpsRuleListVO::setFwInstanceId(const std::string& value) +{ + fwInstanceId_ = value; + fwInstanceIdIsSet_ = true; +} + +bool IpsRuleListVO::fwInstanceIdIsSet() const +{ + return fwInstanceIdIsSet_; +} + +void IpsRuleListVO::unsetfwInstanceId() +{ + fwInstanceIdIsSet_ = false; +} + +int32_t IpsRuleListVO::getLimit() const +{ + return limit_; +} + +void IpsRuleListVO::setLimit(int32_t value) +{ + limit_ = value; + limitIsSet_ = true; +} + +bool IpsRuleListVO::limitIsSet() const +{ + return limitIsSet_; +} + +void IpsRuleListVO::unsetlimit() +{ + limitIsSet_ = false; +} + +std::string IpsRuleListVO::getObjectId() const +{ + return objectId_; +} + +void IpsRuleListVO::setObjectId(const std::string& value) +{ + objectId_ = value; + objectIdIsSet_ = true; +} + +bool IpsRuleListVO::objectIdIsSet() const +{ + return objectIdIsSet_; +} + +void IpsRuleListVO::unsetobjectId() +{ + objectIdIsSet_ = false; +} + +int32_t IpsRuleListVO::getOffset() const +{ + return offset_; +} + +void IpsRuleListVO::setOffset(int32_t value) +{ + offset_ = value; + offsetIsSet_ = true; +} + +bool IpsRuleListVO::offsetIsSet() const +{ + return offsetIsSet_; +} + +void IpsRuleListVO::unsetoffset() +{ + offsetIsSet_ = false; +} + +std::vector& IpsRuleListVO::getRecords() +{ + return records_; +} + +void IpsRuleListVO::setRecords(const std::vector& value) +{ + records_ = value; + recordsIsSet_ = true; +} + +bool IpsRuleListVO::recordsIsSet() const +{ + return recordsIsSet_; +} + +void IpsRuleListVO::unsetrecords() +{ + recordsIsSet_ = false; +} + +int32_t IpsRuleListVO::getTotal() const +{ + return total_; +} + +void IpsRuleListVO::setTotal(int32_t value) +{ + total_ = value; + totalIsSet_ = true; +} + +bool IpsRuleListVO::totalIsSet() const +{ + return totalIsSet_; +} + +void IpsRuleListVO::unsettotal() +{ + totalIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/IpsRuleUpdateTimeVO.cpp b/cfw/src/v1/model/IpsRuleUpdateTimeVO.cpp new file mode 100644 index 00000000..bf27a5fa --- /dev/null +++ b/cfw/src/v1/model/IpsRuleUpdateTimeVO.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/cfw/v1/model/IpsRuleUpdateTimeVO.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +IpsRuleUpdateTimeVO::IpsRuleUpdateTimeVO() +{ + ipsType_ = 0; + ipsTypeIsSet_ = false; + ipsVersion_ = ""; + ipsVersionIsSet_ = false; + updateTime_ = 0L; + updateTimeIsSet_ = false; +} + +IpsRuleUpdateTimeVO::~IpsRuleUpdateTimeVO() = default; + +void IpsRuleUpdateTimeVO::validate() +{ +} + +web::json::value IpsRuleUpdateTimeVO::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(ipsTypeIsSet_) { + val[utility::conversions::to_string_t("ips_type")] = ModelBase::toJson(ipsType_); + } + if(ipsVersionIsSet_) { + val[utility::conversions::to_string_t("ips_version")] = ModelBase::toJson(ipsVersion_); + } + if(updateTimeIsSet_) { + val[utility::conversions::to_string_t("update_time")] = ModelBase::toJson(updateTime_); + } + + return val; +} +bool IpsRuleUpdateTimeVO::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("ips_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_version"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_version")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsVersion(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("update_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("update_time")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setUpdateTime(refVal); + } + } + return ok; +} + + +int32_t IpsRuleUpdateTimeVO::getIpsType() const +{ + return ipsType_; +} + +void IpsRuleUpdateTimeVO::setIpsType(int32_t value) +{ + ipsType_ = value; + ipsTypeIsSet_ = true; +} + +bool IpsRuleUpdateTimeVO::ipsTypeIsSet() const +{ + return ipsTypeIsSet_; +} + +void IpsRuleUpdateTimeVO::unsetipsType() +{ + ipsTypeIsSet_ = false; +} + +std::string IpsRuleUpdateTimeVO::getIpsVersion() const +{ + return ipsVersion_; +} + +void IpsRuleUpdateTimeVO::setIpsVersion(const std::string& value) +{ + ipsVersion_ = value; + ipsVersionIsSet_ = true; +} + +bool IpsRuleUpdateTimeVO::ipsVersionIsSet() const +{ + return ipsVersionIsSet_; +} + +void IpsRuleUpdateTimeVO::unsetipsVersion() +{ + ipsVersionIsSet_ = false; +} + +int64_t IpsRuleUpdateTimeVO::getUpdateTime() const +{ + return updateTime_; +} + +void IpsRuleUpdateTimeVO::setUpdateTime(int64_t value) +{ + updateTime_ = value; + updateTimeIsSet_ = true; +} + +bool IpsRuleUpdateTimeVO::updateTimeIsSet() const +{ + return updateTimeIsSet_; +} + +void IpsRuleUpdateTimeVO::unsetupdateTime() +{ + updateTimeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/IpsRuleVO.cpp b/cfw/src/v1/model/IpsRuleVO.cpp new file mode 100644 index 00000000..94e7d616 --- /dev/null +++ b/cfw/src/v1/model/IpsRuleVO.cpp @@ -0,0 +1,394 @@ + + +#include "huaweicloud/cfw/v1/model/IpsRuleVO.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +IpsRuleVO::IpsRuleVO() +{ + affectedApplication_ = ""; + affectedApplicationIsSet_ = false; + createTime_ = ""; + createTimeIsSet_ = false; + defaultStatus_ = ""; + defaultStatusIsSet_ = false; + ipsCve_ = ""; + ipsCveIsSet_ = false; + ipsGroup_ = ""; + ipsGroupIsSet_ = false; + ipsId_ = ""; + ipsIdIsSet_ = false; + ipsLevel_ = ""; + ipsLevelIsSet_ = false; + ipsName_ = ""; + ipsNameIsSet_ = false; + ipsRulesType_ = ""; + ipsRulesTypeIsSet_ = false; + ipsStatus_ = ""; + ipsStatusIsSet_ = false; +} + +IpsRuleVO::~IpsRuleVO() = default; + +void IpsRuleVO::validate() +{ +} + +web::json::value IpsRuleVO::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(affectedApplicationIsSet_) { + val[utility::conversions::to_string_t("affected_application")] = ModelBase::toJson(affectedApplication_); + } + if(createTimeIsSet_) { + val[utility::conversions::to_string_t("create_time")] = ModelBase::toJson(createTime_); + } + if(defaultStatusIsSet_) { + val[utility::conversions::to_string_t("default_status")] = ModelBase::toJson(defaultStatus_); + } + if(ipsCveIsSet_) { + val[utility::conversions::to_string_t("ips_cve")] = ModelBase::toJson(ipsCve_); + } + if(ipsGroupIsSet_) { + val[utility::conversions::to_string_t("ips_group")] = ModelBase::toJson(ipsGroup_); + } + if(ipsIdIsSet_) { + val[utility::conversions::to_string_t("ips_id")] = ModelBase::toJson(ipsId_); + } + if(ipsLevelIsSet_) { + val[utility::conversions::to_string_t("ips_level")] = ModelBase::toJson(ipsLevel_); + } + if(ipsNameIsSet_) { + val[utility::conversions::to_string_t("ips_name")] = ModelBase::toJson(ipsName_); + } + if(ipsRulesTypeIsSet_) { + val[utility::conversions::to_string_t("ips_rules_type")] = ModelBase::toJson(ipsRulesType_); + } + if(ipsStatusIsSet_) { + val[utility::conversions::to_string_t("ips_status")] = ModelBase::toJson(ipsStatus_); + } + + return val; +} +bool IpsRuleVO::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("affected_application"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("affected_application")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAffectedApplication(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("create_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("create_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCreateTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("default_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("default_status")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDefaultStatus(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_cve"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_cve")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsCve(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_group"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_group")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsGroup(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_level"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_level")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsLevel(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_rules_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_rules_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsRulesType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_status")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsStatus(refVal); + } + } + return ok; +} + + +std::string IpsRuleVO::getAffectedApplication() const +{ + return affectedApplication_; +} + +void IpsRuleVO::setAffectedApplication(const std::string& value) +{ + affectedApplication_ = value; + affectedApplicationIsSet_ = true; +} + +bool IpsRuleVO::affectedApplicationIsSet() const +{ + return affectedApplicationIsSet_; +} + +void IpsRuleVO::unsetaffectedApplication() +{ + affectedApplicationIsSet_ = false; +} + +std::string IpsRuleVO::getCreateTime() const +{ + return createTime_; +} + +void IpsRuleVO::setCreateTime(const std::string& value) +{ + createTime_ = value; + createTimeIsSet_ = true; +} + +bool IpsRuleVO::createTimeIsSet() const +{ + return createTimeIsSet_; +} + +void IpsRuleVO::unsetcreateTime() +{ + createTimeIsSet_ = false; +} + +std::string IpsRuleVO::getDefaultStatus() const +{ + return defaultStatus_; +} + +void IpsRuleVO::setDefaultStatus(const std::string& value) +{ + defaultStatus_ = value; + defaultStatusIsSet_ = true; +} + +bool IpsRuleVO::defaultStatusIsSet() const +{ + return defaultStatusIsSet_; +} + +void IpsRuleVO::unsetdefaultStatus() +{ + defaultStatusIsSet_ = false; +} + +std::string IpsRuleVO::getIpsCve() const +{ + return ipsCve_; +} + +void IpsRuleVO::setIpsCve(const std::string& value) +{ + ipsCve_ = value; + ipsCveIsSet_ = true; +} + +bool IpsRuleVO::ipsCveIsSet() const +{ + return ipsCveIsSet_; +} + +void IpsRuleVO::unsetipsCve() +{ + ipsCveIsSet_ = false; +} + +std::string IpsRuleVO::getIpsGroup() const +{ + return ipsGroup_; +} + +void IpsRuleVO::setIpsGroup(const std::string& value) +{ + ipsGroup_ = value; + ipsGroupIsSet_ = true; +} + +bool IpsRuleVO::ipsGroupIsSet() const +{ + return ipsGroupIsSet_; +} + +void IpsRuleVO::unsetipsGroup() +{ + ipsGroupIsSet_ = false; +} + +std::string IpsRuleVO::getIpsId() const +{ + return ipsId_; +} + +void IpsRuleVO::setIpsId(const std::string& value) +{ + ipsId_ = value; + ipsIdIsSet_ = true; +} + +bool IpsRuleVO::ipsIdIsSet() const +{ + return ipsIdIsSet_; +} + +void IpsRuleVO::unsetipsId() +{ + ipsIdIsSet_ = false; +} + +std::string IpsRuleVO::getIpsLevel() const +{ + return ipsLevel_; +} + +void IpsRuleVO::setIpsLevel(const std::string& value) +{ + ipsLevel_ = value; + ipsLevelIsSet_ = true; +} + +bool IpsRuleVO::ipsLevelIsSet() const +{ + return ipsLevelIsSet_; +} + +void IpsRuleVO::unsetipsLevel() +{ + ipsLevelIsSet_ = false; +} + +std::string IpsRuleVO::getIpsName() const +{ + return ipsName_; +} + +void IpsRuleVO::setIpsName(const std::string& value) +{ + ipsName_ = value; + ipsNameIsSet_ = true; +} + +bool IpsRuleVO::ipsNameIsSet() const +{ + return ipsNameIsSet_; +} + +void IpsRuleVO::unsetipsName() +{ + ipsNameIsSet_ = false; +} + +std::string IpsRuleVO::getIpsRulesType() const +{ + return ipsRulesType_; +} + +void IpsRuleVO::setIpsRulesType(const std::string& value) +{ + ipsRulesType_ = value; + ipsRulesTypeIsSet_ = true; +} + +bool IpsRuleVO::ipsRulesTypeIsSet() const +{ + return ipsRulesTypeIsSet_; +} + +void IpsRuleVO::unsetipsRulesType() +{ + ipsRulesTypeIsSet_ = false; +} + +std::string IpsRuleVO::getIpsStatus() const +{ + return ipsStatus_; +} + +void IpsRuleVO::setIpsStatus(const std::string& value) +{ + ipsStatus_ = value; + ipsStatusIsSet_ = true; +} + +bool IpsRuleVO::ipsStatusIsSet() const +{ + return ipsStatusIsSet_; +} + +void IpsRuleVO::unsetipsStatus() +{ + ipsStatusIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListAlarmWhitelistRequest.cpp b/cfw/src/v1/model/ListAlarmWhitelistRequest.cpp new file mode 100644 index 00000000..e47666cb --- /dev/null +++ b/cfw/src/v1/model/ListAlarmWhitelistRequest.cpp @@ -0,0 +1,219 @@ + + +#include "huaweicloud/cfw/v1/model/ListAlarmWhitelistRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListAlarmWhitelistRequest::ListAlarmWhitelistRequest() +{ + fwInstanceId_ = ""; + fwInstanceIdIsSet_ = false; + ipAddress_ = ""; + ipAddressIsSet_ = false; + limit_ = 0; + limitIsSet_ = false; + offset_ = 0; + offsetIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +ListAlarmWhitelistRequest::~ListAlarmWhitelistRequest() = default; + +void ListAlarmWhitelistRequest::validate() +{ +} + +web::json::value ListAlarmWhitelistRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(fwInstanceIdIsSet_) { + val[utility::conversions::to_string_t("fw_instance_id")] = ModelBase::toJson(fwInstanceId_); + } + if(ipAddressIsSet_) { + val[utility::conversions::to_string_t("ip_address")] = ModelBase::toJson(ipAddress_); + } + if(limitIsSet_) { + val[utility::conversions::to_string_t("limit")] = ModelBase::toJson(limit_); + } + if(offsetIsSet_) { + val[utility::conversions::to_string_t("offset")] = ModelBase::toJson(offset_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool ListAlarmWhitelistRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("fw_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fw_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFwInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ip_address"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ip_address")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpAddress(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("limit"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("limit")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLimit(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("offset"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("offset")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOffset(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(refVal); + } + } + return ok; +} + + +std::string ListAlarmWhitelistRequest::getFwInstanceId() const +{ + return fwInstanceId_; +} + +void ListAlarmWhitelistRequest::setFwInstanceId(const std::string& value) +{ + fwInstanceId_ = value; + fwInstanceIdIsSet_ = true; +} + +bool ListAlarmWhitelistRequest::fwInstanceIdIsSet() const +{ + return fwInstanceIdIsSet_; +} + +void ListAlarmWhitelistRequest::unsetfwInstanceId() +{ + fwInstanceIdIsSet_ = false; +} + +std::string ListAlarmWhitelistRequest::getIpAddress() const +{ + return ipAddress_; +} + +void ListAlarmWhitelistRequest::setIpAddress(const std::string& value) +{ + ipAddress_ = value; + ipAddressIsSet_ = true; +} + +bool ListAlarmWhitelistRequest::ipAddressIsSet() const +{ + return ipAddressIsSet_; +} + +void ListAlarmWhitelistRequest::unsetipAddress() +{ + ipAddressIsSet_ = false; +} + +int32_t ListAlarmWhitelistRequest::getLimit() const +{ + return limit_; +} + +void ListAlarmWhitelistRequest::setLimit(int32_t value) +{ + limit_ = value; + limitIsSet_ = true; +} + +bool ListAlarmWhitelistRequest::limitIsSet() const +{ + return limitIsSet_; +} + +void ListAlarmWhitelistRequest::unsetlimit() +{ + limitIsSet_ = false; +} + +int32_t ListAlarmWhitelistRequest::getOffset() const +{ + return offset_; +} + +void ListAlarmWhitelistRequest::setOffset(int32_t value) +{ + offset_ = value; + offsetIsSet_ = true; +} + +bool ListAlarmWhitelistRequest::offsetIsSet() const +{ + return offsetIsSet_; +} + +void ListAlarmWhitelistRequest::unsetoffset() +{ + offsetIsSet_ = false; +} + +std::string ListAlarmWhitelistRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ListAlarmWhitelistRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ListAlarmWhitelistRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ListAlarmWhitelistRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListAlarmWhitelistResponse.cpp b/cfw/src/v1/model/ListAlarmWhitelistResponse.cpp new file mode 100644 index 00000000..52dac09f --- /dev/null +++ b/cfw/src/v1/model/ListAlarmWhitelistResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/ListAlarmWhitelistResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListAlarmWhitelistResponse::ListAlarmWhitelistResponse() +{ + dataIsSet_ = false; +} + +ListAlarmWhitelistResponse::~ListAlarmWhitelistResponse() = default; + +void ListAlarmWhitelistResponse::validate() +{ +} + +web::json::value ListAlarmWhitelistResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool ListAlarmWhitelistResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + PageInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +PageInfo ListAlarmWhitelistResponse::getData() const +{ + return data_; +} + +void ListAlarmWhitelistResponse::setData(const PageInfo& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ListAlarmWhitelistResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void ListAlarmWhitelistResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListCustomerIpsRequest.cpp b/cfw/src/v1/model/ListCustomerIpsRequest.cpp new file mode 100644 index 00000000..a0665011 --- /dev/null +++ b/cfw/src/v1/model/ListCustomerIpsRequest.cpp @@ -0,0 +1,464 @@ + + +#include "huaweicloud/cfw/v1/model/ListCustomerIpsRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListCustomerIpsRequest::ListCustomerIpsRequest() +{ + actionType_ = 0; + actionTypeIsSet_ = false; + affectedOs_ = 0; + affectedOsIsSet_ = false; + attackType_ = 0; + attackTypeIsSet_ = false; + fwInstanceId_ = ""; + fwInstanceIdIsSet_ = false; + ipsName_ = ""; + ipsNameIsSet_ = false; + limit_ = 0; + limitIsSet_ = false; + objectId_ = ""; + objectIdIsSet_ = false; + offset_ = 0; + offsetIsSet_ = false; + protocol_ = 0; + protocolIsSet_ = false; + severity_ = 0; + severityIsSet_ = false; + software_ = 0; + softwareIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +ListCustomerIpsRequest::~ListCustomerIpsRequest() = default; + +void ListCustomerIpsRequest::validate() +{ +} + +web::json::value ListCustomerIpsRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(actionTypeIsSet_) { + val[utility::conversions::to_string_t("action_type")] = ModelBase::toJson(actionType_); + } + if(affectedOsIsSet_) { + val[utility::conversions::to_string_t("affected_os")] = ModelBase::toJson(affectedOs_); + } + if(attackTypeIsSet_) { + val[utility::conversions::to_string_t("attack_type")] = ModelBase::toJson(attackType_); + } + if(fwInstanceIdIsSet_) { + val[utility::conversions::to_string_t("fw_instance_id")] = ModelBase::toJson(fwInstanceId_); + } + if(ipsNameIsSet_) { + val[utility::conversions::to_string_t("ips_name")] = ModelBase::toJson(ipsName_); + } + if(limitIsSet_) { + val[utility::conversions::to_string_t("limit")] = ModelBase::toJson(limit_); + } + if(objectIdIsSet_) { + val[utility::conversions::to_string_t("object_id")] = ModelBase::toJson(objectId_); + } + if(offsetIsSet_) { + val[utility::conversions::to_string_t("offset")] = ModelBase::toJson(offset_); + } + if(protocolIsSet_) { + val[utility::conversions::to_string_t("protocol")] = ModelBase::toJson(protocol_); + } + if(severityIsSet_) { + val[utility::conversions::to_string_t("severity")] = ModelBase::toJson(severity_); + } + if(softwareIsSet_) { + val[utility::conversions::to_string_t("software")] = ModelBase::toJson(software_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool ListCustomerIpsRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("action_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("action_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setActionType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("affected_os"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("affected_os")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAffectedOs(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("attack_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("attack_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAttackType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("fw_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fw_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFwInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("limit"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("limit")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLimit(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("object_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("object_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setObjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("offset"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("offset")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOffset(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()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setProtocol(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("severity"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("severity")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSeverity(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("software"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("software")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSoftware(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(refVal); + } + } + return ok; +} + + +int32_t ListCustomerIpsRequest::getActionType() const +{ + return actionType_; +} + +void ListCustomerIpsRequest::setActionType(int32_t value) +{ + actionType_ = value; + actionTypeIsSet_ = true; +} + +bool ListCustomerIpsRequest::actionTypeIsSet() const +{ + return actionTypeIsSet_; +} + +void ListCustomerIpsRequest::unsetactionType() +{ + actionTypeIsSet_ = false; +} + +int32_t ListCustomerIpsRequest::getAffectedOs() const +{ + return affectedOs_; +} + +void ListCustomerIpsRequest::setAffectedOs(int32_t value) +{ + affectedOs_ = value; + affectedOsIsSet_ = true; +} + +bool ListCustomerIpsRequest::affectedOsIsSet() const +{ + return affectedOsIsSet_; +} + +void ListCustomerIpsRequest::unsetaffectedOs() +{ + affectedOsIsSet_ = false; +} + +int32_t ListCustomerIpsRequest::getAttackType() const +{ + return attackType_; +} + +void ListCustomerIpsRequest::setAttackType(int32_t value) +{ + attackType_ = value; + attackTypeIsSet_ = true; +} + +bool ListCustomerIpsRequest::attackTypeIsSet() const +{ + return attackTypeIsSet_; +} + +void ListCustomerIpsRequest::unsetattackType() +{ + attackTypeIsSet_ = false; +} + +std::string ListCustomerIpsRequest::getFwInstanceId() const +{ + return fwInstanceId_; +} + +void ListCustomerIpsRequest::setFwInstanceId(const std::string& value) +{ + fwInstanceId_ = value; + fwInstanceIdIsSet_ = true; +} + +bool ListCustomerIpsRequest::fwInstanceIdIsSet() const +{ + return fwInstanceIdIsSet_; +} + +void ListCustomerIpsRequest::unsetfwInstanceId() +{ + fwInstanceIdIsSet_ = false; +} + +std::string ListCustomerIpsRequest::getIpsName() const +{ + return ipsName_; +} + +void ListCustomerIpsRequest::setIpsName(const std::string& value) +{ + ipsName_ = value; + ipsNameIsSet_ = true; +} + +bool ListCustomerIpsRequest::ipsNameIsSet() const +{ + return ipsNameIsSet_; +} + +void ListCustomerIpsRequest::unsetipsName() +{ + ipsNameIsSet_ = false; +} + +int32_t ListCustomerIpsRequest::getLimit() const +{ + return limit_; +} + +void ListCustomerIpsRequest::setLimit(int32_t value) +{ + limit_ = value; + limitIsSet_ = true; +} + +bool ListCustomerIpsRequest::limitIsSet() const +{ + return limitIsSet_; +} + +void ListCustomerIpsRequest::unsetlimit() +{ + limitIsSet_ = false; +} + +std::string ListCustomerIpsRequest::getObjectId() const +{ + return objectId_; +} + +void ListCustomerIpsRequest::setObjectId(const std::string& value) +{ + objectId_ = value; + objectIdIsSet_ = true; +} + +bool ListCustomerIpsRequest::objectIdIsSet() const +{ + return objectIdIsSet_; +} + +void ListCustomerIpsRequest::unsetobjectId() +{ + objectIdIsSet_ = false; +} + +int32_t ListCustomerIpsRequest::getOffset() const +{ + return offset_; +} + +void ListCustomerIpsRequest::setOffset(int32_t value) +{ + offset_ = value; + offsetIsSet_ = true; +} + +bool ListCustomerIpsRequest::offsetIsSet() const +{ + return offsetIsSet_; +} + +void ListCustomerIpsRequest::unsetoffset() +{ + offsetIsSet_ = false; +} + +int32_t ListCustomerIpsRequest::getProtocol() const +{ + return protocol_; +} + +void ListCustomerIpsRequest::setProtocol(int32_t value) +{ + protocol_ = value; + protocolIsSet_ = true; +} + +bool ListCustomerIpsRequest::protocolIsSet() const +{ + return protocolIsSet_; +} + +void ListCustomerIpsRequest::unsetprotocol() +{ + protocolIsSet_ = false; +} + +int32_t ListCustomerIpsRequest::getSeverity() const +{ + return severity_; +} + +void ListCustomerIpsRequest::setSeverity(int32_t value) +{ + severity_ = value; + severityIsSet_ = true; +} + +bool ListCustomerIpsRequest::severityIsSet() const +{ + return severityIsSet_; +} + +void ListCustomerIpsRequest::unsetseverity() +{ + severityIsSet_ = false; +} + +int32_t ListCustomerIpsRequest::getSoftware() const +{ + return software_; +} + +void ListCustomerIpsRequest::setSoftware(int32_t value) +{ + software_ = value; + softwareIsSet_ = true; +} + +bool ListCustomerIpsRequest::softwareIsSet() const +{ + return softwareIsSet_; +} + +void ListCustomerIpsRequest::unsetsoftware() +{ + softwareIsSet_ = false; +} + +std::string ListCustomerIpsRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ListCustomerIpsRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ListCustomerIpsRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ListCustomerIpsRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListCustomerIpsResponse.cpp b/cfw/src/v1/model/ListCustomerIpsResponse.cpp new file mode 100644 index 00000000..f5aa9140 --- /dev/null +++ b/cfw/src/v1/model/ListCustomerIpsResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/ListCustomerIpsResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListCustomerIpsResponse::ListCustomerIpsResponse() +{ + dataIsSet_ = false; +} + +ListCustomerIpsResponse::~ListCustomerIpsResponse() = default; + +void ListCustomerIpsResponse::validate() +{ +} + +web::json::value ListCustomerIpsResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool ListCustomerIpsResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + PageInfoCustomerIpsListVO refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +PageInfoCustomerIpsListVO ListCustomerIpsResponse::getData() const +{ + return data_; +} + +void ListCustomerIpsResponse::setData(const PageInfoCustomerIpsListVO& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ListCustomerIpsResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void ListCustomerIpsResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListDomainParseIpRequest.cpp b/cfw/src/v1/model/ListDomainParseIpRequest.cpp new file mode 100644 index 00000000..af1f684f --- /dev/null +++ b/cfw/src/v1/model/ListDomainParseIpRequest.cpp @@ -0,0 +1,219 @@ + + +#include "huaweicloud/cfw/v1/model/ListDomainParseIpRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListDomainParseIpRequest::ListDomainParseIpRequest() +{ + addressType_ = 0; + addressTypeIsSet_ = false; + domainAddressId_ = ""; + domainAddressIdIsSet_ = false; + domainSetId_ = ""; + domainSetIdIsSet_ = false; + fwInstanceId_ = ""; + fwInstanceIdIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +ListDomainParseIpRequest::~ListDomainParseIpRequest() = default; + +void ListDomainParseIpRequest::validate() +{ +} + +web::json::value ListDomainParseIpRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(addressTypeIsSet_) { + val[utility::conversions::to_string_t("address_type")] = ModelBase::toJson(addressType_); + } + if(domainAddressIdIsSet_) { + val[utility::conversions::to_string_t("domain_address_id")] = ModelBase::toJson(domainAddressId_); + } + if(domainSetIdIsSet_) { + val[utility::conversions::to_string_t("domain_set_id")] = ModelBase::toJson(domainSetId_); + } + if(fwInstanceIdIsSet_) { + val[utility::conversions::to_string_t("fw_instance_id")] = ModelBase::toJson(fwInstanceId_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool ListDomainParseIpRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("address_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("address_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAddressType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("domain_address_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_address_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainAddressId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("domain_set_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_set_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainSetId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("fw_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fw_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFwInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(refVal); + } + } + return ok; +} + + +int32_t ListDomainParseIpRequest::getAddressType() const +{ + return addressType_; +} + +void ListDomainParseIpRequest::setAddressType(int32_t value) +{ + addressType_ = value; + addressTypeIsSet_ = true; +} + +bool ListDomainParseIpRequest::addressTypeIsSet() const +{ + return addressTypeIsSet_; +} + +void ListDomainParseIpRequest::unsetaddressType() +{ + addressTypeIsSet_ = false; +} + +std::string ListDomainParseIpRequest::getDomainAddressId() const +{ + return domainAddressId_; +} + +void ListDomainParseIpRequest::setDomainAddressId(const std::string& value) +{ + domainAddressId_ = value; + domainAddressIdIsSet_ = true; +} + +bool ListDomainParseIpRequest::domainAddressIdIsSet() const +{ + return domainAddressIdIsSet_; +} + +void ListDomainParseIpRequest::unsetdomainAddressId() +{ + domainAddressIdIsSet_ = false; +} + +std::string ListDomainParseIpRequest::getDomainSetId() const +{ + return domainSetId_; +} + +void ListDomainParseIpRequest::setDomainSetId(const std::string& value) +{ + domainSetId_ = value; + domainSetIdIsSet_ = true; +} + +bool ListDomainParseIpRequest::domainSetIdIsSet() const +{ + return domainSetIdIsSet_; +} + +void ListDomainParseIpRequest::unsetdomainSetId() +{ + domainSetIdIsSet_ = false; +} + +std::string ListDomainParseIpRequest::getFwInstanceId() const +{ + return fwInstanceId_; +} + +void ListDomainParseIpRequest::setFwInstanceId(const std::string& value) +{ + fwInstanceId_ = value; + fwInstanceIdIsSet_ = true; +} + +bool ListDomainParseIpRequest::fwInstanceIdIsSet() const +{ + return fwInstanceIdIsSet_; +} + +void ListDomainParseIpRequest::unsetfwInstanceId() +{ + fwInstanceIdIsSet_ = false; +} + +std::string ListDomainParseIpRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ListDomainParseIpRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ListDomainParseIpRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ListDomainParseIpRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListDomainParseIpResponse.cpp b/cfw/src/v1/model/ListDomainParseIpResponse.cpp new file mode 100644 index 00000000..39227323 --- /dev/null +++ b/cfw/src/v1/model/ListDomainParseIpResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/ListDomainParseIpResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListDomainParseIpResponse::ListDomainParseIpResponse() +{ + dataIsSet_ = false; +} + +ListDomainParseIpResponse::~ListDomainParseIpResponse() = default; + +void ListDomainParseIpResponse::validate() +{ +} + +web::json::value ListDomainParseIpResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool ListDomainParseIpResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +std::vector& ListDomainParseIpResponse::getData() +{ + return data_; +} + +void ListDomainParseIpResponse::setData(const std::vector& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ListDomainParseIpResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void ListDomainParseIpResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListIpsRules1Request.cpp b/cfw/src/v1/model/ListIpsRules1Request.cpp new file mode 100644 index 00000000..ceefaf56 --- /dev/null +++ b/cfw/src/v1/model/ListIpsRules1Request.cpp @@ -0,0 +1,569 @@ + + +#include "huaweicloud/cfw/v1/model/ListIpsRules1Request.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListIpsRules1Request::ListIpsRules1Request() +{ + affectedApplicationLike_ = 0; + affectedApplicationLikeIsSet_ = false; + createTime_ = 0; + createTimeIsSet_ = false; + fwInstanceId_ = ""; + fwInstanceIdIsSet_ = false; + ipsCveLike_ = 0; + ipsCveLikeIsSet_ = false; + ipsGroup_ = 0; + ipsGroupIsSet_ = false; + ipsId_ = ""; + ipsIdIsSet_ = false; + ipsLevel_ = 0; + ipsLevelIsSet_ = false; + ipsNameLike_ = ""; + ipsNameLikeIsSet_ = false; + ipsRulesTypeLike_ = 0; + ipsRulesTypeLikeIsSet_ = false; + ipsStatus_ = ""; + ipsStatusIsSet_ = false; + isUpdatedIpsRuleQueried_ = false; + isUpdatedIpsRuleQueriedIsSet_ = false; + limit_ = 0; + limitIsSet_ = false; + objectId_ = ""; + objectIdIsSet_ = false; + offset_ = 0; + offsetIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +ListIpsRules1Request::~ListIpsRules1Request() = default; + +void ListIpsRules1Request::validate() +{ +} + +web::json::value ListIpsRules1Request::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(affectedApplicationLikeIsSet_) { + val[utility::conversions::to_string_t("affected_application_like")] = ModelBase::toJson(affectedApplicationLike_); + } + if(createTimeIsSet_) { + val[utility::conversions::to_string_t("create_time")] = ModelBase::toJson(createTime_); + } + if(fwInstanceIdIsSet_) { + val[utility::conversions::to_string_t("fw_instance_id")] = ModelBase::toJson(fwInstanceId_); + } + if(ipsCveLikeIsSet_) { + val[utility::conversions::to_string_t("ips_cve_like")] = ModelBase::toJson(ipsCveLike_); + } + if(ipsGroupIsSet_) { + val[utility::conversions::to_string_t("ips_group")] = ModelBase::toJson(ipsGroup_); + } + if(ipsIdIsSet_) { + val[utility::conversions::to_string_t("ips_id")] = ModelBase::toJson(ipsId_); + } + if(ipsLevelIsSet_) { + val[utility::conversions::to_string_t("ips_level")] = ModelBase::toJson(ipsLevel_); + } + if(ipsNameLikeIsSet_) { + val[utility::conversions::to_string_t("ips_name_like")] = ModelBase::toJson(ipsNameLike_); + } + if(ipsRulesTypeLikeIsSet_) { + val[utility::conversions::to_string_t("ips_rules_type_like")] = ModelBase::toJson(ipsRulesTypeLike_); + } + if(ipsStatusIsSet_) { + val[utility::conversions::to_string_t("ips_status")] = ModelBase::toJson(ipsStatus_); + } + if(isUpdatedIpsRuleQueriedIsSet_) { + val[utility::conversions::to_string_t("is_updated_ips_rule_queried")] = ModelBase::toJson(isUpdatedIpsRuleQueried_); + } + if(limitIsSet_) { + val[utility::conversions::to_string_t("limit")] = ModelBase::toJson(limit_); + } + if(objectIdIsSet_) { + val[utility::conversions::to_string_t("object_id")] = ModelBase::toJson(objectId_); + } + if(offsetIsSet_) { + val[utility::conversions::to_string_t("offset")] = ModelBase::toJson(offset_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool ListIpsRules1Request::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("affected_application_like"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("affected_application_like")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAffectedApplicationLike(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("create_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("create_time")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCreateTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("fw_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fw_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFwInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_cve_like"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_cve_like")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsCveLike(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_group"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_group")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsGroup(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_level"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_level")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsLevel(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_name_like"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_name_like")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsNameLike(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_rules_type_like"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_rules_type_like")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsRulesTypeLike(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ips_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips_status")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpsStatus(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("is_updated_ips_rule_queried"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_updated_ips_rule_queried")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsUpdatedIpsRuleQueried(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("limit"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("limit")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLimit(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("object_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("object_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setObjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("offset"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("offset")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOffset(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(refVal); + } + } + return ok; +} + + +int32_t ListIpsRules1Request::getAffectedApplicationLike() const +{ + return affectedApplicationLike_; +} + +void ListIpsRules1Request::setAffectedApplicationLike(int32_t value) +{ + affectedApplicationLike_ = value; + affectedApplicationLikeIsSet_ = true; +} + +bool ListIpsRules1Request::affectedApplicationLikeIsSet() const +{ + return affectedApplicationLikeIsSet_; +} + +void ListIpsRules1Request::unsetaffectedApplicationLike() +{ + affectedApplicationLikeIsSet_ = false; +} + +int32_t ListIpsRules1Request::getCreateTime() const +{ + return createTime_; +} + +void ListIpsRules1Request::setCreateTime(int32_t value) +{ + createTime_ = value; + createTimeIsSet_ = true; +} + +bool ListIpsRules1Request::createTimeIsSet() const +{ + return createTimeIsSet_; +} + +void ListIpsRules1Request::unsetcreateTime() +{ + createTimeIsSet_ = false; +} + +std::string ListIpsRules1Request::getFwInstanceId() const +{ + return fwInstanceId_; +} + +void ListIpsRules1Request::setFwInstanceId(const std::string& value) +{ + fwInstanceId_ = value; + fwInstanceIdIsSet_ = true; +} + +bool ListIpsRules1Request::fwInstanceIdIsSet() const +{ + return fwInstanceIdIsSet_; +} + +void ListIpsRules1Request::unsetfwInstanceId() +{ + fwInstanceIdIsSet_ = false; +} + +int32_t ListIpsRules1Request::getIpsCveLike() const +{ + return ipsCveLike_; +} + +void ListIpsRules1Request::setIpsCveLike(int32_t value) +{ + ipsCveLike_ = value; + ipsCveLikeIsSet_ = true; +} + +bool ListIpsRules1Request::ipsCveLikeIsSet() const +{ + return ipsCveLikeIsSet_; +} + +void ListIpsRules1Request::unsetipsCveLike() +{ + ipsCveLikeIsSet_ = false; +} + +int32_t ListIpsRules1Request::getIpsGroup() const +{ + return ipsGroup_; +} + +void ListIpsRules1Request::setIpsGroup(int32_t value) +{ + ipsGroup_ = value; + ipsGroupIsSet_ = true; +} + +bool ListIpsRules1Request::ipsGroupIsSet() const +{ + return ipsGroupIsSet_; +} + +void ListIpsRules1Request::unsetipsGroup() +{ + ipsGroupIsSet_ = false; +} + +std::string ListIpsRules1Request::getIpsId() const +{ + return ipsId_; +} + +void ListIpsRules1Request::setIpsId(const std::string& value) +{ + ipsId_ = value; + ipsIdIsSet_ = true; +} + +bool ListIpsRules1Request::ipsIdIsSet() const +{ + return ipsIdIsSet_; +} + +void ListIpsRules1Request::unsetipsId() +{ + ipsIdIsSet_ = false; +} + +int32_t ListIpsRules1Request::getIpsLevel() const +{ + return ipsLevel_; +} + +void ListIpsRules1Request::setIpsLevel(int32_t value) +{ + ipsLevel_ = value; + ipsLevelIsSet_ = true; +} + +bool ListIpsRules1Request::ipsLevelIsSet() const +{ + return ipsLevelIsSet_; +} + +void ListIpsRules1Request::unsetipsLevel() +{ + ipsLevelIsSet_ = false; +} + +std::string ListIpsRules1Request::getIpsNameLike() const +{ + return ipsNameLike_; +} + +void ListIpsRules1Request::setIpsNameLike(const std::string& value) +{ + ipsNameLike_ = value; + ipsNameLikeIsSet_ = true; +} + +bool ListIpsRules1Request::ipsNameLikeIsSet() const +{ + return ipsNameLikeIsSet_; +} + +void ListIpsRules1Request::unsetipsNameLike() +{ + ipsNameLikeIsSet_ = false; +} + +int32_t ListIpsRules1Request::getIpsRulesTypeLike() const +{ + return ipsRulesTypeLike_; +} + +void ListIpsRules1Request::setIpsRulesTypeLike(int32_t value) +{ + ipsRulesTypeLike_ = value; + ipsRulesTypeLikeIsSet_ = true; +} + +bool ListIpsRules1Request::ipsRulesTypeLikeIsSet() const +{ + return ipsRulesTypeLikeIsSet_; +} + +void ListIpsRules1Request::unsetipsRulesTypeLike() +{ + ipsRulesTypeLikeIsSet_ = false; +} + +std::string ListIpsRules1Request::getIpsStatus() const +{ + return ipsStatus_; +} + +void ListIpsRules1Request::setIpsStatus(const std::string& value) +{ + ipsStatus_ = value; + ipsStatusIsSet_ = true; +} + +bool ListIpsRules1Request::ipsStatusIsSet() const +{ + return ipsStatusIsSet_; +} + +void ListIpsRules1Request::unsetipsStatus() +{ + ipsStatusIsSet_ = false; +} + +bool ListIpsRules1Request::isIsUpdatedIpsRuleQueried() const +{ + return isUpdatedIpsRuleQueried_; +} + +void ListIpsRules1Request::setIsUpdatedIpsRuleQueried(bool value) +{ + isUpdatedIpsRuleQueried_ = value; + isUpdatedIpsRuleQueriedIsSet_ = true; +} + +bool ListIpsRules1Request::isUpdatedIpsRuleQueriedIsSet() const +{ + return isUpdatedIpsRuleQueriedIsSet_; +} + +void ListIpsRules1Request::unsetisUpdatedIpsRuleQueried() +{ + isUpdatedIpsRuleQueriedIsSet_ = false; +} + +int32_t ListIpsRules1Request::getLimit() const +{ + return limit_; +} + +void ListIpsRules1Request::setLimit(int32_t value) +{ + limit_ = value; + limitIsSet_ = true; +} + +bool ListIpsRules1Request::limitIsSet() const +{ + return limitIsSet_; +} + +void ListIpsRules1Request::unsetlimit() +{ + limitIsSet_ = false; +} + +std::string ListIpsRules1Request::getObjectId() const +{ + return objectId_; +} + +void ListIpsRules1Request::setObjectId(const std::string& value) +{ + objectId_ = value; + objectIdIsSet_ = true; +} + +bool ListIpsRules1Request::objectIdIsSet() const +{ + return objectIdIsSet_; +} + +void ListIpsRules1Request::unsetobjectId() +{ + objectIdIsSet_ = false; +} + +int32_t ListIpsRules1Request::getOffset() const +{ + return offset_; +} + +void ListIpsRules1Request::setOffset(int32_t value) +{ + offset_ = value; + offsetIsSet_ = true; +} + +bool ListIpsRules1Request::offsetIsSet() const +{ + return offsetIsSet_; +} + +void ListIpsRules1Request::unsetoffset() +{ + offsetIsSet_ = false; +} + +std::string ListIpsRules1Request::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ListIpsRules1Request::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ListIpsRules1Request::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ListIpsRules1Request::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListIpsRules1Response.cpp b/cfw/src/v1/model/ListIpsRules1Response.cpp new file mode 100644 index 00000000..3837c255 --- /dev/null +++ b/cfw/src/v1/model/ListIpsRules1Response.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/ListIpsRules1Response.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListIpsRules1Response::ListIpsRules1Response() +{ + dataIsSet_ = false; +} + +ListIpsRules1Response::~ListIpsRules1Response() = default; + +void ListIpsRules1Response::validate() +{ +} + +web::json::value ListIpsRules1Response::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool ListIpsRules1Response::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + IpsRuleListVO refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +IpsRuleListVO ListIpsRules1Response::getData() const +{ + return data_; +} + +void ListIpsRules1Response::setData(const IpsRuleListVO& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ListIpsRules1Response::dataIsSet() const +{ + return dataIsSet_; +} + +void ListIpsRules1Response::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListIpsRulesRequest.cpp b/cfw/src/v1/model/ListIpsRulesRequest.cpp new file mode 100644 index 00000000..44a83e62 --- /dev/null +++ b/cfw/src/v1/model/ListIpsRulesRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/cfw/v1/model/ListIpsRulesRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListIpsRulesRequest::ListIpsRulesRequest() +{ + objectId_ = ""; + objectIdIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +ListIpsRulesRequest::~ListIpsRulesRequest() = default; + +void ListIpsRulesRequest::validate() +{ +} + +web::json::value ListIpsRulesRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(objectIdIsSet_) { + val[utility::conversions::to_string_t("object_id")] = ModelBase::toJson(objectId_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool ListIpsRulesRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("object_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("object_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setObjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(refVal); + } + } + return ok; +} + + +std::string ListIpsRulesRequest::getObjectId() const +{ + return objectId_; +} + +void ListIpsRulesRequest::setObjectId(const std::string& value) +{ + objectId_ = value; + objectIdIsSet_ = true; +} + +bool ListIpsRulesRequest::objectIdIsSet() const +{ + return objectIdIsSet_; +} + +void ListIpsRulesRequest::unsetobjectId() +{ + objectIdIsSet_ = false; +} + +std::string ListIpsRulesRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ListIpsRulesRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ListIpsRulesRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ListIpsRulesRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListIpsRulesResponse.cpp b/cfw/src/v1/model/ListIpsRulesResponse.cpp new file mode 100644 index 00000000..8868c20f --- /dev/null +++ b/cfw/src/v1/model/ListIpsRulesResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/ListIpsRulesResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListIpsRulesResponse::ListIpsRulesResponse() +{ + dataIsSet_ = false; +} + +ListIpsRulesResponse::~ListIpsRulesResponse() = default; + +void ListIpsRulesResponse::validate() +{ +} + +web::json::value ListIpsRulesResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool ListIpsRulesResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + AdvancedIpsRuleListVo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +AdvancedIpsRuleListVo ListIpsRulesResponse::getData() const +{ + return data_; +} + +void ListIpsRulesResponse::setData(const AdvancedIpsRuleListVo& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ListIpsRulesResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void ListIpsRulesResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListProjectTagsRequest.cpp b/cfw/src/v1/model/ListProjectTagsRequest.cpp new file mode 100644 index 00000000..b2f57060 --- /dev/null +++ b/cfw/src/v1/model/ListProjectTagsRequest.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/cfw/v1/model/ListProjectTagsRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListProjectTagsRequest::ListProjectTagsRequest() +{ + limit_ = 0; + limitIsSet_ = false; + offset_ = 0; + offsetIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +ListProjectTagsRequest::~ListProjectTagsRequest() = default; + +void ListProjectTagsRequest::validate() +{ +} + +web::json::value ListProjectTagsRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(limitIsSet_) { + val[utility::conversions::to_string_t("limit")] = ModelBase::toJson(limit_); + } + if(offsetIsSet_) { + val[utility::conversions::to_string_t("offset")] = ModelBase::toJson(offset_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool ListProjectTagsRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("limit"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("limit")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLimit(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("offset"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("offset")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOffset(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(refVal); + } + } + return ok; +} + + +int32_t ListProjectTagsRequest::getLimit() const +{ + return limit_; +} + +void ListProjectTagsRequest::setLimit(int32_t value) +{ + limit_ = value; + limitIsSet_ = true; +} + +bool ListProjectTagsRequest::limitIsSet() const +{ + return limitIsSet_; +} + +void ListProjectTagsRequest::unsetlimit() +{ + limitIsSet_ = false; +} + +int32_t ListProjectTagsRequest::getOffset() const +{ + return offset_; +} + +void ListProjectTagsRequest::setOffset(int32_t value) +{ + offset_ = value; + offsetIsSet_ = true; +} + +bool ListProjectTagsRequest::offsetIsSet() const +{ + return offsetIsSet_; +} + +void ListProjectTagsRequest::unsetoffset() +{ + offsetIsSet_ = false; +} + +std::string ListProjectTagsRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ListProjectTagsRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ListProjectTagsRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ListProjectTagsRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListProjectTagsResponse.cpp b/cfw/src/v1/model/ListProjectTagsResponse.cpp new file mode 100644 index 00000000..1dc3e8f5 --- /dev/null +++ b/cfw/src/v1/model/ListProjectTagsResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/ListProjectTagsResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListProjectTagsResponse::ListProjectTagsResponse() +{ + tagsIsSet_ = false; +} + +ListProjectTagsResponse::~ListProjectTagsResponse() = default; + +void ListProjectTagsResponse::validate() +{ +} + +web::json::value ListProjectTagsResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(tagsIsSet_) { + val[utility::conversions::to_string_t("tags")] = ModelBase::toJson(tags_); + } + + return val; +} +bool ListProjectTagsResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("tags"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("tags")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTags(refVal); + } + } + return ok; +} + + +std::vector& ListProjectTagsResponse::getTags() +{ + return tags_; +} + +void ListProjectTagsResponse::setTags(const std::vector& value) +{ + tags_ = value; + tagsIsSet_ = true; +} + +bool ListProjectTagsResponse::tagsIsSet() const +{ + return tagsIsSet_; +} + +void ListProjectTagsResponse::unsettags() +{ + tagsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListRegionsRequest.cpp b/cfw/src/v1/model/ListRegionsRequest.cpp new file mode 100644 index 00000000..4af56005 --- /dev/null +++ b/cfw/src/v1/model/ListRegionsRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/cfw/v1/model/ListRegionsRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListRegionsRequest::ListRegionsRequest() +{ + fwInstanceId_ = ""; + fwInstanceIdIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +ListRegionsRequest::~ListRegionsRequest() = default; + +void ListRegionsRequest::validate() +{ +} + +web::json::value ListRegionsRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(fwInstanceIdIsSet_) { + val[utility::conversions::to_string_t("fw_instance_id")] = ModelBase::toJson(fwInstanceId_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool ListRegionsRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("fw_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fw_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFwInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(refVal); + } + } + return ok; +} + + +std::string ListRegionsRequest::getFwInstanceId() const +{ + return fwInstanceId_; +} + +void ListRegionsRequest::setFwInstanceId(const std::string& value) +{ + fwInstanceId_ = value; + fwInstanceIdIsSet_ = true; +} + +bool ListRegionsRequest::fwInstanceIdIsSet() const +{ + return fwInstanceIdIsSet_; +} + +void ListRegionsRequest::unsetfwInstanceId() +{ + fwInstanceIdIsSet_ = false; +} + +std::string ListRegionsRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ListRegionsRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ListRegionsRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ListRegionsRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListRegionsResponse.cpp b/cfw/src/v1/model/ListRegionsResponse.cpp new file mode 100644 index 00000000..c8bac58c --- /dev/null +++ b/cfw/src/v1/model/ListRegionsResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/ListRegionsResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListRegionsResponse::ListRegionsResponse() +{ + dataIsSet_ = false; +} + +ListRegionsResponse::~ListRegionsResponse() = default; + +void ListRegionsResponse::validate() +{ +} + +web::json::value ListRegionsResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool ListRegionsResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + Object refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +Object ListRegionsResponse::getData() const +{ + return data_; +} + +void ListRegionsResponse::setData(const Object& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ListRegionsResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void ListRegionsResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListResourceTagsRequest.cpp b/cfw/src/v1/model/ListResourceTagsRequest.cpp new file mode 100644 index 00000000..f2ff89b0 --- /dev/null +++ b/cfw/src/v1/model/ListResourceTagsRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/cfw/v1/model/ListResourceTagsRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListResourceTagsRequest::ListResourceTagsRequest() +{ + fwInstanceId_ = ""; + fwInstanceIdIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +ListResourceTagsRequest::~ListResourceTagsRequest() = default; + +void ListResourceTagsRequest::validate() +{ +} + +web::json::value ListResourceTagsRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(fwInstanceIdIsSet_) { + val[utility::conversions::to_string_t("fw_instance_id")] = ModelBase::toJson(fwInstanceId_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool ListResourceTagsRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("fw_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fw_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFwInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(refVal); + } + } + return ok; +} + + +std::string ListResourceTagsRequest::getFwInstanceId() const +{ + return fwInstanceId_; +} + +void ListResourceTagsRequest::setFwInstanceId(const std::string& value) +{ + fwInstanceId_ = value; + fwInstanceIdIsSet_ = true; +} + +bool ListResourceTagsRequest::fwInstanceIdIsSet() const +{ + return fwInstanceIdIsSet_; +} + +void ListResourceTagsRequest::unsetfwInstanceId() +{ + fwInstanceIdIsSet_ = false; +} + +std::string ListResourceTagsRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ListResourceTagsRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ListResourceTagsRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ListResourceTagsRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ListResourceTagsResponse.cpp b/cfw/src/v1/model/ListResourceTagsResponse.cpp new file mode 100644 index 00000000..52746c2e --- /dev/null +++ b/cfw/src/v1/model/ListResourceTagsResponse.cpp @@ -0,0 +1,147 @@ + + +#include "huaweicloud/cfw/v1/model/ListResourceTagsResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ListResourceTagsResponse::ListResourceTagsResponse() +{ + data_ = ""; + dataIsSet_ = false; + sysTagsIsSet_ = false; + tagsIsSet_ = false; +} + +ListResourceTagsResponse::~ListResourceTagsResponse() = default; + +void ListResourceTagsResponse::validate() +{ +} + +web::json::value ListResourceTagsResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + if(sysTagsIsSet_) { + val[utility::conversions::to_string_t("sys_tags")] = ModelBase::toJson(sysTags_); + } + if(tagsIsSet_) { + val[utility::conversions::to_string_t("tags")] = ModelBase::toJson(tags_); + } + + return val; +} +bool ListResourceTagsResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("sys_tags"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sys_tags")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSysTags(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("tags"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("tags")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTags(refVal); + } + } + return ok; +} + + +std::string ListResourceTagsResponse::getData() const +{ + return data_; +} + +void ListResourceTagsResponse::setData(const std::string& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ListResourceTagsResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void ListResourceTagsResponse::unsetdata() +{ + dataIsSet_ = false; +} + +std::vector& ListResourceTagsResponse::getSysTags() +{ + return sysTags_; +} + +void ListResourceTagsResponse::setSysTags(const std::vector& value) +{ + sysTags_ = value; + sysTagsIsSet_ = true; +} + +bool ListResourceTagsResponse::sysTagsIsSet() const +{ + return sysTagsIsSet_; +} + +void ListResourceTagsResponse::unsetsysTags() +{ + sysTagsIsSet_ = false; +} + +std::vector& ListResourceTagsResponse::getTags() +{ + return tags_; +} + +void ListResourceTagsResponse::setTags(const std::vector& value) +{ + tags_ = value; + tagsIsSet_ = true; +} + +bool ListResourceTagsResponse::tagsIsSet() const +{ + return tagsIsSet_; +} + +void ListResourceTagsResponse::unsettags() +{ + tagsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/Mapstringstring.cpp b/cfw/src/v1/model/Mapstringstring.cpp new file mode 100644 index 00000000..c2db7384 --- /dev/null +++ b/cfw/src/v1/model/Mapstringstring.cpp @@ -0,0 +1,44 @@ + + +#include "huaweicloud/cfw/v1/model/Mapstringstring.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +Mapstringstring::Mapstringstring() +{ +} + +Mapstringstring::~Mapstringstring() = default; + +void Mapstringstring::validate() +{ +} + +web::json::value Mapstringstring::toJson() const +{ + web::json::value val = web::json::value::object(); + + + return val; +} +bool Mapstringstring::fromJson(const web::json::value& val) +{ + bool ok = true; + + return ok; +} + + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/PageInfo.cpp b/cfw/src/v1/model/PageInfo.cpp new file mode 100644 index 00000000..a4bf9db4 --- /dev/null +++ b/cfw/src/v1/model/PageInfo.cpp @@ -0,0 +1,672 @@ + + +#include "huaweicloud/cfw/v1/model/PageInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +PageInfo::PageInfo() +{ + endRow_ = 0L; + endRowIsSet_ = false; + hasNextPage_ = false; + hasNextPageIsSet_ = false; + hasPreviousPage_ = false; + hasPreviousPageIsSet_ = false; + isFirstPage_ = false; + isFirstPageIsSet_ = false; + isLastPage_ = false; + isLastPageIsSet_ = false; + listIsSet_ = false; + navigateFirstPage_ = 0; + navigateFirstPageIsSet_ = false; + navigateLastPage_ = 0; + navigateLastPageIsSet_ = false; + navigatePages_ = 0; + navigatePagesIsSet_ = false; + navigatepageNumsIsSet_ = false; + nextPage_ = 0; + nextPageIsSet_ = false; + pageNum_ = 0; + pageNumIsSet_ = false; + pageSize_ = 0; + pageSizeIsSet_ = false; + pages_ = 0; + pagesIsSet_ = false; + prePage_ = 0; + prePageIsSet_ = false; + size_ = 0; + sizeIsSet_ = false; + startRow_ = 0L; + startRowIsSet_ = false; + total_ = 0L; + totalIsSet_ = false; +} + +PageInfo::~PageInfo() = default; + +void PageInfo::validate() +{ +} + +web::json::value PageInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(endRowIsSet_) { + val[utility::conversions::to_string_t("endRow")] = ModelBase::toJson(endRow_); + } + if(hasNextPageIsSet_) { + val[utility::conversions::to_string_t("hasNextPage")] = ModelBase::toJson(hasNextPage_); + } + if(hasPreviousPageIsSet_) { + val[utility::conversions::to_string_t("hasPreviousPage")] = ModelBase::toJson(hasPreviousPage_); + } + if(isFirstPageIsSet_) { + val[utility::conversions::to_string_t("isFirstPage")] = ModelBase::toJson(isFirstPage_); + } + if(isLastPageIsSet_) { + val[utility::conversions::to_string_t("isLastPage")] = ModelBase::toJson(isLastPage_); + } + if(listIsSet_) { + val[utility::conversions::to_string_t("list")] = ModelBase::toJson(list_); + } + if(navigateFirstPageIsSet_) { + val[utility::conversions::to_string_t("navigateFirstPage")] = ModelBase::toJson(navigateFirstPage_); + } + if(navigateLastPageIsSet_) { + val[utility::conversions::to_string_t("navigateLastPage")] = ModelBase::toJson(navigateLastPage_); + } + if(navigatePagesIsSet_) { + val[utility::conversions::to_string_t("navigatePages")] = ModelBase::toJson(navigatePages_); + } + if(navigatepageNumsIsSet_) { + val[utility::conversions::to_string_t("navigatepageNums")] = ModelBase::toJson(navigatepageNums_); + } + if(nextPageIsSet_) { + val[utility::conversions::to_string_t("nextPage")] = ModelBase::toJson(nextPage_); + } + if(pageNumIsSet_) { + val[utility::conversions::to_string_t("pageNum")] = ModelBase::toJson(pageNum_); + } + if(pageSizeIsSet_) { + val[utility::conversions::to_string_t("pageSize")] = ModelBase::toJson(pageSize_); + } + if(pagesIsSet_) { + val[utility::conversions::to_string_t("pages")] = ModelBase::toJson(pages_); + } + if(prePageIsSet_) { + val[utility::conversions::to_string_t("prePage")] = ModelBase::toJson(prePage_); + } + if(sizeIsSet_) { + val[utility::conversions::to_string_t("size")] = ModelBase::toJson(size_); + } + if(startRowIsSet_) { + val[utility::conversions::to_string_t("startRow")] = ModelBase::toJson(startRow_); + } + if(totalIsSet_) { + val[utility::conversions::to_string_t("total")] = ModelBase::toJson(total_); + } + + return val; +} +bool PageInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("endRow"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("endRow")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEndRow(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("hasNextPage"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("hasNextPage")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setHasNextPage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("hasPreviousPage"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("hasPreviousPage")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setHasPreviousPage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("isFirstPage"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("isFirstPage")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsFirstPage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("isLastPage"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("isLastPage")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsLastPage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("list"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("list")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setList(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("navigateFirstPage"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("navigateFirstPage")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNavigateFirstPage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("navigateLastPage"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("navigateLastPage")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNavigateLastPage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("navigatePages"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("navigatePages")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNavigatePages(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("navigatepageNums"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("navigatepageNums")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNavigatepageNums(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("nextPage"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("nextPage")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNextPage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("pageNum"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("pageNum")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPageNum(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("pageSize"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("pageSize")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPageSize(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("pages"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("pages")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPages(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("prePage"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("prePage")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPrePage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("size"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("size")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSize(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("startRow"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("startRow")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStartRow(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("total"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("total")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTotal(refVal); + } + } + return ok; +} + + +int64_t PageInfo::getEndRow() const +{ + return endRow_; +} + +void PageInfo::setEndRow(int64_t value) +{ + endRow_ = value; + endRowIsSet_ = true; +} + +bool PageInfo::endRowIsSet() const +{ + return endRowIsSet_; +} + +void PageInfo::unsetendRow() +{ + endRowIsSet_ = false; +} + +bool PageInfo::isHasNextPage() const +{ + return hasNextPage_; +} + +void PageInfo::setHasNextPage(bool value) +{ + hasNextPage_ = value; + hasNextPageIsSet_ = true; +} + +bool PageInfo::hasNextPageIsSet() const +{ + return hasNextPageIsSet_; +} + +void PageInfo::unsethasNextPage() +{ + hasNextPageIsSet_ = false; +} + +bool PageInfo::isHasPreviousPage() const +{ + return hasPreviousPage_; +} + +void PageInfo::setHasPreviousPage(bool value) +{ + hasPreviousPage_ = value; + hasPreviousPageIsSet_ = true; +} + +bool PageInfo::hasPreviousPageIsSet() const +{ + return hasPreviousPageIsSet_; +} + +void PageInfo::unsethasPreviousPage() +{ + hasPreviousPageIsSet_ = false; +} + +bool PageInfo::isIsFirstPage() const +{ + return isFirstPage_; +} + +void PageInfo::setIsFirstPage(bool value) +{ + isFirstPage_ = value; + isFirstPageIsSet_ = true; +} + +bool PageInfo::isFirstPageIsSet() const +{ + return isFirstPageIsSet_; +} + +void PageInfo::unsetisFirstPage() +{ + isFirstPageIsSet_ = false; +} + +bool PageInfo::isIsLastPage() const +{ + return isLastPage_; +} + +void PageInfo::setIsLastPage(bool value) +{ + isLastPage_ = value; + isLastPageIsSet_ = true; +} + +bool PageInfo::isLastPageIsSet() const +{ + return isLastPageIsSet_; +} + +void PageInfo::unsetisLastPage() +{ + isLastPageIsSet_ = false; +} + +std::vector& PageInfo::getList() +{ + return list_; +} + +void PageInfo::setList(const std::vector& value) +{ + list_ = value; + listIsSet_ = true; +} + +bool PageInfo::listIsSet() const +{ + return listIsSet_; +} + +void PageInfo::unsetlist() +{ + listIsSet_ = false; +} + +int32_t PageInfo::getNavigateFirstPage() const +{ + return navigateFirstPage_; +} + +void PageInfo::setNavigateFirstPage(int32_t value) +{ + navigateFirstPage_ = value; + navigateFirstPageIsSet_ = true; +} + +bool PageInfo::navigateFirstPageIsSet() const +{ + return navigateFirstPageIsSet_; +} + +void PageInfo::unsetnavigateFirstPage() +{ + navigateFirstPageIsSet_ = false; +} + +int32_t PageInfo::getNavigateLastPage() const +{ + return navigateLastPage_; +} + +void PageInfo::setNavigateLastPage(int32_t value) +{ + navigateLastPage_ = value; + navigateLastPageIsSet_ = true; +} + +bool PageInfo::navigateLastPageIsSet() const +{ + return navigateLastPageIsSet_; +} + +void PageInfo::unsetnavigateLastPage() +{ + navigateLastPageIsSet_ = false; +} + +int32_t PageInfo::getNavigatePages() const +{ + return navigatePages_; +} + +void PageInfo::setNavigatePages(int32_t value) +{ + navigatePages_ = value; + navigatePagesIsSet_ = true; +} + +bool PageInfo::navigatePagesIsSet() const +{ + return navigatePagesIsSet_; +} + +void PageInfo::unsetnavigatePages() +{ + navigatePagesIsSet_ = false; +} + +std::vector& PageInfo::getNavigatepageNums() +{ + return navigatepageNums_; +} + +void PageInfo::setNavigatepageNums(std::vector value) +{ + navigatepageNums_ = value; + navigatepageNumsIsSet_ = true; +} + +bool PageInfo::navigatepageNumsIsSet() const +{ + return navigatepageNumsIsSet_; +} + +void PageInfo::unsetnavigatepageNums() +{ + navigatepageNumsIsSet_ = false; +} + +int32_t PageInfo::getNextPage() const +{ + return nextPage_; +} + +void PageInfo::setNextPage(int32_t value) +{ + nextPage_ = value; + nextPageIsSet_ = true; +} + +bool PageInfo::nextPageIsSet() const +{ + return nextPageIsSet_; +} + +void PageInfo::unsetnextPage() +{ + nextPageIsSet_ = false; +} + +int32_t PageInfo::getPageNum() const +{ + return pageNum_; +} + +void PageInfo::setPageNum(int32_t value) +{ + pageNum_ = value; + pageNumIsSet_ = true; +} + +bool PageInfo::pageNumIsSet() const +{ + return pageNumIsSet_; +} + +void PageInfo::unsetpageNum() +{ + pageNumIsSet_ = false; +} + +int32_t PageInfo::getPageSize() const +{ + return pageSize_; +} + +void PageInfo::setPageSize(int32_t value) +{ + pageSize_ = value; + pageSizeIsSet_ = true; +} + +bool PageInfo::pageSizeIsSet() const +{ + return pageSizeIsSet_; +} + +void PageInfo::unsetpageSize() +{ + pageSizeIsSet_ = false; +} + +int32_t PageInfo::getPages() const +{ + return pages_; +} + +void PageInfo::setPages(int32_t value) +{ + pages_ = value; + pagesIsSet_ = true; +} + +bool PageInfo::pagesIsSet() const +{ + return pagesIsSet_; +} + +void PageInfo::unsetpages() +{ + pagesIsSet_ = false; +} + +int32_t PageInfo::getPrePage() const +{ + return prePage_; +} + +void PageInfo::setPrePage(int32_t value) +{ + prePage_ = value; + prePageIsSet_ = true; +} + +bool PageInfo::prePageIsSet() const +{ + return prePageIsSet_; +} + +void PageInfo::unsetprePage() +{ + prePageIsSet_ = false; +} + +int32_t PageInfo::getSize() const +{ + return size_; +} + +void PageInfo::setSize(int32_t value) +{ + size_ = value; + sizeIsSet_ = true; +} + +bool PageInfo::sizeIsSet() const +{ + return sizeIsSet_; +} + +void PageInfo::unsetsize() +{ + sizeIsSet_ = false; +} + +int64_t PageInfo::getStartRow() const +{ + return startRow_; +} + +void PageInfo::setStartRow(int64_t value) +{ + startRow_ = value; + startRowIsSet_ = true; +} + +bool PageInfo::startRowIsSet() const +{ + return startRowIsSet_; +} + +void PageInfo::unsetstartRow() +{ + startRowIsSet_ = false; +} + +int64_t PageInfo::getTotal() const +{ + return total_; +} + +void PageInfo::setTotal(int64_t value) +{ + total_ = value; + totalIsSet_ = true; +} + +bool PageInfo::totalIsSet() const +{ + return totalIsSet_; +} + +void PageInfo::unsettotal() +{ + totalIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/PageInfoCustomerIpsListVO.cpp b/cfw/src/v1/model/PageInfoCustomerIpsListVO.cpp new file mode 100644 index 00000000..7b5b19a1 --- /dev/null +++ b/cfw/src/v1/model/PageInfoCustomerIpsListVO.cpp @@ -0,0 +1,183 @@ + + +#include "huaweicloud/cfw/v1/model/PageInfoCustomerIpsListVO.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +PageInfoCustomerIpsListVO::PageInfoCustomerIpsListVO() +{ + limit_ = 0; + limitIsSet_ = false; + offset_ = 0; + offsetIsSet_ = false; + recordsIsSet_ = false; + total_ = 0; + totalIsSet_ = false; +} + +PageInfoCustomerIpsListVO::~PageInfoCustomerIpsListVO() = default; + +void PageInfoCustomerIpsListVO::validate() +{ +} + +web::json::value PageInfoCustomerIpsListVO::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(limitIsSet_) { + val[utility::conversions::to_string_t("limit")] = ModelBase::toJson(limit_); + } + if(offsetIsSet_) { + val[utility::conversions::to_string_t("offset")] = ModelBase::toJson(offset_); + } + if(recordsIsSet_) { + val[utility::conversions::to_string_t("records")] = ModelBase::toJson(records_); + } + if(totalIsSet_) { + val[utility::conversions::to_string_t("total")] = ModelBase::toJson(total_); + } + + return val; +} +bool PageInfoCustomerIpsListVO::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("limit"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("limit")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLimit(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("offset"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("offset")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOffset(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("records"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("records")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRecords(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("total"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("total")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTotal(refVal); + } + } + return ok; +} + + +int32_t PageInfoCustomerIpsListVO::getLimit() const +{ + return limit_; +} + +void PageInfoCustomerIpsListVO::setLimit(int32_t value) +{ + limit_ = value; + limitIsSet_ = true; +} + +bool PageInfoCustomerIpsListVO::limitIsSet() const +{ + return limitIsSet_; +} + +void PageInfoCustomerIpsListVO::unsetlimit() +{ + limitIsSet_ = false; +} + +int32_t PageInfoCustomerIpsListVO::getOffset() const +{ + return offset_; +} + +void PageInfoCustomerIpsListVO::setOffset(int32_t value) +{ + offset_ = value; + offsetIsSet_ = true; +} + +bool PageInfoCustomerIpsListVO::offsetIsSet() const +{ + return offsetIsSet_; +} + +void PageInfoCustomerIpsListVO::unsetoffset() +{ + offsetIsSet_ = false; +} + +std::vector& PageInfoCustomerIpsListVO::getRecords() +{ + return records_; +} + +void PageInfoCustomerIpsListVO::setRecords(const std::vector& value) +{ + records_ = value; + recordsIsSet_ = true; +} + +bool PageInfoCustomerIpsListVO::recordsIsSet() const +{ + return recordsIsSet_; +} + +void PageInfoCustomerIpsListVO::unsetrecords() +{ + recordsIsSet_ = false; +} + +int32_t PageInfoCustomerIpsListVO::getTotal() const +{ + return total_; +} + +void PageInfoCustomerIpsListVO::setTotal(int32_t value) +{ + total_ = value; + totalIsSet_ = true; +} + +bool PageInfoCustomerIpsListVO::totalIsSet() const +{ + return totalIsSet_; +} + +void PageInfoCustomerIpsListVO::unsettotal() +{ + totalIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ResponseData.cpp b/cfw/src/v1/model/ResponseData.cpp new file mode 100644 index 00000000..47419f95 --- /dev/null +++ b/cfw/src/v1/model/ResponseData.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/cfw/v1/model/ResponseData.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ResponseData::ResponseData() +{ + id_ = ""; + idIsSet_ = false; +} + +ResponseData::~ResponseData() = default; + +void ResponseData::validate() +{ +} + +web::json::value ResponseData::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(idIsSet_) { + val[utility::conversions::to_string_t("id")] = ModelBase::toJson(id_); + } + + return val; +} +bool ResponseData::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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 ResponseData::getId() const +{ + return id_; +} + +void ResponseData::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool ResponseData::idIsSet() const +{ + return idIsSet_; +} + +void ResponseData::unsetid() +{ + idIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/SaveTagsRequest.cpp b/cfw/src/v1/model/SaveTagsRequest.cpp new file mode 100644 index 00000000..80c1bba7 --- /dev/null +++ b/cfw/src/v1/model/SaveTagsRequest.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/cfw/v1/model/SaveTagsRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +SaveTagsRequest::SaveTagsRequest() +{ + fwInstanceId_ = ""; + fwInstanceIdIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; + bodyIsSet_ = false; +} + +SaveTagsRequest::~SaveTagsRequest() = default; + +void SaveTagsRequest::validate() +{ +} + +web::json::value SaveTagsRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(fwInstanceIdIsSet_) { + val[utility::conversions::to_string_t("fw_instance_id")] = ModelBase::toJson(fwInstanceId_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool SaveTagsRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("fw_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fw_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFwInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(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()) + { + CreateTagsDto refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string SaveTagsRequest::getFwInstanceId() const +{ + return fwInstanceId_; +} + +void SaveTagsRequest::setFwInstanceId(const std::string& value) +{ + fwInstanceId_ = value; + fwInstanceIdIsSet_ = true; +} + +bool SaveTagsRequest::fwInstanceIdIsSet() const +{ + return fwInstanceIdIsSet_; +} + +void SaveTagsRequest::unsetfwInstanceId() +{ + fwInstanceIdIsSet_ = false; +} + +std::string SaveTagsRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void SaveTagsRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool SaveTagsRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void SaveTagsRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +CreateTagsDto SaveTagsRequest::getBody() const +{ + return body_; +} + +void SaveTagsRequest::setBody(const CreateTagsDto& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool SaveTagsRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void SaveTagsRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/SaveTagsResponse.cpp b/cfw/src/v1/model/SaveTagsResponse.cpp new file mode 100644 index 00000000..ee75b642 --- /dev/null +++ b/cfw/src/v1/model/SaveTagsResponse.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/cfw/v1/model/SaveTagsResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +SaveTagsResponse::SaveTagsResponse() +{ + data_ = ""; + dataIsSet_ = false; +} + +SaveTagsResponse::~SaveTagsResponse() = default; + +void SaveTagsResponse::validate() +{ +} + +web::json::value SaveTagsResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool SaveTagsResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +std::string SaveTagsResponse::getData() const +{ + return data_; +} + +void SaveTagsResponse::setData(const std::string& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool SaveTagsResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void SaveTagsResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ScanProtocolConfig.cpp b/cfw/src/v1/model/ScanProtocolConfig.cpp new file mode 100644 index 00000000..899bc908 --- /dev/null +++ b/cfw/src/v1/model/ScanProtocolConfig.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/cfw/v1/model/ScanProtocolConfig.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ScanProtocolConfig::ScanProtocolConfig() +{ + action_ = 0; + actionIsSet_ = false; + protocolType_ = 0; + protocolTypeIsSet_ = false; +} + +ScanProtocolConfig::~ScanProtocolConfig() = default; + +void ScanProtocolConfig::validate() +{ +} + +web::json::value ScanProtocolConfig::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(actionIsSet_) { + val[utility::conversions::to_string_t("action")] = ModelBase::toJson(action_); + } + if(protocolTypeIsSet_) { + val[utility::conversions::to_string_t("protocol_type")] = ModelBase::toJson(protocolType_); + } + + return val; +} +bool ScanProtocolConfig::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("action"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("action")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAction(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("protocol_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("protocol_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setProtocolType(refVal); + } + } + return ok; +} + + +int32_t ScanProtocolConfig::getAction() const +{ + return action_; +} + +void ScanProtocolConfig::setAction(int32_t value) +{ + action_ = value; + actionIsSet_ = true; +} + +bool ScanProtocolConfig::actionIsSet() const +{ + return actionIsSet_; +} + +void ScanProtocolConfig::unsetaction() +{ + actionIsSet_ = false; +} + +int32_t ScanProtocolConfig::getProtocolType() const +{ + return protocolType_; +} + +void ScanProtocolConfig::setProtocolType(int32_t value) +{ + protocolType_ = value; + protocolTypeIsSet_ = true; +} + +bool ScanProtocolConfig::protocolTypeIsSet() const +{ + return protocolTypeIsSet_; +} + +void ScanProtocolConfig::unsetprotocolType() +{ + protocolTypeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ShowAlarmConfigRequest.cpp b/cfw/src/v1/model/ShowAlarmConfigRequest.cpp new file mode 100644 index 00000000..2dbda9c7 --- /dev/null +++ b/cfw/src/v1/model/ShowAlarmConfigRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/cfw/v1/model/ShowAlarmConfigRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ShowAlarmConfigRequest::ShowAlarmConfigRequest() +{ + fwInstanceId_ = ""; + fwInstanceIdIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +ShowAlarmConfigRequest::~ShowAlarmConfigRequest() = default; + +void ShowAlarmConfigRequest::validate() +{ +} + +web::json::value ShowAlarmConfigRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(fwInstanceIdIsSet_) { + val[utility::conversions::to_string_t("fw_instance_id")] = ModelBase::toJson(fwInstanceId_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool ShowAlarmConfigRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("fw_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fw_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFwInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(refVal); + } + } + return ok; +} + + +std::string ShowAlarmConfigRequest::getFwInstanceId() const +{ + return fwInstanceId_; +} + +void ShowAlarmConfigRequest::setFwInstanceId(const std::string& value) +{ + fwInstanceId_ = value; + fwInstanceIdIsSet_ = true; +} + +bool ShowAlarmConfigRequest::fwInstanceIdIsSet() const +{ + return fwInstanceIdIsSet_; +} + +void ShowAlarmConfigRequest::unsetfwInstanceId() +{ + fwInstanceIdIsSet_ = false; +} + +std::string ShowAlarmConfigRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ShowAlarmConfigRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ShowAlarmConfigRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ShowAlarmConfigRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ShowAlarmConfigResponse.cpp b/cfw/src/v1/model/ShowAlarmConfigResponse.cpp new file mode 100644 index 00000000..513cf85f --- /dev/null +++ b/cfw/src/v1/model/ShowAlarmConfigResponse.cpp @@ -0,0 +1,112 @@ + + +#include "huaweicloud/cfw/v1/model/ShowAlarmConfigResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ShowAlarmConfigResponse::ShowAlarmConfigResponse() +{ + alarmConfigsIsSet_ = false; + dataIsSet_ = false; +} + +ShowAlarmConfigResponse::~ShowAlarmConfigResponse() = default; + +void ShowAlarmConfigResponse::validate() +{ +} + +web::json::value ShowAlarmConfigResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(alarmConfigsIsSet_) { + val[utility::conversions::to_string_t("alarm_configs")] = ModelBase::toJson(alarmConfigs_); + } + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool ShowAlarmConfigResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("alarm_configs"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("alarm_configs")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAlarmConfigs(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + Object refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +std::vector& ShowAlarmConfigResponse::getAlarmConfigs() +{ + return alarmConfigs_; +} + +void ShowAlarmConfigResponse::setAlarmConfigs(const std::vector& value) +{ + alarmConfigs_ = value; + alarmConfigsIsSet_ = true; +} + +bool ShowAlarmConfigResponse::alarmConfigsIsSet() const +{ + return alarmConfigsIsSet_; +} + +void ShowAlarmConfigResponse::unsetalarmConfigs() +{ + alarmConfigsIsSet_ = false; +} + +Object ShowAlarmConfigResponse::getData() const +{ + return data_; +} + +void ShowAlarmConfigResponse::setData(const Object& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ShowAlarmConfigResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void ShowAlarmConfigResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ShowAntiVirusRuleRequest.cpp b/cfw/src/v1/model/ShowAntiVirusRuleRequest.cpp new file mode 100644 index 00000000..4ec4e762 --- /dev/null +++ b/cfw/src/v1/model/ShowAntiVirusRuleRequest.cpp @@ -0,0 +1,219 @@ + + +#include "huaweicloud/cfw/v1/model/ShowAntiVirusRuleRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ShowAntiVirusRuleRequest::ShowAntiVirusRuleRequest() +{ + objectId_ = ""; + objectIdIsSet_ = false; + engineType_ = 0; + engineTypeIsSet_ = false; + limit_ = 0; + limitIsSet_ = false; + offset_ = 0; + offsetIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +ShowAntiVirusRuleRequest::~ShowAntiVirusRuleRequest() = default; + +void ShowAntiVirusRuleRequest::validate() +{ +} + +web::json::value ShowAntiVirusRuleRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(objectIdIsSet_) { + val[utility::conversions::to_string_t("object_id")] = ModelBase::toJson(objectId_); + } + if(engineTypeIsSet_) { + val[utility::conversions::to_string_t("engine_type")] = ModelBase::toJson(engineType_); + } + if(limitIsSet_) { + val[utility::conversions::to_string_t("limit")] = ModelBase::toJson(limit_); + } + if(offsetIsSet_) { + val[utility::conversions::to_string_t("offset")] = ModelBase::toJson(offset_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool ShowAntiVirusRuleRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("object_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("object_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setObjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("engine_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("engine_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEngineType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("limit"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("limit")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLimit(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("offset"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("offset")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOffset(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(refVal); + } + } + return ok; +} + + +std::string ShowAntiVirusRuleRequest::getObjectId() const +{ + return objectId_; +} + +void ShowAntiVirusRuleRequest::setObjectId(const std::string& value) +{ + objectId_ = value; + objectIdIsSet_ = true; +} + +bool ShowAntiVirusRuleRequest::objectIdIsSet() const +{ + return objectIdIsSet_; +} + +void ShowAntiVirusRuleRequest::unsetobjectId() +{ + objectIdIsSet_ = false; +} + +int32_t ShowAntiVirusRuleRequest::getEngineType() const +{ + return engineType_; +} + +void ShowAntiVirusRuleRequest::setEngineType(int32_t value) +{ + engineType_ = value; + engineTypeIsSet_ = true; +} + +bool ShowAntiVirusRuleRequest::engineTypeIsSet() const +{ + return engineTypeIsSet_; +} + +void ShowAntiVirusRuleRequest::unsetengineType() +{ + engineTypeIsSet_ = false; +} + +int32_t ShowAntiVirusRuleRequest::getLimit() const +{ + return limit_; +} + +void ShowAntiVirusRuleRequest::setLimit(int32_t value) +{ + limit_ = value; + limitIsSet_ = true; +} + +bool ShowAntiVirusRuleRequest::limitIsSet() const +{ + return limitIsSet_; +} + +void ShowAntiVirusRuleRequest::unsetlimit() +{ + limitIsSet_ = false; +} + +int32_t ShowAntiVirusRuleRequest::getOffset() const +{ + return offset_; +} + +void ShowAntiVirusRuleRequest::setOffset(int32_t value) +{ + offset_ = value; + offsetIsSet_ = true; +} + +bool ShowAntiVirusRuleRequest::offsetIsSet() const +{ + return offsetIsSet_; +} + +void ShowAntiVirusRuleRequest::unsetoffset() +{ + offsetIsSet_ = false; +} + +std::string ShowAntiVirusRuleRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ShowAntiVirusRuleRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ShowAntiVirusRuleRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ShowAntiVirusRuleRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ShowAntiVirusRuleResponse.cpp b/cfw/src/v1/model/ShowAntiVirusRuleResponse.cpp new file mode 100644 index 00000000..89ed1ed7 --- /dev/null +++ b/cfw/src/v1/model/ShowAntiVirusRuleResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/ShowAntiVirusRuleResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ShowAntiVirusRuleResponse::ShowAntiVirusRuleResponse() +{ + dataIsSet_ = false; +} + +ShowAntiVirusRuleResponse::~ShowAntiVirusRuleResponse() = default; + +void ShowAntiVirusRuleResponse::validate() +{ +} + +web::json::value ShowAntiVirusRuleResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool ShowAntiVirusRuleResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + AntiVirusRuleVO refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +AntiVirusRuleVO ShowAntiVirusRuleResponse::getData() const +{ + return data_; +} + +void ShowAntiVirusRuleResponse::setData(const AntiVirusRuleVO& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ShowAntiVirusRuleResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void ShowAntiVirusRuleResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ShowAntiVirusSwitchRequest.cpp b/cfw/src/v1/model/ShowAntiVirusSwitchRequest.cpp new file mode 100644 index 00000000..c31cf241 --- /dev/null +++ b/cfw/src/v1/model/ShowAntiVirusSwitchRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/cfw/v1/model/ShowAntiVirusSwitchRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ShowAntiVirusSwitchRequest::ShowAntiVirusSwitchRequest() +{ + objectId_ = ""; + objectIdIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +ShowAntiVirusSwitchRequest::~ShowAntiVirusSwitchRequest() = default; + +void ShowAntiVirusSwitchRequest::validate() +{ +} + +web::json::value ShowAntiVirusSwitchRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(objectIdIsSet_) { + val[utility::conversions::to_string_t("object_id")] = ModelBase::toJson(objectId_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool ShowAntiVirusSwitchRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("object_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("object_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setObjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(refVal); + } + } + return ok; +} + + +std::string ShowAntiVirusSwitchRequest::getObjectId() const +{ + return objectId_; +} + +void ShowAntiVirusSwitchRequest::setObjectId(const std::string& value) +{ + objectId_ = value; + objectIdIsSet_ = true; +} + +bool ShowAntiVirusSwitchRequest::objectIdIsSet() const +{ + return objectIdIsSet_; +} + +void ShowAntiVirusSwitchRequest::unsetobjectId() +{ + objectIdIsSet_ = false; +} + +std::string ShowAntiVirusSwitchRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ShowAntiVirusSwitchRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ShowAntiVirusSwitchRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ShowAntiVirusSwitchRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ShowAntiVirusSwitchResponse.cpp b/cfw/src/v1/model/ShowAntiVirusSwitchResponse.cpp new file mode 100644 index 00000000..f65934a3 --- /dev/null +++ b/cfw/src/v1/model/ShowAntiVirusSwitchResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/ShowAntiVirusSwitchResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ShowAntiVirusSwitchResponse::ShowAntiVirusSwitchResponse() +{ + dataIsSet_ = false; +} + +ShowAntiVirusSwitchResponse::~ShowAntiVirusSwitchResponse() = default; + +void ShowAntiVirusSwitchResponse::validate() +{ +} + +web::json::value ShowAntiVirusSwitchResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool ShowAntiVirusSwitchResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + AntiVirusVO refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +AntiVirusVO ShowAntiVirusSwitchResponse::getData() const +{ + return data_; +} + +void ShowAntiVirusSwitchResponse::setData(const AntiVirusVO& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ShowAntiVirusSwitchResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void ShowAntiVirusSwitchResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ShowAutoProtectStatusRequest.cpp b/cfw/src/v1/model/ShowAutoProtectStatusRequest.cpp new file mode 100644 index 00000000..d9eb7edd --- /dev/null +++ b/cfw/src/v1/model/ShowAutoProtectStatusRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/cfw/v1/model/ShowAutoProtectStatusRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ShowAutoProtectStatusRequest::ShowAutoProtectStatusRequest() +{ + objectId_ = ""; + objectIdIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +ShowAutoProtectStatusRequest::~ShowAutoProtectStatusRequest() = default; + +void ShowAutoProtectStatusRequest::validate() +{ +} + +web::json::value ShowAutoProtectStatusRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(objectIdIsSet_) { + val[utility::conversions::to_string_t("object_id")] = ModelBase::toJson(objectId_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool ShowAutoProtectStatusRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("object_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("object_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setObjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(refVal); + } + } + return ok; +} + + +std::string ShowAutoProtectStatusRequest::getObjectId() const +{ + return objectId_; +} + +void ShowAutoProtectStatusRequest::setObjectId(const std::string& value) +{ + objectId_ = value; + objectIdIsSet_ = true; +} + +bool ShowAutoProtectStatusRequest::objectIdIsSet() const +{ + return objectIdIsSet_; +} + +void ShowAutoProtectStatusRequest::unsetobjectId() +{ + objectIdIsSet_ = false; +} + +std::string ShowAutoProtectStatusRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ShowAutoProtectStatusRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ShowAutoProtectStatusRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ShowAutoProtectStatusRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ShowAutoProtectStatusResponse.cpp b/cfw/src/v1/model/ShowAutoProtectStatusResponse.cpp new file mode 100644 index 00000000..9a10e3ff --- /dev/null +++ b/cfw/src/v1/model/ShowAutoProtectStatusResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/ShowAutoProtectStatusResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ShowAutoProtectStatusResponse::ShowAutoProtectStatusResponse() +{ + dataIsSet_ = false; +} + +ShowAutoProtectStatusResponse::~ShowAutoProtectStatusResponse() = default; + +void ShowAutoProtectStatusResponse::validate() +{ +} + +web::json::value ShowAutoProtectStatusResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool ShowAutoProtectStatusResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + FirewallStatusVO refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +FirewallStatusVO ShowAutoProtectStatusResponse::getData() const +{ + return data_; +} + +void ShowAutoProtectStatusResponse::setData(const FirewallStatusVO& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ShowAutoProtectStatusResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void ShowAutoProtectStatusResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ShowDomainSetDetailRequest.cpp b/cfw/src/v1/model/ShowDomainSetDetailRequest.cpp new file mode 100644 index 00000000..9e374f75 --- /dev/null +++ b/cfw/src/v1/model/ShowDomainSetDetailRequest.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/cfw/v1/model/ShowDomainSetDetailRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ShowDomainSetDetailRequest::ShowDomainSetDetailRequest() +{ + fwInstanceId_ = ""; + fwInstanceIdIsSet_ = false; + domainSetId_ = ""; + domainSetIdIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +ShowDomainSetDetailRequest::~ShowDomainSetDetailRequest() = default; + +void ShowDomainSetDetailRequest::validate() +{ +} + +web::json::value ShowDomainSetDetailRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(fwInstanceIdIsSet_) { + val[utility::conversions::to_string_t("fw_instance_id")] = ModelBase::toJson(fwInstanceId_); + } + if(domainSetIdIsSet_) { + val[utility::conversions::to_string_t("domain_set_id")] = ModelBase::toJson(domainSetId_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool ShowDomainSetDetailRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("fw_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fw_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFwInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("domain_set_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_set_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainSetId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(refVal); + } + } + return ok; +} + + +std::string ShowDomainSetDetailRequest::getFwInstanceId() const +{ + return fwInstanceId_; +} + +void ShowDomainSetDetailRequest::setFwInstanceId(const std::string& value) +{ + fwInstanceId_ = value; + fwInstanceIdIsSet_ = true; +} + +bool ShowDomainSetDetailRequest::fwInstanceIdIsSet() const +{ + return fwInstanceIdIsSet_; +} + +void ShowDomainSetDetailRequest::unsetfwInstanceId() +{ + fwInstanceIdIsSet_ = false; +} + +std::string ShowDomainSetDetailRequest::getDomainSetId() const +{ + return domainSetId_; +} + +void ShowDomainSetDetailRequest::setDomainSetId(const std::string& value) +{ + domainSetId_ = value; + domainSetIdIsSet_ = true; +} + +bool ShowDomainSetDetailRequest::domainSetIdIsSet() const +{ + return domainSetIdIsSet_; +} + +void ShowDomainSetDetailRequest::unsetdomainSetId() +{ + domainSetIdIsSet_ = false; +} + +std::string ShowDomainSetDetailRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ShowDomainSetDetailRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ShowDomainSetDetailRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ShowDomainSetDetailRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ShowDomainSetDetailResponse.cpp b/cfw/src/v1/model/ShowDomainSetDetailResponse.cpp new file mode 100644 index 00000000..74b28162 --- /dev/null +++ b/cfw/src/v1/model/ShowDomainSetDetailResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/ShowDomainSetDetailResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ShowDomainSetDetailResponse::ShowDomainSetDetailResponse() +{ + dataIsSet_ = false; +} + +ShowDomainSetDetailResponse::~ShowDomainSetDetailResponse() = default; + +void ShowDomainSetDetailResponse::validate() +{ +} + +web::json::value ShowDomainSetDetailResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool ShowDomainSetDetailResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + DomainSetVo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +DomainSetVo ShowDomainSetDetailResponse::getData() const +{ + return data_; +} + +void ShowDomainSetDetailResponse::setData(const DomainSetVo& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ShowDomainSetDetailResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void ShowDomainSetDetailResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ShowImportStatusRequest.cpp b/cfw/src/v1/model/ShowImportStatusRequest.cpp new file mode 100644 index 00000000..a97a6e7d --- /dev/null +++ b/cfw/src/v1/model/ShowImportStatusRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/cfw/v1/model/ShowImportStatusRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ShowImportStatusRequest::ShowImportStatusRequest() +{ + objectId_ = ""; + objectIdIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +ShowImportStatusRequest::~ShowImportStatusRequest() = default; + +void ShowImportStatusRequest::validate() +{ +} + +web::json::value ShowImportStatusRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(objectIdIsSet_) { + val[utility::conversions::to_string_t("object_id")] = ModelBase::toJson(objectId_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool ShowImportStatusRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("object_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("object_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setObjectId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(refVal); + } + } + return ok; +} + + +std::string ShowImportStatusRequest::getObjectId() const +{ + return objectId_; +} + +void ShowImportStatusRequest::setObjectId(const std::string& value) +{ + objectId_ = value; + objectIdIsSet_ = true; +} + +bool ShowImportStatusRequest::objectIdIsSet() const +{ + return objectIdIsSet_; +} + +void ShowImportStatusRequest::unsetobjectId() +{ + objectIdIsSet_ = false; +} + +std::string ShowImportStatusRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ShowImportStatusRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ShowImportStatusRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ShowImportStatusRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ShowImportStatusResponse.cpp b/cfw/src/v1/model/ShowImportStatusResponse.cpp new file mode 100644 index 00000000..38f23a6d --- /dev/null +++ b/cfw/src/v1/model/ShowImportStatusResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/ShowImportStatusResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ShowImportStatusResponse::ShowImportStatusResponse() +{ + dataIsSet_ = false; +} + +ShowImportStatusResponse::~ShowImportStatusResponse() = default; + +void ShowImportStatusResponse::validate() +{ +} + +web::json::value ShowImportStatusResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool ShowImportStatusResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + Object refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +Object ShowImportStatusResponse::getData() const +{ + return data_; +} + +void ShowImportStatusResponse::setData(const Object& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ShowImportStatusResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void ShowImportStatusResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ShowIpsUpdateTimeRequest.cpp b/cfw/src/v1/model/ShowIpsUpdateTimeRequest.cpp new file mode 100644 index 00000000..cfecd744 --- /dev/null +++ b/cfw/src/v1/model/ShowIpsUpdateTimeRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/cfw/v1/model/ShowIpsUpdateTimeRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ShowIpsUpdateTimeRequest::ShowIpsUpdateTimeRequest() +{ + fwInstanceId_ = ""; + fwInstanceIdIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +ShowIpsUpdateTimeRequest::~ShowIpsUpdateTimeRequest() = default; + +void ShowIpsUpdateTimeRequest::validate() +{ +} + +web::json::value ShowIpsUpdateTimeRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(fwInstanceIdIsSet_) { + val[utility::conversions::to_string_t("fw_instance_id")] = ModelBase::toJson(fwInstanceId_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool ShowIpsUpdateTimeRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("fw_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fw_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFwInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(refVal); + } + } + return ok; +} + + +std::string ShowIpsUpdateTimeRequest::getFwInstanceId() const +{ + return fwInstanceId_; +} + +void ShowIpsUpdateTimeRequest::setFwInstanceId(const std::string& value) +{ + fwInstanceId_ = value; + fwInstanceIdIsSet_ = true; +} + +bool ShowIpsUpdateTimeRequest::fwInstanceIdIsSet() const +{ + return fwInstanceIdIsSet_; +} + +void ShowIpsUpdateTimeRequest::unsetfwInstanceId() +{ + fwInstanceIdIsSet_ = false; +} + +std::string ShowIpsUpdateTimeRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ShowIpsUpdateTimeRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ShowIpsUpdateTimeRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ShowIpsUpdateTimeRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/ShowIpsUpdateTimeResponse.cpp b/cfw/src/v1/model/ShowIpsUpdateTimeResponse.cpp new file mode 100644 index 00000000..4f795926 --- /dev/null +++ b/cfw/src/v1/model/ShowIpsUpdateTimeResponse.cpp @@ -0,0 +1,288 @@ + + +#include "huaweicloud/cfw/v1/model/ShowIpsUpdateTimeResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +ShowIpsUpdateTimeResponse::ShowIpsUpdateTimeResponse() +{ + dataIsSet_ = false; + errorCode_ = ""; + errorCodeIsSet_ = false; + errorDescription_ = ""; + errorDescriptionIsSet_ = false; + failReason_ = ""; + failReasonIsSet_ = false; + jobId_ = ""; + jobIdIsSet_ = false; + orderId_ = ""; + orderIdIsSet_ = false; + traceId_ = ""; + traceIdIsSet_ = false; +} + +ShowIpsUpdateTimeResponse::~ShowIpsUpdateTimeResponse() = default; + +void ShowIpsUpdateTimeResponse::validate() +{ +} + +web::json::value ShowIpsUpdateTimeResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + if(errorCodeIsSet_) { + val[utility::conversions::to_string_t("error_code")] = ModelBase::toJson(errorCode_); + } + if(errorDescriptionIsSet_) { + val[utility::conversions::to_string_t("error_description")] = ModelBase::toJson(errorDescription_); + } + if(failReasonIsSet_) { + val[utility::conversions::to_string_t("fail_reason")] = ModelBase::toJson(failReason_); + } + if(jobIdIsSet_) { + val[utility::conversions::to_string_t("job_id")] = ModelBase::toJson(jobId_); + } + if(orderIdIsSet_) { + val[utility::conversions::to_string_t("order_id")] = ModelBase::toJson(orderId_); + } + if(traceIdIsSet_) { + val[utility::conversions::to_string_t("trace_id")] = ModelBase::toJson(traceId_); + } + + return val; +} +bool ShowIpsUpdateTimeResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("error_code"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("error_code")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setErrorCode(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("error_description"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("error_description")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setErrorDescription(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("fail_reason"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fail_reason")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFailReason(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); + } + } + if(val.has_field(utility::conversions::to_string_t("order_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("order_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOrderId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("trace_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("trace_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTraceId(refVal); + } + } + return ok; +} + + +std::vector& ShowIpsUpdateTimeResponse::getData() +{ + return data_; +} + +void ShowIpsUpdateTimeResponse::setData(const std::vector& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ShowIpsUpdateTimeResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void ShowIpsUpdateTimeResponse::unsetdata() +{ + dataIsSet_ = false; +} + +std::string ShowIpsUpdateTimeResponse::getErrorCode() const +{ + return errorCode_; +} + +void ShowIpsUpdateTimeResponse::setErrorCode(const std::string& value) +{ + errorCode_ = value; + errorCodeIsSet_ = true; +} + +bool ShowIpsUpdateTimeResponse::errorCodeIsSet() const +{ + return errorCodeIsSet_; +} + +void ShowIpsUpdateTimeResponse::unseterrorCode() +{ + errorCodeIsSet_ = false; +} + +std::string ShowIpsUpdateTimeResponse::getErrorDescription() const +{ + return errorDescription_; +} + +void ShowIpsUpdateTimeResponse::setErrorDescription(const std::string& value) +{ + errorDescription_ = value; + errorDescriptionIsSet_ = true; +} + +bool ShowIpsUpdateTimeResponse::errorDescriptionIsSet() const +{ + return errorDescriptionIsSet_; +} + +void ShowIpsUpdateTimeResponse::unseterrorDescription() +{ + errorDescriptionIsSet_ = false; +} + +std::string ShowIpsUpdateTimeResponse::getFailReason() const +{ + return failReason_; +} + +void ShowIpsUpdateTimeResponse::setFailReason(const std::string& value) +{ + failReason_ = value; + failReasonIsSet_ = true; +} + +bool ShowIpsUpdateTimeResponse::failReasonIsSet() const +{ + return failReasonIsSet_; +} + +void ShowIpsUpdateTimeResponse::unsetfailReason() +{ + failReasonIsSet_ = false; +} + +std::string ShowIpsUpdateTimeResponse::getJobId() const +{ + return jobId_; +} + +void ShowIpsUpdateTimeResponse::setJobId(const std::string& value) +{ + jobId_ = value; + jobIdIsSet_ = true; +} + +bool ShowIpsUpdateTimeResponse::jobIdIsSet() const +{ + return jobIdIsSet_; +} + +void ShowIpsUpdateTimeResponse::unsetjobId() +{ + jobIdIsSet_ = false; +} + +std::string ShowIpsUpdateTimeResponse::getOrderId() const +{ + return orderId_; +} + +void ShowIpsUpdateTimeResponse::setOrderId(const std::string& value) +{ + orderId_ = value; + orderIdIsSet_ = true; +} + +bool ShowIpsUpdateTimeResponse::orderIdIsSet() const +{ + return orderIdIsSet_; +} + +void ShowIpsUpdateTimeResponse::unsetorderId() +{ + orderIdIsSet_ = false; +} + +std::string ShowIpsUpdateTimeResponse::getTraceId() const +{ + return traceId_; +} + +void ShowIpsUpdateTimeResponse::setTraceId(const std::string& value) +{ + traceId_ = value; + traceIdIsSet_ = true; +} + +bool ShowIpsUpdateTimeResponse::traceIdIsSet() const +{ + return traceIdIsSet_; +} + +void ShowIpsUpdateTimeResponse::unsettraceId() +{ + traceIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/SwitchAutoProtectStatusRequest.cpp b/cfw/src/v1/model/SwitchAutoProtectStatusRequest.cpp new file mode 100644 index 00000000..cb642133 --- /dev/null +++ b/cfw/src/v1/model/SwitchAutoProtectStatusRequest.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/cfw/v1/model/SwitchAutoProtectStatusRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +SwitchAutoProtectStatusRequest::SwitchAutoProtectStatusRequest() +{ + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; + bodyIsSet_ = false; +} + +SwitchAutoProtectStatusRequest::~SwitchAutoProtectStatusRequest() = default; + +void SwitchAutoProtectStatusRequest::validate() +{ +} + +web::json::value SwitchAutoProtectStatusRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool SwitchAutoProtectStatusRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(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()) + { + SwitchEipStatusDto refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string SwitchAutoProtectStatusRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void SwitchAutoProtectStatusRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool SwitchAutoProtectStatusRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void SwitchAutoProtectStatusRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +SwitchEipStatusDto SwitchAutoProtectStatusRequest::getBody() const +{ + return body_; +} + +void SwitchAutoProtectStatusRequest::setBody(const SwitchEipStatusDto& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool SwitchAutoProtectStatusRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void SwitchAutoProtectStatusRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/SwitchAutoProtectStatusResponse.cpp b/cfw/src/v1/model/SwitchAutoProtectStatusResponse.cpp new file mode 100644 index 00000000..a3915419 --- /dev/null +++ b/cfw/src/v1/model/SwitchAutoProtectStatusResponse.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/cfw/v1/model/SwitchAutoProtectStatusResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +SwitchAutoProtectStatusResponse::SwitchAutoProtectStatusResponse() +{ + data_ = ""; + dataIsSet_ = false; +} + +SwitchAutoProtectStatusResponse::~SwitchAutoProtectStatusResponse() = default; + +void SwitchAutoProtectStatusResponse::validate() +{ +} + +web::json::value SwitchAutoProtectStatusResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool SwitchAutoProtectStatusResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +std::string SwitchAutoProtectStatusResponse::getData() const +{ + return data_; +} + +void SwitchAutoProtectStatusResponse::setData(const std::string& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool SwitchAutoProtectStatusResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void SwitchAutoProtectStatusResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/SwitchEipStatusDto.cpp b/cfw/src/v1/model/SwitchEipStatusDto.cpp new file mode 100644 index 00000000..5793f1bd --- /dev/null +++ b/cfw/src/v1/model/SwitchEipStatusDto.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/cfw/v1/model/SwitchEipStatusDto.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +SwitchEipStatusDto::SwitchEipStatusDto() +{ + fwInstanceId_ = ""; + fwInstanceIdIsSet_ = false; + objectId_ = ""; + objectIdIsSet_ = false; + status_ = 0; + statusIsSet_ = false; +} + +SwitchEipStatusDto::~SwitchEipStatusDto() = default; + +void SwitchEipStatusDto::validate() +{ +} + +web::json::value SwitchEipStatusDto::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(fwInstanceIdIsSet_) { + val[utility::conversions::to_string_t("fw_instance_id")] = ModelBase::toJson(fwInstanceId_); + } + if(objectIdIsSet_) { + val[utility::conversions::to_string_t("object_id")] = ModelBase::toJson(objectId_); + } + if(statusIsSet_) { + val[utility::conversions::to_string_t("status")] = ModelBase::toJson(status_); + } + + return val; +} +bool SwitchEipStatusDto::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("fw_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fw_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFwInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("object_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("object_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setObjectId(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 SwitchEipStatusDto::getFwInstanceId() const +{ + return fwInstanceId_; +} + +void SwitchEipStatusDto::setFwInstanceId(const std::string& value) +{ + fwInstanceId_ = value; + fwInstanceIdIsSet_ = true; +} + +bool SwitchEipStatusDto::fwInstanceIdIsSet() const +{ + return fwInstanceIdIsSet_; +} + +void SwitchEipStatusDto::unsetfwInstanceId() +{ + fwInstanceIdIsSet_ = false; +} + +std::string SwitchEipStatusDto::getObjectId() const +{ + return objectId_; +} + +void SwitchEipStatusDto::setObjectId(const std::string& value) +{ + objectId_ = value; + objectIdIsSet_ = true; +} + +bool SwitchEipStatusDto::objectIdIsSet() const +{ + return objectIdIsSet_; +} + +void SwitchEipStatusDto::unsetobjectId() +{ + objectIdIsSet_ = false; +} + +int32_t SwitchEipStatusDto::getStatus() const +{ + return status_; +} + +void SwitchEipStatusDto::setStatus(int32_t value) +{ + status_ = value; + statusIsSet_ = true; +} + +bool SwitchEipStatusDto::statusIsSet() const +{ + return statusIsSet_; +} + +void SwitchEipStatusDto::unsetstatus() +{ + statusIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/TagValue.cpp b/cfw/src/v1/model/TagValue.cpp new file mode 100644 index 00000000..4e2bce31 --- /dev/null +++ b/cfw/src/v1/model/TagValue.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/cfw/v1/model/TagValue.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +TagValue::TagValue() +{ + key_ = ""; + keyIsSet_ = false; + valueIsSet_ = false; +} + +TagValue::~TagValue() = default; + +void TagValue::validate() +{ +} + +web::json::value TagValue::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(keyIsSet_) { + val[utility::conversions::to_string_t("key")] = ModelBase::toJson(key_); + } + if(valueIsSet_) { + val[utility::conversions::to_string_t("value")] = ModelBase::toJson(value_); + } + + return val; +} +bool TagValue::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("key"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("key")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setKey(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("value"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("value")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setValue(refVal); + } + } + return ok; +} + + +std::string TagValue::getKey() const +{ + return key_; +} + +void TagValue::setKey(const std::string& value) +{ + key_ = value; + keyIsSet_ = true; +} + +bool TagValue::keyIsSet() const +{ + return keyIsSet_; +} + +void TagValue::unsetkey() +{ + keyIsSet_ = false; +} + +std::vector& TagValue::getValue() +{ + return value_; +} + +void TagValue::setValue(const std::vector& value) +{ + value_ = value; + valueIsSet_ = true; +} + +bool TagValue::valueIsSet() const +{ + return valueIsSet_; +} + +void TagValue::unsetvalue() +{ + valueIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/UpdateAdvancedIpsRuleRequest.cpp b/cfw/src/v1/model/UpdateAdvancedIpsRuleRequest.cpp new file mode 100644 index 00000000..2d90a768 --- /dev/null +++ b/cfw/src/v1/model/UpdateAdvancedIpsRuleRequest.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/cfw/v1/model/UpdateAdvancedIpsRuleRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +UpdateAdvancedIpsRuleRequest::UpdateAdvancedIpsRuleRequest() +{ + fwInstanceId_ = ""; + fwInstanceIdIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; + bodyIsSet_ = false; +} + +UpdateAdvancedIpsRuleRequest::~UpdateAdvancedIpsRuleRequest() = default; + +void UpdateAdvancedIpsRuleRequest::validate() +{ +} + +web::json::value UpdateAdvancedIpsRuleRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(fwInstanceIdIsSet_) { + val[utility::conversions::to_string_t("fw_instance_id")] = ModelBase::toJson(fwInstanceId_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool UpdateAdvancedIpsRuleRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("fw_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fw_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFwInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(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()) + { + AdvancedIpsRuleDto refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string UpdateAdvancedIpsRuleRequest::getFwInstanceId() const +{ + return fwInstanceId_; +} + +void UpdateAdvancedIpsRuleRequest::setFwInstanceId(const std::string& value) +{ + fwInstanceId_ = value; + fwInstanceIdIsSet_ = true; +} + +bool UpdateAdvancedIpsRuleRequest::fwInstanceIdIsSet() const +{ + return fwInstanceIdIsSet_; +} + +void UpdateAdvancedIpsRuleRequest::unsetfwInstanceId() +{ + fwInstanceIdIsSet_ = false; +} + +std::string UpdateAdvancedIpsRuleRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void UpdateAdvancedIpsRuleRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool UpdateAdvancedIpsRuleRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void UpdateAdvancedIpsRuleRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +AdvancedIpsRuleDto UpdateAdvancedIpsRuleRequest::getBody() const +{ + return body_; +} + +void UpdateAdvancedIpsRuleRequest::setBody(const AdvancedIpsRuleDto& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UpdateAdvancedIpsRuleRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UpdateAdvancedIpsRuleRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/UpdateAdvancedIpsRuleResponse.cpp b/cfw/src/v1/model/UpdateAdvancedIpsRuleResponse.cpp new file mode 100644 index 00000000..5c5edd80 --- /dev/null +++ b/cfw/src/v1/model/UpdateAdvancedIpsRuleResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/UpdateAdvancedIpsRuleResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +UpdateAdvancedIpsRuleResponse::UpdateAdvancedIpsRuleResponse() +{ + dataIsSet_ = false; +} + +UpdateAdvancedIpsRuleResponse::~UpdateAdvancedIpsRuleResponse() = default; + +void UpdateAdvancedIpsRuleResponse::validate() +{ +} + +web::json::value UpdateAdvancedIpsRuleResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool UpdateAdvancedIpsRuleResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + ResponseData refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +ResponseData UpdateAdvancedIpsRuleResponse::getData() const +{ + return data_; +} + +void UpdateAdvancedIpsRuleResponse::setData(const ResponseData& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool UpdateAdvancedIpsRuleResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void UpdateAdvancedIpsRuleResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/UpdateAlarmConfigRequest.cpp b/cfw/src/v1/model/UpdateAlarmConfigRequest.cpp new file mode 100644 index 00000000..0b5214c3 --- /dev/null +++ b/cfw/src/v1/model/UpdateAlarmConfigRequest.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/cfw/v1/model/UpdateAlarmConfigRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +UpdateAlarmConfigRequest::UpdateAlarmConfigRequest() +{ + fwInstanceId_ = ""; + fwInstanceIdIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; + bodyIsSet_ = false; +} + +UpdateAlarmConfigRequest::~UpdateAlarmConfigRequest() = default; + +void UpdateAlarmConfigRequest::validate() +{ +} + +web::json::value UpdateAlarmConfigRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(fwInstanceIdIsSet_) { + val[utility::conversions::to_string_t("fw_instance_id")] = ModelBase::toJson(fwInstanceId_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool UpdateAlarmConfigRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("fw_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fw_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFwInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(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()) + { + UpdateAttackLogAlarmConfigDto refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string UpdateAlarmConfigRequest::getFwInstanceId() const +{ + return fwInstanceId_; +} + +void UpdateAlarmConfigRequest::setFwInstanceId(const std::string& value) +{ + fwInstanceId_ = value; + fwInstanceIdIsSet_ = true; +} + +bool UpdateAlarmConfigRequest::fwInstanceIdIsSet() const +{ + return fwInstanceIdIsSet_; +} + +void UpdateAlarmConfigRequest::unsetfwInstanceId() +{ + fwInstanceIdIsSet_ = false; +} + +std::string UpdateAlarmConfigRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void UpdateAlarmConfigRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool UpdateAlarmConfigRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void UpdateAlarmConfigRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +UpdateAttackLogAlarmConfigDto UpdateAlarmConfigRequest::getBody() const +{ + return body_; +} + +void UpdateAlarmConfigRequest::setBody(const UpdateAttackLogAlarmConfigDto& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UpdateAlarmConfigRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UpdateAlarmConfigRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/UpdateAlarmConfigResponse.cpp b/cfw/src/v1/model/UpdateAlarmConfigResponse.cpp new file mode 100644 index 00000000..f8df7669 --- /dev/null +++ b/cfw/src/v1/model/UpdateAlarmConfigResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/UpdateAlarmConfigResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +UpdateAlarmConfigResponse::UpdateAlarmConfigResponse() +{ + dataIsSet_ = false; +} + +UpdateAlarmConfigResponse::~UpdateAlarmConfigResponse() = default; + +void UpdateAlarmConfigResponse::validate() +{ +} + +web::json::value UpdateAlarmConfigResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool UpdateAlarmConfigResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + ResponseData refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +ResponseData UpdateAlarmConfigResponse::getData() const +{ + return data_; +} + +void UpdateAlarmConfigResponse::setData(const ResponseData& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool UpdateAlarmConfigResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void UpdateAlarmConfigResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/UpdateAntiVirusRuleRequest.cpp b/cfw/src/v1/model/UpdateAntiVirusRuleRequest.cpp new file mode 100644 index 00000000..e42f60ac --- /dev/null +++ b/cfw/src/v1/model/UpdateAntiVirusRuleRequest.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/cfw/v1/model/UpdateAntiVirusRuleRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +UpdateAntiVirusRuleRequest::UpdateAntiVirusRuleRequest() +{ + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; + bodyIsSet_ = false; +} + +UpdateAntiVirusRuleRequest::~UpdateAntiVirusRuleRequest() = default; + +void UpdateAntiVirusRuleRequest::validate() +{ +} + +web::json::value UpdateAntiVirusRuleRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool UpdateAntiVirusRuleRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(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()) + { + AntiVirusRuleDto refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string UpdateAntiVirusRuleRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void UpdateAntiVirusRuleRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool UpdateAntiVirusRuleRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void UpdateAntiVirusRuleRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +AntiVirusRuleDto UpdateAntiVirusRuleRequest::getBody() const +{ + return body_; +} + +void UpdateAntiVirusRuleRequest::setBody(const AntiVirusRuleDto& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UpdateAntiVirusRuleRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UpdateAntiVirusRuleRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/UpdateAntiVirusRuleResponse.cpp b/cfw/src/v1/model/UpdateAntiVirusRuleResponse.cpp new file mode 100644 index 00000000..568420a2 --- /dev/null +++ b/cfw/src/v1/model/UpdateAntiVirusRuleResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/UpdateAntiVirusRuleResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +UpdateAntiVirusRuleResponse::UpdateAntiVirusRuleResponse() +{ + dataIsSet_ = false; +} + +UpdateAntiVirusRuleResponse::~UpdateAntiVirusRuleResponse() = default; + +void UpdateAntiVirusRuleResponse::validate() +{ +} + +web::json::value UpdateAntiVirusRuleResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool UpdateAntiVirusRuleResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + ResponseData refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +ResponseData UpdateAntiVirusRuleResponse::getData() const +{ + return data_; +} + +void UpdateAntiVirusRuleResponse::setData(const ResponseData& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool UpdateAntiVirusRuleResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void UpdateAntiVirusRuleResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/UpdateAntiVirusSwitchRequest.cpp b/cfw/src/v1/model/UpdateAntiVirusSwitchRequest.cpp new file mode 100644 index 00000000..14e80eb9 --- /dev/null +++ b/cfw/src/v1/model/UpdateAntiVirusSwitchRequest.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/cfw/v1/model/UpdateAntiVirusSwitchRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +UpdateAntiVirusSwitchRequest::UpdateAntiVirusSwitchRequest() +{ + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; + bodyIsSet_ = false; +} + +UpdateAntiVirusSwitchRequest::~UpdateAntiVirusSwitchRequest() = default; + +void UpdateAntiVirusSwitchRequest::validate() +{ +} + +web::json::value UpdateAntiVirusSwitchRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool UpdateAntiVirusSwitchRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnterpriseProjectId(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()) + { + AntiVirusSwitchDto refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string UpdateAntiVirusSwitchRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void UpdateAntiVirusSwitchRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool UpdateAntiVirusSwitchRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void UpdateAntiVirusSwitchRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +AntiVirusSwitchDto UpdateAntiVirusSwitchRequest::getBody() const +{ + return body_; +} + +void UpdateAntiVirusSwitchRequest::setBody(const AntiVirusSwitchDto& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UpdateAntiVirusSwitchRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UpdateAntiVirusSwitchRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/UpdateAntiVirusSwitchResponse.cpp b/cfw/src/v1/model/UpdateAntiVirusSwitchResponse.cpp new file mode 100644 index 00000000..f72f4eef --- /dev/null +++ b/cfw/src/v1/model/UpdateAntiVirusSwitchResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/cfw/v1/model/UpdateAntiVirusSwitchResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +UpdateAntiVirusSwitchResponse::UpdateAntiVirusSwitchResponse() +{ + dataIsSet_ = false; +} + +UpdateAntiVirusSwitchResponse::~UpdateAntiVirusSwitchResponse() = default; + +void UpdateAntiVirusSwitchResponse::validate() +{ +} + +web::json::value UpdateAntiVirusSwitchResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool UpdateAntiVirusSwitchResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data")); + if(!fieldValue.is_null()) + { + ResponseData refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setData(refVal); + } + } + return ok; +} + + +ResponseData UpdateAntiVirusSwitchResponse::getData() const +{ + return data_; +} + +void UpdateAntiVirusSwitchResponse::setData(const ResponseData& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool UpdateAntiVirusSwitchResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void UpdateAntiVirusSwitchResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/cfw/src/v1/model/UpdateAttackLogAlarmConfigDto.cpp b/cfw/src/v1/model/UpdateAttackLogAlarmConfigDto.cpp new file mode 100644 index 00000000..cf7f208f --- /dev/null +++ b/cfw/src/v1/model/UpdateAttackLogAlarmConfigDto.cpp @@ -0,0 +1,429 @@ + + +#include "huaweicloud/cfw/v1/model/UpdateAttackLogAlarmConfigDto.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Cfw { +namespace V1 { +namespace Model { + + + + +UpdateAttackLogAlarmConfigDto::UpdateAttackLogAlarmConfigDto() +{ + accountName_ = ""; + accountNameIsSet_ = false; + alarmId_ = ""; + alarmIdIsSet_ = false; + alarmTimePeriod_ = 0; + alarmTimePeriodIsSet_ = false; + alarmType_ = 0; + alarmTypeIsSet_ = false; + enableStatus_ = 0; + enableStatusIsSet_ = false; + frequencyCount_ = 0; + frequencyCountIsSet_ = false; + frequencyTime_ = 0; + frequencyTimeIsSet_ = false; + language_ = ""; + languageIsSet_ = false; + severity_ = ""; + severityIsSet_ = false; + topicUrn_ = ""; + topicUrnIsSet_ = false; + username_ = ""; + usernameIsSet_ = false; +} + +UpdateAttackLogAlarmConfigDto::~UpdateAttackLogAlarmConfigDto() = default; + +void UpdateAttackLogAlarmConfigDto::validate() +{ +} + +web::json::value UpdateAttackLogAlarmConfigDto::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(accountNameIsSet_) { + val[utility::conversions::to_string_t("account_name")] = ModelBase::toJson(accountName_); + } + if(alarmIdIsSet_) { + val[utility::conversions::to_string_t("alarm_id")] = ModelBase::toJson(alarmId_); + } + if(alarmTimePeriodIsSet_) { + val[utility::conversions::to_string_t("alarm_time_period")] = ModelBase::toJson(alarmTimePeriod_); + } + if(alarmTypeIsSet_) { + val[utility::conversions::to_string_t("alarm_type")] = ModelBase::toJson(alarmType_); + } + if(enableStatusIsSet_) { + val[utility::conversions::to_string_t("enable_status")] = ModelBase::toJson(enableStatus_); + } + if(frequencyCountIsSet_) { + val[utility::conversions::to_string_t("frequency_count")] = ModelBase::toJson(frequencyCount_); + } + if(frequencyTimeIsSet_) { + val[utility::conversions::to_string_t("frequency_time")] = ModelBase::toJson(frequencyTime_); + } + if(languageIsSet_) { + val[utility::conversions::to_string_t("language")] = ModelBase::toJson(language_); + } + if(severityIsSet_) { + val[utility::conversions::to_string_t("severity")] = ModelBase::toJson(severity_); + } + if(topicUrnIsSet_) { + val[utility::conversions::to_string_t("topic_urn")] = ModelBase::toJson(topicUrn_); + } + if(usernameIsSet_) { + val[utility::conversions::to_string_t("username")] = ModelBase::toJson(username_); + } + + return val; +} +bool UpdateAttackLogAlarmConfigDto::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("account_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("account_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAccountName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("alarm_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("alarm_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAlarmId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("alarm_time_period"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("alarm_time_period")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAlarmTimePeriod(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("alarm_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("alarm_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAlarmType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("enable_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enable_status")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEnableStatus(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("frequency_count"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("frequency_count")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFrequencyCount(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("frequency_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("frequency_time")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFrequencyTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("language"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("language")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLanguage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("severity"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("severity")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSeverity(refVal); + } + } + 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("username"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("username")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setUsername(refVal); + } + } + return ok; +} + + +std::string UpdateAttackLogAlarmConfigDto::getAccountName() const +{ + return accountName_; +} + +void UpdateAttackLogAlarmConfigDto::setAccountName(const std::string& value) +{ + accountName_ = value; + accountNameIsSet_ = true; +} + +bool UpdateAttackLogAlarmConfigDto::accountNameIsSet() const +{ + return accountNameIsSet_; +} + +void UpdateAttackLogAlarmConfigDto::unsetaccountName() +{ + accountNameIsSet_ = false; +} + +std::string UpdateAttackLogAlarmConfigDto::getAlarmId() const +{ + return alarmId_; +} + +void UpdateAttackLogAlarmConfigDto::setAlarmId(const std::string& value) +{ + alarmId_ = value; + alarmIdIsSet_ = true; +} + +bool UpdateAttackLogAlarmConfigDto::alarmIdIsSet() const +{ + return alarmIdIsSet_; +} + +void UpdateAttackLogAlarmConfigDto::unsetalarmId() +{ + alarmIdIsSet_ = false; +} + +int32_t UpdateAttackLogAlarmConfigDto::getAlarmTimePeriod() const +{ + return alarmTimePeriod_; +} + +void UpdateAttackLogAlarmConfigDto::setAlarmTimePeriod(int32_t value) +{ + alarmTimePeriod_ = value; + alarmTimePeriodIsSet_ = true; +} + +bool UpdateAttackLogAlarmConfigDto::alarmTimePeriodIsSet() const +{ + return alarmTimePeriodIsSet_; +} + +void UpdateAttackLogAlarmConfigDto::unsetalarmTimePeriod() +{ + alarmTimePeriodIsSet_ = false; +} + +int32_t UpdateAttackLogAlarmConfigDto::getAlarmType() const +{ + return alarmType_; +} + +void UpdateAttackLogAlarmConfigDto::setAlarmType(int32_t value) +{ + alarmType_ = value; + alarmTypeIsSet_ = true; +} + +bool UpdateAttackLogAlarmConfigDto::alarmTypeIsSet() const +{ + return alarmTypeIsSet_; +} + +void UpdateAttackLogAlarmConfigDto::unsetalarmType() +{ + alarmTypeIsSet_ = false; +} + +int32_t UpdateAttackLogAlarmConfigDto::getEnableStatus() const +{ + return enableStatus_; +} + +void UpdateAttackLogAlarmConfigDto::setEnableStatus(int32_t value) +{ + enableStatus_ = value; + enableStatusIsSet_ = true; +} + +bool UpdateAttackLogAlarmConfigDto::enableStatusIsSet() const +{ + return enableStatusIsSet_; +} + +void UpdateAttackLogAlarmConfigDto::unsetenableStatus() +{ + enableStatusIsSet_ = false; +} + +int32_t UpdateAttackLogAlarmConfigDto::getFrequencyCount() const +{ + return frequencyCount_; +} + +void UpdateAttackLogAlarmConfigDto::setFrequencyCount(int32_t value) +{ + frequencyCount_ = value; + frequencyCountIsSet_ = true; +} + +bool UpdateAttackLogAlarmConfigDto::frequencyCountIsSet() const +{ + return frequencyCountIsSet_; +} + +void UpdateAttackLogAlarmConfigDto::unsetfrequencyCount() +{ + frequencyCountIsSet_ = false; +} + +int32_t UpdateAttackLogAlarmConfigDto::getFrequencyTime() const +{ + return frequencyTime_; +} + +void UpdateAttackLogAlarmConfigDto::setFrequencyTime(int32_t value) +{ + frequencyTime_ = value; + frequencyTimeIsSet_ = true; +} + +bool UpdateAttackLogAlarmConfigDto::frequencyTimeIsSet() const +{ + return frequencyTimeIsSet_; +} + +void UpdateAttackLogAlarmConfigDto::unsetfrequencyTime() +{ + frequencyTimeIsSet_ = false; +} + +std::string UpdateAttackLogAlarmConfigDto::getLanguage() const +{ + return language_; +} + +void UpdateAttackLogAlarmConfigDto::setLanguage(const std::string& value) +{ + language_ = value; + languageIsSet_ = true; +} + +bool UpdateAttackLogAlarmConfigDto::languageIsSet() const +{ + return languageIsSet_; +} + +void UpdateAttackLogAlarmConfigDto::unsetlanguage() +{ + languageIsSet_ = false; +} + +std::string UpdateAttackLogAlarmConfigDto::getSeverity() const +{ + return severity_; +} + +void UpdateAttackLogAlarmConfigDto::setSeverity(const std::string& value) +{ + severity_ = value; + severityIsSet_ = true; +} + +bool UpdateAttackLogAlarmConfigDto::severityIsSet() const +{ + return severityIsSet_; +} + +void UpdateAttackLogAlarmConfigDto::unsetseverity() +{ + severityIsSet_ = false; +} + +std::string UpdateAttackLogAlarmConfigDto::getTopicUrn() const +{ + return topicUrn_; +} + +void UpdateAttackLogAlarmConfigDto::setTopicUrn(const std::string& value) +{ + topicUrn_ = value; + topicUrnIsSet_ = true; +} + +bool UpdateAttackLogAlarmConfigDto::topicUrnIsSet() const +{ + return topicUrnIsSet_; +} + +void UpdateAttackLogAlarmConfigDto::unsettopicUrn() +{ + topicUrnIsSet_ = false; +} + +std::string UpdateAttackLogAlarmConfigDto::getUsername() const +{ + return username_; +} + +void UpdateAttackLogAlarmConfigDto::setUsername(const std::string& value) +{ + username_ = value; + usernameIsSet_ = true; +} + +bool UpdateAttackLogAlarmConfigDto::usernameIsSet() const +{ + return usernameIsSet_; +} + +void UpdateAttackLogAlarmConfigDto::unsetusername() +{ + usernameIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/AllowDbRolePrivilegesRequestBody.h b/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/AllowDbRolePrivilegesRequestBody.h index 9db0c8b8..21163775 100644 --- a/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/AllowDbRolePrivilegesRequestBody.h +++ b/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/AllowDbRolePrivilegesRequestBody.h @@ -9,7 +9,7 @@ #include #include -#include +#include #include namespace HuaweiCloud { @@ -49,19 +49,19 @@ class HUAWEICLOUD_GAUSSDBFOROPENGAUSS_V3_EXPORT AllowDbRolePrivilegesRequestBod void setDbName(const std::string& value); /// - /// 角色权限信息。 + /// /// - Object getUser() const; + GaussDBforOpenGaussRoleAttributes getUser() const; bool userIsSet() const; void unsetuser(); - void setUser(const Object& value); + void setUser(const GaussDBforOpenGaussRoleAttributes& value); protected: std::string dbName_; bool dbNameIsSet_; - Object user_; + GaussDBforOpenGaussRoleAttributes user_; bool userIsSet_; }; diff --git a/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/GaussDBListDatabaseRoles.h b/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/GaussDBListDatabaseRoles.h index d293a9d4..de854305 100644 --- a/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/GaussDBListDatabaseRoles.h +++ b/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/GaussDBListDatabaseRoles.h @@ -9,7 +9,7 @@ #include #include -#include +#include #include namespace HuaweiCloud { @@ -67,13 +67,13 @@ class HUAWEICLOUD_GAUSSDBFOROPENGAUSS_V3_EXPORT GaussDBListDatabaseRoles void setLockStatus(bool value); /// - /// 用户/角色的权限属性。 + /// /// - Object getAttribute() const; + GaussDBListDatabaseRolesPriv getAttribute() const; bool attributeIsSet() const; void unsetattribute(); - void setAttribute(const Object& value); + void setAttribute(const GaussDBListDatabaseRolesPriv& value); protected: @@ -83,7 +83,7 @@ class HUAWEICLOUD_GAUSSDBFOROPENGAUSS_V3_EXPORT GaussDBListDatabaseRoles bool memberofIsSet_; bool lockStatus_; bool lockStatusIsSet_; - Object attribute_; + GaussDBListDatabaseRolesPriv attribute_; bool attributeIsSet_; }; diff --git a/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/GaussDBListDatabaseRolesPriv.h b/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/GaussDBListDatabaseRolesPriv.h new file mode 100644 index 00000000..ae6a6e19 --- /dev/null +++ b/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/GaussDBListDatabaseRolesPriv.h @@ -0,0 +1,152 @@ + +#ifndef HUAWEICLOUD_SDK_GAUSSDBFOROPENGAUSS_V3_MODEL_GaussDBListDatabaseRolesPriv_H_ +#define HUAWEICLOUD_SDK_GAUSSDBFOROPENGAUSS_V3_MODEL_GaussDBListDatabaseRolesPriv_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdbforopengauss { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_GAUSSDBFOROPENGAUSS_V3_EXPORT GaussDBListDatabaseRolesPriv + : public ModelBase +{ +public: + GaussDBListDatabaseRolesPriv(); + virtual ~GaussDBListDatabaseRolesPriv(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// GaussDBListDatabaseRolesPriv members + + /// + /// 用户/角色是否具有管理员权限。 + /// + + bool isRolsuper() const; + bool rolsuperIsSet() const; + void unsetrolsuper(); + void setRolsuper(bool value); + + /// + /// 用户/角色是否自动继承其所属角色的权限。 + /// + + bool isRolinherit() const; + bool rolinheritIsSet() const; + void unsetrolinherit(); + void setRolinherit(bool value); + + /// + /// 用户/角色是否支持创建其他子用户。 + /// + + bool isRolcreaterole() const; + bool rolcreateroleIsSet() const; + void unsetrolcreaterole(); + void setRolcreaterole(bool value); + + /// + /// 用户/角色是否可以创建数据库。 + /// + + bool isRolcreatedb() const; + bool rolcreatedbIsSet() const; + void unsetrolcreatedb(); + void setRolcreatedb(bool value); + + /// + /// 用户/角色是否可以登录数据库。 + /// + + bool isRolcanlogin() const; + bool rolcanloginIsSet() const; + void unsetrolcanlogin(); + void setRolcanlogin(bool value); + + /// + /// 用户/角色连接实例的最大并发连接数。-1表示没有限制。 + /// + + int32_t getRolconnlimit() const; + bool rolconnlimitIsSet() const; + void unsetrolconnlimit(); + void setRolconnlimit(int32_t value); + + /// + /// 用户/角色是否属于复制角色。 + /// + + bool isRolreplication() const; + bool rolreplicationIsSet() const; + void unsetrolreplication(); + void setRolreplication(bool value); + + /// + /// 用户/角色是否绕过每个行级安全策略。 + /// + + bool isRolbypassrls() const; + bool rolbypassrlsIsSet() const; + void unsetrolbypassrls(); + void setRolbypassrls(bool value); + + /// + /// 用户/角色密码过期时间。 + /// + + std::string getRolpassworddeadline() const; + bool rolpassworddeadlineIsSet() const; + void unsetrolpassworddeadline(); + void setRolpassworddeadline(const std::string& value); + + +protected: + bool rolsuper_; + bool rolsuperIsSet_; + bool rolinherit_; + bool rolinheritIsSet_; + bool rolcreaterole_; + bool rolcreateroleIsSet_; + bool rolcreatedb_; + bool rolcreatedbIsSet_; + bool rolcanlogin_; + bool rolcanloginIsSet_; + int32_t rolconnlimit_; + bool rolconnlimitIsSet_; + bool rolreplication_; + bool rolreplicationIsSet_; + bool rolbypassrls_; + bool rolbypassrlsIsSet_; + std::string rolpassworddeadline_; + bool rolpassworddeadlineIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_GAUSSDBFOROPENGAUSS_V3_MODEL_GaussDBListDatabaseRolesPriv_H_ diff --git a/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/GaussDBforOpenGaussRoleAttributes.h b/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/GaussDBforOpenGaussRoleAttributes.h new file mode 100644 index 00000000..b5105317 --- /dev/null +++ b/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/GaussDBforOpenGaussRoleAttributes.h @@ -0,0 +1,97 @@ + +#ifndef HUAWEICLOUD_SDK_GAUSSDBFOROPENGAUSS_V3_MODEL_GaussDBforOpenGaussRoleAttributes_H_ +#define HUAWEICLOUD_SDK_GAUSSDBFOROPENGAUSS_V3_MODEL_GaussDBforOpenGaussRoleAttributes_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdbforopengauss { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 用户的权限属性。 +/// +class HUAWEICLOUD_GAUSSDBFOROPENGAUSS_V3_EXPORT GaussDBforOpenGaussRoleAttributes + : public ModelBase +{ +public: + GaussDBforOpenGaussRoleAttributes(); + virtual ~GaussDBforOpenGaussRoleAttributes(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// GaussDBforOpenGaussRoleAttributes members + + /// + /// 数据库角色名称。 不能使用系统用户或角色,且名称必须存在。 系统用户/角色包括“rdsAdmin”,“rdsMetric”, “rdsBackup”, “rdsRepl”, “root”。 + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + /// + /// SCHEMA名称。 不能和模板库以及系统内schema重名,且schema名称必须存在。 模板库包括postgres, template0 ,template1, 系统内schema包括public,information_schema。 + /// + + std::string getSchema() const; + bool schemaIsSet() const; + void unsetschema(); + void setSchema(const std::string& value); + + /// + /// 数据库角色权限。 - true:只读。 - false:可读可写。 + /// + + bool isReadonly() const; + bool readonlyIsSet() const; + void unsetreadonly(); + void setReadonly(bool value); + + /// + /// 数据库用户/角色名称。 该字段的含义是将此用户/角色的权限授予给name字段指定的角色,通过readonly字段判断是否授予只读权限。 不能和系统用户/角色名称相同,且用户/角色名称必须存在,系统用户/角色包括“rdsAdmin”,“ rdsMetric”, “rdsBackup”, “rdsRepl”, “root”。 + /// + + std::string getDefaultPrivilegeGrantee() const; + bool defaultPrivilegeGranteeIsSet() const; + void unsetdefaultPrivilegeGrantee(); + void setDefaultPrivilegeGrantee(const std::string& value); + + +protected: + std::string name_; + bool nameIsSet_; + std::string schema_; + bool schemaIsSet_; + bool readonly_; + bool readonlyIsSet_; + std::string defaultPrivilegeGrantee_; + bool defaultPrivilegeGranteeIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_GAUSSDBFOROPENGAUSS_V3_MODEL_GaussDBforOpenGaussRoleAttributes_H_ diff --git a/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/ListDatabaseRolesResponse.h b/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/ListDatabaseRolesResponse.h index 6122933e..87335f0f 100644 --- a/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/ListDatabaseRolesResponse.h +++ b/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/ListDatabaseRolesResponse.h @@ -52,16 +52,16 @@ class HUAWEICLOUD_GAUSSDBFOROPENGAUSS_V3_EXPORT ListDatabaseRolesResponse /// 数据库用户/角色总数。 /// - int64_t getTotalCount() const; + int32_t getTotalCount() const; bool totalCountIsSet() const; void unsettotalCount(); - void setTotalCount(int64_t value); + void setTotalCount(int32_t value); protected: std::vector roles_; bool rolesIsSet_; - int64_t totalCount_; + int32_t totalCount_; bool totalCountIsSet_; #ifdef RTTR_FLAG diff --git a/gaussdbforopengauss/src/v3/model/AllowDbRolePrivilegesRequestBody.cpp b/gaussdbforopengauss/src/v3/model/AllowDbRolePrivilegesRequestBody.cpp index 3a8a03e5..14373900 100644 --- a/gaussdbforopengauss/src/v3/model/AllowDbRolePrivilegesRequestBody.cpp +++ b/gaussdbforopengauss/src/v3/model/AllowDbRolePrivilegesRequestBody.cpp @@ -53,7 +53,7 @@ bool AllowDbRolePrivilegesRequestBody::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("user")); if(!fieldValue.is_null()) { - Object refVal; + GaussDBforOpenGaussRoleAttributes refVal; ok &= ModelBase::fromJson(fieldValue, refVal); setUser(refVal); } @@ -83,12 +83,12 @@ void AllowDbRolePrivilegesRequestBody::unsetdbName() dbNameIsSet_ = false; } -Object AllowDbRolePrivilegesRequestBody::getUser() const +GaussDBforOpenGaussRoleAttributes AllowDbRolePrivilegesRequestBody::getUser() const { return user_; } -void AllowDbRolePrivilegesRequestBody::setUser(const Object& value) +void AllowDbRolePrivilegesRequestBody::setUser(const GaussDBforOpenGaussRoleAttributes& value) { user_ = value; userIsSet_ = true; diff --git a/gaussdbforopengauss/src/v3/model/GaussDBListDatabaseRoles.cpp b/gaussdbforopengauss/src/v3/model/GaussDBListDatabaseRoles.cpp index d575298d..8ea98cec 100644 --- a/gaussdbforopengauss/src/v3/model/GaussDBListDatabaseRoles.cpp +++ b/gaussdbforopengauss/src/v3/model/GaussDBListDatabaseRoles.cpp @@ -81,7 +81,7 @@ bool GaussDBListDatabaseRoles::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("attribute")); if(!fieldValue.is_null()) { - Object refVal; + GaussDBListDatabaseRolesPriv refVal; ok &= ModelBase::fromJson(fieldValue, refVal); setAttribute(refVal); } @@ -153,12 +153,12 @@ void GaussDBListDatabaseRoles::unsetlockStatus() lockStatusIsSet_ = false; } -Object GaussDBListDatabaseRoles::getAttribute() const +GaussDBListDatabaseRolesPriv GaussDBListDatabaseRoles::getAttribute() const { return attribute_; } -void GaussDBListDatabaseRoles::setAttribute(const Object& value) +void GaussDBListDatabaseRoles::setAttribute(const GaussDBListDatabaseRolesPriv& value) { attribute_ = value; attributeIsSet_ = true; diff --git a/gaussdbforopengauss/src/v3/model/GaussDBListDatabaseRolesPriv.cpp b/gaussdbforopengauss/src/v3/model/GaussDBListDatabaseRolesPriv.cpp new file mode 100644 index 00000000..4c7841ae --- /dev/null +++ b/gaussdbforopengauss/src/v3/model/GaussDBListDatabaseRolesPriv.cpp @@ -0,0 +1,359 @@ + + +#include "huaweicloud/gaussdbforopengauss/v3/model/GaussDBListDatabaseRolesPriv.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdbforopengauss { +namespace V3 { +namespace Model { + + + + +GaussDBListDatabaseRolesPriv::GaussDBListDatabaseRolesPriv() +{ + rolsuper_ = false; + rolsuperIsSet_ = false; + rolinherit_ = false; + rolinheritIsSet_ = false; + rolcreaterole_ = false; + rolcreateroleIsSet_ = false; + rolcreatedb_ = false; + rolcreatedbIsSet_ = false; + rolcanlogin_ = false; + rolcanloginIsSet_ = false; + rolconnlimit_ = 0; + rolconnlimitIsSet_ = false; + rolreplication_ = false; + rolreplicationIsSet_ = false; + rolbypassrls_ = false; + rolbypassrlsIsSet_ = false; + rolpassworddeadline_ = ""; + rolpassworddeadlineIsSet_ = false; +} + +GaussDBListDatabaseRolesPriv::~GaussDBListDatabaseRolesPriv() = default; + +void GaussDBListDatabaseRolesPriv::validate() +{ +} + +web::json::value GaussDBListDatabaseRolesPriv::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(rolsuperIsSet_) { + val[utility::conversions::to_string_t("rolsuper")] = ModelBase::toJson(rolsuper_); + } + if(rolinheritIsSet_) { + val[utility::conversions::to_string_t("rolinherit")] = ModelBase::toJson(rolinherit_); + } + if(rolcreateroleIsSet_) { + val[utility::conversions::to_string_t("rolcreaterole")] = ModelBase::toJson(rolcreaterole_); + } + if(rolcreatedbIsSet_) { + val[utility::conversions::to_string_t("rolcreatedb")] = ModelBase::toJson(rolcreatedb_); + } + if(rolcanloginIsSet_) { + val[utility::conversions::to_string_t("rolcanlogin")] = ModelBase::toJson(rolcanlogin_); + } + if(rolconnlimitIsSet_) { + val[utility::conversions::to_string_t("rolconnlimit")] = ModelBase::toJson(rolconnlimit_); + } + if(rolreplicationIsSet_) { + val[utility::conversions::to_string_t("rolreplication")] = ModelBase::toJson(rolreplication_); + } + if(rolbypassrlsIsSet_) { + val[utility::conversions::to_string_t("rolbypassrls")] = ModelBase::toJson(rolbypassrls_); + } + if(rolpassworddeadlineIsSet_) { + val[utility::conversions::to_string_t("rolpassworddeadline")] = ModelBase::toJson(rolpassworddeadline_); + } + + return val; +} +bool GaussDBListDatabaseRolesPriv::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("rolsuper"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("rolsuper")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRolsuper(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("rolinherit"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("rolinherit")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRolinherit(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("rolcreaterole"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("rolcreaterole")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRolcreaterole(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("rolcreatedb"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("rolcreatedb")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRolcreatedb(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("rolcanlogin"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("rolcanlogin")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRolcanlogin(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("rolconnlimit"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("rolconnlimit")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRolconnlimit(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("rolreplication"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("rolreplication")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRolreplication(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("rolbypassrls"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("rolbypassrls")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRolbypassrls(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("rolpassworddeadline"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("rolpassworddeadline")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRolpassworddeadline(refVal); + } + } + return ok; +} + + +bool GaussDBListDatabaseRolesPriv::isRolsuper() const +{ + return rolsuper_; +} + +void GaussDBListDatabaseRolesPriv::setRolsuper(bool value) +{ + rolsuper_ = value; + rolsuperIsSet_ = true; +} + +bool GaussDBListDatabaseRolesPriv::rolsuperIsSet() const +{ + return rolsuperIsSet_; +} + +void GaussDBListDatabaseRolesPriv::unsetrolsuper() +{ + rolsuperIsSet_ = false; +} + +bool GaussDBListDatabaseRolesPriv::isRolinherit() const +{ + return rolinherit_; +} + +void GaussDBListDatabaseRolesPriv::setRolinherit(bool value) +{ + rolinherit_ = value; + rolinheritIsSet_ = true; +} + +bool GaussDBListDatabaseRolesPriv::rolinheritIsSet() const +{ + return rolinheritIsSet_; +} + +void GaussDBListDatabaseRolesPriv::unsetrolinherit() +{ + rolinheritIsSet_ = false; +} + +bool GaussDBListDatabaseRolesPriv::isRolcreaterole() const +{ + return rolcreaterole_; +} + +void GaussDBListDatabaseRolesPriv::setRolcreaterole(bool value) +{ + rolcreaterole_ = value; + rolcreateroleIsSet_ = true; +} + +bool GaussDBListDatabaseRolesPriv::rolcreateroleIsSet() const +{ + return rolcreateroleIsSet_; +} + +void GaussDBListDatabaseRolesPriv::unsetrolcreaterole() +{ + rolcreateroleIsSet_ = false; +} + +bool GaussDBListDatabaseRolesPriv::isRolcreatedb() const +{ + return rolcreatedb_; +} + +void GaussDBListDatabaseRolesPriv::setRolcreatedb(bool value) +{ + rolcreatedb_ = value; + rolcreatedbIsSet_ = true; +} + +bool GaussDBListDatabaseRolesPriv::rolcreatedbIsSet() const +{ + return rolcreatedbIsSet_; +} + +void GaussDBListDatabaseRolesPriv::unsetrolcreatedb() +{ + rolcreatedbIsSet_ = false; +} + +bool GaussDBListDatabaseRolesPriv::isRolcanlogin() const +{ + return rolcanlogin_; +} + +void GaussDBListDatabaseRolesPriv::setRolcanlogin(bool value) +{ + rolcanlogin_ = value; + rolcanloginIsSet_ = true; +} + +bool GaussDBListDatabaseRolesPriv::rolcanloginIsSet() const +{ + return rolcanloginIsSet_; +} + +void GaussDBListDatabaseRolesPriv::unsetrolcanlogin() +{ + rolcanloginIsSet_ = false; +} + +int32_t GaussDBListDatabaseRolesPriv::getRolconnlimit() const +{ + return rolconnlimit_; +} + +void GaussDBListDatabaseRolesPriv::setRolconnlimit(int32_t value) +{ + rolconnlimit_ = value; + rolconnlimitIsSet_ = true; +} + +bool GaussDBListDatabaseRolesPriv::rolconnlimitIsSet() const +{ + return rolconnlimitIsSet_; +} + +void GaussDBListDatabaseRolesPriv::unsetrolconnlimit() +{ + rolconnlimitIsSet_ = false; +} + +bool GaussDBListDatabaseRolesPriv::isRolreplication() const +{ + return rolreplication_; +} + +void GaussDBListDatabaseRolesPriv::setRolreplication(bool value) +{ + rolreplication_ = value; + rolreplicationIsSet_ = true; +} + +bool GaussDBListDatabaseRolesPriv::rolreplicationIsSet() const +{ + return rolreplicationIsSet_; +} + +void GaussDBListDatabaseRolesPriv::unsetrolreplication() +{ + rolreplicationIsSet_ = false; +} + +bool GaussDBListDatabaseRolesPriv::isRolbypassrls() const +{ + return rolbypassrls_; +} + +void GaussDBListDatabaseRolesPriv::setRolbypassrls(bool value) +{ + rolbypassrls_ = value; + rolbypassrlsIsSet_ = true; +} + +bool GaussDBListDatabaseRolesPriv::rolbypassrlsIsSet() const +{ + return rolbypassrlsIsSet_; +} + +void GaussDBListDatabaseRolesPriv::unsetrolbypassrls() +{ + rolbypassrlsIsSet_ = false; +} + +std::string GaussDBListDatabaseRolesPriv::getRolpassworddeadline() const +{ + return rolpassworddeadline_; +} + +void GaussDBListDatabaseRolesPriv::setRolpassworddeadline(const std::string& value) +{ + rolpassworddeadline_ = value; + rolpassworddeadlineIsSet_ = true; +} + +bool GaussDBListDatabaseRolesPriv::rolpassworddeadlineIsSet() const +{ + return rolpassworddeadlineIsSet_; +} + +void GaussDBListDatabaseRolesPriv::unsetrolpassworddeadline() +{ + rolpassworddeadlineIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/gaussdbforopengauss/src/v3/model/GaussDBforOpenGaussRoleAttributes.cpp b/gaussdbforopengauss/src/v3/model/GaussDBforOpenGaussRoleAttributes.cpp new file mode 100644 index 00000000..2b6f25a2 --- /dev/null +++ b/gaussdbforopengauss/src/v3/model/GaussDBforOpenGaussRoleAttributes.cpp @@ -0,0 +1,184 @@ + + +#include "huaweicloud/gaussdbforopengauss/v3/model/GaussDBforOpenGaussRoleAttributes.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Gaussdbforopengauss { +namespace V3 { +namespace Model { + + + + +GaussDBforOpenGaussRoleAttributes::GaussDBforOpenGaussRoleAttributes() +{ + name_ = ""; + nameIsSet_ = false; + schema_ = ""; + schemaIsSet_ = false; + readonly_ = false; + readonlyIsSet_ = false; + defaultPrivilegeGrantee_ = ""; + defaultPrivilegeGranteeIsSet_ = false; +} + +GaussDBforOpenGaussRoleAttributes::~GaussDBforOpenGaussRoleAttributes() = default; + +void GaussDBforOpenGaussRoleAttributes::validate() +{ +} + +web::json::value GaussDBforOpenGaussRoleAttributes::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(nameIsSet_) { + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); + } + if(schemaIsSet_) { + val[utility::conversions::to_string_t("schema")] = ModelBase::toJson(schema_); + } + if(readonlyIsSet_) { + val[utility::conversions::to_string_t("readonly")] = ModelBase::toJson(readonly_); + } + if(defaultPrivilegeGranteeIsSet_) { + val[utility::conversions::to_string_t("default_privilege_grantee")] = ModelBase::toJson(defaultPrivilegeGrantee_); + } + + return val; +} +bool GaussDBforOpenGaussRoleAttributes::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("schema"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("schema")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSchema(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("readonly"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("readonly")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setReadonly(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("default_privilege_grantee"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("default_privilege_grantee")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDefaultPrivilegeGrantee(refVal); + } + } + return ok; +} + + +std::string GaussDBforOpenGaussRoleAttributes::getName() const +{ + return name_; +} + +void GaussDBforOpenGaussRoleAttributes::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool GaussDBforOpenGaussRoleAttributes::nameIsSet() const +{ + return nameIsSet_; +} + +void GaussDBforOpenGaussRoleAttributes::unsetname() +{ + nameIsSet_ = false; +} + +std::string GaussDBforOpenGaussRoleAttributes::getSchema() const +{ + return schema_; +} + +void GaussDBforOpenGaussRoleAttributes::setSchema(const std::string& value) +{ + schema_ = value; + schemaIsSet_ = true; +} + +bool GaussDBforOpenGaussRoleAttributes::schemaIsSet() const +{ + return schemaIsSet_; +} + +void GaussDBforOpenGaussRoleAttributes::unsetschema() +{ + schemaIsSet_ = false; +} + +bool GaussDBforOpenGaussRoleAttributes::isReadonly() const +{ + return readonly_; +} + +void GaussDBforOpenGaussRoleAttributes::setReadonly(bool value) +{ + readonly_ = value; + readonlyIsSet_ = true; +} + +bool GaussDBforOpenGaussRoleAttributes::readonlyIsSet() const +{ + return readonlyIsSet_; +} + +void GaussDBforOpenGaussRoleAttributes::unsetreadonly() +{ + readonlyIsSet_ = false; +} + +std::string GaussDBforOpenGaussRoleAttributes::getDefaultPrivilegeGrantee() const +{ + return defaultPrivilegeGrantee_; +} + +void GaussDBforOpenGaussRoleAttributes::setDefaultPrivilegeGrantee(const std::string& value) +{ + defaultPrivilegeGrantee_ = value; + defaultPrivilegeGranteeIsSet_ = true; +} + +bool GaussDBforOpenGaussRoleAttributes::defaultPrivilegeGranteeIsSet() const +{ + return defaultPrivilegeGranteeIsSet_; +} + +void GaussDBforOpenGaussRoleAttributes::unsetdefaultPrivilegeGrantee() +{ + defaultPrivilegeGranteeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/gaussdbforopengauss/src/v3/model/ListDatabaseRolesResponse.cpp b/gaussdbforopengauss/src/v3/model/ListDatabaseRolesResponse.cpp index 838f7b98..e809a377 100644 --- a/gaussdbforopengauss/src/v3/model/ListDatabaseRolesResponse.cpp +++ b/gaussdbforopengauss/src/v3/model/ListDatabaseRolesResponse.cpp @@ -13,7 +13,7 @@ namespace Model { ListDatabaseRolesResponse::ListDatabaseRolesResponse() { rolesIsSet_ = false; - totalCount_ = 0L; + totalCount_ = 0; totalCountIsSet_ = false; } @@ -53,7 +53,7 @@ bool ListDatabaseRolesResponse::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("total_count")); if(!fieldValue.is_null()) { - int64_t refVal; + int32_t refVal; ok &= ModelBase::fromJson(fieldValue, refVal); setTotalCount(refVal); } @@ -83,12 +83,12 @@ void ListDatabaseRolesResponse::unsetroles() rolesIsSet_ = false; } -int64_t ListDatabaseRolesResponse::getTotalCount() const +int32_t ListDatabaseRolesResponse::getTotalCount() const { return totalCount_; } -void ListDatabaseRolesResponse::setTotalCount(int64_t value) +void ListDatabaseRolesResponse::setTotalCount(int32_t value) { totalCount_ = value; totalCountIsSet_ = true; diff --git a/ims/include/huaweicloud/ims/v2/model/CreateImageRequestBody.h b/ims/include/huaweicloud/ims/v2/model/CreateImageRequestBody.h index 5fc80d4b..f56a58ac 100644 --- a/ims/include/huaweicloud/ims/v2/model/CreateImageRequestBody.h +++ b/ims/include/huaweicloud/ims/v2/model/CreateImageRequestBody.h @@ -203,6 +203,15 @@ class HUAWEICLOUD_IMS_V2_EXPORT CreateImageRequestBody void unsetvolumeId(); void setVolumeId(const std::string& value); + /// + /// 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + /// + + std::string getHwFirmwareType() const; + bool hwFirmwareTypeIsSet() const; + void unsethwFirmwareType(); + void setHwFirmwareType(const std::string& value); + protected: std::vector dataImages_; @@ -241,6 +250,8 @@ class HUAWEICLOUD_IMS_V2_EXPORT CreateImageRequestBody bool architectureIsSet_; std::string volumeId_; bool volumeIdIsSet_; + std::string hwFirmwareType_; + bool hwFirmwareTypeIsSet_; }; diff --git a/ims/include/huaweicloud/ims/v2/model/QuickImportImageByFileRequestBody.h b/ims/include/huaweicloud/ims/v2/model/QuickImportImageByFileRequestBody.h index c048d87a..e141cfe0 100644 --- a/ims/include/huaweicloud/ims/v2/model/QuickImportImageByFileRequestBody.h +++ b/ims/include/huaweicloud/ims/v2/model/QuickImportImageByFileRequestBody.h @@ -130,6 +130,15 @@ class HUAWEICLOUD_IMS_V2_EXPORT QuickImportImageByFileRequestBody void unsetarchitecture(); void setArchitecture(const std::string& value); + /// + /// 云主机云服务器的启动方式。目前支持: bios:表示bios引导启动。 uefi:表示uefi引导启动。 + /// + + std::string getHwFirmwareType() const; + bool hwFirmwareTypeIsSet() const; + void unsethwFirmwareType(); + void setHwFirmwareType(const std::string& value); + /// /// 操作系统版本。 创建数据盘镜像时该参数取值为Linux或Windows,默认Linux。 /// @@ -170,6 +179,8 @@ class HUAWEICLOUD_IMS_V2_EXPORT QuickImportImageByFileRequestBody bool enterpriseProjectIdIsSet_; std::string architecture_; bool architectureIsSet_; + std::string hwFirmwareType_; + bool hwFirmwareTypeIsSet_; std::string osType_; bool osTypeIsSet_; std::vector imageTags_; diff --git a/ims/src/v2/model/CreateImageRequestBody.cpp b/ims/src/v2/model/CreateImageRequestBody.cpp index e0fa96e3..f0607433 100644 --- a/ims/src/v2/model/CreateImageRequestBody.cpp +++ b/ims/src/v2/model/CreateImageRequestBody.cpp @@ -45,6 +45,8 @@ CreateImageRequestBody::CreateImageRequestBody() architectureIsSet_ = false; volumeId_ = ""; volumeIdIsSet_ = false; + hwFirmwareType_ = ""; + hwFirmwareTypeIsSet_ = false; } CreateImageRequestBody::~CreateImageRequestBody() = default; @@ -111,6 +113,9 @@ web::json::value CreateImageRequestBody::toJson() const if(volumeIdIsSet_) { val[utility::conversions::to_string_t("volume_id")] = ModelBase::toJson(volumeId_); } + if(hwFirmwareTypeIsSet_) { + val[utility::conversions::to_string_t("hw_firmware_type")] = ModelBase::toJson(hwFirmwareType_); + } return val; } @@ -280,6 +285,15 @@ bool CreateImageRequestBody::fromJson(const web::json::value& val) setVolumeId(refVal); } } + if(val.has_field(utility::conversions::to_string_t("hw_firmware_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("hw_firmware_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setHwFirmwareType(refVal); + } + } return ok; } @@ -662,6 +676,27 @@ void CreateImageRequestBody::unsetvolumeId() volumeIdIsSet_ = false; } +std::string CreateImageRequestBody::getHwFirmwareType() const +{ + return hwFirmwareType_; +} + +void CreateImageRequestBody::setHwFirmwareType(const std::string& value) +{ + hwFirmwareType_ = value; + hwFirmwareTypeIsSet_ = true; +} + +bool CreateImageRequestBody::hwFirmwareTypeIsSet() const +{ + return hwFirmwareTypeIsSet_; +} + +void CreateImageRequestBody::unsethwFirmwareType() +{ + hwFirmwareTypeIsSet_ = false; +} + } } } diff --git a/ims/src/v2/model/QuickImportImageByFileRequestBody.cpp b/ims/src/v2/model/QuickImportImageByFileRequestBody.cpp index 1d74b8d8..22c97ced 100644 --- a/ims/src/v2/model/QuickImportImageByFileRequestBody.cpp +++ b/ims/src/v2/model/QuickImportImageByFileRequestBody.cpp @@ -31,6 +31,8 @@ QuickImportImageByFileRequestBody::QuickImportImageByFileRequestBody() enterpriseProjectIdIsSet_ = false; architecture_ = ""; architectureIsSet_ = false; + hwFirmwareType_ = ""; + hwFirmwareTypeIsSet_ = false; osType_ = ""; osTypeIsSet_ = false; imageTagsIsSet_ = false; @@ -76,6 +78,9 @@ web::json::value QuickImportImageByFileRequestBody::toJson() const if(architectureIsSet_) { val[utility::conversions::to_string_t("architecture")] = ModelBase::toJson(architecture_); } + if(hwFirmwareTypeIsSet_) { + val[utility::conversions::to_string_t("hw_firmware_type")] = ModelBase::toJson(hwFirmwareType_); + } if(osTypeIsSet_) { val[utility::conversions::to_string_t("os_type")] = ModelBase::toJson(osType_); } @@ -179,6 +184,15 @@ bool QuickImportImageByFileRequestBody::fromJson(const web::json::value& val) setArchitecture(refVal); } } + if(val.has_field(utility::conversions::to_string_t("hw_firmware_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("hw_firmware_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setHwFirmwareType(refVal); + } + } if(val.has_field(utility::conversions::to_string_t("os_type"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("os_type")); if(!fieldValue.is_null()) @@ -411,6 +425,27 @@ void QuickImportImageByFileRequestBody::unsetarchitecture() architectureIsSet_ = false; } +std::string QuickImportImageByFileRequestBody::getHwFirmwareType() const +{ + return hwFirmwareType_; +} + +void QuickImportImageByFileRequestBody::setHwFirmwareType(const std::string& value) +{ + hwFirmwareType_ = value; + hwFirmwareTypeIsSet_ = true; +} + +bool QuickImportImageByFileRequestBody::hwFirmwareTypeIsSet() const +{ + return hwFirmwareTypeIsSet_; +} + +void QuickImportImageByFileRequestBody::unsethwFirmwareType() +{ + hwFirmwareTypeIsSet_ = false; +} + std::string QuickImportImageByFileRequestBody::getOsType() const { return osType_; diff --git a/lts/include/huaweicloud/lts/v2/model/CreateLogGroupParams.h b/lts/include/huaweicloud/lts/v2/model/CreateLogGroupParams.h index 18a7f7a9..eec5de97 100644 --- a/lts/include/huaweicloud/lts/v2/model/CreateLogGroupParams.h +++ b/lts/include/huaweicloud/lts/v2/model/CreateLogGroupParams.h @@ -67,6 +67,15 @@ class HUAWEICLOUD_LTS_V2_EXPORT CreateLogGroupParams void unsettags(); void setTags(const std::vector& value); + /// + /// 日志组别名 + /// + + std::string getLogGroupNameAlias() const; + bool logGroupNameAliasIsSet() const; + void unsetlogGroupNameAlias(); + void setLogGroupNameAlias(const std::string& value); + protected: std::string logGroupName_; @@ -75,6 +84,8 @@ class HUAWEICLOUD_LTS_V2_EXPORT CreateLogGroupParams bool ttlInDaysIsSet_; std::vector tags_; bool tagsIsSet_; + std::string logGroupNameAlias_; + bool logGroupNameAliasIsSet_; }; diff --git a/lts/include/huaweicloud/lts/v2/model/ListLogStreamsRequest.h b/lts/include/huaweicloud/lts/v2/model/ListLogStreamsRequest.h index 34ae83bb..94cdacfc 100644 --- a/lts/include/huaweicloud/lts/v2/model/ListLogStreamsRequest.h +++ b/lts/include/huaweicloud/lts/v2/model/ListLogStreamsRequest.h @@ -65,24 +65,6 @@ class HUAWEICLOUD_LTS_V2_EXPORT ListLogStreamsRequest void unsetlogStreamName(); void setLogStreamName(const std::string& value); - /// - /// 查询游标,初始传入0,后续从上一次的返回值中获取 - /// - - int32_t getOffset() const; - bool offsetIsSet() const; - void unsetoffset(); - void setOffset(int32_t value); - - /// - /// 每页数据量,最大值为100 - /// - - int32_t getLimit() const; - bool limitIsSet() const; - void unsetlimit(); - void setLimit(int32_t value); - protected: std::string contentType_; @@ -91,10 +73,6 @@ class HUAWEICLOUD_LTS_V2_EXPORT ListLogStreamsRequest bool logGroupNameIsSet_; std::string logStreamName_; bool logStreamNameIsSet_; - int32_t offset_; - bool offsetIsSet_; - int32_t limit_; - bool limitIsSet_; #ifdef RTTR_FLAG RTTR_ENABLE() diff --git a/lts/include/huaweicloud/lts/v2/model/TransferDetail.h b/lts/include/huaweicloud/lts/v2/model/TransferDetail.h index 20eb7750..9d132dad 100644 --- a/lts/include/huaweicloud/lts/v2/model/TransferDetail.h +++ b/lts/include/huaweicloud/lts/v2/model/TransferDetail.h @@ -183,6 +183,42 @@ class HUAWEICLOUD_LTS_V2_EXPORT TransferDetail void unsettags(); void setTags(const std::vector& value); + /// + /// dms转储JSON格式选填,可以转储tag字段 + /// + + std::vector& getLtsTags(); + bool ltsTagsIsSet() const; + void unsetltsTags(); + void setLtsTags(const std::vector& value); + + /// + /// dms转储JSON格式选填,可以转储日志流标签字段 + /// + + std::vector& getStreamTags(); + bool streamTagsIsSet() const; + void unsetstreamTags(); + void setStreamTags(const std::vector& value); + + /// + /// dms转储JSON格式选填,可以转储结构化字段 + /// + + std::vector& getStructFields(); + bool structFieldsIsSet() const; + void unsetstructFields(); + void setStructFields(const std::vector& value); + + /// + /// dms转储JSON格式选填,无效字段填充 + /// + + std::string getInvalidFieldValue() const; + bool invalidFieldValueIsSet() const; + void unsetinvalidFieldValue(); + void setInvalidFieldValue(const std::string& value); + protected: int32_t obsPeriod_; @@ -217,6 +253,14 @@ class HUAWEICLOUD_LTS_V2_EXPORT TransferDetail bool obsTimeZoneIdIsSet_; std::vector tags_; bool tagsIsSet_; + std::vector ltsTags_; + bool ltsTagsIsSet_; + std::vector streamTags_; + bool streamTagsIsSet_; + std::vector structFields_; + bool structFieldsIsSet_; + std::string invalidFieldValue_; + bool invalidFieldValueIsSet_; }; diff --git a/lts/include/huaweicloud/lts/v2/model/UpdateAccessConfigRequestBody.h b/lts/include/huaweicloud/lts/v2/model/UpdateAccessConfigRequestBody.h index 2328e216..b5b35bfb 100644 --- a/lts/include/huaweicloud/lts/v2/model/UpdateAccessConfigRequestBody.h +++ b/lts/include/huaweicloud/lts/v2/model/UpdateAccessConfigRequestBody.h @@ -53,6 +53,15 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateAccessConfigRequestBody void unsetaccessConfigId(); void setAccessConfigId(const std::string& value); + /// + /// 日志接入名称。 满足正则表达式:^(?!.)(?!)(?!.*?.$)[\\u4e00-\\u9fa5a-zA-Z0-9-.]{1,64}$ + /// + + std::string getAccessConfigName() const; + bool accessConfigNameIsSet() const; + void unsetaccessConfigName(); + void setAccessConfigName(const std::string& value); + /// /// /// @@ -192,6 +201,8 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateAccessConfigRequestBody protected: std::string accessConfigId_; bool accessConfigIdIsSet_; + std::string accessConfigName_; + bool accessConfigNameIsSet_; AccessConfigDeatilUpdate accessConfigDetail_; bool accessConfigDetailIsSet_; AccessConfigHostGroupIdList hostGroupInfo_; diff --git a/lts/include/huaweicloud/lts/v2/model/UpdateLogStreamParams.h b/lts/include/huaweicloud/lts/v2/model/UpdateLogStreamParams.h index 968b5c63..e9891ec6 100644 --- a/lts/include/huaweicloud/lts/v2/model/UpdateLogStreamParams.h +++ b/lts/include/huaweicloud/lts/v2/model/UpdateLogStreamParams.h @@ -40,7 +40,7 @@ class HUAWEICLOUD_LTS_V2_EXPORT UpdateLogStreamParams /// UpdateLogStreamParams members /// - /// 日志存储时间(天)。 该参数仅对华东-上海一、华北-北京四、华南-广州用户开放。 + /// 日志存储时间(天)。 /// int32_t getTtlInDays() const; diff --git a/lts/src/v2/LtsClient.cpp b/lts/src/v2/LtsClient.cpp index af946cd3..61c7a116 100644 --- a/lts/src/v2/LtsClient.cpp +++ b/lts/src/v2/LtsClient.cpp @@ -1859,12 +1859,6 @@ std::shared_ptr LtsClient::listLogStreams(ListLogStreams if (request.logStreamNameIsSet()) { localVarQueryParams["log_stream_name"] = parameterToString(request.getLogStreamName()); } - if (request.offsetIsSet()) { - localVarQueryParams["offset"] = parameterToString(request.getOffset()); - } - if (request.limitIsSet()) { - localVarQueryParams["limit"] = parameterToString(request.getLimit()); - } if (request.contentTypeIsSet()) { localVarHeaderParams["Content-Type"] = parameterToString(request.getContentType()); } diff --git a/lts/src/v2/LtsMeta.cpp b/lts/src/v2/LtsMeta.cpp index 9dbcfc6b..dac95a25 100644 --- a/lts/src/v2/LtsMeta.cpp +++ b/lts/src/v2/LtsMeta.cpp @@ -593,12 +593,6 @@ HttpRequestDef LtsMeta::genRequestDefForListLogStreams() { reqDefBuilder.withRequestField(FieldDef().withName("LogStreamName") .withJsonTag("log_stream_name") .withLocationType(Query_)); - reqDefBuilder.withRequestField(FieldDef().withName("Offset") - .withJsonTag("offset") - .withLocationType(Query_)); - reqDefBuilder.withRequestField(FieldDef().withName("Limit") - .withJsonTag("limit") - .withLocationType(Query_)); FieldDef headerParamContentType; reqDefBuilder.withRequestField(headerParamContentType .withName("ContentType") diff --git a/lts/src/v2/model/CreateLogGroupParams.cpp b/lts/src/v2/model/CreateLogGroupParams.cpp index af5327df..b298e271 100644 --- a/lts/src/v2/model/CreateLogGroupParams.cpp +++ b/lts/src/v2/model/CreateLogGroupParams.cpp @@ -17,6 +17,8 @@ CreateLogGroupParams::CreateLogGroupParams() ttlInDays_ = 0; ttlInDaysIsSet_ = false; tagsIsSet_ = false; + logGroupNameAlias_ = ""; + logGroupNameAliasIsSet_ = false; } CreateLogGroupParams::~CreateLogGroupParams() = default; @@ -38,6 +40,9 @@ web::json::value CreateLogGroupParams::toJson() const if(tagsIsSet_) { val[utility::conversions::to_string_t("tags")] = ModelBase::toJson(tags_); } + if(logGroupNameAliasIsSet_) { + val[utility::conversions::to_string_t("log_group_name_alias")] = ModelBase::toJson(logGroupNameAlias_); + } return val; } @@ -72,6 +77,15 @@ bool CreateLogGroupParams::fromJson(const web::json::value& val) setTags(refVal); } } + if(val.has_field(utility::conversions::to_string_t("log_group_name_alias"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("log_group_name_alias")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogGroupNameAlias(refVal); + } + } return ok; } @@ -139,6 +153,27 @@ void CreateLogGroupParams::unsettags() tagsIsSet_ = false; } +std::string CreateLogGroupParams::getLogGroupNameAlias() const +{ + return logGroupNameAlias_; +} + +void CreateLogGroupParams::setLogGroupNameAlias(const std::string& value) +{ + logGroupNameAlias_ = value; + logGroupNameAliasIsSet_ = true; +} + +bool CreateLogGroupParams::logGroupNameAliasIsSet() const +{ + return logGroupNameAliasIsSet_; +} + +void CreateLogGroupParams::unsetlogGroupNameAlias() +{ + logGroupNameAliasIsSet_ = false; +} + } } } diff --git a/lts/src/v2/model/ListLogStreamsRequest.cpp b/lts/src/v2/model/ListLogStreamsRequest.cpp index 80153935..fb7a4c0a 100644 --- a/lts/src/v2/model/ListLogStreamsRequest.cpp +++ b/lts/src/v2/model/ListLogStreamsRequest.cpp @@ -18,10 +18,6 @@ ListLogStreamsRequest::ListLogStreamsRequest() logGroupNameIsSet_ = false; logStreamName_ = ""; logStreamNameIsSet_ = false; - offset_ = 0; - offsetIsSet_ = false; - limit_ = 0; - limitIsSet_ = false; } ListLogStreamsRequest::~ListLogStreamsRequest() = default; @@ -43,12 +39,6 @@ web::json::value ListLogStreamsRequest::toJson() const if(logStreamNameIsSet_) { val[utility::conversions::to_string_t("log_stream_name")] = ModelBase::toJson(logStreamName_); } - if(offsetIsSet_) { - val[utility::conversions::to_string_t("offset")] = ModelBase::toJson(offset_); - } - if(limitIsSet_) { - val[utility::conversions::to_string_t("limit")] = ModelBase::toJson(limit_); - } return val; } @@ -83,24 +73,6 @@ bool ListLogStreamsRequest::fromJson(const web::json::value& val) setLogStreamName(refVal); } } - if(val.has_field(utility::conversions::to_string_t("offset"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("offset")); - if(!fieldValue.is_null()) - { - int32_t refVal; - ok &= ModelBase::fromJson(fieldValue, refVal); - setOffset(refVal); - } - } - if(val.has_field(utility::conversions::to_string_t("limit"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("limit")); - if(!fieldValue.is_null()) - { - int32_t refVal; - ok &= ModelBase::fromJson(fieldValue, refVal); - setLimit(refVal); - } - } return ok; } @@ -168,48 +140,6 @@ void ListLogStreamsRequest::unsetlogStreamName() logStreamNameIsSet_ = false; } -int32_t ListLogStreamsRequest::getOffset() const -{ - return offset_; -} - -void ListLogStreamsRequest::setOffset(int32_t value) -{ - offset_ = value; - offsetIsSet_ = true; -} - -bool ListLogStreamsRequest::offsetIsSet() const -{ - return offsetIsSet_; -} - -void ListLogStreamsRequest::unsetoffset() -{ - offsetIsSet_ = false; -} - -int32_t ListLogStreamsRequest::getLimit() const -{ - return limit_; -} - -void ListLogStreamsRequest::setLimit(int32_t value) -{ - limit_ = value; - limitIsSet_ = true; -} - -bool ListLogStreamsRequest::limitIsSet() const -{ - return limitIsSet_; -} - -void ListLogStreamsRequest::unsetlimit() -{ - limitIsSet_ = false; -} - } } } diff --git a/lts/src/v2/model/TransferDetail.cpp b/lts/src/v2/model/TransferDetail.cpp index 3e0ae261..36bbf7b0 100644 --- a/lts/src/v2/model/TransferDetail.cpp +++ b/lts/src/v2/model/TransferDetail.cpp @@ -43,6 +43,11 @@ TransferDetail::TransferDetail() obsTimeZoneId_ = ""; obsTimeZoneIdIsSet_ = false; tagsIsSet_ = false; + ltsTagsIsSet_ = false; + streamTagsIsSet_ = false; + structFieldsIsSet_ = false; + invalidFieldValue_ = ""; + invalidFieldValueIsSet_ = false; } TransferDetail::~TransferDetail() = default; @@ -103,6 +108,18 @@ web::json::value TransferDetail::toJson() const if(tagsIsSet_) { val[utility::conversions::to_string_t("tags")] = ModelBase::toJson(tags_); } + if(ltsTagsIsSet_) { + val[utility::conversions::to_string_t("lts_tags")] = ModelBase::toJson(ltsTags_); + } + if(streamTagsIsSet_) { + val[utility::conversions::to_string_t("stream_tags")] = ModelBase::toJson(streamTags_); + } + if(structFieldsIsSet_) { + val[utility::conversions::to_string_t("struct_fields")] = ModelBase::toJson(structFields_); + } + if(invalidFieldValueIsSet_) { + val[utility::conversions::to_string_t("invalid_field_value")] = ModelBase::toJson(invalidFieldValue_); + } return val; } @@ -254,6 +271,42 @@ bool TransferDetail::fromJson(const web::json::value& val) setTags(refVal); } } + if(val.has_field(utility::conversions::to_string_t("lts_tags"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("lts_tags")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLtsTags(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("stream_tags"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("stream_tags")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStreamTags(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("struct_fields"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("struct_fields")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStructFields(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("invalid_field_value"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("invalid_field_value")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInvalidFieldValue(refVal); + } + } return ok; } @@ -594,6 +647,90 @@ void TransferDetail::unsettags() tagsIsSet_ = false; } +std::vector& TransferDetail::getLtsTags() +{ + return ltsTags_; +} + +void TransferDetail::setLtsTags(const std::vector& value) +{ + ltsTags_ = value; + ltsTagsIsSet_ = true; +} + +bool TransferDetail::ltsTagsIsSet() const +{ + return ltsTagsIsSet_; +} + +void TransferDetail::unsetltsTags() +{ + ltsTagsIsSet_ = false; +} + +std::vector& TransferDetail::getStreamTags() +{ + return streamTags_; +} + +void TransferDetail::setStreamTags(const std::vector& value) +{ + streamTags_ = value; + streamTagsIsSet_ = true; +} + +bool TransferDetail::streamTagsIsSet() const +{ + return streamTagsIsSet_; +} + +void TransferDetail::unsetstreamTags() +{ + streamTagsIsSet_ = false; +} + +std::vector& TransferDetail::getStructFields() +{ + return structFields_; +} + +void TransferDetail::setStructFields(const std::vector& value) +{ + structFields_ = value; + structFieldsIsSet_ = true; +} + +bool TransferDetail::structFieldsIsSet() const +{ + return structFieldsIsSet_; +} + +void TransferDetail::unsetstructFields() +{ + structFieldsIsSet_ = false; +} + +std::string TransferDetail::getInvalidFieldValue() const +{ + return invalidFieldValue_; +} + +void TransferDetail::setInvalidFieldValue(const std::string& value) +{ + invalidFieldValue_ = value; + invalidFieldValueIsSet_ = true; +} + +bool TransferDetail::invalidFieldValueIsSet() const +{ + return invalidFieldValueIsSet_; +} + +void TransferDetail::unsetinvalidFieldValue() +{ + invalidFieldValueIsSet_ = false; +} + } } } diff --git a/lts/src/v2/model/UpdateAccessConfigRequestBody.cpp b/lts/src/v2/model/UpdateAccessConfigRequestBody.cpp index 2d5c8c7e..35634481 100644 --- a/lts/src/v2/model/UpdateAccessConfigRequestBody.cpp +++ b/lts/src/v2/model/UpdateAccessConfigRequestBody.cpp @@ -14,6 +14,8 @@ UpdateAccessConfigRequestBody::UpdateAccessConfigRequestBody() { accessConfigId_ = ""; accessConfigIdIsSet_ = false; + accessConfigName_ = ""; + accessConfigNameIsSet_ = false; accessConfigDetailIsSet_ = false; hostGroupInfoIsSet_ = false; accessConfigTagIsSet_ = false; @@ -53,6 +55,9 @@ web::json::value UpdateAccessConfigRequestBody::toJson() const if(accessConfigIdIsSet_) { val[utility::conversions::to_string_t("access_config_id")] = ModelBase::toJson(accessConfigId_); } + if(accessConfigNameIsSet_) { + val[utility::conversions::to_string_t("access_config_name")] = ModelBase::toJson(accessConfigName_); + } if(accessConfigDetailIsSet_) { val[utility::conversions::to_string_t("access_config_detail")] = ModelBase::toJson(accessConfigDetail_); } @@ -114,6 +119,15 @@ bool UpdateAccessConfigRequestBody::fromJson(const web::json::value& val) setAccessConfigId(refVal); } } + if(val.has_field(utility::conversions::to_string_t("access_config_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("access_config_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAccessConfigName(refVal); + } + } if(val.has_field(utility::conversions::to_string_t("access_config_detail"))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("access_config_detail")); if(!fieldValue.is_null()) @@ -274,6 +288,27 @@ void UpdateAccessConfigRequestBody::unsetaccessConfigId() accessConfigIdIsSet_ = false; } +std::string UpdateAccessConfigRequestBody::getAccessConfigName() const +{ + return accessConfigName_; +} + +void UpdateAccessConfigRequestBody::setAccessConfigName(const std::string& value) +{ + accessConfigName_ = value; + accessConfigNameIsSet_ = true; +} + +bool UpdateAccessConfigRequestBody::accessConfigNameIsSet() const +{ + return accessConfigNameIsSet_; +} + +void UpdateAccessConfigRequestBody::unsetaccessConfigName() +{ + accessConfigNameIsSet_ = false; +} + AccessConfigDeatilUpdate UpdateAccessConfigRequestBody::getAccessConfigDetail() const { return accessConfigDetail_; diff --git a/ocr/include/huaweicloud/ocr/v1/model/GeneralTextRequestBody.h b/ocr/include/huaweicloud/ocr/v1/model/GeneralTextRequestBody.h index 2e646122..a2953d98 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/rds/include/huaweicloud/rds/v3/RdsClient.h b/rds/include/huaweicloud/rds/v3/RdsClient.h index e46a74e5..5c437c2a 100644 --- a/rds/include/huaweicloud/rds/v3/RdsClient.h +++ b/rds/include/huaweicloud/rds/v3/RdsClient.h @@ -120,6 +120,8 @@ #include #include #include +#include +#include #include #include #include @@ -227,6 +229,7 @@ #include #include #include +#include #include #include #include @@ -916,6 +919,14 @@ class HUAWEICLOUD_RDS_V3_EXPORT RdsClient : public Client std::shared_ptr listDatastores( ListDatastoresRequest &request ); + // 查询容灾管理列表 + // + // 查询容灾管理列表。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listDrInfos( + ListDrInfosRequest &request + ); // // // 批量查询容灾实例信息 diff --git a/rds/include/huaweicloud/rds/v3/RdsMeta.h b/rds/include/huaweicloud/rds/v3/RdsMeta.h index e6bd527c..dda61358 100644 --- a/rds/include/huaweicloud/rds/v3/RdsMeta.h +++ b/rds/include/huaweicloud/rds/v3/RdsMeta.h @@ -52,6 +52,7 @@ class HUAWEICLOUD_RDS_V3_EXPORT RdsMeta { static HttpRequestDef genRequestDefForListCollations(); static HttpRequestDef genRequestDefForListConfigurations(); static HttpRequestDef genRequestDefForListDatastores(); + static HttpRequestDef genRequestDefForListDrInfos(); static HttpRequestDef genRequestDefForListDrRelations(); static HttpRequestDef genRequestDefForListEngineFlavors(); static HttpRequestDef genRequestDefForListErrorLogs(); diff --git a/rds/include/huaweicloud/rds/v3/model/InstanceDrInfo.h b/rds/include/huaweicloud/rds/v3/model/InstanceDrInfo.h new file mode 100644 index 00000000..05c964c7 --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/InstanceDrInfo.h @@ -0,0 +1,185 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_InstanceDrInfo_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_InstanceDrInfo_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_RDS_V3_EXPORT InstanceDrInfo + : public ModelBase +{ +public: + InstanceDrInfo(); + virtual ~InstanceDrInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// InstanceDrInfo members + + /// + /// 容灾关系id + /// + + std::string getId() const; + bool idIsSet() const; + void unsetid(); + void setId(const std::string& value); + + /// + /// 容灾搭建状态 + /// + + std::string getStatus() const; + bool statusIsSet() const; + void unsetstatus(); + void setStatus(const std::string& value); + + /// + /// 失败消息 + /// + + std::string getFailedMessage() const; + bool failedMessageIsSet() const; + void unsetfailedMessage(); + void setFailedMessage(const std::string& value); + + /// + /// 同步状态,取值范围是0或-1,0表示正常,-1表示异常。 + /// + + std::string getReplicaState() const; + bool replicaStateIsSet() const; + void unsetreplicaState(); + void setReplicaState(const std::string& value); + + /// + /// 发送延迟大小(MB),即主实例当前wal日志写入位点与灾备实例当前接收wal日志位点的差值。 + /// + + std::string getWalWriteReceiveDelayInMb() const; + bool walWriteReceiveDelayInMbIsSet() const; + void unsetwalWriteReceiveDelayInMb(); + void setWalWriteReceiveDelayInMb(const std::string& value); + + /// + /// 端到端延迟大小(MB),即主实例当前wal日志写入位点与灾备实例当前回放wal日志位点的差值。 + /// + + std::string getWalWriteReplayDelayInMb() const; + bool walWriteReplayDelayInMbIsSet() const; + void unsetwalWriteReplayDelayInMb(); + void setWalWriteReplayDelayInMb(const std::string& value); + + /// + /// 回放延迟时间(ms),即数据在灾备上回放的延迟时间。 + /// + + std::string getWalReceiveReplayDelayInMs() const; + bool walReceiveReplayDelayInMsIsSet() const; + void unsetwalReceiveReplayDelayInMs(); + void setWalReceiveReplayDelayInMs(const std::string& value); + + /// + /// 主实例ID + /// + + std::string getMasterInstanceId() const; + bool masterInstanceIdIsSet() const; + void unsetmasterInstanceId(); + void setMasterInstanceId(const std::string& value); + + /// + /// 主实例所在region + /// + + std::string getMasterRegion() const; + bool masterRegionIsSet() const; + void unsetmasterRegion(); + void setMasterRegion(const std::string& value); + + /// + /// 灾备实例ID + /// + + std::string getSlaveInstanceId() const; + bool slaveInstanceIdIsSet() const; + void unsetslaveInstanceId(); + void setSlaveInstanceId(const std::string& value); + + /// + /// 灾备实例所在region + /// + + std::string getSlaveRegion() const; + bool slaveRegionIsSet() const; + void unsetslaveRegion(); + void setSlaveRegion(const std::string& value); + + /// + /// 灾备搭建时间 + /// + + int64_t getTime() const; + bool timeIsSet() const; + void unsettime(); + void setTime(int64_t value); + + +protected: + std::string id_; + bool idIsSet_; + std::string status_; + bool statusIsSet_; + std::string failedMessage_; + bool failedMessageIsSet_; + std::string replicaState_; + bool replicaStateIsSet_; + std::string walWriteReceiveDelayInMb_; + bool walWriteReceiveDelayInMbIsSet_; + std::string walWriteReplayDelayInMb_; + bool walWriteReplayDelayInMbIsSet_; + std::string walReceiveReplayDelayInMs_; + bool walReceiveReplayDelayInMsIsSet_; + std::string masterInstanceId_; + bool masterInstanceIdIsSet_; + std::string masterRegion_; + bool masterRegionIsSet_; + std::string slaveInstanceId_; + bool slaveInstanceIdIsSet_; + std::string slaveRegion_; + bool slaveRegionIsSet_; + int64_t time_; + bool timeIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_InstanceDrInfo_H_ diff --git a/rds/include/huaweicloud/rds/v3/model/ListDrInfosRequest.h b/rds/include/huaweicloud/rds/v3/model/ListDrInfosRequest.h new file mode 100644 index 00000000..da4fc36e --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/ListDrInfosRequest.h @@ -0,0 +1,83 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_ListDrInfosRequest_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_ListDrInfosRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_RDS_V3_EXPORT ListDrInfosRequest + : public ModelBase +{ +public: + ListDrInfosRequest(); + virtual ~ListDrInfosRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListDrInfosRequest members + + /// + /// 语言。默认en-us。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// + /// + + QueryDRInfoRequest getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const QueryDRInfoRequest& value); + + +protected: + std::string xLanguage_; + bool xLanguageIsSet_; + QueryDRInfoRequest body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListDrInfosRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_ListDrInfosRequest_H_ diff --git a/rds/include/huaweicloud/rds/v3/model/ListDrInfosResponse.h b/rds/include/huaweicloud/rds/v3/model/ListDrInfosResponse.h new file mode 100644 index 00000000..6aec6c24 --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/ListDrInfosResponse.h @@ -0,0 +1,79 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_ListDrInfosResponse_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_ListDrInfosResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_RDS_V3_EXPORT ListDrInfosResponse + : public ModelBase, public HttpResponse +{ +public: + ListDrInfosResponse(); + virtual ~ListDrInfosResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListDrInfosResponse members + + /// + /// 总记录数 + /// + + int32_t getTotalCount() const; + bool totalCountIsSet() const; + void unsettotalCount(); + void setTotalCount(int32_t value); + + /// + /// 实例容灾信息 + /// + + std::vector& getInstanceDrInfos(); + bool instanceDrInfosIsSet() const; + void unsetinstanceDrInfos(); + void setInstanceDrInfos(const std::vector& value); + + +protected: + int32_t totalCount_; + bool totalCountIsSet_; + std::vector instanceDrInfos_; + bool instanceDrInfosIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_ListDrInfosResponse_H_ diff --git a/rds/include/huaweicloud/rds/v3/model/Policy.h b/rds/include/huaweicloud/rds/v3/model/Policy.h index 770c07d4..3f8739ee 100644 --- a/rds/include/huaweicloud/rds/v3/model/Policy.h +++ b/rds/include/huaweicloud/rds/v3/model/Policy.h @@ -51,16 +51,16 @@ class HUAWEICLOUD_RDS_V3_EXPORT Policy /// 保留时长(天) /// - std::string getRetentionDays() const; + int32_t getRetentionDays() const; bool retentionDaysIsSet() const; void unsetretentionDays(); - void setRetentionDays(const std::string& value); + void setRetentionDays(int32_t value); protected: std::string period_; bool periodIsSet_; - std::string retentionDays_; + int32_t retentionDays_; bool retentionDaysIsSet_; }; diff --git a/rds/include/huaweicloud/rds/v3/model/QueryDRInfoRequest.h b/rds/include/huaweicloud/rds/v3/model/QueryDRInfoRequest.h new file mode 100644 index 00000000..4073ae71 --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/QueryDRInfoRequest.h @@ -0,0 +1,185 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_QueryDRInfoRequest_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_QueryDRInfoRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_RDS_V3_EXPORT QueryDRInfoRequest + : public ModelBase +{ +public: + QueryDRInfoRequest(); + virtual ~QueryDRInfoRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// QueryDRInfoRequest members + + /// + /// 容灾关系id + /// + + std::string getId() const; + bool idIsSet() const; + void unsetid(); + void setId(const std::string& value); + + /// + /// 容灾搭建状态 + /// + + std::string getStatus() const; + bool statusIsSet() const; + void unsetstatus(); + void setStatus(const std::string& value); + + /// + /// 灾备实例id + /// + + std::string getMasterInstanceId() const; + bool masterInstanceIdIsSet() const; + void unsetmasterInstanceId(); + void setMasterInstanceId(const std::string& value); + + /// + /// 主实例region + /// + + std::string getMasterRegion() const; + bool masterRegionIsSet() const; + void unsetmasterRegion(); + void setMasterRegion(const std::string& value); + + /// + /// 灾备实例id + /// + + std::string getSlaveInstanceId() const; + bool slaveInstanceIdIsSet() const; + void unsetslaveInstanceId(); + void setSlaveInstanceId(const std::string& value); + + /// + /// 灾备实例region + /// + + std::string getSlaveRegion() const; + bool slaveRegionIsSet() const; + void unsetslaveRegion(); + void setSlaveRegion(const std::string& value); + + /// + /// 创建起始时间 + /// + + int64_t getCreateAtStart() const; + bool createAtStartIsSet() const; + void unsetcreateAtStart(); + void setCreateAtStart(int64_t value); + + /// + /// 创建结束时间 + /// + + int64_t getCreateAtEnd() const; + bool createAtEndIsSet() const; + void unsetcreateAtEnd(); + void setCreateAtEnd(int64_t value); + + /// + /// 排序方式。 DESC,降序。 ASC,升序。 默认降序。 + /// + + std::string getOrder() const; + bool orderIsSet() const; + void unsetorder(); + void setOrder(const std::string& value); + + /// + /// 排序字段。 status 容灾搭建状态。 time 容灾搭建时间。 master_region 主实例region。 slave_region 灾备实例region 默认容灾搭建时间。 + /// + + std::string getSortField() const; + bool sortFieldIsSet() const; + void unsetsortField(); + void setSortField(const std::string& value); + + /// + /// 索引位置,偏移量。从第一条数据偏移offset条数据后开始查询,默认为0(偏移0条数据,表示从第一条数据开始查询),必须为数字,不能为负数。 + /// + + int32_t getOffset() const; + bool offsetIsSet() const; + void unsetoffset(); + void setOffset(int32_t value); + + /// + /// 查询记录数。默认为10,不能为负数,最小值为1,最大值为100。 + /// + + int32_t getLimit() const; + bool limitIsSet() const; + void unsetlimit(); + void setLimit(int32_t value); + + +protected: + std::string id_; + bool idIsSet_; + std::string status_; + bool statusIsSet_; + std::string masterInstanceId_; + bool masterInstanceIdIsSet_; + std::string masterRegion_; + bool masterRegionIsSet_; + std::string slaveInstanceId_; + bool slaveInstanceIdIsSet_; + std::string slaveRegion_; + bool slaveRegionIsSet_; + int64_t createAtStart_; + bool createAtStartIsSet_; + int64_t createAtEnd_; + bool createAtEndIsSet_; + std::string order_; + bool orderIsSet_; + std::string sortField_; + bool sortFieldIsSet_; + int32_t offset_; + bool offsetIsSet_; + int32_t limit_; + bool limitIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_QueryDRInfoRequest_H_ diff --git a/rds/src/v3/RdsClient.cpp b/rds/src/v3/RdsClient.cpp index fdcd7778..59c8a6c7 100644 --- a/rds/src/v3/RdsClient.cpp +++ b/rds/src/v3/RdsClient.cpp @@ -1661,6 +1661,50 @@ std::shared_ptr RdsClient::listDatastores(ListDatastores return localVarResult; } +std::shared_ptr RdsClient::listDrInfos(ListDrInfosRequest &request) +{ + std::string localVarPath = "/v3/{project_id}/instances/disaster-recovery-infos"; + + 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; + + 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, RdsMeta::genRequestDefForListDrInfos()); + + 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 RdsClient::listDrRelations(ListDrRelationsRequest &request) { std::string localVarPath = "/v3/{project_id}/instances/disaster-recovery-relation"; diff --git a/rds/src/v3/RdsMeta.cpp b/rds/src/v3/RdsMeta.cpp index 28008e4a..d97dcb9d 100644 --- a/rds/src/v3/RdsMeta.cpp +++ b/rds/src/v3/RdsMeta.cpp @@ -519,6 +519,20 @@ HttpRequestDef RdsMeta::genRequestDefForListDatastores() { return reqDefBuilder; } +HttpRequestDef RdsMeta::genRequestDefForListDrInfos() { + 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 RdsMeta::genRequestDefForListDrRelations() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; diff --git a/rds/src/v3/model/InstanceDrInfo.cpp b/rds/src/v3/model/InstanceDrInfo.cpp new file mode 100644 index 00000000..722e82ec --- /dev/null +++ b/rds/src/v3/model/InstanceDrInfo.cpp @@ -0,0 +1,464 @@ + + +#include "huaweicloud/rds/v3/model/InstanceDrInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +InstanceDrInfo::InstanceDrInfo() +{ + id_ = ""; + idIsSet_ = false; + status_ = ""; + statusIsSet_ = false; + failedMessage_ = ""; + failedMessageIsSet_ = false; + replicaState_ = ""; + replicaStateIsSet_ = false; + walWriteReceiveDelayInMb_ = ""; + walWriteReceiveDelayInMbIsSet_ = false; + walWriteReplayDelayInMb_ = ""; + walWriteReplayDelayInMbIsSet_ = false; + walReceiveReplayDelayInMs_ = ""; + walReceiveReplayDelayInMsIsSet_ = false; + masterInstanceId_ = ""; + masterInstanceIdIsSet_ = false; + masterRegion_ = ""; + masterRegionIsSet_ = false; + slaveInstanceId_ = ""; + slaveInstanceIdIsSet_ = false; + slaveRegion_ = ""; + slaveRegionIsSet_ = false; + time_ = 0L; + timeIsSet_ = false; +} + +InstanceDrInfo::~InstanceDrInfo() = default; + +void InstanceDrInfo::validate() +{ +} + +web::json::value InstanceDrInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(idIsSet_) { + val[utility::conversions::to_string_t("id")] = ModelBase::toJson(id_); + } + if(statusIsSet_) { + val[utility::conversions::to_string_t("status")] = ModelBase::toJson(status_); + } + if(failedMessageIsSet_) { + val[utility::conversions::to_string_t("failed_message")] = ModelBase::toJson(failedMessage_); + } + if(replicaStateIsSet_) { + val[utility::conversions::to_string_t("replica_state")] = ModelBase::toJson(replicaState_); + } + if(walWriteReceiveDelayInMbIsSet_) { + val[utility::conversions::to_string_t("wal_write_receive_delay_in_mb")] = ModelBase::toJson(walWriteReceiveDelayInMb_); + } + if(walWriteReplayDelayInMbIsSet_) { + val[utility::conversions::to_string_t("wal_write_replay_delay_in_mb")] = ModelBase::toJson(walWriteReplayDelayInMb_); + } + if(walReceiveReplayDelayInMsIsSet_) { + val[utility::conversions::to_string_t("wal_receive_replay_delay_in_ms")] = ModelBase::toJson(walReceiveReplayDelayInMs_); + } + if(masterInstanceIdIsSet_) { + val[utility::conversions::to_string_t("master_instance_id")] = ModelBase::toJson(masterInstanceId_); + } + if(masterRegionIsSet_) { + val[utility::conversions::to_string_t("master_region")] = ModelBase::toJson(masterRegion_); + } + if(slaveInstanceIdIsSet_) { + val[utility::conversions::to_string_t("slave_instance_id")] = ModelBase::toJson(slaveInstanceId_); + } + if(slaveRegionIsSet_) { + val[utility::conversions::to_string_t("slave_region")] = ModelBase::toJson(slaveRegion_); + } + if(timeIsSet_) { + val[utility::conversions::to_string_t("time")] = ModelBase::toJson(time_); + } + + return val; +} +bool InstanceDrInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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("status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("status")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStatus(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("failed_message"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("failed_message")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFailedMessage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("replica_state"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("replica_state")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setReplicaState(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("wal_write_receive_delay_in_mb"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("wal_write_receive_delay_in_mb")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setWalWriteReceiveDelayInMb(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("wal_write_replay_delay_in_mb"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("wal_write_replay_delay_in_mb")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setWalWriteReplayDelayInMb(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("wal_receive_replay_delay_in_ms"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("wal_receive_replay_delay_in_ms")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setWalReceiveReplayDelayInMs(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("master_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("master_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setMasterInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("master_region"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("master_region")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setMasterRegion(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("slave_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("slave_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSlaveInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("slave_region"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("slave_region")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSlaveRegion(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("time")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTime(refVal); + } + } + return ok; +} + + +std::string InstanceDrInfo::getId() const +{ + return id_; +} + +void InstanceDrInfo::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool InstanceDrInfo::idIsSet() const +{ + return idIsSet_; +} + +void InstanceDrInfo::unsetid() +{ + idIsSet_ = false; +} + +std::string InstanceDrInfo::getStatus() const +{ + return status_; +} + +void InstanceDrInfo::setStatus(const std::string& value) +{ + status_ = value; + statusIsSet_ = true; +} + +bool InstanceDrInfo::statusIsSet() const +{ + return statusIsSet_; +} + +void InstanceDrInfo::unsetstatus() +{ + statusIsSet_ = false; +} + +std::string InstanceDrInfo::getFailedMessage() const +{ + return failedMessage_; +} + +void InstanceDrInfo::setFailedMessage(const std::string& value) +{ + failedMessage_ = value; + failedMessageIsSet_ = true; +} + +bool InstanceDrInfo::failedMessageIsSet() const +{ + return failedMessageIsSet_; +} + +void InstanceDrInfo::unsetfailedMessage() +{ + failedMessageIsSet_ = false; +} + +std::string InstanceDrInfo::getReplicaState() const +{ + return replicaState_; +} + +void InstanceDrInfo::setReplicaState(const std::string& value) +{ + replicaState_ = value; + replicaStateIsSet_ = true; +} + +bool InstanceDrInfo::replicaStateIsSet() const +{ + return replicaStateIsSet_; +} + +void InstanceDrInfo::unsetreplicaState() +{ + replicaStateIsSet_ = false; +} + +std::string InstanceDrInfo::getWalWriteReceiveDelayInMb() const +{ + return walWriteReceiveDelayInMb_; +} + +void InstanceDrInfo::setWalWriteReceiveDelayInMb(const std::string& value) +{ + walWriteReceiveDelayInMb_ = value; + walWriteReceiveDelayInMbIsSet_ = true; +} + +bool InstanceDrInfo::walWriteReceiveDelayInMbIsSet() const +{ + return walWriteReceiveDelayInMbIsSet_; +} + +void InstanceDrInfo::unsetwalWriteReceiveDelayInMb() +{ + walWriteReceiveDelayInMbIsSet_ = false; +} + +std::string InstanceDrInfo::getWalWriteReplayDelayInMb() const +{ + return walWriteReplayDelayInMb_; +} + +void InstanceDrInfo::setWalWriteReplayDelayInMb(const std::string& value) +{ + walWriteReplayDelayInMb_ = value; + walWriteReplayDelayInMbIsSet_ = true; +} + +bool InstanceDrInfo::walWriteReplayDelayInMbIsSet() const +{ + return walWriteReplayDelayInMbIsSet_; +} + +void InstanceDrInfo::unsetwalWriteReplayDelayInMb() +{ + walWriteReplayDelayInMbIsSet_ = false; +} + +std::string InstanceDrInfo::getWalReceiveReplayDelayInMs() const +{ + return walReceiveReplayDelayInMs_; +} + +void InstanceDrInfo::setWalReceiveReplayDelayInMs(const std::string& value) +{ + walReceiveReplayDelayInMs_ = value; + walReceiveReplayDelayInMsIsSet_ = true; +} + +bool InstanceDrInfo::walReceiveReplayDelayInMsIsSet() const +{ + return walReceiveReplayDelayInMsIsSet_; +} + +void InstanceDrInfo::unsetwalReceiveReplayDelayInMs() +{ + walReceiveReplayDelayInMsIsSet_ = false; +} + +std::string InstanceDrInfo::getMasterInstanceId() const +{ + return masterInstanceId_; +} + +void InstanceDrInfo::setMasterInstanceId(const std::string& value) +{ + masterInstanceId_ = value; + masterInstanceIdIsSet_ = true; +} + +bool InstanceDrInfo::masterInstanceIdIsSet() const +{ + return masterInstanceIdIsSet_; +} + +void InstanceDrInfo::unsetmasterInstanceId() +{ + masterInstanceIdIsSet_ = false; +} + +std::string InstanceDrInfo::getMasterRegion() const +{ + return masterRegion_; +} + +void InstanceDrInfo::setMasterRegion(const std::string& value) +{ + masterRegion_ = value; + masterRegionIsSet_ = true; +} + +bool InstanceDrInfo::masterRegionIsSet() const +{ + return masterRegionIsSet_; +} + +void InstanceDrInfo::unsetmasterRegion() +{ + masterRegionIsSet_ = false; +} + +std::string InstanceDrInfo::getSlaveInstanceId() const +{ + return slaveInstanceId_; +} + +void InstanceDrInfo::setSlaveInstanceId(const std::string& value) +{ + slaveInstanceId_ = value; + slaveInstanceIdIsSet_ = true; +} + +bool InstanceDrInfo::slaveInstanceIdIsSet() const +{ + return slaveInstanceIdIsSet_; +} + +void InstanceDrInfo::unsetslaveInstanceId() +{ + slaveInstanceIdIsSet_ = false; +} + +std::string InstanceDrInfo::getSlaveRegion() const +{ + return slaveRegion_; +} + +void InstanceDrInfo::setSlaveRegion(const std::string& value) +{ + slaveRegion_ = value; + slaveRegionIsSet_ = true; +} + +bool InstanceDrInfo::slaveRegionIsSet() const +{ + return slaveRegionIsSet_; +} + +void InstanceDrInfo::unsetslaveRegion() +{ + slaveRegionIsSet_ = false; +} + +int64_t InstanceDrInfo::getTime() const +{ + return time_; +} + +void InstanceDrInfo::setTime(int64_t value) +{ + time_ = value; + timeIsSet_ = true; +} + +bool InstanceDrInfo::timeIsSet() const +{ + return timeIsSet_; +} + +void InstanceDrInfo::unsettime() +{ + timeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/rds/src/v3/model/ListDrInfosRequest.cpp b/rds/src/v3/model/ListDrInfosRequest.cpp new file mode 100644 index 00000000..f0cf8062 --- /dev/null +++ b/rds/src/v3/model/ListDrInfosRequest.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/rds/v3/model/ListDrInfosRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +ListDrInfosRequest::ListDrInfosRequest() +{ + xLanguage_ = ""; + xLanguageIsSet_ = false; + bodyIsSet_ = false; +} + +ListDrInfosRequest::~ListDrInfosRequest() = default; + +void ListDrInfosRequest::validate() +{ +} + +web::json::value ListDrInfosRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool ListDrInfosRequest::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("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + QueryDRInfoRequest refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string ListDrInfosRequest::getXLanguage() const +{ + return xLanguage_; +} + +void ListDrInfosRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool ListDrInfosRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void ListDrInfosRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +QueryDRInfoRequest ListDrInfosRequest::getBody() const +{ + return body_; +} + +void ListDrInfosRequest::setBody(const QueryDRInfoRequest& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool ListDrInfosRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void ListDrInfosRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/rds/src/v3/model/ListDrInfosResponse.cpp b/rds/src/v3/model/ListDrInfosResponse.cpp new file mode 100644 index 00000000..fa1ee306 --- /dev/null +++ b/rds/src/v3/model/ListDrInfosResponse.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/rds/v3/model/ListDrInfosResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +ListDrInfosResponse::ListDrInfosResponse() +{ + totalCount_ = 0; + totalCountIsSet_ = false; + instanceDrInfosIsSet_ = false; +} + +ListDrInfosResponse::~ListDrInfosResponse() = default; + +void ListDrInfosResponse::validate() +{ +} + +web::json::value ListDrInfosResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(totalCountIsSet_) { + val[utility::conversions::to_string_t("total_count")] = ModelBase::toJson(totalCount_); + } + if(instanceDrInfosIsSet_) { + val[utility::conversions::to_string_t("instance_dr_infos")] = ModelBase::toJson(instanceDrInfos_); + } + + return val; +} +bool ListDrInfosResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("total_count"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("total_count")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTotalCount(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("instance_dr_infos"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_dr_infos")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceDrInfos(refVal); + } + } + return ok; +} + + +int32_t ListDrInfosResponse::getTotalCount() const +{ + return totalCount_; +} + +void ListDrInfosResponse::setTotalCount(int32_t value) +{ + totalCount_ = value; + totalCountIsSet_ = true; +} + +bool ListDrInfosResponse::totalCountIsSet() const +{ + return totalCountIsSet_; +} + +void ListDrInfosResponse::unsettotalCount() +{ + totalCountIsSet_ = false; +} + +std::vector& ListDrInfosResponse::getInstanceDrInfos() +{ + return instanceDrInfos_; +} + +void ListDrInfosResponse::setInstanceDrInfos(const std::vector& value) +{ + instanceDrInfos_ = value; + instanceDrInfosIsSet_ = true; +} + +bool ListDrInfosResponse::instanceDrInfosIsSet() const +{ + return instanceDrInfosIsSet_; +} + +void ListDrInfosResponse::unsetinstanceDrInfos() +{ + instanceDrInfosIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/rds/src/v3/model/Policy.cpp b/rds/src/v3/model/Policy.cpp index 49a98016..046b6fe1 100644 --- a/rds/src/v3/model/Policy.cpp +++ b/rds/src/v3/model/Policy.cpp @@ -14,7 +14,7 @@ Policy::Policy() { period_ = ""; periodIsSet_ = false; - retentionDays_ = ""; + retentionDays_ = 0; retentionDaysIsSet_ = false; } @@ -54,7 +54,7 @@ bool Policy::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("retention_days")); if(!fieldValue.is_null()) { - std::string refVal; + int32_t refVal; ok &= ModelBase::fromJson(fieldValue, refVal); setRetentionDays(refVal); } @@ -84,12 +84,12 @@ void Policy::unsetperiod() periodIsSet_ = false; } -std::string Policy::getRetentionDays() const +int32_t Policy::getRetentionDays() const { return retentionDays_; } -void Policy::setRetentionDays(const std::string& value) +void Policy::setRetentionDays(int32_t value) { retentionDays_ = value; retentionDaysIsSet_ = true; diff --git a/rds/src/v3/model/QueryDRInfoRequest.cpp b/rds/src/v3/model/QueryDRInfoRequest.cpp new file mode 100644 index 00000000..aab51ab8 --- /dev/null +++ b/rds/src/v3/model/QueryDRInfoRequest.cpp @@ -0,0 +1,464 @@ + + +#include "huaweicloud/rds/v3/model/QueryDRInfoRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +QueryDRInfoRequest::QueryDRInfoRequest() +{ + id_ = ""; + idIsSet_ = false; + status_ = ""; + statusIsSet_ = false; + masterInstanceId_ = ""; + masterInstanceIdIsSet_ = false; + masterRegion_ = ""; + masterRegionIsSet_ = false; + slaveInstanceId_ = ""; + slaveInstanceIdIsSet_ = false; + slaveRegion_ = ""; + slaveRegionIsSet_ = false; + createAtStart_ = 0L; + createAtStartIsSet_ = false; + createAtEnd_ = 0L; + createAtEndIsSet_ = false; + order_ = ""; + orderIsSet_ = false; + sortField_ = ""; + sortFieldIsSet_ = false; + offset_ = 0; + offsetIsSet_ = false; + limit_ = 0; + limitIsSet_ = false; +} + +QueryDRInfoRequest::~QueryDRInfoRequest() = default; + +void QueryDRInfoRequest::validate() +{ +} + +web::json::value QueryDRInfoRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(idIsSet_) { + val[utility::conversions::to_string_t("id")] = ModelBase::toJson(id_); + } + if(statusIsSet_) { + val[utility::conversions::to_string_t("status")] = ModelBase::toJson(status_); + } + if(masterInstanceIdIsSet_) { + val[utility::conversions::to_string_t("master_instance_id")] = ModelBase::toJson(masterInstanceId_); + } + if(masterRegionIsSet_) { + val[utility::conversions::to_string_t("master_region")] = ModelBase::toJson(masterRegion_); + } + if(slaveInstanceIdIsSet_) { + val[utility::conversions::to_string_t("slave_instance_id")] = ModelBase::toJson(slaveInstanceId_); + } + if(slaveRegionIsSet_) { + val[utility::conversions::to_string_t("slave_region")] = ModelBase::toJson(slaveRegion_); + } + if(createAtStartIsSet_) { + val[utility::conversions::to_string_t("create_at_start")] = ModelBase::toJson(createAtStart_); + } + if(createAtEndIsSet_) { + val[utility::conversions::to_string_t("create_at_end")] = ModelBase::toJson(createAtEnd_); + } + if(orderIsSet_) { + val[utility::conversions::to_string_t("order")] = ModelBase::toJson(order_); + } + if(sortFieldIsSet_) { + val[utility::conversions::to_string_t("sort_field")] = ModelBase::toJson(sortField_); + } + if(offsetIsSet_) { + val[utility::conversions::to_string_t("offset")] = ModelBase::toJson(offset_); + } + if(limitIsSet_) { + val[utility::conversions::to_string_t("limit")] = ModelBase::toJson(limit_); + } + + return val; +} +bool QueryDRInfoRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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("status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("status")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStatus(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("master_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("master_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setMasterInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("master_region"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("master_region")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setMasterRegion(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("slave_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("slave_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSlaveInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("slave_region"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("slave_region")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSlaveRegion(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("create_at_start"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("create_at_start")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCreateAtStart(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("create_at_end"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("create_at_end")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCreateAtEnd(refVal); + } + } + 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()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOrder(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("sort_field"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sort_field")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSortField(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("offset"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("offset")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOffset(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("limit"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("limit")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLimit(refVal); + } + } + return ok; +} + + +std::string QueryDRInfoRequest::getId() const +{ + return id_; +} + +void QueryDRInfoRequest::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool QueryDRInfoRequest::idIsSet() const +{ + return idIsSet_; +} + +void QueryDRInfoRequest::unsetid() +{ + idIsSet_ = false; +} + +std::string QueryDRInfoRequest::getStatus() const +{ + return status_; +} + +void QueryDRInfoRequest::setStatus(const std::string& value) +{ + status_ = value; + statusIsSet_ = true; +} + +bool QueryDRInfoRequest::statusIsSet() const +{ + return statusIsSet_; +} + +void QueryDRInfoRequest::unsetstatus() +{ + statusIsSet_ = false; +} + +std::string QueryDRInfoRequest::getMasterInstanceId() const +{ + return masterInstanceId_; +} + +void QueryDRInfoRequest::setMasterInstanceId(const std::string& value) +{ + masterInstanceId_ = value; + masterInstanceIdIsSet_ = true; +} + +bool QueryDRInfoRequest::masterInstanceIdIsSet() const +{ + return masterInstanceIdIsSet_; +} + +void QueryDRInfoRequest::unsetmasterInstanceId() +{ + masterInstanceIdIsSet_ = false; +} + +std::string QueryDRInfoRequest::getMasterRegion() const +{ + return masterRegion_; +} + +void QueryDRInfoRequest::setMasterRegion(const std::string& value) +{ + masterRegion_ = value; + masterRegionIsSet_ = true; +} + +bool QueryDRInfoRequest::masterRegionIsSet() const +{ + return masterRegionIsSet_; +} + +void QueryDRInfoRequest::unsetmasterRegion() +{ + masterRegionIsSet_ = false; +} + +std::string QueryDRInfoRequest::getSlaveInstanceId() const +{ + return slaveInstanceId_; +} + +void QueryDRInfoRequest::setSlaveInstanceId(const std::string& value) +{ + slaveInstanceId_ = value; + slaveInstanceIdIsSet_ = true; +} + +bool QueryDRInfoRequest::slaveInstanceIdIsSet() const +{ + return slaveInstanceIdIsSet_; +} + +void QueryDRInfoRequest::unsetslaveInstanceId() +{ + slaveInstanceIdIsSet_ = false; +} + +std::string QueryDRInfoRequest::getSlaveRegion() const +{ + return slaveRegion_; +} + +void QueryDRInfoRequest::setSlaveRegion(const std::string& value) +{ + slaveRegion_ = value; + slaveRegionIsSet_ = true; +} + +bool QueryDRInfoRequest::slaveRegionIsSet() const +{ + return slaveRegionIsSet_; +} + +void QueryDRInfoRequest::unsetslaveRegion() +{ + slaveRegionIsSet_ = false; +} + +int64_t QueryDRInfoRequest::getCreateAtStart() const +{ + return createAtStart_; +} + +void QueryDRInfoRequest::setCreateAtStart(int64_t value) +{ + createAtStart_ = value; + createAtStartIsSet_ = true; +} + +bool QueryDRInfoRequest::createAtStartIsSet() const +{ + return createAtStartIsSet_; +} + +void QueryDRInfoRequest::unsetcreateAtStart() +{ + createAtStartIsSet_ = false; +} + +int64_t QueryDRInfoRequest::getCreateAtEnd() const +{ + return createAtEnd_; +} + +void QueryDRInfoRequest::setCreateAtEnd(int64_t value) +{ + createAtEnd_ = value; + createAtEndIsSet_ = true; +} + +bool QueryDRInfoRequest::createAtEndIsSet() const +{ + return createAtEndIsSet_; +} + +void QueryDRInfoRequest::unsetcreateAtEnd() +{ + createAtEndIsSet_ = false; +} + +std::string QueryDRInfoRequest::getOrder() const +{ + return order_; +} + +void QueryDRInfoRequest::setOrder(const std::string& value) +{ + order_ = value; + orderIsSet_ = true; +} + +bool QueryDRInfoRequest::orderIsSet() const +{ + return orderIsSet_; +} + +void QueryDRInfoRequest::unsetorder() +{ + orderIsSet_ = false; +} + +std::string QueryDRInfoRequest::getSortField() const +{ + return sortField_; +} + +void QueryDRInfoRequest::setSortField(const std::string& value) +{ + sortField_ = value; + sortFieldIsSet_ = true; +} + +bool QueryDRInfoRequest::sortFieldIsSet() const +{ + return sortFieldIsSet_; +} + +void QueryDRInfoRequest::unsetsortField() +{ + sortFieldIsSet_ = false; +} + +int32_t QueryDRInfoRequest::getOffset() const +{ + return offset_; +} + +void QueryDRInfoRequest::setOffset(int32_t value) +{ + offset_ = value; + offsetIsSet_ = true; +} + +bool QueryDRInfoRequest::offsetIsSet() const +{ + return offsetIsSet_; +} + +void QueryDRInfoRequest::unsetoffset() +{ + offsetIsSet_ = false; +} + +int32_t QueryDRInfoRequest::getLimit() const +{ + return limit_; +} + +void QueryDRInfoRequest::setLimit(int32_t value) +{ + limit_ = value; + limitIsSet_ = true; +} + +bool QueryDRInfoRequest::limitIsSet() const +{ + return limitIsSet_; +} + +void QueryDRInfoRequest::unsetlimit() +{ + limitIsSet_ = false; +} + +} +} +} +} +} + +