From b5b5a11025193e081ef2db6c25269d9d6c7d6f43 Mon Sep 17 00:00:00 2001 From: Huaweicloud-SDK Date: Thu, 10 Oct 2024 15:49:56 +0800 Subject: [PATCH] release 3.1.105 source code --- CHANGELOG.md | 119 +++ CHANGELOG_CN.md | 119 +++ VERSION | 2 +- aad/include/huaweicloud/aad/v1/AadClient.h | 21 + aad/include/huaweicloud/aad/v1/AadMeta.h | 2 + .../AssociateIpToPolicyAndPackageRequest.h | 83 ++ .../AssociateIpToPolicyAndPackageResponse.h | 55 ++ ...isassociateIpFromPolicyAndPackageRequest.h | 83 ++ ...sassociateIpFromPolicyAndPackageResponse.h | 55 ++ .../aad/v1/model/IpBindingV3Body.h | 65 ++ aad/include/huaweicloud/aad/v2/AadClient.h | 280 ++++++ aad/include/huaweicloud/aad/v2/AadExport.h | 16 + aad/include/huaweicloud/aad/v2/AadMeta.h | 42 + aad/include/huaweicloud/aad/v2/AadRegion.h | 44 + .../huaweicloud/aad/v2/model/ActionInfo.h | 76 ++ .../huaweicloud/aad/v2/model/Backend.h | 86 ++ .../aad/v2/model/BlackWhiteListRule.h | 97 +++ .../huaweicloud/aad/v2/model/BwListIps.h | 75 ++ .../huaweicloud/aad/v2/model/CertInfo.h | 108 +++ .../huaweicloud/aad/v2/model/Condition.h | 98 +++ .../aad/v2/model/CreateAadDomainRequestBody.h | 164 ++++ .../aad/v2/model/CreateDomainRequest.h | 71 ++ .../aad/v2/model/CreateDomainResponse.h | 78 ++ aad/include/huaweicloud/aad/v2/model/Curve.h | 85 ++ .../aad/v2/model/DeleteDomainRequest.h | 71 ++ .../aad/v2/model/DeleteDomainResponse.h | 67 ++ .../aad/v2/model/DeleteDomainV2RequestBody.h | 65 ++ .../huaweicloud/aad/v2/model/DetailInfo.h | 64 ++ .../aad/v2/model/EmptyJsonResponse.h | 52 ++ .../huaweicloud/aad/v2/model/FlowBps.h | 85 ++ .../huaweicloud/aad/v2/model/FlowPps.h | 85 ++ .../aad/v2/model/FrequencyControlRule.h | 255 ++++++ .../aad/v2/model/InstanceDomainItem.h | 175 ++++ aad/include/huaweicloud/aad/v2/model/Ips.h | 119 +++ .../aad/v2/model/ListConnectionNumberData.h | 77 ++ .../v2/model/ListConnectionNumberDataList.h | 74 ++ .../aad/v2/model/ListDDoSAttackEventRequest.h | 83 ++ .../v2/model/ListDDoSAttackEventRequestBody.h | 141 +++ .../v2/model/ListDDoSAttackEventResponse.h | 79 ++ .../model/ListDDoSConnectionNumberRequest.h | 104 +++ .../model/ListDDoSConnectionNumberResponse.h | 68 ++ .../aad/v2/model/ListDDoSEventData.h | 174 ++++ .../aad/v2/model/ListDDoSFlowRequest.h | 115 +++ .../aad/v2/model/ListDDoSFlowResponse.h | 80 ++ .../model/ListFrequencyControlRuleRequest.h | 71 ++ .../model/ListFrequencyControlRuleResponse.h | 79 ++ .../aad/v2/model/ListInstanceDomainsRequest.h | 71 ++ .../v2/model/ListInstanceDomainsResponse.h | 91 ++ .../aad/v2/model/ListWafAttackEventRequest.h | 148 ++++ .../aad/v2/model/ListWafAttackEventResponse.h | 79 ++ .../aad/v2/model/ListWafAttackEventlist.h | 142 +++ .../aad/v2/model/ListWafBandwidthRequest.h | 126 +++ .../aad/v2/model/ListWafBandwidthResponse.h | 68 ++ .../aad/v2/model/ListWafCustomRuleRequest.h | 82 ++ .../aad/v2/model/ListWafCustomRuleResponse.h | 79 ++ .../aad/v2/model/ListWafGeoIpRuleRequest.h | 82 ++ .../aad/v2/model/ListWafGeoIpRuleResponse.h | 79 ++ .../aad/v2/model/ListWafQpsRequest.h | 126 +++ .../aad/v2/model/ListWafQpsResponse.h | 68 ++ .../aad/v2/model/ListWafWhiteIpRuleRequest.h | 82 ++ .../aad/v2/model/ListWafWhiteIpRuleResponse.h | 90 ++ .../v2/model/ListWhiteBlackIpRuleRequest.h | 82 ++ .../v2/model/ListWhiteBlackIpRuleResponse.h | 79 ++ .../huaweicloud/aad/v2/model/PageRespInfo.h | 75 ++ aad/include/huaweicloud/aad/v2/model/Point.h | 118 +++ .../v2/model/ShowDomainCertificateRequest.h | 71 ++ .../v2/model/ShowDomainCertificateResponse.h | 90 ++ .../aad/v2/model/ShowFlowBlockRequest.h | 71 ++ .../aad/v2/model/ShowFlowBlockResponse.h | 79 ++ .../aad/v2/model/ShowWafPolicyRequest.h | 82 ++ .../aad/v2/model/ShowWafPolicyResponse.h | 112 +++ .../aad/v2/model/ShowWafQpsRequest.h | 115 +++ .../aad/v2/model/ShowWafQpsResponse.h | 66 ++ .../huaweicloud/aad/v2/model/TagCondition.h | 76 ++ .../aad/v2/model/UpgradeInstanceData.h | 108 +++ .../aad/v2/model/UpgradeInstanceSpecRequest.h | 71 ++ .../v2/model/UpgradeInstanceSpecResponse.h | 67 ++ .../model/UpgradeInstanceSpecV2RequestBody.h | 76 ++ .../aad/v2/model/WafCustomCondition.h | 98 +++ .../huaweicloud/aad/v2/model/WafCustomRule.h | 166 ++++ .../aad/v2/model/WafCustomRuleAction.h | 64 ++ .../huaweicloud/aad/v2/model/WafGeoIpRule.h | 119 +++ .../aad/v2/model/WafPolicyOptions.h | 107 +++ aad/src/v1/AadClient.cpp | 84 ++ aad/src/v1/AadMeta.cpp | 18 + .../AssociateIpToPolicyAndPackageRequest.cpp | 113 +++ .../AssociateIpToPolicyAndPackageResponse.cpp | 44 + ...associateIpFromPolicyAndPackageRequest.cpp | 113 +++ ...ssociateIpFromPolicyAndPackageResponse.cpp | 44 + aad/src/v1/model/IpBindingV3Body.cpp | 78 ++ aad/src/v2/AadClient.cpp | 822 ++++++++++++++++++ aad/src/v2/AadMeta.cpp | 259 ++++++ aad/src/v2/AadRegion.cpp | 33 + aad/src/v2/CMakeLists.txt | 80 ++ aad/src/v2/model/ActionInfo.cpp | 113 +++ aad/src/v2/model/Backend.cpp | 149 ++++ aad/src/v2/model/BlackWhiteListRule.cpp | 184 ++++ aad/src/v2/model/BwListIps.cpp | 114 +++ aad/src/v2/model/CertInfo.cpp | 219 +++++ aad/src/v2/model/Condition.cpp | 183 ++++ .../v2/model/CreateAadDomainRequestBody.cpp | 391 +++++++++ aad/src/v2/model/CreateDomainRequest.cpp | 78 ++ aad/src/v2/model/CreateDomainResponse.cpp | 114 +++ aad/src/v2/model/Curve.cpp | 149 ++++ aad/src/v2/model/DeleteDomainRequest.cpp | 78 ++ aad/src/v2/model/DeleteDomainResponse.cpp | 78 ++ .../v2/model/DeleteDomainV2RequestBody.cpp | 78 ++ aad/src/v2/model/DetailInfo.cpp | 78 ++ aad/src/v2/model/EmptyJsonResponse.cpp | 44 + aad/src/v2/model/FlowBps.cpp | 149 ++++ aad/src/v2/model/FlowPps.cpp | 149 ++++ aad/src/v2/model/FrequencyControlRule.cpp | 671 ++++++++++++++ aad/src/v2/model/InstanceDomainItem.cpp | 428 +++++++++ aad/src/v2/model/Ips.cpp | 254 ++++++ aad/src/v2/model/ListConnectionNumberData.cpp | 113 +++ .../v2/model/ListConnectionNumberDataList.cpp | 114 +++ .../v2/model/ListDDoSAttackEventRequest.cpp | 113 +++ .../model/ListDDoSAttackEventRequestBody.cpp | 324 +++++++ .../v2/model/ListDDoSAttackEventResponse.cpp | 113 +++ .../model/ListDDoSConnectionNumberRequest.cpp | 184 ++++ .../ListDDoSConnectionNumberResponse.cpp | 78 ++ aad/src/v2/model/ListDDoSEventData.cpp | 429 +++++++++ aad/src/v2/model/ListDDoSFlowRequest.cpp | 219 +++++ aad/src/v2/model/ListDDoSFlowResponse.cpp | 112 +++ .../model/ListFrequencyControlRuleRequest.cpp | 79 ++ .../ListFrequencyControlRuleResponse.cpp | 113 +++ .../v2/model/ListInstanceDomainsRequest.cpp | 79 ++ .../v2/model/ListInstanceDomainsResponse.cpp | 148 ++++ .../v2/model/ListWafAttackEventRequest.cpp | 324 +++++++ .../v2/model/ListWafAttackEventResponse.cpp | 113 +++ aad/src/v2/model/ListWafAttackEventlist.cpp | 323 +++++++ aad/src/v2/model/ListWafBandwidthRequest.cpp | 254 ++++++ aad/src/v2/model/ListWafBandwidthResponse.cpp | 78 ++ aad/src/v2/model/ListWafCustomRuleRequest.cpp | 114 +++ .../v2/model/ListWafCustomRuleResponse.cpp | 113 +++ aad/src/v2/model/ListWafGeoIpRuleRequest.cpp | 114 +++ aad/src/v2/model/ListWafGeoIpRuleResponse.cpp | 113 +++ aad/src/v2/model/ListWafQpsRequest.cpp | 254 ++++++ aad/src/v2/model/ListWafQpsResponse.cpp | 78 ++ .../v2/model/ListWafWhiteIpRuleRequest.cpp | 114 +++ .../v2/model/ListWafWhiteIpRuleResponse.cpp | 147 ++++ .../v2/model/ListWhiteBlackIpRuleRequest.cpp | 114 +++ .../v2/model/ListWhiteBlackIpRuleResponse.cpp | 113 +++ aad/src/v2/model/PageRespInfo.cpp | 114 +++ aad/src/v2/model/Point.cpp | 254 ++++++ .../v2/model/ShowDomainCertificateRequest.cpp | 79 ++ .../model/ShowDomainCertificateResponse.cpp | 148 ++++ aad/src/v2/model/ShowFlowBlockRequest.cpp | 79 ++ aad/src/v2/model/ShowFlowBlockResponse.cpp | 113 +++ aad/src/v2/model/ShowWafPolicyRequest.cpp | 114 +++ aad/src/v2/model/ShowWafPolicyResponse.cpp | 218 +++++ aad/src/v2/model/ShowWafQpsRequest.cpp | 219 +++++ aad/src/v2/model/ShowWafQpsResponse.cpp | 79 ++ aad/src/v2/model/TagCondition.cpp | 113 +++ aad/src/v2/model/UpgradeInstanceData.cpp | 219 +++++ .../v2/model/UpgradeInstanceSpecRequest.cpp | 78 ++ .../v2/model/UpgradeInstanceSpecResponse.cpp | 79 ++ .../UpgradeInstanceSpecV2RequestBody.cpp | 113 +++ aad/src/v2/model/WafCustomCondition.cpp | 183 ++++ aad/src/v2/model/WafCustomRule.cpp | 392 +++++++++ aad/src/v2/model/WafCustomRuleAction.cpp | 79 ++ aad/src/v2/model/WafGeoIpRule.cpp | 254 ++++++ aad/src/v2/model/WafPolicyOptions.cpp | 219 +++++ .../huaweicloud/drs/v3/model/QueryJobResp.h | 8 +- drs/include/huaweicloud/drs/v5/DrsClient.h | 137 ++- drs/include/huaweicloud/drs/v5/DrsMeta.h | 12 + .../huaweicloud/drs/v5/model/BackupFileInfo.h | 97 +++ .../huaweicloud/drs/v5/model/BackupFileResp.h | 86 ++ .../huaweicloud/drs/v5/model/BackupInfo.h | 88 ++ .../huaweicloud/drs/v5/model/BackupInfoResp.h | 88 ++ .../drs/v5/model/BackupJobBaseInfo.h | 110 +++ .../drs/v5/model/BackupJobEndpointInfo.h | 86 ++ .../drs/v5/model/BackupRestoreOptionInfo.h | 143 +++ .../drs/v5/model/ChangeToPeriodRequest.h | 94 ++ .../drs/v5/model/ChangeToPeriodResponse.h | 67 ++ .../drs/v5/model/CheckDataFilterResponse.h | 2 +- .../drs/v5/model/CleanAlarmsRequest.h | 93 ++ .../drs/v5/model/CleanAlarmsResponse.h | 67 ++ .../drs/v5/model/CollectColumnsResponse.h | 2 +- .../v5/model/CollectDbObjectsAsyncResponse.h | 2 +- .../v5/model/CollectDbObjectsInfoResponse.h | 2 +- .../v5/model/CollectPositionAsyncResponse.h | 2 +- .../drs/v5/model/ConnectionConfig.h | 64 ++ .../huaweicloud/drs/v5/model/ConnectionResp.h | 167 ++++ .../drs/v5/model/CreateConnectionReq.h | 157 ++++ .../drs/v5/model/CreateConnectionRequest.h | 83 ++ .../drs/v5/model/CreateConnectionResponse.h | 170 ++++ .../drs/v5/model/CreateOfflineTaskReq.h | 100 +++ .../v5/model/CreateReplicationJobRequest.h | 83 ++ .../v5/model/CreateReplicationJobResponse.h | 67 ++ .../huaweicloud/drs/v5/model/DdlAlarmResp.h | 141 +++ .../drs/v5/model/DeleteConnectionRequest.h | 82 ++ .../drs/v5/model/DeleteConnectionResponse.h | 67 ++ .../v5/model/DeleteReplicationJobRequest.h | 82 ++ .../v5/model/DeleteReplicationJobResponse.h | 67 ++ .../drs/v5/model/ListConnectionsRequest.h | 214 +++++ .../drs/v5/model/ListConnectionsResponse.h | 79 ++ .../drs/v5/model/ListJobDdlsRequest.h | 137 +++ .../drs/v5/model/ListJobDdlsResponse.h | 79 ++ .../drs/v5/model/ListReplicationJobsRequest.h | 204 +++++ .../v5/model/ListReplicationJobsResponse.h | 79 ++ .../drs/v5/model/ModifyConnectionRequest.h | 94 ++ .../drs/v5/model/ModifyConnectionResponse.h | 67 ++ .../drs/v5/model/ModifyOfflineTaskReq.h | 75 ++ .../drs/v5/model/OfflineTaskInfo.h | 152 ++++ .../huaweicloud/drs/v5/model/ResourceTag.h | 2 +- .../ShowDataProcessingRulesResultResponse.h | 2 +- .../drs/v5/model/ShowReplicationJobRequest.h | 82 ++ .../drs/v5/model/ShowReplicationJobResponse.h | 181 ++++ .../ShowUpdateObjectSavingStatusResponse.h | 2 +- .../huaweicloud/drs/v5/model/ToPeriodReq.h | 97 +++ .../drs/v5/model/UpdateConnectionReq.h | 157 ++++ .../drs/v5/model/UpdateDataProgressResponse.h | 2 +- .../v5/model/UpdateReplicationJobRequest.h | 94 ++ .../v5/model/UpdateReplicationJobResponse.h | 67 ++ drs/src/v3/model/QueryJobResp.cpp | 8 +- drs/src/v5/DrsClient.cpp | 543 ++++++++++++ drs/src/v5/DrsMeta.cpp | 230 +++++ drs/src/v5/model/BackupFileInfo.cpp | 184 ++++ drs/src/v5/model/BackupFileResp.cpp | 149 ++++ drs/src/v5/model/BackupInfo.cpp | 148 ++++ drs/src/v5/model/BackupInfoResp.cpp | 148 ++++ drs/src/v5/model/BackupJobBaseInfo.cpp | 218 +++++ drs/src/v5/model/BackupJobEndpointInfo.cpp | 149 ++++ drs/src/v5/model/BackupRestoreOptionInfo.cpp | 322 +++++++ drs/src/v5/model/ChangeToPeriodRequest.cpp | 148 ++++ drs/src/v5/model/ChangeToPeriodResponse.cpp | 79 ++ drs/src/v5/model/CleanAlarmsRequest.cpp | 149 ++++ drs/src/v5/model/CleanAlarmsResponse.cpp | 78 ++ drs/src/v5/model/ConnectionConfig.cpp | 79 ++ drs/src/v5/model/ConnectionResp.cpp | 390 +++++++++ drs/src/v5/model/CreateConnectionReq.cpp | 354 ++++++++ drs/src/v5/model/CreateConnectionRequest.cpp | 113 +++ drs/src/v5/model/CreateConnectionResponse.cpp | 390 +++++++++ drs/src/v5/model/CreateOfflineTaskReq.cpp | 180 ++++ .../v5/model/CreateReplicationJobRequest.cpp | 113 +++ .../v5/model/CreateReplicationJobResponse.cpp | 79 ++ drs/src/v5/model/DdlAlarmResp.cpp | 324 +++++++ drs/src/v5/model/DeleteConnectionRequest.cpp | 114 +++ drs/src/v5/model/DeleteConnectionResponse.cpp | 78 ++ .../v5/model/DeleteReplicationJobRequest.cpp | 114 +++ .../v5/model/DeleteReplicationJobResponse.cpp | 78 ++ drs/src/v5/model/ListConnectionsRequest.cpp | 534 ++++++++++++ drs/src/v5/model/ListConnectionsResponse.cpp | 113 +++ drs/src/v5/model/ListJobDdlsRequest.cpp | 289 ++++++ drs/src/v5/model/ListJobDdlsResponse.cpp | 113 +++ .../v5/model/ListReplicationJobsRequest.cpp | 498 +++++++++++ .../v5/model/ListReplicationJobsResponse.cpp | 113 +++ drs/src/v5/model/ModifyConnectionRequest.cpp | 148 ++++ drs/src/v5/model/ModifyConnectionResponse.cpp | 78 ++ drs/src/v5/model/ModifyOfflineTaskReq.cpp | 114 +++ drs/src/v5/model/OfflineTaskInfo.cpp | 359 ++++++++ .../v5/model/ShowReplicationJobRequest.cpp | 114 +++ .../v5/model/ShowReplicationJobResponse.cpp | 425 +++++++++ drs/src/v5/model/ToPeriodReq.cpp | 184 ++++ drs/src/v5/model/UpdateConnectionReq.cpp | 354 ++++++++ .../v5/model/UpdateReplicationJobRequest.cpp | 148 ++++ .../v5/model/UpdateReplicationJobResponse.cpp | 78 ++ .../evs/v2/model/ListVolumesRequest.h | 11 - .../huaweicloud/evs/v2/model/VolumeDetail.h | 11 - evs/src/v2/EvsClient.cpp | 3 - evs/src/v2/EvsMeta.cpp | 3 - evs/src/v2/model/ListVolumesRequest.cpp | 35 - evs/src/v2/model/VolumeDetail.cpp | 35 - .../v3/model/CheckStarrocksParamsResponse.h | 12 +- .../gaussdb/v3/model/StarRocksCreateRequest.h | 11 + .../v3/model/CheckStarrocksParamsResponse.cpp | 30 +- .../src/v3/model/StarRocksCreateRequest.cpp | 35 + .../v3/model/DeleteManualBackupResponse.h | 23 + .../v3/model/DeleteManualBackupResponse.cpp | 70 ++ .../kvs/v1/model/CreateTableRequestBody.h | 23 + .../kvs/v1/model/CreateTableResponse.h | 23 + .../kvs/v1/model/Global_secondary_index.h | 14 +- .../kvs/v1/model/Pre_split_key_options.h | 15 +- .../kvs/v1/model/Provisioned_throughput.h | 77 ++ kvs/src/v1/model/CreateTableRequestBody.cpp | 69 ++ kvs/src/v1/model/CreateTableResponse.cpp | 69 ++ kvs/src/v1/model/Global_secondary_index.cpp | 34 + kvs/src/v1/model/Pre_split_key_options.cpp | 35 - kvs/src/v1/model/Provisioned_throughput.cpp | 120 +++ rds/include/huaweicloud/rds/v3/RdsClient.h | 21 + rds/include/huaweicloud/rds/v3/RdsMeta.h | 2 + rds/include/huaweicloud/rds/v3/RdsRegion.h | 8 + .../v3/model/ShowRecoveryTimeWindowRequest.h | 82 ++ .../v3/model/ShowRecoveryTimeWindowResponse.h | 78 ++ .../huaweicloud/rds/v3/model/ToPeriodReq.h | 97 +++ .../rds/v3/model/UpdateToPeriodRequest.h | 94 ++ .../rds/v3/model/UpdateToPeriodResponse.h | 67 ++ rds/src/v3/RdsClient.cpp | 78 ++ rds/src/v3/RdsMeta.cpp | 24 + .../model/ShowRecoveryTimeWindowRequest.cpp | 114 +++ .../model/ShowRecoveryTimeWindowResponse.cpp | 114 +++ rds/src/v3/model/ToPeriodReq.cpp | 184 ++++ rds/src/v3/model/UpdateToPeriodRequest.cpp | 148 ++++ rds/src/v3/model/UpdateToPeriodResponse.cpp | 79 ++ 295 files changed, 35392 insertions(+), 190 deletions(-) create mode 100644 aad/include/huaweicloud/aad/v1/model/AssociateIpToPolicyAndPackageRequest.h create mode 100644 aad/include/huaweicloud/aad/v1/model/AssociateIpToPolicyAndPackageResponse.h create mode 100644 aad/include/huaweicloud/aad/v1/model/DisassociateIpFromPolicyAndPackageRequest.h create mode 100644 aad/include/huaweicloud/aad/v1/model/DisassociateIpFromPolicyAndPackageResponse.h create mode 100644 aad/include/huaweicloud/aad/v1/model/IpBindingV3Body.h create mode 100644 aad/include/huaweicloud/aad/v2/AadClient.h create mode 100644 aad/include/huaweicloud/aad/v2/AadExport.h create mode 100644 aad/include/huaweicloud/aad/v2/AadMeta.h create mode 100644 aad/include/huaweicloud/aad/v2/AadRegion.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ActionInfo.h create mode 100644 aad/include/huaweicloud/aad/v2/model/Backend.h create mode 100644 aad/include/huaweicloud/aad/v2/model/BlackWhiteListRule.h create mode 100644 aad/include/huaweicloud/aad/v2/model/BwListIps.h create mode 100644 aad/include/huaweicloud/aad/v2/model/CertInfo.h create mode 100644 aad/include/huaweicloud/aad/v2/model/Condition.h create mode 100644 aad/include/huaweicloud/aad/v2/model/CreateAadDomainRequestBody.h create mode 100644 aad/include/huaweicloud/aad/v2/model/CreateDomainRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/CreateDomainResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/Curve.h create mode 100644 aad/include/huaweicloud/aad/v2/model/DeleteDomainRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/DeleteDomainResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/DeleteDomainV2RequestBody.h create mode 100644 aad/include/huaweicloud/aad/v2/model/DetailInfo.h create mode 100644 aad/include/huaweicloud/aad/v2/model/EmptyJsonResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/FlowBps.h create mode 100644 aad/include/huaweicloud/aad/v2/model/FlowPps.h create mode 100644 aad/include/huaweicloud/aad/v2/model/FrequencyControlRule.h create mode 100644 aad/include/huaweicloud/aad/v2/model/InstanceDomainItem.h create mode 100644 aad/include/huaweicloud/aad/v2/model/Ips.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListConnectionNumberData.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListConnectionNumberDataList.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListDDoSAttackEventRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListDDoSAttackEventRequestBody.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListDDoSAttackEventResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListDDoSConnectionNumberRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListDDoSConnectionNumberResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListDDoSEventData.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListDDoSFlowRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListDDoSFlowResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListFrequencyControlRuleRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListFrequencyControlRuleResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListInstanceDomainsRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListInstanceDomainsResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListWafAttackEventRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListWafAttackEventResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListWafAttackEventlist.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListWafBandwidthRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListWafBandwidthResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListWafCustomRuleRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListWafCustomRuleResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListWafGeoIpRuleRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListWafGeoIpRuleResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListWafQpsRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListWafQpsResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListWafWhiteIpRuleRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListWafWhiteIpRuleResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListWhiteBlackIpRuleRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ListWhiteBlackIpRuleResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/PageRespInfo.h create mode 100644 aad/include/huaweicloud/aad/v2/model/Point.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ShowDomainCertificateRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ShowDomainCertificateResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ShowFlowBlockRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ShowFlowBlockResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ShowWafPolicyRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ShowWafPolicyResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ShowWafQpsRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/ShowWafQpsResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/TagCondition.h create mode 100644 aad/include/huaweicloud/aad/v2/model/UpgradeInstanceData.h create mode 100644 aad/include/huaweicloud/aad/v2/model/UpgradeInstanceSpecRequest.h create mode 100644 aad/include/huaweicloud/aad/v2/model/UpgradeInstanceSpecResponse.h create mode 100644 aad/include/huaweicloud/aad/v2/model/UpgradeInstanceSpecV2RequestBody.h create mode 100644 aad/include/huaweicloud/aad/v2/model/WafCustomCondition.h create mode 100644 aad/include/huaweicloud/aad/v2/model/WafCustomRule.h create mode 100644 aad/include/huaweicloud/aad/v2/model/WafCustomRuleAction.h create mode 100644 aad/include/huaweicloud/aad/v2/model/WafGeoIpRule.h create mode 100644 aad/include/huaweicloud/aad/v2/model/WafPolicyOptions.h create mode 100644 aad/src/v1/model/AssociateIpToPolicyAndPackageRequest.cpp create mode 100644 aad/src/v1/model/AssociateIpToPolicyAndPackageResponse.cpp create mode 100644 aad/src/v1/model/DisassociateIpFromPolicyAndPackageRequest.cpp create mode 100644 aad/src/v1/model/DisassociateIpFromPolicyAndPackageResponse.cpp create mode 100644 aad/src/v1/model/IpBindingV3Body.cpp create mode 100644 aad/src/v2/AadClient.cpp create mode 100644 aad/src/v2/AadMeta.cpp create mode 100644 aad/src/v2/AadRegion.cpp create mode 100644 aad/src/v2/CMakeLists.txt create mode 100644 aad/src/v2/model/ActionInfo.cpp create mode 100644 aad/src/v2/model/Backend.cpp create mode 100644 aad/src/v2/model/BlackWhiteListRule.cpp create mode 100644 aad/src/v2/model/BwListIps.cpp create mode 100644 aad/src/v2/model/CertInfo.cpp create mode 100644 aad/src/v2/model/Condition.cpp create mode 100644 aad/src/v2/model/CreateAadDomainRequestBody.cpp create mode 100644 aad/src/v2/model/CreateDomainRequest.cpp create mode 100644 aad/src/v2/model/CreateDomainResponse.cpp create mode 100644 aad/src/v2/model/Curve.cpp create mode 100644 aad/src/v2/model/DeleteDomainRequest.cpp create mode 100644 aad/src/v2/model/DeleteDomainResponse.cpp create mode 100644 aad/src/v2/model/DeleteDomainV2RequestBody.cpp create mode 100644 aad/src/v2/model/DetailInfo.cpp create mode 100644 aad/src/v2/model/EmptyJsonResponse.cpp create mode 100644 aad/src/v2/model/FlowBps.cpp create mode 100644 aad/src/v2/model/FlowPps.cpp create mode 100644 aad/src/v2/model/FrequencyControlRule.cpp create mode 100644 aad/src/v2/model/InstanceDomainItem.cpp create mode 100644 aad/src/v2/model/Ips.cpp create mode 100644 aad/src/v2/model/ListConnectionNumberData.cpp create mode 100644 aad/src/v2/model/ListConnectionNumberDataList.cpp create mode 100644 aad/src/v2/model/ListDDoSAttackEventRequest.cpp create mode 100644 aad/src/v2/model/ListDDoSAttackEventRequestBody.cpp create mode 100644 aad/src/v2/model/ListDDoSAttackEventResponse.cpp create mode 100644 aad/src/v2/model/ListDDoSConnectionNumberRequest.cpp create mode 100644 aad/src/v2/model/ListDDoSConnectionNumberResponse.cpp create mode 100644 aad/src/v2/model/ListDDoSEventData.cpp create mode 100644 aad/src/v2/model/ListDDoSFlowRequest.cpp create mode 100644 aad/src/v2/model/ListDDoSFlowResponse.cpp create mode 100644 aad/src/v2/model/ListFrequencyControlRuleRequest.cpp create mode 100644 aad/src/v2/model/ListFrequencyControlRuleResponse.cpp create mode 100644 aad/src/v2/model/ListInstanceDomainsRequest.cpp create mode 100644 aad/src/v2/model/ListInstanceDomainsResponse.cpp create mode 100644 aad/src/v2/model/ListWafAttackEventRequest.cpp create mode 100644 aad/src/v2/model/ListWafAttackEventResponse.cpp create mode 100644 aad/src/v2/model/ListWafAttackEventlist.cpp create mode 100644 aad/src/v2/model/ListWafBandwidthRequest.cpp create mode 100644 aad/src/v2/model/ListWafBandwidthResponse.cpp create mode 100644 aad/src/v2/model/ListWafCustomRuleRequest.cpp create mode 100644 aad/src/v2/model/ListWafCustomRuleResponse.cpp create mode 100644 aad/src/v2/model/ListWafGeoIpRuleRequest.cpp create mode 100644 aad/src/v2/model/ListWafGeoIpRuleResponse.cpp create mode 100644 aad/src/v2/model/ListWafQpsRequest.cpp create mode 100644 aad/src/v2/model/ListWafQpsResponse.cpp create mode 100644 aad/src/v2/model/ListWafWhiteIpRuleRequest.cpp create mode 100644 aad/src/v2/model/ListWafWhiteIpRuleResponse.cpp create mode 100644 aad/src/v2/model/ListWhiteBlackIpRuleRequest.cpp create mode 100644 aad/src/v2/model/ListWhiteBlackIpRuleResponse.cpp create mode 100644 aad/src/v2/model/PageRespInfo.cpp create mode 100644 aad/src/v2/model/Point.cpp create mode 100644 aad/src/v2/model/ShowDomainCertificateRequest.cpp create mode 100644 aad/src/v2/model/ShowDomainCertificateResponse.cpp create mode 100644 aad/src/v2/model/ShowFlowBlockRequest.cpp create mode 100644 aad/src/v2/model/ShowFlowBlockResponse.cpp create mode 100644 aad/src/v2/model/ShowWafPolicyRequest.cpp create mode 100644 aad/src/v2/model/ShowWafPolicyResponse.cpp create mode 100644 aad/src/v2/model/ShowWafQpsRequest.cpp create mode 100644 aad/src/v2/model/ShowWafQpsResponse.cpp create mode 100644 aad/src/v2/model/TagCondition.cpp create mode 100644 aad/src/v2/model/UpgradeInstanceData.cpp create mode 100644 aad/src/v2/model/UpgradeInstanceSpecRequest.cpp create mode 100644 aad/src/v2/model/UpgradeInstanceSpecResponse.cpp create mode 100644 aad/src/v2/model/UpgradeInstanceSpecV2RequestBody.cpp create mode 100644 aad/src/v2/model/WafCustomCondition.cpp create mode 100644 aad/src/v2/model/WafCustomRule.cpp create mode 100644 aad/src/v2/model/WafCustomRuleAction.cpp create mode 100644 aad/src/v2/model/WafGeoIpRule.cpp create mode 100644 aad/src/v2/model/WafPolicyOptions.cpp create mode 100644 drs/include/huaweicloud/drs/v5/model/BackupFileInfo.h create mode 100644 drs/include/huaweicloud/drs/v5/model/BackupFileResp.h create mode 100644 drs/include/huaweicloud/drs/v5/model/BackupInfo.h create mode 100644 drs/include/huaweicloud/drs/v5/model/BackupInfoResp.h create mode 100644 drs/include/huaweicloud/drs/v5/model/BackupJobBaseInfo.h create mode 100644 drs/include/huaweicloud/drs/v5/model/BackupJobEndpointInfo.h create mode 100644 drs/include/huaweicloud/drs/v5/model/BackupRestoreOptionInfo.h create mode 100644 drs/include/huaweicloud/drs/v5/model/ChangeToPeriodRequest.h create mode 100644 drs/include/huaweicloud/drs/v5/model/ChangeToPeriodResponse.h create mode 100644 drs/include/huaweicloud/drs/v5/model/CleanAlarmsRequest.h create mode 100644 drs/include/huaweicloud/drs/v5/model/CleanAlarmsResponse.h create mode 100644 drs/include/huaweicloud/drs/v5/model/ConnectionConfig.h create mode 100644 drs/include/huaweicloud/drs/v5/model/ConnectionResp.h create mode 100644 drs/include/huaweicloud/drs/v5/model/CreateConnectionReq.h create mode 100644 drs/include/huaweicloud/drs/v5/model/CreateConnectionRequest.h create mode 100644 drs/include/huaweicloud/drs/v5/model/CreateConnectionResponse.h create mode 100644 drs/include/huaweicloud/drs/v5/model/CreateOfflineTaskReq.h create mode 100644 drs/include/huaweicloud/drs/v5/model/CreateReplicationJobRequest.h create mode 100644 drs/include/huaweicloud/drs/v5/model/CreateReplicationJobResponse.h create mode 100644 drs/include/huaweicloud/drs/v5/model/DdlAlarmResp.h create mode 100644 drs/include/huaweicloud/drs/v5/model/DeleteConnectionRequest.h create mode 100644 drs/include/huaweicloud/drs/v5/model/DeleteConnectionResponse.h create mode 100644 drs/include/huaweicloud/drs/v5/model/DeleteReplicationJobRequest.h create mode 100644 drs/include/huaweicloud/drs/v5/model/DeleteReplicationJobResponse.h create mode 100644 drs/include/huaweicloud/drs/v5/model/ListConnectionsRequest.h create mode 100644 drs/include/huaweicloud/drs/v5/model/ListConnectionsResponse.h create mode 100644 drs/include/huaweicloud/drs/v5/model/ListJobDdlsRequest.h create mode 100644 drs/include/huaweicloud/drs/v5/model/ListJobDdlsResponse.h create mode 100644 drs/include/huaweicloud/drs/v5/model/ListReplicationJobsRequest.h create mode 100644 drs/include/huaweicloud/drs/v5/model/ListReplicationJobsResponse.h create mode 100644 drs/include/huaweicloud/drs/v5/model/ModifyConnectionRequest.h create mode 100644 drs/include/huaweicloud/drs/v5/model/ModifyConnectionResponse.h create mode 100644 drs/include/huaweicloud/drs/v5/model/ModifyOfflineTaskReq.h create mode 100644 drs/include/huaweicloud/drs/v5/model/OfflineTaskInfo.h create mode 100644 drs/include/huaweicloud/drs/v5/model/ShowReplicationJobRequest.h create mode 100644 drs/include/huaweicloud/drs/v5/model/ShowReplicationJobResponse.h create mode 100644 drs/include/huaweicloud/drs/v5/model/ToPeriodReq.h create mode 100644 drs/include/huaweicloud/drs/v5/model/UpdateConnectionReq.h create mode 100644 drs/include/huaweicloud/drs/v5/model/UpdateReplicationJobRequest.h create mode 100644 drs/include/huaweicloud/drs/v5/model/UpdateReplicationJobResponse.h create mode 100644 drs/src/v5/model/BackupFileInfo.cpp create mode 100644 drs/src/v5/model/BackupFileResp.cpp create mode 100644 drs/src/v5/model/BackupInfo.cpp create mode 100644 drs/src/v5/model/BackupInfoResp.cpp create mode 100644 drs/src/v5/model/BackupJobBaseInfo.cpp create mode 100644 drs/src/v5/model/BackupJobEndpointInfo.cpp create mode 100644 drs/src/v5/model/BackupRestoreOptionInfo.cpp create mode 100644 drs/src/v5/model/ChangeToPeriodRequest.cpp create mode 100644 drs/src/v5/model/ChangeToPeriodResponse.cpp create mode 100644 drs/src/v5/model/CleanAlarmsRequest.cpp create mode 100644 drs/src/v5/model/CleanAlarmsResponse.cpp create mode 100644 drs/src/v5/model/ConnectionConfig.cpp create mode 100644 drs/src/v5/model/ConnectionResp.cpp create mode 100644 drs/src/v5/model/CreateConnectionReq.cpp create mode 100644 drs/src/v5/model/CreateConnectionRequest.cpp create mode 100644 drs/src/v5/model/CreateConnectionResponse.cpp create mode 100644 drs/src/v5/model/CreateOfflineTaskReq.cpp create mode 100644 drs/src/v5/model/CreateReplicationJobRequest.cpp create mode 100644 drs/src/v5/model/CreateReplicationJobResponse.cpp create mode 100644 drs/src/v5/model/DdlAlarmResp.cpp create mode 100644 drs/src/v5/model/DeleteConnectionRequest.cpp create mode 100644 drs/src/v5/model/DeleteConnectionResponse.cpp create mode 100644 drs/src/v5/model/DeleteReplicationJobRequest.cpp create mode 100644 drs/src/v5/model/DeleteReplicationJobResponse.cpp create mode 100644 drs/src/v5/model/ListConnectionsRequest.cpp create mode 100644 drs/src/v5/model/ListConnectionsResponse.cpp create mode 100644 drs/src/v5/model/ListJobDdlsRequest.cpp create mode 100644 drs/src/v5/model/ListJobDdlsResponse.cpp create mode 100644 drs/src/v5/model/ListReplicationJobsRequest.cpp create mode 100644 drs/src/v5/model/ListReplicationJobsResponse.cpp create mode 100644 drs/src/v5/model/ModifyConnectionRequest.cpp create mode 100644 drs/src/v5/model/ModifyConnectionResponse.cpp create mode 100644 drs/src/v5/model/ModifyOfflineTaskReq.cpp create mode 100644 drs/src/v5/model/OfflineTaskInfo.cpp create mode 100644 drs/src/v5/model/ShowReplicationJobRequest.cpp create mode 100644 drs/src/v5/model/ShowReplicationJobResponse.cpp create mode 100644 drs/src/v5/model/ToPeriodReq.cpp create mode 100644 drs/src/v5/model/UpdateConnectionReq.cpp create mode 100644 drs/src/v5/model/UpdateReplicationJobRequest.cpp create mode 100644 drs/src/v5/model/UpdateReplicationJobResponse.cpp create mode 100644 kvs/include/huaweicloud/kvs/v1/model/Provisioned_throughput.h create mode 100644 kvs/src/v1/model/Provisioned_throughput.cpp create mode 100644 rds/include/huaweicloud/rds/v3/model/ShowRecoveryTimeWindowRequest.h create mode 100644 rds/include/huaweicloud/rds/v3/model/ShowRecoveryTimeWindowResponse.h create mode 100644 rds/include/huaweicloud/rds/v3/model/ToPeriodReq.h create mode 100644 rds/include/huaweicloud/rds/v3/model/UpdateToPeriodRequest.h create mode 100644 rds/include/huaweicloud/rds/v3/model/UpdateToPeriodResponse.h create mode 100644 rds/src/v3/model/ShowRecoveryTimeWindowRequest.cpp create mode 100644 rds/src/v3/model/ShowRecoveryTimeWindowResponse.cpp create mode 100644 rds/src/v3/model/ToPeriodReq.cpp create mode 100644 rds/src/v3/model/UpdateToPeriodRequest.cpp create mode 100644 rds/src/v3/model/UpdateToPeriodResponse.cpp diff --git a/CHANGELOG.md b/CHANGELOG.md index 85df79637..16ef57001 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,122 @@ +# 3.1.105 2024-10-10 + +### HuaweiCloud SDK AAD + +- _API Version_ + - V1 +- _Features_ + - Support the APIs `AssociateIpToPolicyAndPackage`, `DisassociateIpFromPolicyAndPackage` +- _Bug Fix_ + - None +- _Change_ + - None + +### HuaweiCloud SDK DRS + +- _API Version_ + - V3 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **BatchListJobDetails** + - changes of response param + - `* results.node_num: string -> int32` + +### HuaweiCloud SDK DRS + +- _API Version_ + - V5 +- _Features_ + - Support the following APIs: + - `ListReplicationJobs` + - `CreateReplicationJob` + - `ShowReplicationJob` + - `UpdateReplicationJob` + - `DeleteReplicationJob` + - `ChangeToPeriod` + - `ListConnections` + - `CreateConnection` + - `ModifyConnection` + - `DeleteConnection` + - `ListJobDdls` + - `CleanAlarms` +- _Bug Fix_ + - None +- _Change_ + - None + +### HuaweiCloud SDK EVS + +- _API Version_ + - V2 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ShowVolume** + - changes of response param + - `- volume.snapshot_policy_id` + - **ListVolumes** + - changes of request param + - `- snapshot_policy_id` + - changes of response param + - `- volumes.snapshot_policy_id` + +### HuaweiCloud SDK GaussDB + +- _API Version_ + - V3 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **CreateStarrocksInstance** + - changes of request param + - `+ security_group_id` + - **CheckStarrocksParams** + - changes of response param + - `+ differences` + - `- check_starrocks_params_responce` + +### HuaweiCloud SDK KVS + +- _API Version_ + - V1 +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **CreateTable** + - changes of request param + - `+ bill_mode` + - `+ provisioned_throughput` + - `+ global_secondary_index_schema.provisioned_throughput` + - `- pre_split_key_options.hash_count` + - changes of response param + - `+ bill_mode` + - `+ provisioned_throughput` + - `+ global_secondary_index_schema.provisioned_throughput` + - `- pre_split_key_options.hash_count` + - **DescribeTable** + - changes of response param + - `+ global_secondary_index_schema.provisioned_throughput` + +### HuaweiCloud SDK RDS + +- _API Version_ + - V3 +- _Features_ + - Support the APIs `ShowRecoveryTimeWindow`, `UpdateToPeriod` +- _Bug Fix_ + - None +- _Change_ + - None + # 3.1.104 2024-09-26 ### HuaweiCloud SDK DDS diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index aa6075a8f..49c530336 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,3 +1,122 @@ +# 3.1.105 2024-10-10 + +### HuaweiCloud SDK AAD + +- _接口版本_ + - V1 +- _新增特性_ + - 支持接口`AssociateIpToPolicyAndPackage`、`DisassociateIpFromPolicyAndPackage` +- _解决问题_ + - 无 +- _特性变更_ + - 无 + +### HuaweiCloud SDK DRS + +- _接口版本_ + - V3 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **BatchListJobDetails** + - 响应参数变更 + - `* results.node_num: string -> int32` + +### HuaweiCloud SDK DRS + +- _接口版本_ + - V5 +- _新增特性_ + - 支持以下接口: + - `ListReplicationJobs` + - `CreateReplicationJob` + - `ShowReplicationJob` + - `UpdateReplicationJob` + - `DeleteReplicationJob` + - `ChangeToPeriod` + - `ListConnections` + - `CreateConnection` + - `ModifyConnection` + - `DeleteConnection` + - `ListJobDdls` + - `CleanAlarms` +- _解决问题_ + - 无 +- _特性变更_ + - 无 + +### HuaweiCloud SDK EVS + +- _接口版本_ + - V2 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ShowVolume** + - 响应参数变更 + - `- volume.snapshot_policy_id` + - **ListVolumes** + - 请求参数变更 + - `- snapshot_policy_id` + - 响应参数变更 + - `- volumes.snapshot_policy_id` + +### HuaweiCloud SDK GaussDB + +- _接口版本_ + - V3 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **CreateStarrocksInstance** + - 请求参数变更 + - `+ security_group_id` + - **CheckStarrocksParams** + - 响应参数变更 + - `+ differences` + - `- check_starrocks_params_responce` + +### HuaweiCloud SDK KVS + +- _接口版本_ + - V1 +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **CreateTable** + - 请求参数变更 + - `+ bill_mode` + - `+ provisioned_throughput` + - `+ global_secondary_index_schema.provisioned_throughput` + - `- pre_split_key_options.hash_count` + - 响应参数变更 + - `+ bill_mode` + - `+ provisioned_throughput` + - `+ global_secondary_index_schema.provisioned_throughput` + - `- pre_split_key_options.hash_count` + - **DescribeTable** + - 响应参数变更 + - `+ global_secondary_index_schema.provisioned_throughput` + +### HuaweiCloud SDK RDS + +- _接口版本_ + - V3 +- _新增特性_ + - 支持接口`ShowRecoveryTimeWindow`、`UpdateToPeriod` +- _解决问题_ + - 无 +- _特性变更_ + - 无 + # 3.1.104 2024-09-26 ### HuaweiCloud SDK DDS diff --git a/VERSION b/VERSION index 8a79e85c0..ec4fb494a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.104 +3.1.105 diff --git a/aad/include/huaweicloud/aad/v1/AadClient.h b/aad/include/huaweicloud/aad/v1/AadClient.h index 12a657e11..7c4e65685 100644 --- a/aad/include/huaweicloud/aad/v1/AadClient.h +++ b/aad/include/huaweicloud/aad/v1/AadClient.h @@ -24,6 +24,8 @@ #include #include #include +#include +#include #include #include #include @@ -49,11 +51,14 @@ #include #include #include +#include +#include #include #include #include #include #include +#include #include #include #include @@ -192,6 +197,14 @@ class HUAWEICLOUD_AAD_V1_EXPORT AadClient : public Client std::shared_ptr associateIpToPolicy( AssociateIpToPolicyRequest &request ); + // 策略和防护包绑定防护对象 + // + // 策略和防护包绑定防护对象 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr associateIpToPolicyAndPackage( + AssociateIpToPolicyAndPackageRequest &request + ); // 批量创建高防实例IP的转发规则 // // 批量创建高防实例IP的转发规则 @@ -264,6 +277,14 @@ class HUAWEICLOUD_AAD_V1_EXPORT AadClient : public Client std::shared_ptr disassociateIpFromPolicy( DisassociateIpFromPolicyRequest &request ); + // 策略和防护包解绑防护对象 + // + // 策略和防护包解绑防护对象 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr disassociateIpFromPolicyAndPackage( + DisassociateIpFromPolicyAndPackageRequest &request + ); // 查询域名列表 // // 查询域名列表 diff --git a/aad/include/huaweicloud/aad/v1/AadMeta.h b/aad/include/huaweicloud/aad/v1/AadMeta.h index f0f57ce91..9c2439380 100644 --- a/aad/include/huaweicloud/aad/v1/AadMeta.h +++ b/aad/include/huaweicloud/aad/v1/AadMeta.h @@ -21,6 +21,7 @@ class HUAWEICLOUD_AAD_V1_EXPORT AadMeta { static HttpRequestDef genRequestDefForAddBlackWhiteIpList(); static HttpRequestDef genRequestDefForAddPolicyBlackAndWhiteIpList(); static HttpRequestDef genRequestDefForAssociateIpToPolicy(); + static HttpRequestDef genRequestDefForAssociateIpToPolicyAndPackage(); static HttpRequestDef genRequestDefForBatchCreateInstanceIpRule(); static HttpRequestDef genRequestDefForBatchDeleteInstanceIpRule(); static HttpRequestDef genRequestDefForCreateAadDomain(); @@ -30,6 +31,7 @@ class HUAWEICLOUD_AAD_V1_EXPORT AadMeta { static HttpRequestDef genRequestDefForDeletePolicy(); static HttpRequestDef genRequestDefForDeletePolicyBlackAndWhiteIpList(); static HttpRequestDef genRequestDefForDisassociateIpFromPolicy(); + static HttpRequestDef genRequestDefForDisassociateIpFromPolicyAndPackage(); static HttpRequestDef genRequestDefForListDomain(); static HttpRequestDef genRequestDefForListInstance(); static HttpRequestDef genRequestDefForListInstanceId(); diff --git a/aad/include/huaweicloud/aad/v1/model/AssociateIpToPolicyAndPackageRequest.h b/aad/include/huaweicloud/aad/v1/model/AssociateIpToPolicyAndPackageRequest.h new file mode 100644 index 000000000..9a89f16ca --- /dev/null +++ b/aad/include/huaweicloud/aad/v1/model/AssociateIpToPolicyAndPackageRequest.h @@ -0,0 +1,83 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V1_MODEL_AssociateIpToPolicyAndPackageRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V1_MODEL_AssociateIpToPolicyAndPackageRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V1_EXPORT AssociateIpToPolicyAndPackageRequest + : public ModelBase +{ +public: + AssociateIpToPolicyAndPackageRequest(); + virtual ~AssociateIpToPolicyAndPackageRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// AssociateIpToPolicyAndPackageRequest members + + /// + /// 策略id + /// + + std::string getPolicyId() const; + bool policyIdIsSet() const; + void unsetpolicyId(); + void setPolicyId(const std::string& value); + + /// + /// + /// + + IpBindingV3Body getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const IpBindingV3Body& value); + + +protected: + std::string policyId_; + bool policyIdIsSet_; + IpBindingV3Body body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + AssociateIpToPolicyAndPackageRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V1_MODEL_AssociateIpToPolicyAndPackageRequest_H_ diff --git a/aad/include/huaweicloud/aad/v1/model/AssociateIpToPolicyAndPackageResponse.h b/aad/include/huaweicloud/aad/v1/model/AssociateIpToPolicyAndPackageResponse.h new file mode 100644 index 000000000..61edbd8ba --- /dev/null +++ b/aad/include/huaweicloud/aad/v1/model/AssociateIpToPolicyAndPackageResponse.h @@ -0,0 +1,55 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V1_MODEL_AssociateIpToPolicyAndPackageResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V1_MODEL_AssociateIpToPolicyAndPackageResponse_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V1_EXPORT AssociateIpToPolicyAndPackageResponse + : public ModelBase, public HttpResponse +{ +public: + AssociateIpToPolicyAndPackageResponse(); + virtual ~AssociateIpToPolicyAndPackageResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// AssociateIpToPolicyAndPackageResponse members + + +protected: + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V1_MODEL_AssociateIpToPolicyAndPackageResponse_H_ diff --git a/aad/include/huaweicloud/aad/v1/model/DisassociateIpFromPolicyAndPackageRequest.h b/aad/include/huaweicloud/aad/v1/model/DisassociateIpFromPolicyAndPackageRequest.h new file mode 100644 index 000000000..08d1e6b0d --- /dev/null +++ b/aad/include/huaweicloud/aad/v1/model/DisassociateIpFromPolicyAndPackageRequest.h @@ -0,0 +1,83 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V1_MODEL_DisassociateIpFromPolicyAndPackageRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V1_MODEL_DisassociateIpFromPolicyAndPackageRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V1_EXPORT DisassociateIpFromPolicyAndPackageRequest + : public ModelBase +{ +public: + DisassociateIpFromPolicyAndPackageRequest(); + virtual ~DisassociateIpFromPolicyAndPackageRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DisassociateIpFromPolicyAndPackageRequest members + + /// + /// 策略id + /// + + std::string getPolicyId() const; + bool policyIdIsSet() const; + void unsetpolicyId(); + void setPolicyId(const std::string& value); + + /// + /// + /// + + IpBindingV3Body getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const IpBindingV3Body& value); + + +protected: + std::string policyId_; + bool policyIdIsSet_; + IpBindingV3Body body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + DisassociateIpFromPolicyAndPackageRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V1_MODEL_DisassociateIpFromPolicyAndPackageRequest_H_ diff --git a/aad/include/huaweicloud/aad/v1/model/DisassociateIpFromPolicyAndPackageResponse.h b/aad/include/huaweicloud/aad/v1/model/DisassociateIpFromPolicyAndPackageResponse.h new file mode 100644 index 000000000..d4de43410 --- /dev/null +++ b/aad/include/huaweicloud/aad/v1/model/DisassociateIpFromPolicyAndPackageResponse.h @@ -0,0 +1,55 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V1_MODEL_DisassociateIpFromPolicyAndPackageResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V1_MODEL_DisassociateIpFromPolicyAndPackageResponse_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V1_EXPORT DisassociateIpFromPolicyAndPackageResponse + : public ModelBase, public HttpResponse +{ +public: + DisassociateIpFromPolicyAndPackageResponse(); + virtual ~DisassociateIpFromPolicyAndPackageResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DisassociateIpFromPolicyAndPackageResponse members + + +protected: + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V1_MODEL_DisassociateIpFromPolicyAndPackageResponse_H_ diff --git a/aad/include/huaweicloud/aad/v1/model/IpBindingV3Body.h b/aad/include/huaweicloud/aad/v1/model/IpBindingV3Body.h new file mode 100644 index 000000000..133fb2e75 --- /dev/null +++ b/aad/include/huaweicloud/aad/v1/model/IpBindingV3Body.h @@ -0,0 +1,65 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V1_MODEL_IpBindingV3Body_H_ +#define HUAWEICLOUD_SDK_AAD_V1_MODEL_IpBindingV3Body_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// ip绑定请求体 +/// +class HUAWEICLOUD_AAD_V1_EXPORT IpBindingV3Body + : public ModelBase +{ +public: + IpBindingV3Body(); + virtual ~IpBindingV3Body(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// IpBindingV3Body members + + /// + /// 防护ip列表 + /// + + std::vector& getIpList(); + bool ipListIsSet() const; + void unsetipList(); + void setIpList(const std::vector& value); + + +protected: + std::vector ipList_; + bool ipListIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V1_MODEL_IpBindingV3Body_H_ diff --git a/aad/include/huaweicloud/aad/v2/AadClient.h b/aad/include/huaweicloud/aad/v2/AadClient.h new file mode 100644 index 000000000..82420eb09 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/AadClient.h @@ -0,0 +1,280 @@ +#ifndef HUAWEICLOUD_SDK_AAD_V2_AadClient_H_ +#define HUAWEICLOUD_SDK_AAD_V2_AadClient_H_ + +#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 +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#undef U +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { + +using namespace HuaweiCloud::Sdk::Core; +using namespace HuaweiCloud::Sdk::Aad::V2::Model; + +class HUAWEICLOUD_AAD_V2_EXPORT AadClient : public Client +{ +public: + + AadClient(); + + virtual ~AadClient(); + + static ClientBuilder newBuilder(); + + // 创建防护域名 + // + // 创建防护域名 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr createDomain( + CreateDomainRequest &request + ); + // 查询DDoS攻击事件列表 + // + // 查询DDoS攻击事件列表 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listDDoSAttackEvent( + ListDDoSAttackEventRequest &request + ); + // 查询新建连接数和并发连接数 + // + // 查询新建连接数和并发连接数 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listDDoSConnectionNumber( + ListDDoSConnectionNumberRequest &request + ); + // 查询DDoS攻击防护BPS/PPS流量 + // + // 查询DDoS攻击防护BPS/PPS流量 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listDDoSFlow( + ListDDoSFlowRequest &request + ); + // 查询频率控制规则列表 + // + // 查询频率控制规则列表 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listFrequencyControlRule( + ListFrequencyControlRuleRequest &request + ); + // 查询实例关联的域名信息 + // + // 查询实例关联的域名信息 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listInstanceDomains( + ListInstanceDomainsRequest &request + ); + // 查询攻击事件列表 + // + // 查询攻击事件列表 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listWafAttackEvent( + ListWafAttackEventRequest &request + ); + // 带宽曲线 + // + // 带宽曲线 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listWafBandwidth( + ListWafBandwidthRequest &request + ); + // 查询精准防护规则 + // + // 查询精准防护规则 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listWafCustomRule( + ListWafCustomRuleRequest &request + ); + // 查询区域封禁规则 + // + // 查询区域封禁规则 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listWafGeoIpRule( + ListWafGeoIpRuleRequest &request + ); + // 查询请求QPS + // + // 查询请求QPS + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listWafQps( + ListWafQpsRequest &request + ); + // 防护策略web-cc黑白名单-查询黑白名单规则 + // + // 防护策略web-cc黑白名单-查询黑白名单规则 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listWafWhiteIpRule( + ListWafWhiteIpRuleRequest &request + ); + // 查询DDoS攻击防护的黑白名单列表 + // + // 查询DDoS攻击防护的黑白名单列表 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listWhiteBlackIpRule( + ListWhiteBlackIpRuleRequest &request + ); + // 查询域名关联的证书信息 + // + // 查询域名关联的证书信息 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showDomainCertificate( + ShowDomainCertificateRequest &request + ); + // 查询流量封禁信息 + // + // 查询流量封禁信息 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showFlowBlock( + ShowFlowBlockRequest &request + ); + // 查询WEB防护策略配置 + // + // 查询WEB防护策略配置 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showWafPolicy( + ShowWafPolicyRequest &request + ); + // 查询CC攻击防护请求QPS + // + // 查询CC攻击防护请求QPS + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showWafQps( + ShowWafQpsRequest &request + ); + // 修改实例规格 + // + // 修改实例规格 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr upgradeInstanceSpec( + UpgradeInstanceSpecRequest &request + ); + + // 删除防护域名 + // + // 删除防护域名 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr deleteDomain( + DeleteDomainRequest &request + ); + + +private: +#if defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) + std::string parameterToString(utility::string_t value); +#endif + std::string parameterToString(std::string value); + std::string parameterToString(int32_t value); + std::string parameterToString(int64_t value); + std::string parameterToString(float value); + std::string parameterToString(double value); + std::string parameterToString(const Object& obj); + std::string parameterToString(const utility::datetime &value); + + template + std::string parameterToString(const std::vector &value) + { + std::stringstream ss; + for( size_t i = 0; i < value.size(); i++) + { + if (i > 0) { + ss << ", "; + } + ss << parameterToString(value[i]); + } + + return ss.str(); + } + + template + std::string parameterToString(const std::shared_ptr &value) + { + return parameterToString(*value.get()); + } + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + +} +} +} +} + +template class HUAWEICLOUD_AAD_V2_EXPORT ::HuaweiCloud::Sdk::Core::ClientBuilder<::HuaweiCloud::Sdk::Aad::V2::AadClient>; + +#endif // HUAWEICLOUD_SDK_AAD_V2_AadClient_H_ + diff --git a/aad/include/huaweicloud/aad/v2/AadExport.h b/aad/include/huaweicloud/aad/v2/AadExport.h new file mode 100644 index 000000000..955d0612a --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/AadExport.h @@ -0,0 +1,16 @@ +#ifndef HUAWEICLOUD_SDK_AAD_V2_AadExport_H_ +#define HUAWEICLOUD_SDK_AAD_V2_AadExport_H_ + +#include + +#if defined(HUAWEICLOUD_SHARED) +# if defined(HUAWEICLOUD_AAD_V2_SHARED) +# define HUAWEICLOUD_AAD_V2_EXPORT HUAWEICLOUD_EXPORT +# else +# define HUAWEICLOUD_AAD_V2_EXPORT HUAWEICLOUD_IMPORT +# endif +#else +# define HUAWEICLOUD_AAD_V2_EXPORT +#endif + +#endif // !HUAWEICLOUD_SDK_AAD_V2_AadExport_H_ \ No newline at end of file diff --git a/aad/include/huaweicloud/aad/v2/AadMeta.h b/aad/include/huaweicloud/aad/v2/AadMeta.h new file mode 100644 index 000000000..39ff0a2c7 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/AadMeta.h @@ -0,0 +1,42 @@ +#ifndef HUAWEICLOUD_SDK_AAD_V2_AadMeta_H_ +#define HUAWEICLOUD_SDK_AAD_V2_AadMeta_H_ + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { + +using namespace HuaweiCloud::Sdk::Core::Http; + +class HUAWEICLOUD_AAD_V2_EXPORT AadMeta { +public: + static HttpRequestDef genRequestDefForCreateDomain(); + static HttpRequestDef genRequestDefForListDDoSAttackEvent(); + static HttpRequestDef genRequestDefForListDDoSConnectionNumber(); + static HttpRequestDef genRequestDefForListDDoSFlow(); + static HttpRequestDef genRequestDefForListFrequencyControlRule(); + static HttpRequestDef genRequestDefForListInstanceDomains(); + static HttpRequestDef genRequestDefForListWafAttackEvent(); + static HttpRequestDef genRequestDefForListWafBandwidth(); + static HttpRequestDef genRequestDefForListWafCustomRule(); + static HttpRequestDef genRequestDefForListWafGeoIpRule(); + static HttpRequestDef genRequestDefForListWafQps(); + static HttpRequestDef genRequestDefForListWafWhiteIpRule(); + static HttpRequestDef genRequestDefForListWhiteBlackIpRule(); + static HttpRequestDef genRequestDefForShowDomainCertificate(); + static HttpRequestDef genRequestDefForShowFlowBlock(); + static HttpRequestDef genRequestDefForShowWafPolicy(); + static HttpRequestDef genRequestDefForShowWafQps(); + static HttpRequestDef genRequestDefForUpgradeInstanceSpec(); + static HttpRequestDef genRequestDefForDeleteDomain(); +}; + +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_AadMeta_H_ diff --git a/aad/include/huaweicloud/aad/v2/AadRegion.h b/aad/include/huaweicloud/aad/v2/AadRegion.h new file mode 100644 index 000000000..e1ed3ffa3 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/AadRegion.h @@ -0,0 +1,44 @@ +#ifndef HUAWEICLOUD_SDK_AAD_V2_AadRegion_H_ +#define HUAWEICLOUD_SDK_AAD_V2_AadRegion_H_ + +#include +#include +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +using namespace HuaweiCloud::Sdk::Core::Auth; + +class HUAWEICLOUD_AAD_V2_EXPORT AadRegion { +public: + AadRegion(); + virtual ~AadRegion(); + + static Region valueOf(std::string regionId); + + static std::map initRegions() { + std::map regions; + regions["cn-north-4"] = Region("cn-north-4", + { + "https://aad.myhuaweicloud.com" + }); + regions["ap-southeast-1"] = Region("ap-southeast-1", + { + "https://aad.myhuaweicloud.com" + }); + return regions; + } +private: + static std::map regions; +}; + +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_AadRegion_H_ \ No newline at end of file diff --git a/aad/include/huaweicloud/aad/v2/model/ActionInfo.h b/aad/include/huaweicloud/aad/v2/model/ActionInfo.h new file mode 100644 index 000000000..e134fa358 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ActionInfo.h @@ -0,0 +1,76 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ActionInfo_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ActionInfo_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT ActionInfo + : public ModelBase +{ +public: + ActionInfo(); + virtual ~ActionInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ActionInfo members + + /// + /// 动作类型:block:阻断,captcha:人机验证;log: 仅记录;dynamic_block:动态阻断 + /// + + std::string getCategory() const; + bool categoryIsSet() const; + void unsetcategory(); + void setCategory(const std::string& value); + + /// + /// + /// + + DetailInfo getDetail() const; + bool detailIsSet() const; + void unsetdetail(); + void setDetail(const DetailInfo& value); + + +protected: + std::string category_; + bool categoryIsSet_; + DetailInfo detail_; + bool detailIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ActionInfo_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/Backend.h b/aad/include/huaweicloud/aad/v2/model/Backend.h new file mode 100644 index 000000000..7951f48bc --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/Backend.h @@ -0,0 +1,86 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_Backend_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_Backend_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// backend +/// +class HUAWEICLOUD_AAD_V2_EXPORT Backend + : public ModelBase +{ +public: + Backend(); + virtual ~Backend(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// Backend members + + /// + /// 当前后端协议 + /// + + std::string getProtocol() const; + bool protocolIsSet() const; + void unsetprotocol(); + void setProtocol(const std::string& value); + + /// + /// 当前后端端口 + /// + + int32_t getPort() const; + bool portIsSet() const; + void unsetport(); + void setPort(int32_t value); + + /// + /// 当前后端 Host 值 + /// + + std::string getHost() const; + bool hostIsSet() const; + void unsethost(); + void setHost(const std::string& value); + + +protected: + std::string protocol_; + bool protocolIsSet_; + int32_t port_; + bool portIsSet_; + std::string host_; + bool hostIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_Backend_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/BlackWhiteListRule.h b/aad/include/huaweicloud/aad/v2/model/BlackWhiteListRule.h new file mode 100644 index 000000000..c68dac725 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/BlackWhiteListRule.h @@ -0,0 +1,97 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_BlackWhiteListRule_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_BlackWhiteListRule_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT BlackWhiteListRule + : public ModelBase +{ +public: + BlackWhiteListRule(); + virtual ~BlackWhiteListRule(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// BlackWhiteListRule members + + /// + /// id + /// + + std::string getId() const; + bool idIsSet() const; + void unsetid(); + void setId(const std::string& value); + + /// + /// 0-黑名单,1-白名单 + /// + + int32_t getType() const; + bool typeIsSet() const; + void unsettype(); + void setType(int32_t value); + + /// + /// ip + /// + + std::string getIp() const; + bool ipIsSet() const; + void unsetip(); + void setIp(const std::string& value); + + /// + /// 域名id + /// + + std::string getDomainId() const; + bool domainIdIsSet() const; + void unsetdomainId(); + void setDomainId(const std::string& value); + + +protected: + std::string id_; + bool idIsSet_; + int32_t type_; + bool typeIsSet_; + std::string ip_; + bool ipIsSet_; + std::string domainId_; + bool domainIdIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_BlackWhiteListRule_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/BwListIps.h b/aad/include/huaweicloud/aad/v2/model/BwListIps.h new file mode 100644 index 000000000..fae8588f0 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/BwListIps.h @@ -0,0 +1,75 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_BwListIps_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_BwListIps_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT BwListIps + : public ModelBase +{ +public: + BwListIps(); + virtual ~BwListIps(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// BwListIps members + + /// + /// 黑白名单ip + /// + + std::string getIp() const; + bool ipIsSet() const; + void unsetip(); + void setIp(const std::string& value); + + /// + /// 描述 + /// + + std::string getDesc() const; + bool descIsSet() const; + void unsetdesc(); + void setDesc(const std::string& value); + + +protected: + std::string ip_; + bool ipIsSet_; + std::string desc_; + bool descIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_BwListIps_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/CertInfo.h b/aad/include/huaweicloud/aad/v2/model/CertInfo.h new file mode 100644 index 000000000..1e4e913cb --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/CertInfo.h @@ -0,0 +1,108 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_CertInfo_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_CertInfo_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT CertInfo + : public ModelBase +{ +public: + CertInfo(); + virtual ~CertInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CertInfo members + + /// + /// 证书名称 + /// + + std::string getCertName() const; + bool certNameIsSet() const; + void unsetcertName(); + void setCertName(const std::string& value); + + /// + /// 证书id + /// + + std::string getId() const; + bool idIsSet() const; + void unsetid(); + void setId(const std::string& value); + + /// + /// 适用域名 + /// + + std::string getApplyDomain() const; + bool applyDomainIsSet() const; + void unsetapplyDomain(); + void setApplyDomain(const std::string& value); + + /// + /// 过期时间 + /// + + int64_t getExpireTime() const; + bool expireTimeIsSet() const; + void unsetexpireTime(); + void setExpireTime(int64_t value); + + /// + /// 过期状态 + /// + + int32_t getExpireStatus() const; + bool expireStatusIsSet() const; + void unsetexpireStatus(); + void setExpireStatus(int32_t value); + + +protected: + std::string certName_; + bool certNameIsSet_; + std::string id_; + bool idIsSet_; + std::string applyDomain_; + bool applyDomainIsSet_; + int64_t expireTime_; + bool expireTimeIsSet_; + int32_t expireStatus_; + bool expireStatusIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_CertInfo_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/Condition.h b/aad/include/huaweicloud/aad/v2/model/Condition.h new file mode 100644 index 000000000..29c1b26d4 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/Condition.h @@ -0,0 +1,98 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_Condition_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_Condition_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// cc规则防护规则限速条件 +/// +class HUAWEICLOUD_AAD_V2_EXPORT Condition + : public ModelBase +{ +public: + Condition(); + virtual ~Condition(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// Condition members + + /// + /// 字段类型 url:路径 ip:IPv4 ipv6:IPv6 params:Params cookie:Cookie header:Header response_code:Response Code + /// + + std::string getCategory() const; + bool categoryIsSet() const; + void unsetcategory(); + void setCategory(const std::string& value); + + /// + /// 条件列表逻辑匹配内容。 当匹配逻辑为exist或not_exist时,contents必须为空,其他情况下contents必填且长度不超过2048 当category为response_code时,contents状态码为200~599,正则为 ^(?:[2-5]\\d{2})$ 当匹配逻辑包含\"len\"时,contents必须为0~65535的整数;当匹配逻辑包含\"num\"时,contents必须为0~512的整数 + /// + + std::vector& getContents(); + bool contentsIsSet() const; + void unsetcontents(); + void setContents(const std::vector& value); + + /// + /// 子字段 当字段类型为ip或ipv6时,index必填且必须为:client-ip:客户端IP、x-forwarded-for:X-Forwarded-For、TCP连接IP: $remote_addr 当字段类型(category)选择“params”、“cookie”、“header”时,请根据实际需求配置子字段且该参数必填。 当匹配逻辑为num_greater、num_less、num_equal、num_not_equal时,子字段必须为空 当子字段不为空时,最大长度不超过2048 + /// + + std::string getIndex() const; + bool indexIsSet() const; + void unsetindex(); + void setIndex(const std::string& value); + + /// + /// 条件列表匹配逻辑。 如果字段类型category是url,匹配逻辑可以为:contain、 not_contain、 equal、 not_equal、 prefix、 not_prefix、 suffix、 not_suffix、 len_greater、 len_less、len_equal或者len_not_equal 如果字段类型category是ip、ipv6或response_code,匹配逻辑可以为: equal、not_equal 如果字段类型category是params、cookie或者header, 匹配逻辑可以为:contain、 not_contain、 equal、 not_equal、 prefix、 not_prefix、 suffix、 not_suffix、 len_greater、 len_less、len_equal、len_not_equal、num_greater、num_less、num_equal、num_not_equal、exist或者not_exist + /// + + std::string getLogicOperation() const; + bool logicOperationIsSet() const; + void unsetlogicOperation(); + void setLogicOperation(const std::string& value); + + +protected: + std::string category_; + bool categoryIsSet_; + std::vector contents_; + bool contentsIsSet_; + std::string index_; + bool indexIsSet_; + std::string logicOperation_; + bool logicOperationIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_Condition_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/CreateAadDomainRequestBody.h b/aad/include/huaweicloud/aad/v2/model/CreateAadDomainRequestBody.h new file mode 100644 index 000000000..2fc4c5602 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/CreateAadDomainRequestBody.h @@ -0,0 +1,164 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_CreateAadDomainRequestBody_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_CreateAadDomainRequestBody_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT CreateAadDomainRequestBody + : public ModelBase +{ +public: + CreateAadDomainRequestBody(); + virtual ~CreateAadDomainRequestBody(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateAadDomainRequestBody members + + /// + /// 域名 + /// + + std::string getDomainName() const; + bool domainNameIsSet() const; + void unsetdomainName(); + void setDomainName(const std::string& value); + + /// + /// 企业项目id,与接入的高防实例所属企业项目保持一致。可在华为云EPS服务中查看企业项目id,default企业项目id为\"0\"。 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + /// + /// 高防实例ip列表。多个高防实例ip必须属于同一企业项目。 + /// + + std::vector& getIps(); + bool ipsIsSet() const; + void unsetips(); + void setIps(const std::vector& value); + + /// + /// 源站类型。 0 - 源站IP, 1 - 源站域名。 + /// + + int32_t getRealServerType() const; + bool realServerTypeIsSet() const; + void unsetrealServerType(); + void setRealServerType(int32_t value); + + /// + /// HTTP端口,与port_https不能同时为空。DDoS高防支持的HTTP端口可在控制台查看。 + /// + + std::vector& getPortHttp(); + bool portHttpIsSet() const; + void unsetportHttp(); + void setPortHttp(std::vector value); + + /// + /// HTTPS端口,与port_http不能同时为空。DDoS高防支持的HTTPS端口可在控制台查看。 + /// + + std::vector& getPortHttps(); + bool portHttpsIsSet() const; + void unsetportHttps(); + void setPortHttps(std::vector value); + + /// + /// 源站(源站ip/源站域名) + /// + + std::string getRealServer() const; + bool realServerIsSet() const; + void unsetrealServer(); + void setRealServer(const std::string& value); + + /// + /// 防护区域,0-大陆,1-海外 + /// + + std::string getOverseasType() const; + bool overseasTypeIsSet() const; + void unsetoverseasType(); + void setOverseasType(const std::string& value); + + /// + /// 证书名称(必须是已经存在的证书) + /// + + std::string getCertName() const; + bool certNameIsSet() const; + void unsetcertName(); + void setCertName(const std::string& value); + + /// + /// 开启0,关闭1 + /// + + std::string getWafSwitch() const; + bool wafSwitchIsSet() const; + void unsetwafSwitch(); + void setWafSwitch(const std::string& value); + + +protected: + std::string domainName_; + bool domainNameIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + std::vector ips_; + bool ipsIsSet_; + int32_t realServerType_; + bool realServerTypeIsSet_; + std::vector portHttp_; + bool portHttpIsSet_; + std::vector portHttps_; + bool portHttpsIsSet_; + std::string realServer_; + bool realServerIsSet_; + std::string overseasType_; + bool overseasTypeIsSet_; + std::string certName_; + bool certNameIsSet_; + std::string wafSwitch_; + bool wafSwitchIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_CreateAadDomainRequestBody_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/CreateDomainRequest.h b/aad/include/huaweicloud/aad/v2/model/CreateDomainRequest.h new file mode 100644 index 000000000..b64bf213c --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/CreateDomainRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_CreateDomainRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_CreateDomainRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT CreateDomainRequest + : public ModelBase +{ +public: + CreateDomainRequest(); + virtual ~CreateDomainRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateDomainRequest members + + /// + /// + /// + + CreateAadDomainRequestBody getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const CreateAadDomainRequestBody& value); + + +protected: + CreateAadDomainRequestBody body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + CreateDomainRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_CreateDomainRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/CreateDomainResponse.h b/aad/include/huaweicloud/aad/v2/model/CreateDomainResponse.h new file mode 100644 index 000000000..84efbed67 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/CreateDomainResponse.h @@ -0,0 +1,78 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_CreateDomainResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_CreateDomainResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT CreateDomainResponse + : public ModelBase, public HttpResponse +{ +public: + CreateDomainResponse(); + virtual ~CreateDomainResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateDomainResponse members + + /// + /// 高防提供的CNAME地址 + /// + + std::string getCname() const; + bool cnameIsSet() const; + void unsetcname(); + void setCname(const std::string& value); + + /// + /// 域名id + /// + + std::string getDomainId() const; + bool domainIdIsSet() const; + void unsetdomainId(); + void setDomainId(const std::string& value); + + +protected: + std::string cname_; + bool cnameIsSet_; + std::string domainId_; + bool domainIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_CreateDomainResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/Curve.h b/aad/include/huaweicloud/aad/v2/model/Curve.h new file mode 100644 index 000000000..0ae98bdee --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/Curve.h @@ -0,0 +1,85 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_Curve_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_Curve_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT Curve + : public ModelBase +{ +public: + Curve(); + virtual ~Curve(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// Curve members + + /// + /// 入带宽 + /// + + float getIn() const; + bool inIsSet() const; + void unsetin(); + void setIn(float value); + + /// + /// 出带宽 + /// + + float getOut() const; + bool outIsSet() const; + void unsetout(); + void setOut(float value); + + /// + /// 时间戳 + /// + + int32_t getTime() const; + bool timeIsSet() const; + void unsettime(); + void setTime(int32_t value); + + +protected: + float in_; + bool inIsSet_; + float out_; + bool outIsSet_; + int32_t time_; + bool timeIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_Curve_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/DeleteDomainRequest.h b/aad/include/huaweicloud/aad/v2/model/DeleteDomainRequest.h new file mode 100644 index 000000000..840320b4d --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/DeleteDomainRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_DeleteDomainRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_DeleteDomainRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT DeleteDomainRequest + : public ModelBase +{ +public: + DeleteDomainRequest(); + virtual ~DeleteDomainRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteDomainRequest members + + /// + /// + /// + + DeleteDomainV2RequestBody getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const DeleteDomainV2RequestBody& value); + + +protected: + DeleteDomainV2RequestBody body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + DeleteDomainRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_DeleteDomainRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/DeleteDomainResponse.h b/aad/include/huaweicloud/aad/v2/model/DeleteDomainResponse.h new file mode 100644 index 000000000..ed7bb1cc1 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/DeleteDomainResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_DeleteDomainResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_DeleteDomainResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT DeleteDomainResponse + : public ModelBase, public HttpResponse +{ +public: + DeleteDomainResponse(); + virtual ~DeleteDomainResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteDomainResponse members + + /// + /// + /// + + Object getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const Object& value); + + +protected: + Object body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_DeleteDomainResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/DeleteDomainV2RequestBody.h b/aad/include/huaweicloud/aad/v2/model/DeleteDomainV2RequestBody.h new file mode 100644 index 000000000..ecc369ff8 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/DeleteDomainV2RequestBody.h @@ -0,0 +1,65 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_DeleteDomainV2RequestBody_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_DeleteDomainV2RequestBody_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT DeleteDomainV2RequestBody + : public ModelBase +{ +public: + DeleteDomainV2RequestBody(); + virtual ~DeleteDomainV2RequestBody(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteDomainV2RequestBody members + + /// + /// 域名id列表 + /// + + std::vector& getDomainId(); + bool domainIdIsSet() const; + void unsetdomainId(); + void setDomainId(const std::vector& value); + + +protected: + std::vector domainId_; + bool domainIdIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_DeleteDomainV2RequestBody_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/DetailInfo.h b/aad/include/huaweicloud/aad/v2/model/DetailInfo.h new file mode 100644 index 000000000..c5c7e922b --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/DetailInfo.h @@ -0,0 +1,64 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_DetailInfo_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_DetailInfo_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT DetailInfo + : public ModelBase +{ +public: + DetailInfo(); + virtual ~DetailInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DetailInfo members + + /// + /// + /// + + PageRespInfo getResponse() const; + bool responseIsSet() const; + void unsetresponse(); + void setResponse(const PageRespInfo& value); + + +protected: + PageRespInfo response_; + bool responseIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_DetailInfo_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/EmptyJsonResponse.h b/aad/include/huaweicloud/aad/v2/model/EmptyJsonResponse.h new file mode 100644 index 000000000..f4162fc39 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/EmptyJsonResponse.h @@ -0,0 +1,52 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_EmptyJsonResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_EmptyJsonResponse_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT EmptyJsonResponse + : public ModelBase +{ +public: + EmptyJsonResponse(); + virtual ~EmptyJsonResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// EmptyJsonResponse members + + +protected: + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_EmptyJsonResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/FlowBps.h b/aad/include/huaweicloud/aad/v2/model/FlowBps.h new file mode 100644 index 000000000..5b42089ff --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/FlowBps.h @@ -0,0 +1,85 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_FlowBps_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_FlowBps_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT FlowBps + : public ModelBase +{ +public: + FlowBps(); + virtual ~FlowBps(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// FlowBps members + + /// + /// 数据时间 + /// + + int64_t getUtime() const; + bool utimeIsSet() const; + void unsetutime(); + void setUtime(int64_t value); + + /// + /// 攻击流量 + /// + + int32_t getAttackBps() const; + bool attackBpsIsSet() const; + void unsetattackBps(); + void setAttackBps(int32_t value); + + /// + /// 正常流量 + /// + + int32_t getNormalBps() const; + bool normalBpsIsSet() const; + void unsetnormalBps(); + void setNormalBps(int32_t value); + + +protected: + int64_t utime_; + bool utimeIsSet_; + int32_t attackBps_; + bool attackBpsIsSet_; + int32_t normalBps_; + bool normalBpsIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_FlowBps_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/FlowPps.h b/aad/include/huaweicloud/aad/v2/model/FlowPps.h new file mode 100644 index 000000000..41d2e4fde --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/FlowPps.h @@ -0,0 +1,85 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_FlowPps_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_FlowPps_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT FlowPps + : public ModelBase +{ +public: + FlowPps(); + virtual ~FlowPps(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// FlowPps members + + /// + /// 数据时间 + /// + + int64_t getUtime() const; + bool utimeIsSet() const; + void unsetutime(); + void setUtime(int64_t value); + + /// + /// 攻击包速率 + /// + + int32_t getAttackPps() const; + bool attackPpsIsSet() const; + void unsetattackPps(); + void setAttackPps(int32_t value); + + /// + /// 正常包速率 + /// + + int32_t getNormalPps() const; + bool normalPpsIsSet() const; + void unsetnormalPps(); + void setNormalPps(int32_t value); + + +protected: + int64_t utime_; + bool utimeIsSet_; + int32_t attackPps_; + bool attackPpsIsSet_; + int32_t normalPps_; + bool normalPpsIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_FlowPps_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/FrequencyControlRule.h b/aad/include/huaweicloud/aad/v2/model/FrequencyControlRule.h new file mode 100644 index 000000000..112173cea --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/FrequencyControlRule.h @@ -0,0 +1,255 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_FrequencyControlRule_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_FrequencyControlRule_H_ + + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT FrequencyControlRule + : public ModelBase +{ +public: + FrequencyControlRule(); + virtual ~FrequencyControlRule(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// FrequencyControlRule members + + /// + /// id + /// + + std::string getId() const; + bool idIsSet() const; + void unsetid(); + void setId(const std::string& value); + + /// + /// 判断是否是智能cc生成的规则 + /// + + int32_t getProducer() const; + bool producerIsSet() const; + void unsetproducer(); + void setProducer(int32_t value); + + /// + /// 规则名称 + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + /// + /// 规则应用的url + /// + + std::string getUrl() const; + bool urlIsSet() const; + void unseturl(); + void setUrl(const std::string& value); + + /// + /// 限速频率,单位为次,范围为1~2147483647 + /// + + std::string getLimitNum() const; + bool limitNumIsSet() const; + void unsetlimitNum(); + void setLimitNum(const std::string& value); + + /// + /// 限速周期,单位为秒,范围1~3600 + /// + + std::string getLimitPeriod() const; + bool limitPeriodIsSet() const; + void unsetlimitPeriod(); + void setLimitPeriod(const std::string& value); + + /// + /// 阻断时间,单位为秒,范围为0~65535 + /// + + std::string getLockTime() const; + bool lockTimeIsSet() const; + void unsetlockTime(); + void setLockTime(const std::string& value); + + /// + /// 限速模式:ip、cookie、header、other、policy、domain、url。 源限速:ip:IP限速,根据IP区分单个Web访问者。cookie:用户限速,根据Cookie键值区分单个Web访问者。header:用户限速,根据Header区分单个Web访问者。other:根据Referer(自定义请求访问的来源)字段区分单个Web访问者。-目的限速:policy: 策略限速、domain: 域名限速、url: url限速 + /// + + std::string getTagType() const; + bool tagTypeIsSet() const; + void unsettagType(); + void setTagType(const std::string& value); + + /// + /// 用户标识,当限速模式为用户限速(cookie或header)时 + /// + + std::string getTagIndex() const; + bool tagIndexIsSet() const; + void unsettagIndex(); + void setTagIndex(const std::string& value); + + /// + /// + /// + + TagCondition getTagCondition() const; + bool tagConditionIsSet() const; + void unsettagCondition(); + void setTagCondition(const TagCondition& value); + + /// + /// + /// + + ActionInfo getAction() const; + bool actionIsSet() const; + void unsetaction(); + void setAction(const ActionInfo& value); + + /// + /// cc规则防护模式,0:标准(老版本),只支持对域名的防护路径做限制。1:高级(新版本),支持对路径、IP、Cookie、Header、Params字段做限制。修改CC规则时必须传mode + /// + + std::string getMode() const; + bool modeIsSet() const; + void unsetmode(); + void setMode(const std::string& value); + + /// + /// cc规则防护规则限速条件 + /// + + std::vector& getConditions(); + bool conditionsIsSet() const; + void unsetconditions(); + void setConditions(const std::vector& value); + + /// + /// 放行频率,单位为次,范围为0~2147483647 + /// + + int32_t getUnlockNum() const; + bool unlockNumIsSet() const; + void unsetunlockNum(); + void setUnlockNum(int32_t value); + + /// + /// 域名聚合统计 + /// + + bool isDomainAggregation() const; + bool domainAggregationIsSet() const; + void unsetdomainAggregation(); + void setDomainAggregation(bool value); + + /// + /// 全局计数 + /// + + bool isRegionAggregation() const; + bool regionAggregationIsSet() const; + void unsetregionAggregation(); + void setRegionAggregation(bool value); + + /// + /// 锁定验证时间 + /// + + int32_t getCaptchaLockTime() const; + bool captchaLockTimeIsSet() const; + void unsetcaptchaLockTime(); + void setCaptchaLockTime(int32_t value); + + /// + /// 是否灰度生效 + /// + + bool isGrayscaleTime() const; + bool grayscaleTimeIsSet() const; + void unsetgrayscaleTime(); + void setGrayscaleTime(bool value); + + +protected: + std::string id_; + bool idIsSet_; + int32_t producer_; + bool producerIsSet_; + std::string name_; + bool nameIsSet_; + std::string url_; + bool urlIsSet_; + std::string limitNum_; + bool limitNumIsSet_; + std::string limitPeriod_; + bool limitPeriodIsSet_; + std::string lockTime_; + bool lockTimeIsSet_; + std::string tagType_; + bool tagTypeIsSet_; + std::string tagIndex_; + bool tagIndexIsSet_; + TagCondition tagCondition_; + bool tagConditionIsSet_; + ActionInfo action_; + bool actionIsSet_; + std::string mode_; + bool modeIsSet_; + std::vector conditions_; + bool conditionsIsSet_; + int32_t unlockNum_; + bool unlockNumIsSet_; + bool domainAggregation_; + bool domainAggregationIsSet_; + bool regionAggregation_; + bool regionAggregationIsSet_; + int32_t captchaLockTime_; + bool captchaLockTimeIsSet_; + bool grayscaleTime_; + bool grayscaleTimeIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_FrequencyControlRule_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/InstanceDomainItem.h b/aad/include/huaweicloud/aad/v2/model/InstanceDomainItem.h new file mode 100644 index 000000000..6cd7b91be --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/InstanceDomainItem.h @@ -0,0 +1,175 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_InstanceDomainItem_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_InstanceDomainItem_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT InstanceDomainItem + : public ModelBase +{ +public: + InstanceDomainItem(); + virtual ~InstanceDomainItem(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// InstanceDomainItem members + + /// + /// 域名ID + /// + + std::string getDomainId() const; + bool domainIdIsSet() const; + void unsetdomainId(); + void setDomainId(const std::string& value); + + /// + /// 域名 + /// + + std::string getDomainName() const; + bool domainNameIsSet() const; + void unsetdomainName(); + void setDomainName(const std::string& value); + + /// + /// 域名cname + /// + + std::string getCname() const; + bool cnameIsSet() const; + void unsetcname(); + void setCname(const std::string& value); + + /// + /// 域名状态 NORMAL = '0', FREEZE = '1' + /// + + std::string getDomainStatus() const; + bool domainStatusIsSet() const; + void unsetdomainStatus(); + void setDomainStatus(const std::string& value); + + /// + /// cc防护状态 + /// + + int32_t getCcStatus() const; + bool ccStatusIsSet() const; + void unsetccStatus(); + void setCcStatus(int32_t value); + + /// + /// 证书状态:1---已上传 2---未上传 + /// + + int32_t getHttpsCertStatus() const; + bool httpsCertStatusIsSet() const; + void unsethttpsCertStatus(); + void setHttpsCertStatus(int32_t value); + + /// + /// 证书名称 + /// + + std::string getCertName() const; + bool certNameIsSet() const; + void unsetcertName(); + void setCertName(const std::string& value); + + /// + /// 域名协议 + /// + + std::vector& getProtocolType(); + bool protocolTypeIsSet() const; + void unsetprotocolType(); + void setProtocolType(const std::vector& value); + + /// + /// 源站类型 + /// + + int32_t getRealServerType() const; + bool realServerTypeIsSet() const; + void unsetrealServerType(); + void setRealServerType(int32_t value); + + /// + /// 源站 + /// + + std::string getRealServers() const; + bool realServersIsSet() const; + void unsetrealServers(); + void setRealServers(const std::string& value); + + /// + /// waf防护状态 + /// + + int32_t getWafStatus() const; + bool wafStatusIsSet() const; + void unsetwafStatus(); + void setWafStatus(int32_t value); + + +protected: + std::string domainId_; + bool domainIdIsSet_; + std::string domainName_; + bool domainNameIsSet_; + std::string cname_; + bool cnameIsSet_; + std::string domainStatus_; + bool domainStatusIsSet_; + int32_t ccStatus_; + bool ccStatusIsSet_; + int32_t httpsCertStatus_; + bool httpsCertStatusIsSet_; + std::string certName_; + bool certNameIsSet_; + std::vector protocolType_; + bool protocolTypeIsSet_; + int32_t realServerType_; + bool realServerTypeIsSet_; + std::string realServers_; + bool realServersIsSet_; + int32_t wafStatus_; + bool wafStatusIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_InstanceDomainItem_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/Ips.h b/aad/include/huaweicloud/aad/v2/model/Ips.h new file mode 100644 index 000000000..1d50f140f --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/Ips.h @@ -0,0 +1,119 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_Ips_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_Ips_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT Ips + : public ModelBase +{ +public: + Ips(); + virtual ~Ips(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// Ips members + + /// + /// ip id + /// + + std::string getIpId() const; + bool ipIdIsSet() const; + void unsetipId(); + void setIpId(const std::string& value); + + /// + /// ip + /// + + std::string getIp() const; + bool ipIsSet() const; + void unsetip(); + void setIp(const std::string& value); + + /// + /// 线路 + /// + + std::string getIsp() const; + bool ispIsSet() const; + void unsetisp(); + void setIsp(const std::string& value); + + /// + /// 数据中心 + /// + + std::string getDataCenter() const; + bool dataCenterIsSet() const; + void unsetdataCenter(); + void setDataCenter(const std::string& value); + + /// + /// 海外区域封禁状态 0-关闭 1-开启 + /// + + int32_t getForeignSwitchStatus() const; + bool foreignSwitchStatusIsSet() const; + void unsetforeignSwitchStatus(); + void setForeignSwitchStatus(int32_t value); + + /// + /// UDP协议禁用 0-关闭 1-开启 + /// + + int32_t getUdpSwitchStatus() const; + bool udpSwitchStatusIsSet() const; + void unsetudpSwitchStatus(); + void setUdpSwitchStatus(int32_t value); + + +protected: + std::string ipId_; + bool ipIdIsSet_; + std::string ip_; + bool ipIsSet_; + std::string isp_; + bool ispIsSet_; + std::string dataCenter_; + bool dataCenterIsSet_; + int32_t foreignSwitchStatus_; + bool foreignSwitchStatusIsSet_; + int32_t udpSwitchStatus_; + bool udpSwitchStatusIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_Ips_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListConnectionNumberData.h b/aad/include/huaweicloud/aad/v2/model/ListConnectionNumberData.h new file mode 100644 index 000000000..b72574765 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListConnectionNumberData.h @@ -0,0 +1,77 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListConnectionNumberData_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListConnectionNumberData_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListConnectionNumberData + : public ModelBase +{ +public: + ListConnectionNumberData(); + virtual ~ListConnectionNumberData(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListConnectionNumberData members + + /// + /// 连接数名称 + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + /// + /// items + /// + + std::vector& getList(); + bool listIsSet() const; + void unsetlist(); + void setList(const std::vector& value); + + +protected: + std::string name_; + bool nameIsSet_; + std::vector list_; + bool listIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListConnectionNumberData_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListConnectionNumberDataList.h b/aad/include/huaweicloud/aad/v2/model/ListConnectionNumberDataList.h new file mode 100644 index 000000000..f3e908eb3 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListConnectionNumberDataList.h @@ -0,0 +1,74 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListConnectionNumberDataList_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListConnectionNumberDataList_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListConnectionNumberDataList + : public ModelBase +{ +public: + ListConnectionNumberDataList(); + virtual ~ListConnectionNumberDataList(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListConnectionNumberDataList members + + /// + /// 时间戳毫秒值 + /// + + int32_t getTime() const; + bool timeIsSet() const; + void unsettime(); + void setTime(int32_t value); + + /// + /// 连接数 + /// + + int32_t getValue() const; + bool valueIsSet() const; + void unsetvalue(); + void setValue(int32_t value); + + +protected: + int32_t time_; + bool timeIsSet_; + int32_t value_; + bool valueIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListConnectionNumberDataList_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListDDoSAttackEventRequest.h b/aad/include/huaweicloud/aad/v2/model/ListDDoSAttackEventRequest.h new file mode 100644 index 000000000..09a15a213 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListDDoSAttackEventRequest.h @@ -0,0 +1,83 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSAttackEventRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSAttackEventRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListDDoSAttackEventRequest + : public ModelBase +{ +public: + ListDDoSAttackEventRequest(); + virtual ~ListDDoSAttackEventRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListDDoSAttackEventRequest members + + /// + /// 实例id + /// + + std::string getInstanceId() const; + bool instanceIdIsSet() const; + void unsetinstanceId(); + void setInstanceId(const std::string& value); + + /// + /// + /// + + ListDDoSAttackEventRequestBody getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const ListDDoSAttackEventRequestBody& value); + + +protected: + std::string instanceId_; + bool instanceIdIsSet_; + ListDDoSAttackEventRequestBody body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListDDoSAttackEventRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSAttackEventRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListDDoSAttackEventRequestBody.h b/aad/include/huaweicloud/aad/v2/model/ListDDoSAttackEventRequestBody.h new file mode 100644 index 000000000..f2c95c16d --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListDDoSAttackEventRequestBody.h @@ -0,0 +1,141 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSAttackEventRequestBody_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSAttackEventRequestBody_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListDDoSAttackEventRequestBody + : public ModelBase +{ +public: + ListDDoSAttackEventRequestBody(); + virtual ~ListDDoSAttackEventRequestBody(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListDDoSAttackEventRequestBody members + + /// + /// 开始时间(毫秒时间戳) + /// + + std::string getStartTime() const; + bool startTimeIsSet() const; + void unsetstartTime(); + void setStartTime(const std::string& value); + + /// + /// 结束时间(毫秒时间戳) + /// + + std::string getEndTime() const; + bool endTimeIsSet() const; + void unsetendTime(); + void setEndTime(const std::string& value); + + /// + /// 偏移量 + /// + + int32_t getOffset() const; + bool offsetIsSet() const; + void unsetoffset(); + void setOffset(int32_t value); + + /// + /// 限制条数,范围1-100 + /// + + int32_t getLimit() const; + bool limitIsSet() const; + void unsetlimit(); + void setLimit(int32_t value); + + /// + /// 高防ip + /// + + std::string getIp() const; + bool ipIsSet() const; + void unsetip(); + void setIp(const std::string& value); + + /// + /// 攻击流量最小值 + /// + + std::string getAttackFlowLow() const; + bool attackFlowLowIsSet() const; + void unsetattackFlowLow(); + void setAttackFlowLow(const std::string& value); + + /// + /// 攻击流量最大值 + /// + + std::string getAttackFlowUp() const; + bool attackFlowUpIsSet() const; + void unsetattackFlowUp(); + void setAttackFlowUp(const std::string& value); + + /// + /// 攻击状态:attack-攻击; normal-结束攻击 + /// + + std::string getAttackStatus() const; + bool attackStatusIsSet() const; + void unsetattackStatus(); + void setAttackStatus(const std::string& value); + + +protected: + std::string startTime_; + bool startTimeIsSet_; + std::string endTime_; + bool endTimeIsSet_; + int32_t offset_; + bool offsetIsSet_; + int32_t limit_; + bool limitIsSet_; + std::string ip_; + bool ipIsSet_; + std::string attackFlowLow_; + bool attackFlowLowIsSet_; + std::string attackFlowUp_; + bool attackFlowUpIsSet_; + std::string attackStatus_; + bool attackStatusIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSAttackEventRequestBody_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListDDoSAttackEventResponse.h b/aad/include/huaweicloud/aad/v2/model/ListDDoSAttackEventResponse.h new file mode 100644 index 000000000..035bcd8b0 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListDDoSAttackEventResponse.h @@ -0,0 +1,79 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSAttackEventResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSAttackEventResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListDDoSAttackEventResponse + : public ModelBase, public HttpResponse +{ +public: + ListDDoSAttackEventResponse(); + virtual ~ListDDoSAttackEventResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListDDoSAttackEventResponse members + + /// + /// total + /// + + int32_t getTotal() const; + bool totalIsSet() const; + void unsettotal(); + void setTotal(int32_t value); + + /// + /// data + /// + + std::vector& getData(); + bool dataIsSet() const; + void unsetdata(); + void setData(const std::vector& value); + + +protected: + int32_t total_; + bool totalIsSet_; + std::vector data_; + bool dataIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSAttackEventResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListDDoSConnectionNumberRequest.h b/aad/include/huaweicloud/aad/v2/model/ListDDoSConnectionNumberRequest.h new file mode 100644 index 000000000..d1cbb39ac --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListDDoSConnectionNumberRequest.h @@ -0,0 +1,104 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSConnectionNumberRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSConnectionNumberRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListDDoSConnectionNumberRequest + : public ModelBase +{ +public: + ListDDoSConnectionNumberRequest(); + virtual ~ListDDoSConnectionNumberRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListDDoSConnectionNumberRequest members + + /// + /// 开始时间(毫秒时间戳) + /// + + std::string getStartTime() const; + bool startTimeIsSet() const; + void unsetstartTime(); + void setStartTime(const std::string& value); + + /// + /// 结束时间(毫秒时间戳) + /// + + std::string getEndTime() const; + bool endTimeIsSet() const; + void unsetendTime(); + void setEndTime(const std::string& value); + + /// + /// 实例id + /// + + std::string getInstanceId() const; + bool instanceIdIsSet() const; + void unsetinstanceId(); + void setInstanceId(const std::string& value); + + /// + /// 高防ip + /// + + std::string getIp() const; + bool ipIsSet() const; + void unsetip(); + void setIp(const std::string& value); + + +protected: + std::string startTime_; + bool startTimeIsSet_; + std::string endTime_; + bool endTimeIsSet_; + std::string instanceId_; + bool instanceIdIsSet_; + std::string ip_; + bool ipIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListDDoSConnectionNumberRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSConnectionNumberRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListDDoSConnectionNumberResponse.h b/aad/include/huaweicloud/aad/v2/model/ListDDoSConnectionNumberResponse.h new file mode 100644 index 000000000..17085c176 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListDDoSConnectionNumberResponse.h @@ -0,0 +1,68 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSConnectionNumberResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSConnectionNumberResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListDDoSConnectionNumberResponse + : public ModelBase, public HttpResponse +{ +public: + ListDDoSConnectionNumberResponse(); + virtual ~ListDDoSConnectionNumberResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListDDoSConnectionNumberResponse members + + /// + /// items + /// + + 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_AAD_V2_MODEL_ListDDoSConnectionNumberResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListDDoSEventData.h b/aad/include/huaweicloud/aad/v2/model/ListDDoSEventData.h new file mode 100644 index 000000000..deccf0941 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListDDoSEventData.h @@ -0,0 +1,174 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSEventData_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSEventData_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListDDoSEventData + : public ModelBase +{ +public: + ListDDoSEventData(); + virtual ~ListDDoSEventData(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListDDoSEventData members + + /// + /// 防护IP + /// + + std::string getZoneIp() const; + bool zoneIpIsSet() const; + void unsetzoneIp(); + void setZoneIp(const std::string& value); + + /// + /// 开始时间(毫秒时间戳) + /// + + std::string getStartTime() const; + bool startTimeIsSet() const; + void unsetstartTime(); + void setStartTime(const std::string& value); + + /// + /// 结束时间(毫秒时间戳) + /// + + std::string getEndTime() const; + bool endTimeIsSet() const; + void unsetendTime(); + void setEndTime(const std::string& value); + + /// + /// 攻击流量峰值,单位“kbps” + /// + + std::string getMaxDropKbps() const; + bool maxDropKbpsIsSet() const; + void unsetmaxDropKbps(); + void setMaxDropKbps(const std::string& value); + + /// + /// 攻击报文数峰值,单位“pps” + /// + + std::string getMaxDropPps() const; + bool maxDropPpsIsSet() const; + void unsetmaxDropPps(); + void setMaxDropPps(const std::string& value); + + /// + /// 入流量峰值,单位“kbps” + /// + + std::string getMaxInKbps() const; + bool maxInKbpsIsSet() const; + void unsetmaxInKbps(); + void setMaxInKbps(const std::string& value); + + /// + /// 入报文数峰值,单位“pps” + /// + + std::string getMaxInPps() const; + bool maxInPpsIsSet() const; + void unsetmaxInPps(); + void setMaxInPps(const std::string& value); + + /// + /// 攻击类型 + /// + + std::string getAttackTypes() const; + bool attackTypesIsSet() const; + void unsetattackTypes(); + void setAttackTypes(const std::string& value); + + /// + /// 攻击源IP + /// + + std::string getAttackIps() const; + bool attackIpsIsSet() const; + void unsetattackIps(); + void setAttackIps(const std::string& value); + + /// + /// 攻击IP描述 + /// + + std::string getAttackIpsDesc() const; + bool attackIpsDescIsSet() const; + void unsetattackIpsDesc(); + void setAttackIpsDesc(const std::string& value); + + /// + /// 攻击状态 + /// + + std::string getAttackStatus() const; + bool attackStatusIsSet() const; + void unsetattackStatus(); + void setAttackStatus(const std::string& value); + + +protected: + std::string zoneIp_; + bool zoneIpIsSet_; + std::string startTime_; + bool startTimeIsSet_; + std::string endTime_; + bool endTimeIsSet_; + std::string maxDropKbps_; + bool maxDropKbpsIsSet_; + std::string maxDropPps_; + bool maxDropPpsIsSet_; + std::string maxInKbps_; + bool maxInKbpsIsSet_; + std::string maxInPps_; + bool maxInPpsIsSet_; + std::string attackTypes_; + bool attackTypesIsSet_; + std::string attackIps_; + bool attackIpsIsSet_; + std::string attackIpsDesc_; + bool attackIpsDescIsSet_; + std::string attackStatus_; + bool attackStatusIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSEventData_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListDDoSFlowRequest.h b/aad/include/huaweicloud/aad/v2/model/ListDDoSFlowRequest.h new file mode 100644 index 000000000..749fa08db --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListDDoSFlowRequest.h @@ -0,0 +1,115 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSFlowRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSFlowRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListDDoSFlowRequest + : public ModelBase +{ +public: + ListDDoSFlowRequest(); + virtual ~ListDDoSFlowRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListDDoSFlowRequest members + + /// + /// 实例ID + /// + + std::string getInstanceId() const; + bool instanceIdIsSet() const; + void unsetinstanceId(); + void setInstanceId(const std::string& value); + + /// + /// 高防IP + /// + + std::string getIp() const; + bool ipIsSet() const; + void unsetip(); + void setIp(const std::string& value); + + /// + /// 请求类型 pps、bps + /// + + std::string getType() const; + bool typeIsSet() const; + void unsettype(); + void setType(const std::string& value); + + /// + /// 开始时间(毫秒时间戳) + /// + + std::string getStartTime() const; + bool startTimeIsSet() const; + void unsetstartTime(); + void setStartTime(const std::string& value); + + /// + /// 结束时间(毫秒时间戳) + /// + + std::string getEndTime() const; + bool endTimeIsSet() const; + void unsetendTime(); + void setEndTime(const std::string& value); + + +protected: + std::string instanceId_; + bool instanceIdIsSet_; + std::string ip_; + bool ipIsSet_; + std::string type_; + bool typeIsSet_; + std::string startTime_; + bool startTimeIsSet_; + std::string endTime_; + bool endTimeIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListDDoSFlowRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSFlowRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListDDoSFlowResponse.h b/aad/include/huaweicloud/aad/v2/model/ListDDoSFlowResponse.h new file mode 100644 index 000000000..6ca0a42ca --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListDDoSFlowResponse.h @@ -0,0 +1,80 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSFlowResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSFlowResponse_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListDDoSFlowResponse + : public ModelBase, public HttpResponse +{ +public: + ListDDoSFlowResponse(); + virtual ~ListDDoSFlowResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListDDoSFlowResponse members + + /// + /// 当请求type=bps时必返回 + /// + + std::vector& getFlowBps(); + bool flowBpsIsSet() const; + void unsetflowBps(); + void setFlowBps(const std::vector& value); + + /// + /// 当请求type=pps时必返回 + /// + + std::vector& getFlowPps(); + bool flowPpsIsSet() const; + void unsetflowPps(); + void setFlowPps(const std::vector& value); + + +protected: + std::vector flowBps_; + bool flowBpsIsSet_; + std::vector flowPps_; + bool flowPpsIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListDDoSFlowResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListFrequencyControlRuleRequest.h b/aad/include/huaweicloud/aad/v2/model/ListFrequencyControlRuleRequest.h new file mode 100644 index 000000000..8c5d6112b --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListFrequencyControlRuleRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListFrequencyControlRuleRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListFrequencyControlRuleRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListFrequencyControlRuleRequest + : public ModelBase +{ +public: + ListFrequencyControlRuleRequest(); + virtual ~ListFrequencyControlRuleRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListFrequencyControlRuleRequest members + + /// + /// 域名 + /// + + std::string getDomainName() const; + bool domainNameIsSet() const; + void unsetdomainName(); + void setDomainName(const std::string& value); + + +protected: + std::string domainName_; + bool domainNameIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListFrequencyControlRuleRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListFrequencyControlRuleRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListFrequencyControlRuleResponse.h b/aad/include/huaweicloud/aad/v2/model/ListFrequencyControlRuleResponse.h new file mode 100644 index 000000000..b670c2354 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListFrequencyControlRuleResponse.h @@ -0,0 +1,79 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListFrequencyControlRuleResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListFrequencyControlRuleResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListFrequencyControlRuleResponse + : public ModelBase, public HttpResponse +{ +public: + ListFrequencyControlRuleResponse(); + virtual ~ListFrequencyControlRuleResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListFrequencyControlRuleResponse members + + /// + /// total + /// + + int32_t getTotal() const; + bool totalIsSet() const; + void unsettotal(); + void setTotal(int32_t value); + + /// + /// items + /// + + std::vector& getItems(); + bool itemsIsSet() const; + void unsetitems(); + void setItems(const std::vector& value); + + +protected: + int32_t total_; + bool totalIsSet_; + std::vector items_; + bool itemsIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListFrequencyControlRuleResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListInstanceDomainsRequest.h b/aad/include/huaweicloud/aad/v2/model/ListInstanceDomainsRequest.h new file mode 100644 index 000000000..da5c80afd --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListInstanceDomainsRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListInstanceDomainsRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListInstanceDomainsRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListInstanceDomainsRequest + : public ModelBase +{ +public: + ListInstanceDomainsRequest(); + virtual ~ListInstanceDomainsRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListInstanceDomainsRequest members + + /// + /// 实例id + /// + + std::string getInstanceId() const; + bool instanceIdIsSet() const; + void unsetinstanceId(); + void setInstanceId(const std::string& value); + + +protected: + std::string instanceId_; + bool instanceIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListInstanceDomainsRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListInstanceDomainsRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListInstanceDomainsResponse.h b/aad/include/huaweicloud/aad/v2/model/ListInstanceDomainsResponse.h new file mode 100644 index 000000000..a9ab74230 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListInstanceDomainsResponse.h @@ -0,0 +1,91 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListInstanceDomainsResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListInstanceDomainsResponse_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListInstanceDomainsResponse + : public ModelBase, public HttpResponse +{ +public: + ListInstanceDomainsResponse(); + virtual ~ListInstanceDomainsResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListInstanceDomainsResponse members + + /// + /// 实例id + /// + + std::string getInstanceId() const; + bool instanceIdIsSet() const; + void unsetinstanceId(); + void setInstanceId(const std::string& value); + + /// + /// 实例名称 + /// + + std::string getInstanceName() const; + bool instanceNameIsSet() const; + void unsetinstanceName(); + void setInstanceName(const std::string& value); + + /// + /// 域名信息 + /// + + std::vector& getDomains(); + bool domainsIsSet() const; + void unsetdomains(); + void setDomains(const std::vector& value); + + +protected: + std::string instanceId_; + bool instanceIdIsSet_; + std::string instanceName_; + bool instanceNameIsSet_; + std::vector domains_; + bool domainsIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListInstanceDomainsResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListWafAttackEventRequest.h b/aad/include/huaweicloud/aad/v2/model/ListWafAttackEventRequest.h new file mode 100644 index 000000000..6382dfa6b --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListWafAttackEventRequest.h @@ -0,0 +1,148 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafAttackEventRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafAttackEventRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListWafAttackEventRequest + : public ModelBase +{ +public: + ListWafAttackEventRequest(); + virtual ~ListWafAttackEventRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListWafAttackEventRequest members + + /// + /// 不传时代表全部域名 + /// + + std::string getDomains() const; + bool domainsIsSet() const; + void unsetdomains(); + void setDomains(const std::string& value); + + /// + /// 开始时间(毫秒时间戳) + /// + + std::string getStartTime() const; + bool startTimeIsSet() const; + void unsetstartTime(); + void setStartTime(const std::string& value); + + /// + /// 结束时间(毫秒时间戳) + /// + + std::string getEndTime() const; + bool endTimeIsSet() const; + void unsetendTime(); + void setEndTime(const std::string& value); + + /// + /// 枚举值:yesterday,today,3days,1week,1month 与开始结束时间不同时为空 + /// + + std::string getRecent() const; + bool recentIsSet() const; + void unsetrecent(); + void setRecent(const std::string& value); + + /// + /// 实例类型,0-大陆,1-海外 + /// + + int32_t getOverseasType() const; + bool overseasTypeIsSet() const; + void unsetoverseasType(); + void setOverseasType(int32_t value); + + /// + /// 攻击源IP + /// + + std::string getSip() const; + bool sipIsSet() const; + void unsetsip(); + void setSip(const std::string& value); + + /// + /// limit + /// + + int32_t getLimit() const; + bool limitIsSet() const; + void unsetlimit(); + void setLimit(int32_t value); + + /// + /// offset + /// + + int32_t getOffset() const; + bool offsetIsSet() const; + void unsetoffset(); + void setOffset(int32_t value); + + +protected: + std::string domains_; + bool domainsIsSet_; + std::string startTime_; + bool startTimeIsSet_; + std::string endTime_; + bool endTimeIsSet_; + std::string recent_; + bool recentIsSet_; + int32_t overseasType_; + bool overseasTypeIsSet_; + std::string sip_; + bool sipIsSet_; + int32_t limit_; + bool limitIsSet_; + int32_t offset_; + bool offsetIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListWafAttackEventRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafAttackEventRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListWafAttackEventResponse.h b/aad/include/huaweicloud/aad/v2/model/ListWafAttackEventResponse.h new file mode 100644 index 000000000..bfb736071 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListWafAttackEventResponse.h @@ -0,0 +1,79 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafAttackEventResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafAttackEventResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListWafAttackEventResponse + : public ModelBase, public HttpResponse +{ +public: + ListWafAttackEventResponse(); + virtual ~ListWafAttackEventResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListWafAttackEventResponse members + + /// + /// total + /// + + int32_t getTotal() const; + bool totalIsSet() const; + void unsettotal(); + void setTotal(int32_t value); + + /// + /// list + /// + + std::vector& getList(); + bool listIsSet() const; + void unsetlist(); + void setList(const std::vector& value); + + +protected: + int32_t total_; + bool totalIsSet_; + std::vector list_; + bool listIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafAttackEventResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListWafAttackEventlist.h b/aad/include/huaweicloud/aad/v2/model/ListWafAttackEventlist.h new file mode 100644 index 000000000..bc87bf0d8 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListWafAttackEventlist.h @@ -0,0 +1,142 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafAttackEventlist_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafAttackEventlist_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListWafAttackEventlist + : public ModelBase +{ +public: + ListWafAttackEventlist(); + virtual ~ListWafAttackEventlist(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListWafAttackEventlist members + + /// + /// id + /// + + std::string getId() const; + bool idIsSet() const; + void unsetid(); + void setId(const std::string& value); + + /// + /// 攻击目标域名 + /// + + std::string getDomain() const; + bool domainIsSet() const; + void unsetdomain(); + void setDomain(const std::string& value); + + /// + /// 攻击时间 + /// + + int32_t getTime() const; + bool timeIsSet() const; + void unsettime(); + void setTime(int32_t value); + + /// + /// 攻击源IP + /// + + std::string getSip() const; + bool sipIsSet() const; + void unsetsip(); + void setSip(const std::string& value); + + /// + /// 防御动作 + /// + + std::string getAction() const; + bool actionIsSet() const; + void unsetaction(); + void setAction(const std::string& value); + + /// + /// 攻击url + /// + + std::string getUrl() const; + bool urlIsSet() const; + void unseturl(); + void setUrl(const std::string& value); + + /// + /// 攻击类型 + /// + + std::string getType() const; + bool typeIsSet() const; + void unsettype(); + void setType(const std::string& value); + + /// + /// + /// + + Backend getBackend() const; + bool backendIsSet() const; + void unsetbackend(); + void setBackend(const Backend& value); + + +protected: + std::string id_; + bool idIsSet_; + std::string domain_; + bool domainIsSet_; + int32_t time_; + bool timeIsSet_; + std::string sip_; + bool sipIsSet_; + std::string action_; + bool actionIsSet_; + std::string url_; + bool urlIsSet_; + std::string type_; + bool typeIsSet_; + Backend backend_; + bool backendIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafAttackEventlist_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListWafBandwidthRequest.h b/aad/include/huaweicloud/aad/v2/model/ListWafBandwidthRequest.h new file mode 100644 index 000000000..6690b206f --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListWafBandwidthRequest.h @@ -0,0 +1,126 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafBandwidthRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafBandwidthRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListWafBandwidthRequest + : public ModelBase +{ +public: + ListWafBandwidthRequest(); + virtual ~ListWafBandwidthRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListWafBandwidthRequest members + + /// + /// 不传时代表全部域名 + /// + + std::string getDomains() const; + bool domainsIsSet() const; + void unsetdomains(); + void setDomains(const std::string& value); + + /// + /// 平均值 mean、峰值 peak + /// + + std::string getValueType() const; + bool valueTypeIsSet() const; + void unsetvalueType(); + void setValueType(const std::string& value); + + /// + /// 开始时间(毫秒时间戳) + /// + + std::string getStartTime() const; + bool startTimeIsSet() const; + void unsetstartTime(); + void setStartTime(const std::string& value); + + /// + /// 结束时间(毫秒时间戳) + /// + + std::string getEndTime() const; + bool endTimeIsSet() const; + void unsetendTime(); + void setEndTime(const std::string& value); + + /// + /// 枚举值:yesterday,today,3days,1week,1month 与开始结束时间不同时为空 + /// + + std::string getRecent() const; + bool recentIsSet() const; + void unsetrecent(); + void setRecent(const std::string& value); + + /// + /// 实例类型,0-大陆,1-海外 + /// + + int32_t getOverseasType() const; + bool overseasTypeIsSet() const; + void unsetoverseasType(); + void setOverseasType(int32_t value); + + +protected: + std::string domains_; + bool domainsIsSet_; + std::string valueType_; + bool valueTypeIsSet_; + std::string startTime_; + bool startTimeIsSet_; + std::string endTime_; + bool endTimeIsSet_; + std::string recent_; + bool recentIsSet_; + int32_t overseasType_; + bool overseasTypeIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListWafBandwidthRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafBandwidthRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListWafBandwidthResponse.h b/aad/include/huaweicloud/aad/v2/model/ListWafBandwidthResponse.h new file mode 100644 index 000000000..5818335e5 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListWafBandwidthResponse.h @@ -0,0 +1,68 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafBandwidthResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafBandwidthResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListWafBandwidthResponse + : public ModelBase, public HttpResponse +{ +public: + ListWafBandwidthResponse(); + virtual ~ListWafBandwidthResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListWafBandwidthResponse members + + /// + /// 曲线 + /// + + std::vector& getCurve(); + bool curveIsSet() const; + void unsetcurve(); + void setCurve(const std::vector& value); + + +protected: + std::vector curve_; + bool curveIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafBandwidthResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListWafCustomRuleRequest.h b/aad/include/huaweicloud/aad/v2/model/ListWafCustomRuleRequest.h new file mode 100644 index 000000000..b0fc6e089 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListWafCustomRuleRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafCustomRuleRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafCustomRuleRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListWafCustomRuleRequest + : public ModelBase +{ +public: + ListWafCustomRuleRequest(); + virtual ~ListWafCustomRuleRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListWafCustomRuleRequest members + + /// + /// 域名 + /// + + std::string getDomainName() const; + bool domainNameIsSet() const; + void unsetdomainName(); + void setDomainName(const std::string& value); + + /// + /// 防护区域,0-大陆,1-海外 + /// + + int32_t getOverseasType() const; + bool overseasTypeIsSet() const; + void unsetoverseasType(); + void setOverseasType(int32_t value); + + +protected: + std::string domainName_; + bool domainNameIsSet_; + int32_t overseasType_; + bool overseasTypeIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListWafCustomRuleRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafCustomRuleRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListWafCustomRuleResponse.h b/aad/include/huaweicloud/aad/v2/model/ListWafCustomRuleResponse.h new file mode 100644 index 000000000..6d81a899e --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListWafCustomRuleResponse.h @@ -0,0 +1,79 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafCustomRuleResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafCustomRuleResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListWafCustomRuleResponse + : public ModelBase, public HttpResponse +{ +public: + ListWafCustomRuleResponse(); + virtual ~ListWafCustomRuleResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListWafCustomRuleResponse members + + /// + /// total + /// + + int32_t getTotal() const; + bool totalIsSet() const; + void unsettotal(); + void setTotal(int32_t value); + + /// + /// items + /// + + std::vector& getItems(); + bool itemsIsSet() const; + void unsetitems(); + void setItems(const std::vector& value); + + +protected: + int32_t total_; + bool totalIsSet_; + std::vector items_; + bool itemsIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafCustomRuleResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListWafGeoIpRuleRequest.h b/aad/include/huaweicloud/aad/v2/model/ListWafGeoIpRuleRequest.h new file mode 100644 index 000000000..da77a9721 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListWafGeoIpRuleRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafGeoIpRuleRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafGeoIpRuleRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListWafGeoIpRuleRequest + : public ModelBase +{ +public: + ListWafGeoIpRuleRequest(); + virtual ~ListWafGeoIpRuleRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListWafGeoIpRuleRequest members + + /// + /// 域名 + /// + + std::string getDomainName() const; + bool domainNameIsSet() const; + void unsetdomainName(); + void setDomainName(const std::string& value); + + /// + /// 防护区域,0-大陆,1-海外 + /// + + int32_t getOverseasType() const; + bool overseasTypeIsSet() const; + void unsetoverseasType(); + void setOverseasType(int32_t value); + + +protected: + std::string domainName_; + bool domainNameIsSet_; + int32_t overseasType_; + bool overseasTypeIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListWafGeoIpRuleRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafGeoIpRuleRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListWafGeoIpRuleResponse.h b/aad/include/huaweicloud/aad/v2/model/ListWafGeoIpRuleResponse.h new file mode 100644 index 000000000..5e89332d9 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListWafGeoIpRuleResponse.h @@ -0,0 +1,79 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafGeoIpRuleResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafGeoIpRuleResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListWafGeoIpRuleResponse + : public ModelBase, public HttpResponse +{ +public: + ListWafGeoIpRuleResponse(); + virtual ~ListWafGeoIpRuleResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListWafGeoIpRuleResponse members + + /// + /// total + /// + + int32_t getTotal() const; + bool totalIsSet() const; + void unsettotal(); + void setTotal(int32_t value); + + /// + /// items + /// + + std::vector& getItems(); + bool itemsIsSet() const; + void unsetitems(); + void setItems(const std::vector& value); + + +protected: + int32_t total_; + bool totalIsSet_; + std::vector items_; + bool itemsIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafGeoIpRuleResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListWafQpsRequest.h b/aad/include/huaweicloud/aad/v2/model/ListWafQpsRequest.h new file mode 100644 index 000000000..904f8afa4 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListWafQpsRequest.h @@ -0,0 +1,126 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafQpsRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafQpsRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListWafQpsRequest + : public ModelBase +{ +public: + ListWafQpsRequest(); + virtual ~ListWafQpsRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListWafQpsRequest members + + /// + /// 不传时代表全部域名 + /// + + std::string getDomains() const; + bool domainsIsSet() const; + void unsetdomains(); + void setDomains(const std::string& value); + + /// + /// 用于 QPS、带宽: 平均值 mean、峰值 peak;用于 响应状态码: 源站返回值 source 、高防返回值 proxy + /// + + std::string getValueType() const; + bool valueTypeIsSet() const; + void unsetvalueType(); + void setValueType(const std::string& value); + + /// + /// 开始时间(毫秒时间戳) + /// + + std::string getStartTime() const; + bool startTimeIsSet() const; + void unsetstartTime(); + void setStartTime(const std::string& value); + + /// + /// 结束时间(毫秒时间戳) + /// + + std::string getEndTime() const; + bool endTimeIsSet() const; + void unsetendTime(); + void setEndTime(const std::string& value); + + /// + /// 枚举值:yesterday,today,3days,1week,1month 与开始结束时间不同时为空 + /// + + std::string getRecent() const; + bool recentIsSet() const; + void unsetrecent(); + void setRecent(const std::string& value); + + /// + /// 实例类型,0-大陆,1-海外 + /// + + int32_t getOverseasType() const; + bool overseasTypeIsSet() const; + void unsetoverseasType(); + void setOverseasType(int32_t value); + + +protected: + std::string domains_; + bool domainsIsSet_; + std::string valueType_; + bool valueTypeIsSet_; + std::string startTime_; + bool startTimeIsSet_; + std::string endTime_; + bool endTimeIsSet_; + std::string recent_; + bool recentIsSet_; + int32_t overseasType_; + bool overseasTypeIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListWafQpsRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafQpsRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListWafQpsResponse.h b/aad/include/huaweicloud/aad/v2/model/ListWafQpsResponse.h new file mode 100644 index 000000000..975053aba --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListWafQpsResponse.h @@ -0,0 +1,68 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafQpsResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafQpsResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListWafQpsResponse + : public ModelBase, public HttpResponse +{ +public: + ListWafQpsResponse(); + virtual ~ListWafQpsResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListWafQpsResponse members + + /// + /// curve + /// + + std::vector& getCurve(); + bool curveIsSet() const; + void unsetcurve(); + void setCurve(const std::vector& value); + + +protected: + std::vector curve_; + bool curveIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafQpsResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListWafWhiteIpRuleRequest.h b/aad/include/huaweicloud/aad/v2/model/ListWafWhiteIpRuleRequest.h new file mode 100644 index 000000000..32a3247f2 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListWafWhiteIpRuleRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafWhiteIpRuleRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafWhiteIpRuleRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListWafWhiteIpRuleRequest + : public ModelBase +{ +public: + ListWafWhiteIpRuleRequest(); + virtual ~ListWafWhiteIpRuleRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListWafWhiteIpRuleRequest members + + /// + /// 域名 + /// + + std::string getDomainName() const; + bool domainNameIsSet() const; + void unsetdomainName(); + void setDomainName(const std::string& value); + + /// + /// 防护区域,0-大陆,1-海外 + /// + + int32_t getOverseasType() const; + bool overseasTypeIsSet() const; + void unsetoverseasType(); + void setOverseasType(int32_t value); + + +protected: + std::string domainName_; + bool domainNameIsSet_; + int32_t overseasType_; + bool overseasTypeIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListWafWhiteIpRuleRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafWhiteIpRuleRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListWafWhiteIpRuleResponse.h b/aad/include/huaweicloud/aad/v2/model/ListWafWhiteIpRuleResponse.h new file mode 100644 index 000000000..a4fd949d7 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListWafWhiteIpRuleResponse.h @@ -0,0 +1,90 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafWhiteIpRuleResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafWhiteIpRuleResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListWafWhiteIpRuleResponse + : public ModelBase, public HttpResponse +{ +public: + ListWafWhiteIpRuleResponse(); + virtual ~ListWafWhiteIpRuleResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListWafWhiteIpRuleResponse members + + /// + /// total + /// + + int32_t getTotal() const; + bool totalIsSet() const; + void unsettotal(); + void setTotal(int32_t value); + + /// + /// black + /// + + std::vector& getBlack(); + bool blackIsSet() const; + void unsetblack(); + void setBlack(const std::vector& value); + + /// + /// white + /// + + std::vector& getWhite(); + bool whiteIsSet() const; + void unsetwhite(); + void setWhite(const std::vector& value); + + +protected: + int32_t total_; + bool totalIsSet_; + std::vector black_; + bool blackIsSet_; + std::vector white_; + bool whiteIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWafWhiteIpRuleResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListWhiteBlackIpRuleRequest.h b/aad/include/huaweicloud/aad/v2/model/ListWhiteBlackIpRuleRequest.h new file mode 100644 index 000000000..b1b72a416 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListWhiteBlackIpRuleRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWhiteBlackIpRuleRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWhiteBlackIpRuleRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListWhiteBlackIpRuleRequest + : public ModelBase +{ +public: + ListWhiteBlackIpRuleRequest(); + virtual ~ListWhiteBlackIpRuleRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListWhiteBlackIpRuleRequest members + + /// + /// white-白名单,black-黑名单 + /// + + std::string getType() const; + bool typeIsSet() const; + void unsettype(); + void setType(const std::string& value); + + /// + /// instanceId + /// + + std::string getInstanceId() const; + bool instanceIdIsSet() const; + void unsetinstanceId(); + void setInstanceId(const std::string& value); + + +protected: + std::string type_; + bool typeIsSet_; + std::string instanceId_; + bool instanceIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListWhiteBlackIpRuleRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWhiteBlackIpRuleRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ListWhiteBlackIpRuleResponse.h b/aad/include/huaweicloud/aad/v2/model/ListWhiteBlackIpRuleResponse.h new file mode 100644 index 000000000..4332c184b --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ListWhiteBlackIpRuleResponse.h @@ -0,0 +1,79 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWhiteBlackIpRuleResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWhiteBlackIpRuleResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ListWhiteBlackIpRuleResponse + : public ModelBase, public HttpResponse +{ +public: + ListWhiteBlackIpRuleResponse(); + virtual ~ListWhiteBlackIpRuleResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListWhiteBlackIpRuleResponse members + + /// + /// total + /// + + int32_t getTotal() const; + bool totalIsSet() const; + void unsettotal(); + void setTotal(int32_t value); + + /// + /// 名单列表 + /// + + std::vector& getIps(); + bool ipsIsSet() const; + void unsetips(); + void setIps(const std::vector& value); + + +protected: + int32_t total_; + bool totalIsSet_; + std::vector ips_; + bool ipsIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ListWhiteBlackIpRuleResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/PageRespInfo.h b/aad/include/huaweicloud/aad/v2/model/PageRespInfo.h new file mode 100644 index 000000000..5aee62139 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/PageRespInfo.h @@ -0,0 +1,75 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_PageRespInfo_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_PageRespInfo_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT PageRespInfo + : public ModelBase +{ +public: + PageRespInfo(); + virtual ~PageRespInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// PageRespInfo members + + /// + /// 页面类型 + /// + + std::string getContentType() const; + bool contentTypeIsSet() const; + void unsetcontentType(); + void setContentType(const std::string& value); + + /// + /// 页面内容 + /// + + std::string getContent() const; + bool contentIsSet() const; + void unsetcontent(); + void setContent(const std::string& value); + + +protected: + std::string contentType_; + bool contentTypeIsSet_; + std::string content_; + bool contentIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_PageRespInfo_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/Point.h b/aad/include/huaweicloud/aad/v2/model/Point.h new file mode 100644 index 000000000..06e75d5f4 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/Point.h @@ -0,0 +1,118 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_Point_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_Point_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT Point + : public ModelBase +{ +public: + Point(); + virtual ~Point(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// Point members + + /// + /// 时间戳 + /// + + int32_t getTime() const; + bool timeIsSet() const; + void unsettime(); + void setTime(int32_t value); + + /// + /// 请求总量 + /// + + int32_t getTotal() const; + bool totalIsSet() const; + void unsettotal(); + void setTotal(int32_t value); + + /// + /// 攻击总量 + /// + + int32_t getAttack() const; + bool attackIsSet() const; + void unsetattack(); + void setAttack(int32_t value); + + /// + /// web基础防护 + /// + + int32_t getBasic() const; + bool basicIsSet() const; + void unsetbasic(); + void setBasic(int32_t value); + + /// + /// 频率控制 + /// + + int32_t getCc() const; + bool ccIsSet() const; + void unsetcc(); + void setCc(int32_t value); + + /// + /// 精准防护 + /// + + int32_t getCustomCustom() const; + bool customCustomIsSet() const; + void unsetcustomCustom(); + void setCustomCustom(int32_t value); + + +protected: + int32_t time_; + bool timeIsSet_; + int32_t total_; + bool totalIsSet_; + int32_t attack_; + bool attackIsSet_; + int32_t basic_; + bool basicIsSet_; + int32_t cc_; + bool ccIsSet_; + int32_t customCustom_; + bool customCustomIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_Point_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ShowDomainCertificateRequest.h b/aad/include/huaweicloud/aad/v2/model/ShowDomainCertificateRequest.h new file mode 100644 index 000000000..2ddefab99 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ShowDomainCertificateRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowDomainCertificateRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowDomainCertificateRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ShowDomainCertificateRequest + : public ModelBase +{ +public: + ShowDomainCertificateRequest(); + virtual ~ShowDomainCertificateRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowDomainCertificateRequest members + + /// + /// 域名id + /// + + std::string getDomainId() const; + bool domainIdIsSet() const; + void unsetdomainId(); + void setDomainId(const std::string& value); + + +protected: + std::string domainId_; + bool domainIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowDomainCertificateRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowDomainCertificateRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ShowDomainCertificateResponse.h b/aad/include/huaweicloud/aad/v2/model/ShowDomainCertificateResponse.h new file mode 100644 index 000000000..2d846a71b --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ShowDomainCertificateResponse.h @@ -0,0 +1,90 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowDomainCertificateResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowDomainCertificateResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ShowDomainCertificateResponse + : public ModelBase, public HttpResponse +{ +public: + ShowDomainCertificateResponse(); + virtual ~ShowDomainCertificateResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowDomainCertificateResponse members + + /// + /// 域名id + /// + + std::string getDomainId() const; + bool domainIdIsSet() const; + void unsetdomainId(); + void setDomainId(const std::string& value); + + /// + /// 域名 + /// + + std::string getDomainName() const; + bool domainNameIsSet() const; + void unsetdomainName(); + void setDomainName(const std::string& value); + + /// + /// + /// + + CertInfo getCertInfo() const; + bool certInfoIsSet() const; + void unsetcertInfo(); + void setCertInfo(const CertInfo& value); + + +protected: + std::string domainId_; + bool domainIdIsSet_; + std::string domainName_; + bool domainNameIsSet_; + CertInfo certInfo_; + bool certInfoIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowDomainCertificateResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ShowFlowBlockRequest.h b/aad/include/huaweicloud/aad/v2/model/ShowFlowBlockRequest.h new file mode 100644 index 000000000..871a996ea --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ShowFlowBlockRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowFlowBlockRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowFlowBlockRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ShowFlowBlockRequest + : public ModelBase +{ +public: + ShowFlowBlockRequest(); + virtual ~ShowFlowBlockRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowFlowBlockRequest members + + /// + /// instanceId + /// + + std::string getInstanceId() const; + bool instanceIdIsSet() const; + void unsetinstanceId(); + void setInstanceId(const std::string& value); + + +protected: + std::string instanceId_; + bool instanceIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowFlowBlockRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowFlowBlockRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ShowFlowBlockResponse.h b/aad/include/huaweicloud/aad/v2/model/ShowFlowBlockResponse.h new file mode 100644 index 000000000..81de12cb0 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ShowFlowBlockResponse.h @@ -0,0 +1,79 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowFlowBlockResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowFlowBlockResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ShowFlowBlockResponse + : public ModelBase, public HttpResponse +{ +public: + ShowFlowBlockResponse(); + virtual ~ShowFlowBlockResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowFlowBlockResponse members + + /// + /// total + /// + + int32_t getTotal() const; + bool totalIsSet() const; + void unsettotal(); + void setTotal(int32_t value); + + /// + /// ips + /// + + std::vector& getIps(); + bool ipsIsSet() const; + void unsetips(); + void setIps(const std::vector& value); + + +protected: + int32_t total_; + bool totalIsSet_; + std::vector ips_; + bool ipsIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowFlowBlockResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ShowWafPolicyRequest.h b/aad/include/huaweicloud/aad/v2/model/ShowWafPolicyRequest.h new file mode 100644 index 000000000..b9b5d2cd6 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ShowWafPolicyRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowWafPolicyRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowWafPolicyRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ShowWafPolicyRequest + : public ModelBase +{ +public: + ShowWafPolicyRequest(); + virtual ~ShowWafPolicyRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowWafPolicyRequest members + + /// + /// 域名 + /// + + std::string getDomainName() const; + bool domainNameIsSet() const; + void unsetdomainName(); + void setDomainName(const std::string& value); + + /// + /// 防护区域,0-大陆,1-海外 + /// + + int32_t getOverseasType() const; + bool overseasTypeIsSet() const; + void unsetoverseasType(); + void setOverseasType(int32_t value); + + +protected: + std::string domainName_; + bool domainNameIsSet_; + int32_t overseasType_; + bool overseasTypeIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowWafPolicyRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowWafPolicyRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ShowWafPolicyResponse.h b/aad/include/huaweicloud/aad/v2/model/ShowWafPolicyResponse.h new file mode 100644 index 000000000..13dec63a3 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ShowWafPolicyResponse.h @@ -0,0 +1,112 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowWafPolicyResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowWafPolicyResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ShowWafPolicyResponse + : public ModelBase, public HttpResponse +{ +public: + ShowWafPolicyResponse(); + virtual ~ShowWafPolicyResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowWafPolicyResponse members + + /// + /// 域名(包含端口) + /// + + std::string getDomainName() const; + bool domainNameIsSet() const; + void unsetdomainName(); + void setDomainName(const std::string& value); + + /// + /// 0-中国大陆,1-中国大陆外 + /// + + int32_t getOverseasType() const; + bool overseasTypeIsSet() const; + void unsetoverseasType(); + void setOverseasType(int32_t value); + + /// + /// + /// + + WafPolicyOptions getOptions() const; + bool optionsIsSet() const; + void unsetoptions(); + void setOptions(const WafPolicyOptions& value); + + /// + /// 智能CC防护等级:[0-宽松,1- 正常, 2- 严格] + /// + + int32_t getLevel() const; + bool levelIsSet() const; + void unsetlevel(); + void setLevel(int32_t value); + + /// + /// 智能CC模式:0-预警,1-防护 + /// + + int32_t getMode() const; + bool modeIsSet() const; + void unsetmode(); + void setMode(int32_t value); + + +protected: + std::string domainName_; + bool domainNameIsSet_; + int32_t overseasType_; + bool overseasTypeIsSet_; + WafPolicyOptions options_; + bool optionsIsSet_; + int32_t level_; + bool levelIsSet_; + int32_t mode_; + bool modeIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowWafPolicyResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ShowWafQpsRequest.h b/aad/include/huaweicloud/aad/v2/model/ShowWafQpsRequest.h new file mode 100644 index 000000000..9c2fc39ed --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ShowWafQpsRequest.h @@ -0,0 +1,115 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowWafQpsRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowWafQpsRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ShowWafQpsRequest + : public ModelBase +{ +public: + ShowWafQpsRequest(); + virtual ~ShowWafQpsRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowWafQpsRequest members + + /// + /// 枚举值:yesterday,today,3days,1week,1month 与开始结束时间不同时为空 + /// + + std::string getRecent() const; + bool recentIsSet() const; + void unsetrecent(); + void setRecent(const std::string& value); + + /// + /// 查询域名 + /// + + std::string getDomains() const; + bool domainsIsSet() const; + void unsetdomains(); + void setDomains(const std::string& value); + + /// + /// 开始时间(毫秒时间戳) + /// + + std::string getStartTime() const; + bool startTimeIsSet() const; + void unsetstartTime(); + void setStartTime(const std::string& value); + + /// + /// 结束时间(毫秒时间戳) + /// + + std::string getEndTime() const; + bool endTimeIsSet() const; + void unsetendTime(); + void setEndTime(const std::string& value); + + /// + /// 防护区域,0-大陆,1-海外 + /// + + int32_t getOverseasType() const; + bool overseasTypeIsSet() const; + void unsetoverseasType(); + void setOverseasType(int32_t value); + + +protected: + std::string recent_; + bool recentIsSet_; + std::string domains_; + bool domainsIsSet_; + std::string startTime_; + bool startTimeIsSet_; + std::string endTime_; + bool endTimeIsSet_; + int32_t overseasType_; + bool overseasTypeIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowWafQpsRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowWafQpsRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/ShowWafQpsResponse.h b/aad/include/huaweicloud/aad/v2/model/ShowWafQpsResponse.h new file mode 100644 index 000000000..6030e40bb --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/ShowWafQpsResponse.h @@ -0,0 +1,66 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowWafQpsResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowWafQpsResponse_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT ShowWafQpsResponse + : public ModelBase, public HttpResponse +{ +public: + ShowWafQpsResponse(); + virtual ~ShowWafQpsResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowWafQpsResponse members + + /// + /// qps + /// + + int32_t getQps() const; + bool qpsIsSet() const; + void unsetqps(); + void setQps(int32_t value); + + +protected: + int32_t qps_; + bool qpsIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_ShowWafQpsResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/TagCondition.h b/aad/include/huaweicloud/aad/v2/model/TagCondition.h new file mode 100644 index 000000000..cfc29a39c --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/TagCondition.h @@ -0,0 +1,76 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_TagCondition_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_TagCondition_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT TagCondition + : public ModelBase +{ +public: + TagCondition(); + virtual ~TagCondition(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// TagCondition members + + /// + /// 防护动作 + /// + + std::string getCategory() const; + bool categoryIsSet() const; + void unsetcategory(); + void setCategory(const std::string& value); + + /// + /// 字段内容 + /// + + std::vector& getContents(); + bool contentsIsSet() const; + void unsetcontents(); + void setContents(const std::vector& value); + + +protected: + std::string category_; + bool categoryIsSet_; + std::vector contents_; + bool contentsIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_TagCondition_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/UpgradeInstanceData.h b/aad/include/huaweicloud/aad/v2/model/UpgradeInstanceData.h new file mode 100644 index 000000000..888d7a048 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/UpgradeInstanceData.h @@ -0,0 +1,108 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_UpgradeInstanceData_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_UpgradeInstanceData_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT UpgradeInstanceData + : public ModelBase +{ +public: + UpgradeInstanceData(); + virtual ~UpgradeInstanceData(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpgradeInstanceData members + + /// + /// 保底带宽(G) + /// + + std::string getBasicBandwidth() const; + bool basicBandwidthIsSet() const; + void unsetbasicBandwidth(); + void setBasicBandwidth(const std::string& value); + + /// + /// 弹性带宽(G) + /// + + std::string getElasticBandwidth() const; + bool elasticBandwidthIsSet() const; + void unsetelasticBandwidth(); + void setElasticBandwidth(const std::string& value); + + /// + /// 业务带宽 + /// + + int32_t getServiceBandwidth() const; + bool serviceBandwidthIsSet() const; + void unsetserviceBandwidth(); + void setServiceBandwidth(int32_t value); + + /// + /// 端口数 + /// + + int32_t getPortNum() const; + bool portNumIsSet() const; + void unsetportNum(); + void setPortNum(int32_t value); + + /// + /// 域名数 + /// + + int32_t getBindDomainNum() const; + bool bindDomainNumIsSet() const; + void unsetbindDomainNum(); + void setBindDomainNum(int32_t value); + + +protected: + std::string basicBandwidth_; + bool basicBandwidthIsSet_; + std::string elasticBandwidth_; + bool elasticBandwidthIsSet_; + int32_t serviceBandwidth_; + bool serviceBandwidthIsSet_; + int32_t portNum_; + bool portNumIsSet_; + int32_t bindDomainNum_; + bool bindDomainNumIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_UpgradeInstanceData_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/UpgradeInstanceSpecRequest.h b/aad/include/huaweicloud/aad/v2/model/UpgradeInstanceSpecRequest.h new file mode 100644 index 000000000..4d15a6460 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/UpgradeInstanceSpecRequest.h @@ -0,0 +1,71 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_UpgradeInstanceSpecRequest_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_UpgradeInstanceSpecRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT UpgradeInstanceSpecRequest + : public ModelBase +{ +public: + UpgradeInstanceSpecRequest(); + virtual ~UpgradeInstanceSpecRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpgradeInstanceSpecRequest members + + /// + /// + /// + + UpgradeInstanceSpecV2RequestBody getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const UpgradeInstanceSpecV2RequestBody& value); + + +protected: + UpgradeInstanceSpecV2RequestBody body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + UpgradeInstanceSpecRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_UpgradeInstanceSpecRequest_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/UpgradeInstanceSpecResponse.h b/aad/include/huaweicloud/aad/v2/model/UpgradeInstanceSpecResponse.h new file mode 100644 index 000000000..a202fa81b --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/UpgradeInstanceSpecResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_UpgradeInstanceSpecResponse_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_UpgradeInstanceSpecResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_AAD_V2_EXPORT UpgradeInstanceSpecResponse + : public ModelBase, public HttpResponse +{ +public: + UpgradeInstanceSpecResponse(); + virtual ~UpgradeInstanceSpecResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpgradeInstanceSpecResponse members + + /// + /// 订单id + /// + + std::string getOrderId() const; + bool orderIdIsSet() const; + void unsetorderId(); + void setOrderId(const std::string& value); + + +protected: + std::string orderId_; + bool orderIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_UpgradeInstanceSpecResponse_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/UpgradeInstanceSpecV2RequestBody.h b/aad/include/huaweicloud/aad/v2/model/UpgradeInstanceSpecV2RequestBody.h new file mode 100644 index 000000000..b0be66c59 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/UpgradeInstanceSpecV2RequestBody.h @@ -0,0 +1,76 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_UpgradeInstanceSpecV2RequestBody_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_UpgradeInstanceSpecV2RequestBody_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT UpgradeInstanceSpecV2RequestBody + : public ModelBase +{ +public: + UpgradeInstanceSpecV2RequestBody(); + virtual ~UpgradeInstanceSpecV2RequestBody(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpgradeInstanceSpecV2RequestBody members + + /// + /// 实例id + /// + + std::string getInstanceId() const; + bool instanceIdIsSet() const; + void unsetinstanceId(); + void setInstanceId(const std::string& value); + + /// + /// + /// + + UpgradeInstanceData getUpgradeData() const; + bool upgradeDataIsSet() const; + void unsetupgradeData(); + void setUpgradeData(const UpgradeInstanceData& value); + + +protected: + std::string instanceId_; + bool instanceIdIsSet_; + UpgradeInstanceData upgradeData_; + bool upgradeDataIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_UpgradeInstanceSpecV2RequestBody_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/WafCustomCondition.h b/aad/include/huaweicloud/aad/v2/model/WafCustomCondition.h new file mode 100644 index 000000000..44ad3b923 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/WafCustomCondition.h @@ -0,0 +1,98 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_WafCustomCondition_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_WafCustomCondition_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// cc规则防护规则限速条件 +/// +class HUAWEICLOUD_AAD_V2_EXPORT WafCustomCondition + : public ModelBase +{ +public: + WafCustomCondition(); + virtual ~WafCustomCondition(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// WafCustomCondition members + + /// + /// 字段类型 枚举值: url:路径 ip:IPv4 user-agent: User Agent method: Method referer: Referer params:Params cookie:Cookie header:Header request_line: Request Line request: Request + /// + + std::string getCategory() const; + bool categoryIsSet() const; + void unsetcategory(); + void setCategory(const std::string& value); + + /// + /// 子字段 - 当字段类型为url,user-agent、refer、request_line、method、request时,不需要传index参数 - 当字段类型为ip或ipv6时,index必填且必须为以下值: client-ip:客户端IP x-forwarded-for:X-Forwarded-For TCP连接IP: $remote_addr - 当字段类型(category)选择“params”、“cookie”、“header”时,请根据实际需求配置子字段且该参数必填。 - 当匹配逻辑为num_greater、num_less、num_equal、num_not_equal时,子字段必须为空 - 当子字段不为空时,最大长度不超过2048 + /// + + std::string getIndex() const; + bool indexIsSet() const; + void unsetindex(); + void setIndex(const std::string& value); + + /// + /// 条件列表匹配逻辑。 如果字段类型category是url、user-agent或者referer, 匹配逻辑可以为:contain、 not_contain、 equal、 not_equal、 prefix、 not_prefix、 suffix、 not_suffix、 len_greater、 len_less、len_equal或者len_not_equal 如果字段类型category是ip、ipv6或method,匹配逻辑可以为: equal、not_equal 如果字段类型category是request_line或者request, 匹配逻辑可以为: len_greater、len_less、len_equal或者len_not_equal 如果字段类型category是params、cookie或者header, 匹配逻辑可以为:contain、 not_contain、 equal、 not_equal、 prefix、 not_prefix、 suffix、 not_suffix、 len_greater、 len_less、len_equal、len_not_equal、num_greater、num_less、num_equal、num_not_equal、exist或者not_exist + /// + + std::string getLogicOperation() const; + bool logicOperationIsSet() const; + void unsetlogicOperation(); + void setLogicOperation(const std::string& value); + + /// + /// 条件列表逻辑匹配内容。 - 当匹配逻辑为exist或not_exist时,contents必须为空,其他情况下contents必填且长度不超过2048 - 当匹配逻辑包含\"len\"时,contents必须为0~65535的整数;当匹配逻辑包含\"num\"时,contents必须为0~512的整数 - 当category为method时, contents必须是1-64位大写字母 + /// + + std::vector& getContents(); + bool contentsIsSet() const; + void unsetcontents(); + void setContents(const std::vector& value); + + +protected: + std::string category_; + bool categoryIsSet_; + std::string index_; + bool indexIsSet_; + std::string logicOperation_; + bool logicOperationIsSet_; + std::vector contents_; + bool contentsIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_WafCustomCondition_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/WafCustomRule.h b/aad/include/huaweicloud/aad/v2/model/WafCustomRule.h new file mode 100644 index 000000000..a7baf347a --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/WafCustomRule.h @@ -0,0 +1,166 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_WafCustomRule_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_WafCustomRule_H_ + + +#include + +#include +#include +#include + +#include +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT WafCustomRule + : public ModelBase +{ +public: + WafCustomRule(); + virtual ~WafCustomRule(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// WafCustomRule members + + /// + /// id + /// + + std::string getId() const; + bool idIsSet() const; + void unsetid(); + void setId(const std::string& value); + + /// + /// name + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + /// + /// 精准防护规则生效时间。true-自定义生效时间,false-立即生效 + /// + + bool isTime() const; + bool timeIsSet() const; + void unsettime(); + void setTime(bool value); + + /// + /// 精准防护规则生效的起始时间戳(秒) + /// + + int64_t getStart() const; + bool startIsSet() const; + void unsetstart(); + void setStart(int64_t value); + + /// + /// 精准防护规则生效的终止时间戳(秒) + /// + + int64_t getTerminal() const; + bool terminalIsSet() const; + void unsetterminal(); + void setTerminal(int64_t value); + + /// + /// 执行该规则的优先级,值越小,优先级越高。取值范围:0到1000。 + /// + + int32_t getPriority() const; + bool priorityIsSet() const; + void unsetpriority(); + void setPriority(int32_t value); + + /// + /// condition + /// + + std::vector& getConditions(); + bool conditionsIsSet() const; + void unsetconditions(); + void setConditions(const std::vector& value); + + /// + /// + /// + + WafCustomRuleAction getAction() const; + bool actionIsSet() const; + void unsetaction(); + void setAction(const WafCustomRuleAction& value); + + /// + /// 域名 + /// + + std::string getDomainName() const; + bool domainNameIsSet() const; + void unsetdomainName(); + void setDomainName(const std::string& value); + + /// + /// 防护区域,0-大陆,1-海外 + /// + + int32_t getOverseasType() const; + bool overseasTypeIsSet() const; + void unsetoverseasType(); + void setOverseasType(int32_t value); + + +protected: + std::string id_; + bool idIsSet_; + std::string name_; + bool nameIsSet_; + bool time_; + bool timeIsSet_; + int64_t start_; + bool startIsSet_; + int64_t terminal_; + bool terminalIsSet_; + int32_t priority_; + bool priorityIsSet_; + std::vector conditions_; + bool conditionsIsSet_; + WafCustomRuleAction action_; + bool actionIsSet_; + std::string domainName_; + bool domainNameIsSet_; + int32_t overseasType_; + bool overseasTypeIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_WafCustomRule_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/WafCustomRuleAction.h b/aad/include/huaweicloud/aad/v2/model/WafCustomRuleAction.h new file mode 100644 index 000000000..80a9b9151 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/WafCustomRuleAction.h @@ -0,0 +1,64 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_WafCustomRuleAction_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_WafCustomRuleAction_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT WafCustomRuleAction + : public ModelBase +{ +public: + WafCustomRuleAction(); + virtual ~WafCustomRuleAction(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// WafCustomRuleAction members + + /// + /// 防护动作。 “block”:拦截。 “pass”:放行。 “log”:仅记录 + /// + + std::string getCategory() const; + bool categoryIsSet() const; + void unsetcategory(); + void setCategory(const std::string& value); + + +protected: + std::string category_; + bool categoryIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_WafCustomRuleAction_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/WafGeoIpRule.h b/aad/include/huaweicloud/aad/v2/model/WafGeoIpRule.h new file mode 100644 index 000000000..03672ee7a --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/WafGeoIpRule.h @@ -0,0 +1,119 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_WafGeoIpRule_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_WafGeoIpRule_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT WafGeoIpRule + : public ModelBase +{ +public: + WafGeoIpRule(); + virtual ~WafGeoIpRule(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// WafGeoIpRule members + + /// + /// 地理位置 + /// + + std::string getGeoip() const; + bool geoipIsSet() const; + void unsetgeoip(); + void setGeoip(const std::string& 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); + + /// + /// 防护区域,0-大陆,1-海外 + /// + + int32_t getOverseasType() const; + bool overseasTypeIsSet() const; + void unsetoverseasType(); + void setOverseasType(int32_t value); + + /// + /// 添加时间 + /// + + int32_t getTimestamp() const; + bool timestampIsSet() const; + void unsettimestamp(); + void setTimestamp(int32_t value); + + /// + /// 防护动作 0-阻断,1-放行,2-仅记录 + /// + + int32_t getWhite() const; + bool whiteIsSet() const; + void unsetwhite(); + void setWhite(int32_t value); + + +protected: + std::string geoip_; + bool geoipIsSet_; + std::string id_; + bool idIsSet_; + std::string name_; + bool nameIsSet_; + int32_t overseasType_; + bool overseasTypeIsSet_; + int32_t timestamp_; + bool timestampIsSet_; + int32_t white_; + bool whiteIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_WafGeoIpRule_H_ diff --git a/aad/include/huaweicloud/aad/v2/model/WafPolicyOptions.h b/aad/include/huaweicloud/aad/v2/model/WafPolicyOptions.h new file mode 100644 index 000000000..550366266 --- /dev/null +++ b/aad/include/huaweicloud/aad/v2/model/WafPolicyOptions.h @@ -0,0 +1,107 @@ + +#ifndef HUAWEICLOUD_SDK_AAD_V2_MODEL_WafPolicyOptions_H_ +#define HUAWEICLOUD_SDK_AAD_V2_MODEL_WafPolicyOptions_H_ + + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_AAD_V2_EXPORT WafPolicyOptions + : public ModelBase +{ +public: + WafPolicyOptions(); + virtual ~WafPolicyOptions(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// WafPolicyOptions members + + /// + /// 是否开启CC(频率控制) + /// + + bool isCc() const; + bool ccIsSet() const; + void unsetcc(); + void setCc(bool value); + + /// + /// 是否开启精准访问防护 + /// + + bool isCustom() const; + bool customIsSet() const; + void unsetcustom(); + void setCustom(bool value); + + /// + /// 是否开启区域封禁防护 + /// + + bool isGeoip() const; + bool geoipIsSet() const; + void unsetgeoip(); + void setGeoip(bool value); + + /// + /// 是否开启黑白名单防护 + /// + + bool isWhiteblackip() const; + bool whiteblackipIsSet() const; + void unsetwhiteblackip(); + void setWhiteblackip(bool value); + + /// + /// 是否开启智能CC防护 + /// + + bool isModulexEnabled() const; + bool modulexEnabledIsSet() const; + void unsetmodulexEnabled(); + void setModulexEnabled(bool value); + + +protected: + bool cc_; + bool ccIsSet_; + bool custom_; + bool customIsSet_; + bool geoip_; + bool geoipIsSet_; + bool whiteblackip_; + bool whiteblackipIsSet_; + bool modulexEnabled_; + bool modulexEnabledIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_AAD_V2_MODEL_WafPolicyOptions_H_ diff --git a/aad/src/v1/AadClient.cpp b/aad/src/v1/AadClient.cpp index 652675215..46ee4b2b7 100644 --- a/aad/src/v1/AadClient.cpp +++ b/aad/src/v1/AadClient.cpp @@ -325,6 +325,48 @@ std::shared_ptr AadClient::associateIpToPolicy(Asso return localVarResult; } +std::shared_ptr AadClient::associateIpToPolicyAndPackage(AssociateIpToPolicyAndPackageRequest &request) +{ + std::string localVarPath = "/v3/cnad/policies/{policy_id}/bind"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["policy_id"] = parameterToString(request.getPolicyId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + std::string localVarHttpBody; + 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, AadMeta::genRequestDefForAssociateIpToPolicyAndPackage()); + + 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 AadClient::batchCreateInstanceIpRule(BatchCreateInstanceIpRuleRequest &request) { std::string localVarPath = "/v1/aad/instances/{instance_id}/{ip}/rules/batch-create"; @@ -677,6 +719,48 @@ std::shared_ptr AadClient::disassociateIpFromP return localVarResult; } +std::shared_ptr AadClient::disassociateIpFromPolicyAndPackage(DisassociateIpFromPolicyAndPackageRequest &request) +{ + std::string localVarPath = "/v3/cnad/policies/{policy_id}/unbind"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["policy_id"] = parameterToString(request.getPolicyId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + std::string localVarHttpBody; + 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, AadMeta::genRequestDefForDisassociateIpFromPolicyAndPackage()); + + 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 AadClient::listDomain(ListDomainRequest &request) { std::string localVarPath = "/v1/aad/protected-domains"; diff --git a/aad/src/v1/AadMeta.cpp b/aad/src/v1/AadMeta.cpp index ec510de38..9d978ab34 100644 --- a/aad/src/v1/AadMeta.cpp +++ b/aad/src/v1/AadMeta.cpp @@ -70,6 +70,15 @@ HttpRequestDef AadMeta::genRequestDefForAssociateIpToPolicy() { return reqDefBuilder; } +HttpRequestDef AadMeta::genRequestDefForAssociateIpToPolicyAndPackage() { + HttpRequestDef reqDefBuilder; + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef AadMeta::genRequestDefForBatchCreateInstanceIpRule() { HttpRequestDef reqDefBuilder; FieldDef bodyParam; @@ -143,6 +152,15 @@ HttpRequestDef AadMeta::genRequestDefForDisassociateIpFromPolicy() { return reqDefBuilder; } +HttpRequestDef AadMeta::genRequestDefForDisassociateIpFromPolicyAndPackage() { + HttpRequestDef reqDefBuilder; + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + HttpRequestDef AadMeta::genRequestDefForListDomain() { HttpRequestDef reqDefBuilder; return reqDefBuilder; diff --git a/aad/src/v1/model/AssociateIpToPolicyAndPackageRequest.cpp b/aad/src/v1/model/AssociateIpToPolicyAndPackageRequest.cpp new file mode 100644 index 000000000..95033ebda --- /dev/null +++ b/aad/src/v1/model/AssociateIpToPolicyAndPackageRequest.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/aad/v1/model/AssociateIpToPolicyAndPackageRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V1 { +namespace Model { + + + + +AssociateIpToPolicyAndPackageRequest::AssociateIpToPolicyAndPackageRequest() +{ + policyId_ = ""; + policyIdIsSet_ = false; + bodyIsSet_ = false; +} + +AssociateIpToPolicyAndPackageRequest::~AssociateIpToPolicyAndPackageRequest() = default; + +void AssociateIpToPolicyAndPackageRequest::validate() +{ +} + +web::json::value AssociateIpToPolicyAndPackageRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(policyIdIsSet_) { + val[utility::conversions::to_string_t("policy_id")] = ModelBase::toJson(policyId_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool AssociateIpToPolicyAndPackageRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("policy_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("policy_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPolicyId(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()) + { + IpBindingV3Body refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string AssociateIpToPolicyAndPackageRequest::getPolicyId() const +{ + return policyId_; +} + +void AssociateIpToPolicyAndPackageRequest::setPolicyId(const std::string& value) +{ + policyId_ = value; + policyIdIsSet_ = true; +} + +bool AssociateIpToPolicyAndPackageRequest::policyIdIsSet() const +{ + return policyIdIsSet_; +} + +void AssociateIpToPolicyAndPackageRequest::unsetpolicyId() +{ + policyIdIsSet_ = false; +} + +IpBindingV3Body AssociateIpToPolicyAndPackageRequest::getBody() const +{ + return body_; +} + +void AssociateIpToPolicyAndPackageRequest::setBody(const IpBindingV3Body& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool AssociateIpToPolicyAndPackageRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void AssociateIpToPolicyAndPackageRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v1/model/AssociateIpToPolicyAndPackageResponse.cpp b/aad/src/v1/model/AssociateIpToPolicyAndPackageResponse.cpp new file mode 100644 index 000000000..1ff96ba36 --- /dev/null +++ b/aad/src/v1/model/AssociateIpToPolicyAndPackageResponse.cpp @@ -0,0 +1,44 @@ + + +#include "huaweicloud/aad/v1/model/AssociateIpToPolicyAndPackageResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V1 { +namespace Model { + + + + +AssociateIpToPolicyAndPackageResponse::AssociateIpToPolicyAndPackageResponse() +{ +} + +AssociateIpToPolicyAndPackageResponse::~AssociateIpToPolicyAndPackageResponse() = default; + +void AssociateIpToPolicyAndPackageResponse::validate() +{ +} + +web::json::value AssociateIpToPolicyAndPackageResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + + return val; +} +bool AssociateIpToPolicyAndPackageResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + return ok; +} + + +} +} +} +} +} + + diff --git a/aad/src/v1/model/DisassociateIpFromPolicyAndPackageRequest.cpp b/aad/src/v1/model/DisassociateIpFromPolicyAndPackageRequest.cpp new file mode 100644 index 000000000..dcae4b405 --- /dev/null +++ b/aad/src/v1/model/DisassociateIpFromPolicyAndPackageRequest.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/aad/v1/model/DisassociateIpFromPolicyAndPackageRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V1 { +namespace Model { + + + + +DisassociateIpFromPolicyAndPackageRequest::DisassociateIpFromPolicyAndPackageRequest() +{ + policyId_ = ""; + policyIdIsSet_ = false; + bodyIsSet_ = false; +} + +DisassociateIpFromPolicyAndPackageRequest::~DisassociateIpFromPolicyAndPackageRequest() = default; + +void DisassociateIpFromPolicyAndPackageRequest::validate() +{ +} + +web::json::value DisassociateIpFromPolicyAndPackageRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(policyIdIsSet_) { + val[utility::conversions::to_string_t("policy_id")] = ModelBase::toJson(policyId_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool DisassociateIpFromPolicyAndPackageRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("policy_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("policy_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPolicyId(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()) + { + IpBindingV3Body refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string DisassociateIpFromPolicyAndPackageRequest::getPolicyId() const +{ + return policyId_; +} + +void DisassociateIpFromPolicyAndPackageRequest::setPolicyId(const std::string& value) +{ + policyId_ = value; + policyIdIsSet_ = true; +} + +bool DisassociateIpFromPolicyAndPackageRequest::policyIdIsSet() const +{ + return policyIdIsSet_; +} + +void DisassociateIpFromPolicyAndPackageRequest::unsetpolicyId() +{ + policyIdIsSet_ = false; +} + +IpBindingV3Body DisassociateIpFromPolicyAndPackageRequest::getBody() const +{ + return body_; +} + +void DisassociateIpFromPolicyAndPackageRequest::setBody(const IpBindingV3Body& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool DisassociateIpFromPolicyAndPackageRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void DisassociateIpFromPolicyAndPackageRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v1/model/DisassociateIpFromPolicyAndPackageResponse.cpp b/aad/src/v1/model/DisassociateIpFromPolicyAndPackageResponse.cpp new file mode 100644 index 000000000..02f869cd6 --- /dev/null +++ b/aad/src/v1/model/DisassociateIpFromPolicyAndPackageResponse.cpp @@ -0,0 +1,44 @@ + + +#include "huaweicloud/aad/v1/model/DisassociateIpFromPolicyAndPackageResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V1 { +namespace Model { + + + + +DisassociateIpFromPolicyAndPackageResponse::DisassociateIpFromPolicyAndPackageResponse() +{ +} + +DisassociateIpFromPolicyAndPackageResponse::~DisassociateIpFromPolicyAndPackageResponse() = default; + +void DisassociateIpFromPolicyAndPackageResponse::validate() +{ +} + +web::json::value DisassociateIpFromPolicyAndPackageResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + + return val; +} +bool DisassociateIpFromPolicyAndPackageResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + return ok; +} + + +} +} +} +} +} + + diff --git a/aad/src/v1/model/IpBindingV3Body.cpp b/aad/src/v1/model/IpBindingV3Body.cpp new file mode 100644 index 000000000..fcda6aac9 --- /dev/null +++ b/aad/src/v1/model/IpBindingV3Body.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/aad/v1/model/IpBindingV3Body.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V1 { +namespace Model { + + + + +IpBindingV3Body::IpBindingV3Body() +{ + ipListIsSet_ = false; +} + +IpBindingV3Body::~IpBindingV3Body() = default; + +void IpBindingV3Body::validate() +{ +} + +web::json::value IpBindingV3Body::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(ipListIsSet_) { + val[utility::conversions::to_string_t("ip_list")] = ModelBase::toJson(ipList_); + } + + return val; +} +bool IpBindingV3Body::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("ip_list"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ip_list")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpList(refVal); + } + } + return ok; +} + + +std::vector& IpBindingV3Body::getIpList() +{ + return ipList_; +} + +void IpBindingV3Body::setIpList(const std::vector& value) +{ + ipList_ = value; + ipListIsSet_ = true; +} + +bool IpBindingV3Body::ipListIsSet() const +{ + return ipListIsSet_; +} + +void IpBindingV3Body::unsetipList() +{ + ipListIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/AadClient.cpp b/aad/src/v2/AadClient.cpp new file mode 100644 index 000000000..0c5fe9846 --- /dev/null +++ b/aad/src/v2/AadClient.cpp @@ -0,0 +1,822 @@ +#include +#include + +#include + +#include + +template +std::string toString(const T value) +{ + std::ostringstream out; + out << std::setprecision(std::numeric_limits::digits10) << std::fixed << value; + return out.str(); +} + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { + +using namespace HuaweiCloud::Sdk::Aad::V2::Model; + +AadClient::AadClient() +{ +} + +AadClient::~AadClient() +{ +} + +ClientBuilder AadClient::newBuilder() +{ + return ClientBuilder("GlobalCredentials"); +} +std::shared_ptr AadClient::createDomain(CreateDomainRequest &request) +{ + std::string localVarPath = "/v2/aad/domains"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + std::string localVarHttpBody; + 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, AadMeta::genRequestDefForCreateDomain()); + + 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 AadClient::listDDoSAttackEvent(ListDDoSAttackEventRequest &request) +{ + std::string localVarPath = "/v2/aad/instances/{instance_id}/ddos-info/attack/events"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["instance_id"] = parameterToString(request.getInstanceId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + std::string localVarHttpBody; + if (isJson) { + // handle json input + web::json::value localVarJson; + localVarJson = ModelBase::toJson(request.getBody()); + localVarHttpBody = utility::conversions::to_utf8string(localVarJson.serialize()); + } + + std::unique_ptr res = callApi("POST", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, AadMeta::genRequestDefForListDDoSAttackEvent()); + + 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 AadClient::listDDoSConnectionNumber(ListDDoSConnectionNumberRequest &request) +{ + std::string localVarPath = "/v2/aad/instances/{instance_id}/ddos-info/flow/connection-numbers"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["instance_id"] = parameterToString(request.getInstanceId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.startTimeIsSet()) { + localVarQueryParams["start_time"] = parameterToString(request.getStartTime()); + } + if (request.endTimeIsSet()) { + localVarQueryParams["end_time"] = parameterToString(request.getEndTime()); + } + if (request.ipIsSet()) { + localVarQueryParams["ip"] = parameterToString(request.getIp()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, AadMeta::genRequestDefForListDDoSConnectionNumber()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr AadClient::listDDoSFlow(ListDDoSFlowRequest &request) +{ + std::string localVarPath = "/v2/aad/instances/{instance_id}/ddos-info/flow"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["instance_id"] = parameterToString(request.getInstanceId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.ipIsSet()) { + localVarQueryParams["ip"] = parameterToString(request.getIp()); + } + if (request.typeIsSet()) { + localVarQueryParams["type"] = parameterToString(request.getType()); + } + if (request.startTimeIsSet()) { + localVarQueryParams["start_time"] = parameterToString(request.getStartTime()); + } + if (request.endTimeIsSet()) { + localVarQueryParams["end_time"] = parameterToString(request.getEndTime()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, AadMeta::genRequestDefForListDDoSFlow()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr AadClient::listFrequencyControlRule(ListFrequencyControlRuleRequest &request) +{ + std::string localVarPath = "/v2/aad/policies/waf/frequency-control-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.domainNameIsSet()) { + localVarQueryParams["domain_name"] = parameterToString(request.getDomainName()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, AadMeta::genRequestDefForListFrequencyControlRule()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr AadClient::listInstanceDomains(ListInstanceDomainsRequest &request) +{ + std::string localVarPath = "/v2/aad/instances/{instance_id}/domains"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["instance_id"] = parameterToString(request.getInstanceId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, AadMeta::genRequestDefForListInstanceDomains()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr AadClient::listWafAttackEvent(ListWafAttackEventRequest &request) +{ + std::string localVarPath = "/v2/aad/domains/waf-info/attack/event"; + + 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.domainsIsSet()) { + localVarQueryParams["domains"] = parameterToString(request.getDomains()); + } + if (request.startTimeIsSet()) { + localVarQueryParams["start_time"] = parameterToString(request.getStartTime()); + } + if (request.endTimeIsSet()) { + localVarQueryParams["end_time"] = parameterToString(request.getEndTime()); + } + if (request.recentIsSet()) { + localVarQueryParams["recent"] = parameterToString(request.getRecent()); + } + if (request.overseasTypeIsSet()) { + localVarQueryParams["overseas_type"] = parameterToString(request.getOverseasType()); + } + if (request.sipIsSet()) { + localVarQueryParams["sip"] = parameterToString(request.getSip()); + } + if (request.limitIsSet()) { + localVarQueryParams["limit"] = parameterToString(request.getLimit()); + } + if (request.offsetIsSet()) { + localVarQueryParams["offset"] = parameterToString(request.getOffset()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, AadMeta::genRequestDefForListWafAttackEvent()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr AadClient::listWafBandwidth(ListWafBandwidthRequest &request) +{ + std::string localVarPath = "/v2/aad/domains/waf-info/flow/bandwidth"; + + 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.domainsIsSet()) { + localVarQueryParams["domains"] = parameterToString(request.getDomains()); + } + if (request.valueTypeIsSet()) { + localVarQueryParams["value_type"] = parameterToString(request.getValueType()); + } + if (request.startTimeIsSet()) { + localVarQueryParams["start_time"] = parameterToString(request.getStartTime()); + } + if (request.endTimeIsSet()) { + localVarQueryParams["end_time"] = parameterToString(request.getEndTime()); + } + if (request.recentIsSet()) { + localVarQueryParams["recent"] = parameterToString(request.getRecent()); + } + if (request.overseasTypeIsSet()) { + localVarQueryParams["overseas_type"] = parameterToString(request.getOverseasType()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, AadMeta::genRequestDefForListWafBandwidth()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr AadClient::listWafCustomRule(ListWafCustomRuleRequest &request) +{ + std::string localVarPath = "/v2/aad/policies/waf/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.domainNameIsSet()) { + localVarQueryParams["domain_name"] = parameterToString(request.getDomainName()); + } + if (request.overseasTypeIsSet()) { + localVarQueryParams["overseas_type"] = parameterToString(request.getOverseasType()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, AadMeta::genRequestDefForListWafCustomRule()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr AadClient::listWafGeoIpRule(ListWafGeoIpRuleRequest &request) +{ + std::string localVarPath = "/v2/aad/policies/waf/geoip-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.domainNameIsSet()) { + localVarQueryParams["domain_name"] = parameterToString(request.getDomainName()); + } + if (request.overseasTypeIsSet()) { + localVarQueryParams["overseas_type"] = parameterToString(request.getOverseasType()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, AadMeta::genRequestDefForListWafGeoIpRule()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr AadClient::listWafQps(ListWafQpsRequest &request) +{ + std::string localVarPath = "/v2/aad/domains/waf-info/flow/qps"; + + 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.domainsIsSet()) { + localVarQueryParams["domains"] = parameterToString(request.getDomains()); + } + if (request.valueTypeIsSet()) { + localVarQueryParams["value_type"] = parameterToString(request.getValueType()); + } + if (request.startTimeIsSet()) { + localVarQueryParams["start_time"] = parameterToString(request.getStartTime()); + } + if (request.endTimeIsSet()) { + localVarQueryParams["end_time"] = parameterToString(request.getEndTime()); + } + if (request.recentIsSet()) { + localVarQueryParams["recent"] = parameterToString(request.getRecent()); + } + if (request.overseasTypeIsSet()) { + localVarQueryParams["overseas_type"] = parameterToString(request.getOverseasType()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, AadMeta::genRequestDefForListWafQps()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr AadClient::listWafWhiteIpRule(ListWafWhiteIpRuleRequest &request) +{ + std::string localVarPath = "/v2/aad/policies/waf/blackwhite-list"; + + 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.domainNameIsSet()) { + localVarQueryParams["domain_name"] = parameterToString(request.getDomainName()); + } + if (request.overseasTypeIsSet()) { + localVarQueryParams["overseas_type"] = parameterToString(request.getOverseasType()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, AadMeta::genRequestDefForListWafWhiteIpRule()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr AadClient::listWhiteBlackIpRule(ListWhiteBlackIpRuleRequest &request) +{ + std::string localVarPath = "/v2/aad/policies/ddos/blackwhite-list"; + + 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.typeIsSet()) { + localVarQueryParams["type"] = parameterToString(request.getType()); + } + if (request.instanceIdIsSet()) { + localVarQueryParams["instance_id"] = parameterToString(request.getInstanceId()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, AadMeta::genRequestDefForListWhiteBlackIpRule()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr AadClient::showDomainCertificate(ShowDomainCertificateRequest &request) +{ + std::string localVarPath = "/v2/aad/domains/{domain_id}/certificate"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["domain_id"] = parameterToString(request.getDomainId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, AadMeta::genRequestDefForShowDomainCertificate()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr AadClient::showFlowBlock(ShowFlowBlockRequest &request) +{ + std::string localVarPath = "/v2/aad/policies/ddos/flow-block"; + + 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.instanceIdIsSet()) { + localVarQueryParams["instance_id"] = parameterToString(request.getInstanceId()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, AadMeta::genRequestDefForShowFlowBlock()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr AadClient::showWafPolicy(ShowWafPolicyRequest &request) +{ + std::string localVarPath = "/v2/aad/policies/waf"; + + 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.domainNameIsSet()) { + localVarQueryParams["domain_name"] = parameterToString(request.getDomainName()); + } + if (request.overseasTypeIsSet()) { + localVarQueryParams["overseas_type"] = parameterToString(request.getOverseasType()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, AadMeta::genRequestDefForShowWafPolicy()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr AadClient::showWafQps(ShowWafQpsRequest &request) +{ + std::string localVarPath = "/v2/aad/domains/waf-info/flow/request/peak"; + + 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.recentIsSet()) { + localVarQueryParams["recent"] = parameterToString(request.getRecent()); + } + if (request.domainsIsSet()) { + localVarQueryParams["domains"] = parameterToString(request.getDomains()); + } + if (request.startTimeIsSet()) { + localVarQueryParams["start_time"] = parameterToString(request.getStartTime()); + } + if (request.endTimeIsSet()) { + localVarQueryParams["end_time"] = parameterToString(request.getEndTime()); + } + if (request.overseasTypeIsSet()) { + localVarQueryParams["overseas_type"] = parameterToString(request.getOverseasType()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, AadMeta::genRequestDefForShowWafQps()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} +std::shared_ptr AadClient::upgradeInstanceSpec(UpgradeInstanceSpecRequest &request) +{ + std::string localVarPath = "/v2/aad/instance"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + std::string localVarHttpBody; + 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, AadMeta::genRequestDefForUpgradeInstanceSpec()); + + 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 AadClient::deleteDomain(DeleteDomainRequest &request) +{ + std::string localVarPath = "/v2/aad/domains"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + + std::string localVarHttpBody; + 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, AadMeta::genRequestDefForDeleteDomain()); + + 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 AadClient::parameterToString(utility::string_t value) +{ + return utility::conversions::to_utf8string(value); +} +#endif +std::string AadClient::parameterToString(std::string value) +{ + return value; +} + +std::string AadClient::parameterToString(int64_t value) +{ + std::stringstream valueAsStringStream; + valueAsStringStream << value; + return valueAsStringStream.str(); +} + +std::string AadClient::parameterToString(int32_t value) +{ + std::stringstream valueAsStringStream; + valueAsStringStream << value; + return valueAsStringStream.str(); +} + +std::string AadClient::parameterToString(float value) +{ + return toString(value); +} + +std::string AadClient::parameterToString(double value) +{ + return toString(value); +} + +std::string AadClient::parameterToString(const Object& obj) +{ + auto val = obj.toJson(); + std::string value; + ModelBase::fromJson(val, value); + return value; +} +std::string AadClient::parameterToString(const utility::datetime &value) +{ + return utility::conversions::to_utf8string(value.to_string(utility::datetime::ISO_8601)); +} + +} +} +} +} + diff --git a/aad/src/v2/AadMeta.cpp b/aad/src/v2/AadMeta.cpp new file mode 100644 index 000000000..0801fe6a4 --- /dev/null +++ b/aad/src/v2/AadMeta.cpp @@ -0,0 +1,259 @@ + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { + +using namespace HuaweiCloud::Sdk::Core::Http; + +HttpRequestDef AadMeta::genRequestDefForCreateDomain() { + HttpRequestDef reqDefBuilder; + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForListDDoSAttackEvent() { + HttpRequestDef reqDefBuilder; + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForListDDoSConnectionNumber() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("StartTime") + .withJsonTag("start_time") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EndTime") + .withJsonTag("end_time") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Ip") + .withJsonTag("ip") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForListDDoSFlow() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("Ip") + .withJsonTag("ip") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Type") + .withJsonTag("type") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("StartTime") + .withJsonTag("start_time") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EndTime") + .withJsonTag("end_time") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForListFrequencyControlRule() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("DomainName") + .withJsonTag("domain_name") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForListInstanceDomains() { + HttpRequestDef reqDefBuilder; + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForListWafAttackEvent() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("Domains") + .withJsonTag("domains") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("StartTime") + .withJsonTag("start_time") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EndTime") + .withJsonTag("end_time") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Recent") + .withJsonTag("recent") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("OverseasType") + .withJsonTag("overseas_type") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Sip") + .withJsonTag("sip") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Limit") + .withJsonTag("limit") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Offset") + .withJsonTag("offset") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForListWafBandwidth() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("Domains") + .withJsonTag("domains") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("ValueType") + .withJsonTag("value_type") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("StartTime") + .withJsonTag("start_time") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EndTime") + .withJsonTag("end_time") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Recent") + .withJsonTag("recent") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("OverseasType") + .withJsonTag("overseas_type") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForListWafCustomRule() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("DomainName") + .withJsonTag("domain_name") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("OverseasType") + .withJsonTag("overseas_type") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForListWafGeoIpRule() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("DomainName") + .withJsonTag("domain_name") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("OverseasType") + .withJsonTag("overseas_type") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForListWafQps() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("Domains") + .withJsonTag("domains") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("ValueType") + .withJsonTag("value_type") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("StartTime") + .withJsonTag("start_time") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EndTime") + .withJsonTag("end_time") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Recent") + .withJsonTag("recent") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("OverseasType") + .withJsonTag("overseas_type") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForListWafWhiteIpRule() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("DomainName") + .withJsonTag("domain_name") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("OverseasType") + .withJsonTag("overseas_type") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForListWhiteBlackIpRule() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("Type") + .withJsonTag("type") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("InstanceId") + .withJsonTag("instance_id") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForShowDomainCertificate() { + HttpRequestDef reqDefBuilder; + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForShowFlowBlock() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("InstanceId") + .withJsonTag("instance_id") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForShowWafPolicy() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("DomainName") + .withJsonTag("domain_name") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("OverseasType") + .withJsonTag("overseas_type") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForShowWafQps() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("Recent") + .withJsonTag("recent") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Domains") + .withJsonTag("domains") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("StartTime") + .withJsonTag("start_time") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EndTime") + .withJsonTag("end_time") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("OverseasType") + .withJsonTag("overseas_type") + .withLocationType(Query_)); + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForUpgradeInstanceSpec() { + HttpRequestDef reqDefBuilder; + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + +HttpRequestDef AadMeta::genRequestDefForDeleteDomain() { + HttpRequestDef reqDefBuilder; + FieldDef bodyParam; + reqDefBuilder.withRequestField(bodyParam. + withName("Body"). + withLocationType(Body_)); + return reqDefBuilder; +} + + +} +} +} +} + diff --git a/aad/src/v2/AadRegion.cpp b/aad/src/v2/AadRegion.cpp new file mode 100644 index 000000000..ffe7341bb --- /dev/null +++ b/aad/src/v2/AadRegion.cpp @@ -0,0 +1,33 @@ +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { + +using namespace HuaweiCloud::Sdk::Core::Auth; +using namespace HuaweiCloud::Sdk::Core::Exception; + +AadRegion::AadRegion() +{} + +AadRegion::~AadRegion() +{} + +std::map AadRegion::regions = AadRegion::initRegions(); + +Region AadRegion::valueOf(std::string regionId) { + if (regionId.empty()) { + throw SdkException("the regionId can not be null!"); + } + auto iter = regions.find(regionId); + if (iter != regions.end()) { + return iter->second; + } + throw SdkException("the regionId is supported for the service!"); +} + +} +} +} +} diff --git a/aad/src/v2/CMakeLists.txt b/aad/src/v2/CMakeLists.txt new file mode 100644 index 000000000..bbcff8a9b --- /dev/null +++ b/aad/src/v2/CMakeLists.txt @@ -0,0 +1,80 @@ +cmake_minimum_required (VERSION 3.10) + +#PROJECT's NAME +project(aad_v2) + +if(CMAKE_HOST_WIN32) + add_compile_options(-bigobj) +else() + set(cxx_base_flags "${cxx_base_flags} -bigobj") +endif() + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_UUID_FORCE_AUTO_LINK") + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) +endif() + +#HEADER FILES +file(GLOB service_client_header + ${CMAKE_SOURCE_DIR}/aad/include/huaweicloud/aad/v2/*.h) +file(GLOB service_model_header + ${CMAKE_SOURCE_DIR}/aad/include/huaweicloud/aad/v2/model/*.h) +#SOURCE FILES +file(GLOB source_file + ${CMAKE_SOURCE_DIR}/aad/src/v2/*.cpp + ${CMAKE_SOURCE_DIR}/aad/src/v2/model/*.cpp) + +add_library(aad_v2 ${LIB_TYPE} + ${source_file} + ${service_client_header} + ${service_model_header}) + +set_target_properties(aad_v2 + PROPERTIES + LINKER_LANGUAGE CXX + ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin + OUTPUT_NAME aad_v2 + ) + +if(CMAKE_HOST_WIN32) + if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(aad_v2 + PROPERTIES + DEFINE_SYMBOL HUAWEICLOUD_AAD_V2_SHARED) + endif() +else() + if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(aad_v2 + PROPERTIES + DEFINE_SYMBOL HUAWEICLOUD_AAD_V2_EXPORT) + endif() +endif() + +target_include_directories(aad_v2 PUBLIC + ${CMAKE_SOURCE_DIR}/aad/include + ) + +target_link_libraries(aad_v2 PUBLIC + core) + +if(ENABLE_RTTR) + if(NOT CMAKE_HOST_WIN32) + set(rttr_DIR /home/nfs/rttr/rttr-0.9.6/build/install/share/rttr/cmake) + endif() + find_package(rttr CONFIG REQUIRED) + target_link_libraries(aad_v2 PUBLIC + RTTR::Core) +endif() + +install(FILES ${service_client_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/huaweicloud/aad/v2) +install(FILES ${service_model_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/huaweicloud/aad/v2/model) +install(TARGETS aad_v2 + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) \ No newline at end of file diff --git a/aad/src/v2/model/ActionInfo.cpp b/aad/src/v2/model/ActionInfo.cpp new file mode 100644 index 000000000..29947aff9 --- /dev/null +++ b/aad/src/v2/model/ActionInfo.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/aad/v2/model/ActionInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ActionInfo::ActionInfo() +{ + category_ = ""; + categoryIsSet_ = false; + detailIsSet_ = false; +} + +ActionInfo::~ActionInfo() = default; + +void ActionInfo::validate() +{ +} + +web::json::value ActionInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(categoryIsSet_) { + val[utility::conversions::to_string_t("category")] = ModelBase::toJson(category_); + } + if(detailIsSet_) { + val[utility::conversions::to_string_t("detail")] = ModelBase::toJson(detail_); + } + + return val; +} +bool ActionInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("category"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("category")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCategory(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("detail"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("detail")); + if(!fieldValue.is_null()) + { + DetailInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDetail(refVal); + } + } + return ok; +} + + +std::string ActionInfo::getCategory() const +{ + return category_; +} + +void ActionInfo::setCategory(const std::string& value) +{ + category_ = value; + categoryIsSet_ = true; +} + +bool ActionInfo::categoryIsSet() const +{ + return categoryIsSet_; +} + +void ActionInfo::unsetcategory() +{ + categoryIsSet_ = false; +} + +DetailInfo ActionInfo::getDetail() const +{ + return detail_; +} + +void ActionInfo::setDetail(const DetailInfo& value) +{ + detail_ = value; + detailIsSet_ = true; +} + +bool ActionInfo::detailIsSet() const +{ + return detailIsSet_; +} + +void ActionInfo::unsetdetail() +{ + detailIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/Backend.cpp b/aad/src/v2/model/Backend.cpp new file mode 100644 index 000000000..6502a032f --- /dev/null +++ b/aad/src/v2/model/Backend.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/aad/v2/model/Backend.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +Backend::Backend() +{ + protocol_ = ""; + protocolIsSet_ = false; + port_ = 0; + portIsSet_ = false; + host_ = ""; + hostIsSet_ = false; +} + +Backend::~Backend() = default; + +void Backend::validate() +{ +} + +web::json::value Backend::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(protocolIsSet_) { + val[utility::conversions::to_string_t("protocol")] = ModelBase::toJson(protocol_); + } + if(portIsSet_) { + val[utility::conversions::to_string_t("port")] = ModelBase::toJson(port_); + } + if(hostIsSet_) { + val[utility::conversions::to_string_t("host")] = ModelBase::toJson(host_); + } + + return val; +} +bool Backend::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("protocol"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("protocol")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setProtocol(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("port"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("port")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPort(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("host"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("host")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setHost(refVal); + } + } + return ok; +} + + +std::string Backend::getProtocol() const +{ + return protocol_; +} + +void Backend::setProtocol(const std::string& value) +{ + protocol_ = value; + protocolIsSet_ = true; +} + +bool Backend::protocolIsSet() const +{ + return protocolIsSet_; +} + +void Backend::unsetprotocol() +{ + protocolIsSet_ = false; +} + +int32_t Backend::getPort() const +{ + return port_; +} + +void Backend::setPort(int32_t value) +{ + port_ = value; + portIsSet_ = true; +} + +bool Backend::portIsSet() const +{ + return portIsSet_; +} + +void Backend::unsetport() +{ + portIsSet_ = false; +} + +std::string Backend::getHost() const +{ + return host_; +} + +void Backend::setHost(const std::string& value) +{ + host_ = value; + hostIsSet_ = true; +} + +bool Backend::hostIsSet() const +{ + return hostIsSet_; +} + +void Backend::unsethost() +{ + hostIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/BlackWhiteListRule.cpp b/aad/src/v2/model/BlackWhiteListRule.cpp new file mode 100644 index 000000000..babaca18d --- /dev/null +++ b/aad/src/v2/model/BlackWhiteListRule.cpp @@ -0,0 +1,184 @@ + + +#include "huaweicloud/aad/v2/model/BlackWhiteListRule.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +BlackWhiteListRule::BlackWhiteListRule() +{ + id_ = ""; + idIsSet_ = false; + type_ = 0; + typeIsSet_ = false; + ip_ = ""; + ipIsSet_ = false; + domainId_ = ""; + domainIdIsSet_ = false; +} + +BlackWhiteListRule::~BlackWhiteListRule() = default; + +void BlackWhiteListRule::validate() +{ +} + +web::json::value BlackWhiteListRule::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(idIsSet_) { + val[utility::conversions::to_string_t("id")] = ModelBase::toJson(id_); + } + if(typeIsSet_) { + val[utility::conversions::to_string_t("type")] = ModelBase::toJson(type_); + } + if(ipIsSet_) { + val[utility::conversions::to_string_t("ip")] = ModelBase::toJson(ip_); + } + if(domainIdIsSet_) { + val[utility::conversions::to_string_t("domain_id")] = ModelBase::toJson(domainId_); + } + + return val; +} +bool BlackWhiteListRule::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("type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ip"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ip")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("domain_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainId(refVal); + } + } + return ok; +} + + +std::string BlackWhiteListRule::getId() const +{ + return id_; +} + +void BlackWhiteListRule::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool BlackWhiteListRule::idIsSet() const +{ + return idIsSet_; +} + +void BlackWhiteListRule::unsetid() +{ + idIsSet_ = false; +} + +int32_t BlackWhiteListRule::getType() const +{ + return type_; +} + +void BlackWhiteListRule::setType(int32_t value) +{ + type_ = value; + typeIsSet_ = true; +} + +bool BlackWhiteListRule::typeIsSet() const +{ + return typeIsSet_; +} + +void BlackWhiteListRule::unsettype() +{ + typeIsSet_ = false; +} + +std::string BlackWhiteListRule::getIp() const +{ + return ip_; +} + +void BlackWhiteListRule::setIp(const std::string& value) +{ + ip_ = value; + ipIsSet_ = true; +} + +bool BlackWhiteListRule::ipIsSet() const +{ + return ipIsSet_; +} + +void BlackWhiteListRule::unsetip() +{ + ipIsSet_ = false; +} + +std::string BlackWhiteListRule::getDomainId() const +{ + return domainId_; +} + +void BlackWhiteListRule::setDomainId(const std::string& value) +{ + domainId_ = value; + domainIdIsSet_ = true; +} + +bool BlackWhiteListRule::domainIdIsSet() const +{ + return domainIdIsSet_; +} + +void BlackWhiteListRule::unsetdomainId() +{ + domainIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/BwListIps.cpp b/aad/src/v2/model/BwListIps.cpp new file mode 100644 index 000000000..eb6a78186 --- /dev/null +++ b/aad/src/v2/model/BwListIps.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/aad/v2/model/BwListIps.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +BwListIps::BwListIps() +{ + ip_ = ""; + ipIsSet_ = false; + desc_ = ""; + descIsSet_ = false; +} + +BwListIps::~BwListIps() = default; + +void BwListIps::validate() +{ +} + +web::json::value BwListIps::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(ipIsSet_) { + val[utility::conversions::to_string_t("ip")] = ModelBase::toJson(ip_); + } + if(descIsSet_) { + val[utility::conversions::to_string_t("desc")] = ModelBase::toJson(desc_); + } + + return val; +} +bool BwListIps::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("ip"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ip")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("desc"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("desc")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDesc(refVal); + } + } + return ok; +} + + +std::string BwListIps::getIp() const +{ + return ip_; +} + +void BwListIps::setIp(const std::string& value) +{ + ip_ = value; + ipIsSet_ = true; +} + +bool BwListIps::ipIsSet() const +{ + return ipIsSet_; +} + +void BwListIps::unsetip() +{ + ipIsSet_ = false; +} + +std::string BwListIps::getDesc() const +{ + return desc_; +} + +void BwListIps::setDesc(const std::string& value) +{ + desc_ = value; + descIsSet_ = true; +} + +bool BwListIps::descIsSet() const +{ + return descIsSet_; +} + +void BwListIps::unsetdesc() +{ + descIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/CertInfo.cpp b/aad/src/v2/model/CertInfo.cpp new file mode 100644 index 000000000..e9d6a059f --- /dev/null +++ b/aad/src/v2/model/CertInfo.cpp @@ -0,0 +1,219 @@ + + +#include "huaweicloud/aad/v2/model/CertInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +CertInfo::CertInfo() +{ + certName_ = ""; + certNameIsSet_ = false; + id_ = ""; + idIsSet_ = false; + applyDomain_ = ""; + applyDomainIsSet_ = false; + expireTime_ = 0L; + expireTimeIsSet_ = false; + expireStatus_ = 0; + expireStatusIsSet_ = false; +} + +CertInfo::~CertInfo() = default; + +void CertInfo::validate() +{ +} + +web::json::value CertInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(certNameIsSet_) { + val[utility::conversions::to_string_t("cert_name")] = ModelBase::toJson(certName_); + } + if(idIsSet_) { + val[utility::conversions::to_string_t("id")] = ModelBase::toJson(id_); + } + if(applyDomainIsSet_) { + val[utility::conversions::to_string_t("apply_domain")] = ModelBase::toJson(applyDomain_); + } + if(expireTimeIsSet_) { + val[utility::conversions::to_string_t("expire_time")] = ModelBase::toJson(expireTime_); + } + if(expireStatusIsSet_) { + val[utility::conversions::to_string_t("expire_status")] = ModelBase::toJson(expireStatus_); + } + + return val; +} +bool CertInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("cert_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cert_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCertName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("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("apply_domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("apply_domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setApplyDomain(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("expire_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("expire_time")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setExpireTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("expire_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("expire_status")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setExpireStatus(refVal); + } + } + return ok; +} + + +std::string CertInfo::getCertName() const +{ + return certName_; +} + +void CertInfo::setCertName(const std::string& value) +{ + certName_ = value; + certNameIsSet_ = true; +} + +bool CertInfo::certNameIsSet() const +{ + return certNameIsSet_; +} + +void CertInfo::unsetcertName() +{ + certNameIsSet_ = false; +} + +std::string CertInfo::getId() const +{ + return id_; +} + +void CertInfo::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool CertInfo::idIsSet() const +{ + return idIsSet_; +} + +void CertInfo::unsetid() +{ + idIsSet_ = false; +} + +std::string CertInfo::getApplyDomain() const +{ + return applyDomain_; +} + +void CertInfo::setApplyDomain(const std::string& value) +{ + applyDomain_ = value; + applyDomainIsSet_ = true; +} + +bool CertInfo::applyDomainIsSet() const +{ + return applyDomainIsSet_; +} + +void CertInfo::unsetapplyDomain() +{ + applyDomainIsSet_ = false; +} + +int64_t CertInfo::getExpireTime() const +{ + return expireTime_; +} + +void CertInfo::setExpireTime(int64_t value) +{ + expireTime_ = value; + expireTimeIsSet_ = true; +} + +bool CertInfo::expireTimeIsSet() const +{ + return expireTimeIsSet_; +} + +void CertInfo::unsetexpireTime() +{ + expireTimeIsSet_ = false; +} + +int32_t CertInfo::getExpireStatus() const +{ + return expireStatus_; +} + +void CertInfo::setExpireStatus(int32_t value) +{ + expireStatus_ = value; + expireStatusIsSet_ = true; +} + +bool CertInfo::expireStatusIsSet() const +{ + return expireStatusIsSet_; +} + +void CertInfo::unsetexpireStatus() +{ + expireStatusIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/Condition.cpp b/aad/src/v2/model/Condition.cpp new file mode 100644 index 000000000..45740f816 --- /dev/null +++ b/aad/src/v2/model/Condition.cpp @@ -0,0 +1,183 @@ + + +#include "huaweicloud/aad/v2/model/Condition.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +Condition::Condition() +{ + category_ = ""; + categoryIsSet_ = false; + contentsIsSet_ = false; + index_ = ""; + indexIsSet_ = false; + logicOperation_ = ""; + logicOperationIsSet_ = false; +} + +Condition::~Condition() = default; + +void Condition::validate() +{ +} + +web::json::value Condition::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(categoryIsSet_) { + val[utility::conversions::to_string_t("category")] = ModelBase::toJson(category_); + } + if(contentsIsSet_) { + val[utility::conversions::to_string_t("contents")] = ModelBase::toJson(contents_); + } + if(indexIsSet_) { + val[utility::conversions::to_string_t("index")] = ModelBase::toJson(index_); + } + if(logicOperationIsSet_) { + val[utility::conversions::to_string_t("logic_operation")] = ModelBase::toJson(logicOperation_); + } + + return val; +} +bool Condition::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("category"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("category")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCategory(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("contents"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("contents")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setContents(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("index"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("index")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIndex(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("logic_operation"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("logic_operation")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogicOperation(refVal); + } + } + return ok; +} + + +std::string Condition::getCategory() const +{ + return category_; +} + +void Condition::setCategory(const std::string& value) +{ + category_ = value; + categoryIsSet_ = true; +} + +bool Condition::categoryIsSet() const +{ + return categoryIsSet_; +} + +void Condition::unsetcategory() +{ + categoryIsSet_ = false; +} + +std::vector& Condition::getContents() +{ + return contents_; +} + +void Condition::setContents(const std::vector& value) +{ + contents_ = value; + contentsIsSet_ = true; +} + +bool Condition::contentsIsSet() const +{ + return contentsIsSet_; +} + +void Condition::unsetcontents() +{ + contentsIsSet_ = false; +} + +std::string Condition::getIndex() const +{ + return index_; +} + +void Condition::setIndex(const std::string& value) +{ + index_ = value; + indexIsSet_ = true; +} + +bool Condition::indexIsSet() const +{ + return indexIsSet_; +} + +void Condition::unsetindex() +{ + indexIsSet_ = false; +} + +std::string Condition::getLogicOperation() const +{ + return logicOperation_; +} + +void Condition::setLogicOperation(const std::string& value) +{ + logicOperation_ = value; + logicOperationIsSet_ = true; +} + +bool Condition::logicOperationIsSet() const +{ + return logicOperationIsSet_; +} + +void Condition::unsetlogicOperation() +{ + logicOperationIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/CreateAadDomainRequestBody.cpp b/aad/src/v2/model/CreateAadDomainRequestBody.cpp new file mode 100644 index 000000000..b81b6f6cf --- /dev/null +++ b/aad/src/v2/model/CreateAadDomainRequestBody.cpp @@ -0,0 +1,391 @@ + + +#include "huaweicloud/aad/v2/model/CreateAadDomainRequestBody.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +CreateAadDomainRequestBody::CreateAadDomainRequestBody() +{ + domainName_ = ""; + domainNameIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; + ipsIsSet_ = false; + realServerType_ = 0; + realServerTypeIsSet_ = false; + portHttpIsSet_ = false; + portHttpsIsSet_ = false; + realServer_ = ""; + realServerIsSet_ = false; + overseasType_ = ""; + overseasTypeIsSet_ = false; + certName_ = ""; + certNameIsSet_ = false; + wafSwitch_ = ""; + wafSwitchIsSet_ = false; +} + +CreateAadDomainRequestBody::~CreateAadDomainRequestBody() = default; + +void CreateAadDomainRequestBody::validate() +{ +} + +web::json::value CreateAadDomainRequestBody::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainNameIsSet_) { + val[utility::conversions::to_string_t("domain_name")] = ModelBase::toJson(domainName_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + if(ipsIsSet_) { + val[utility::conversions::to_string_t("ips")] = ModelBase::toJson(ips_); + } + if(realServerTypeIsSet_) { + val[utility::conversions::to_string_t("real_server_type")] = ModelBase::toJson(realServerType_); + } + if(portHttpIsSet_) { + val[utility::conversions::to_string_t("port_http")] = ModelBase::toJson(portHttp_); + } + if(portHttpsIsSet_) { + val[utility::conversions::to_string_t("port_https")] = ModelBase::toJson(portHttps_); + } + if(realServerIsSet_) { + val[utility::conversions::to_string_t("real_server")] = ModelBase::toJson(realServer_); + } + if(overseasTypeIsSet_) { + val[utility::conversions::to_string_t("overseas_type")] = ModelBase::toJson(overseasType_); + } + if(certNameIsSet_) { + val[utility::conversions::to_string_t("cert_name")] = ModelBase::toJson(certName_); + } + if(wafSwitchIsSet_) { + val[utility::conversions::to_string_t("waf_switch")] = ModelBase::toJson(wafSwitch_); + } + + return val; +} +bool CreateAadDomainRequestBody::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainName(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("ips"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIps(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("real_server_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("real_server_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRealServerType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("port_http"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("port_http")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPortHttp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("port_https"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("port_https")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPortHttps(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("real_server"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("real_server")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRealServer(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("overseas_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("overseas_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOverseasType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("cert_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cert_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCertName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("waf_switch"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("waf_switch")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setWafSwitch(refVal); + } + } + return ok; +} + + +std::string CreateAadDomainRequestBody::getDomainName() const +{ + return domainName_; +} + +void CreateAadDomainRequestBody::setDomainName(const std::string& value) +{ + domainName_ = value; + domainNameIsSet_ = true; +} + +bool CreateAadDomainRequestBody::domainNameIsSet() const +{ + return domainNameIsSet_; +} + +void CreateAadDomainRequestBody::unsetdomainName() +{ + domainNameIsSet_ = false; +} + +std::string CreateAadDomainRequestBody::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void CreateAadDomainRequestBody::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool CreateAadDomainRequestBody::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void CreateAadDomainRequestBody::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +std::vector& CreateAadDomainRequestBody::getIps() +{ + return ips_; +} + +void CreateAadDomainRequestBody::setIps(const std::vector& value) +{ + ips_ = value; + ipsIsSet_ = true; +} + +bool CreateAadDomainRequestBody::ipsIsSet() const +{ + return ipsIsSet_; +} + +void CreateAadDomainRequestBody::unsetips() +{ + ipsIsSet_ = false; +} + +int32_t CreateAadDomainRequestBody::getRealServerType() const +{ + return realServerType_; +} + +void CreateAadDomainRequestBody::setRealServerType(int32_t value) +{ + realServerType_ = value; + realServerTypeIsSet_ = true; +} + +bool CreateAadDomainRequestBody::realServerTypeIsSet() const +{ + return realServerTypeIsSet_; +} + +void CreateAadDomainRequestBody::unsetrealServerType() +{ + realServerTypeIsSet_ = false; +} + +std::vector& CreateAadDomainRequestBody::getPortHttp() +{ + return portHttp_; +} + +void CreateAadDomainRequestBody::setPortHttp(std::vector value) +{ + portHttp_ = value; + portHttpIsSet_ = true; +} + +bool CreateAadDomainRequestBody::portHttpIsSet() const +{ + return portHttpIsSet_; +} + +void CreateAadDomainRequestBody::unsetportHttp() +{ + portHttpIsSet_ = false; +} + +std::vector& CreateAadDomainRequestBody::getPortHttps() +{ + return portHttps_; +} + +void CreateAadDomainRequestBody::setPortHttps(std::vector value) +{ + portHttps_ = value; + portHttpsIsSet_ = true; +} + +bool CreateAadDomainRequestBody::portHttpsIsSet() const +{ + return portHttpsIsSet_; +} + +void CreateAadDomainRequestBody::unsetportHttps() +{ + portHttpsIsSet_ = false; +} + +std::string CreateAadDomainRequestBody::getRealServer() const +{ + return realServer_; +} + +void CreateAadDomainRequestBody::setRealServer(const std::string& value) +{ + realServer_ = value; + realServerIsSet_ = true; +} + +bool CreateAadDomainRequestBody::realServerIsSet() const +{ + return realServerIsSet_; +} + +void CreateAadDomainRequestBody::unsetrealServer() +{ + realServerIsSet_ = false; +} + +std::string CreateAadDomainRequestBody::getOverseasType() const +{ + return overseasType_; +} + +void CreateAadDomainRequestBody::setOverseasType(const std::string& value) +{ + overseasType_ = value; + overseasTypeIsSet_ = true; +} + +bool CreateAadDomainRequestBody::overseasTypeIsSet() const +{ + return overseasTypeIsSet_; +} + +void CreateAadDomainRequestBody::unsetoverseasType() +{ + overseasTypeIsSet_ = false; +} + +std::string CreateAadDomainRequestBody::getCertName() const +{ + return certName_; +} + +void CreateAadDomainRequestBody::setCertName(const std::string& value) +{ + certName_ = value; + certNameIsSet_ = true; +} + +bool CreateAadDomainRequestBody::certNameIsSet() const +{ + return certNameIsSet_; +} + +void CreateAadDomainRequestBody::unsetcertName() +{ + certNameIsSet_ = false; +} + +std::string CreateAadDomainRequestBody::getWafSwitch() const +{ + return wafSwitch_; +} + +void CreateAadDomainRequestBody::setWafSwitch(const std::string& value) +{ + wafSwitch_ = value; + wafSwitchIsSet_ = true; +} + +bool CreateAadDomainRequestBody::wafSwitchIsSet() const +{ + return wafSwitchIsSet_; +} + +void CreateAadDomainRequestBody::unsetwafSwitch() +{ + wafSwitchIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/CreateDomainRequest.cpp b/aad/src/v2/model/CreateDomainRequest.cpp new file mode 100644 index 000000000..f27323bf1 --- /dev/null +++ b/aad/src/v2/model/CreateDomainRequest.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/aad/v2/model/CreateDomainRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +CreateDomainRequest::CreateDomainRequest() +{ + bodyIsSet_ = false; +} + +CreateDomainRequest::~CreateDomainRequest() = default; + +void CreateDomainRequest::validate() +{ +} + +web::json::value CreateDomainRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool CreateDomainRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + CreateAadDomainRequestBody refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +CreateAadDomainRequestBody CreateDomainRequest::getBody() const +{ + return body_; +} + +void CreateDomainRequest::setBody(const CreateAadDomainRequestBody& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool CreateDomainRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void CreateDomainRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/CreateDomainResponse.cpp b/aad/src/v2/model/CreateDomainResponse.cpp new file mode 100644 index 000000000..d14fd7e5e --- /dev/null +++ b/aad/src/v2/model/CreateDomainResponse.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/aad/v2/model/CreateDomainResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +CreateDomainResponse::CreateDomainResponse() +{ + cname_ = ""; + cnameIsSet_ = false; + domainId_ = ""; + domainIdIsSet_ = false; +} + +CreateDomainResponse::~CreateDomainResponse() = default; + +void CreateDomainResponse::validate() +{ +} + +web::json::value CreateDomainResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(cnameIsSet_) { + val[utility::conversions::to_string_t("cname")] = ModelBase::toJson(cname_); + } + if(domainIdIsSet_) { + val[utility::conversions::to_string_t("domain_id")] = ModelBase::toJson(domainId_); + } + + return val; +} +bool CreateDomainResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("cname"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cname")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCname(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("domain_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainId(refVal); + } + } + return ok; +} + + +std::string CreateDomainResponse::getCname() const +{ + return cname_; +} + +void CreateDomainResponse::setCname(const std::string& value) +{ + cname_ = value; + cnameIsSet_ = true; +} + +bool CreateDomainResponse::cnameIsSet() const +{ + return cnameIsSet_; +} + +void CreateDomainResponse::unsetcname() +{ + cnameIsSet_ = false; +} + +std::string CreateDomainResponse::getDomainId() const +{ + return domainId_; +} + +void CreateDomainResponse::setDomainId(const std::string& value) +{ + domainId_ = value; + domainIdIsSet_ = true; +} + +bool CreateDomainResponse::domainIdIsSet() const +{ + return domainIdIsSet_; +} + +void CreateDomainResponse::unsetdomainId() +{ + domainIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/Curve.cpp b/aad/src/v2/model/Curve.cpp new file mode 100644 index 000000000..a6792db27 --- /dev/null +++ b/aad/src/v2/model/Curve.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/aad/v2/model/Curve.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +Curve::Curve() +{ + in_ = 0.0f; + inIsSet_ = false; + out_ = 0.0f; + outIsSet_ = false; + time_ = 0; + timeIsSet_ = false; +} + +Curve::~Curve() = default; + +void Curve::validate() +{ +} + +web::json::value Curve::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(inIsSet_) { + val[utility::conversions::to_string_t("in")] = ModelBase::toJson(in_); + } + if(outIsSet_) { + val[utility::conversions::to_string_t("out")] = ModelBase::toJson(out_); + } + if(timeIsSet_) { + val[utility::conversions::to_string_t("time")] = ModelBase::toJson(time_); + } + + return val; +} +bool Curve::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("in"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("in")); + if(!fieldValue.is_null()) + { + float refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIn(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("out"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("out")); + if(!fieldValue.is_null()) + { + float refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOut(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()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTime(refVal); + } + } + return ok; +} + + +float Curve::getIn() const +{ + return in_; +} + +void Curve::setIn(float value) +{ + in_ = value; + inIsSet_ = true; +} + +bool Curve::inIsSet() const +{ + return inIsSet_; +} + +void Curve::unsetin() +{ + inIsSet_ = false; +} + +float Curve::getOut() const +{ + return out_; +} + +void Curve::setOut(float value) +{ + out_ = value; + outIsSet_ = true; +} + +bool Curve::outIsSet() const +{ + return outIsSet_; +} + +void Curve::unsetout() +{ + outIsSet_ = false; +} + +int32_t Curve::getTime() const +{ + return time_; +} + +void Curve::setTime(int32_t value) +{ + time_ = value; + timeIsSet_ = true; +} + +bool Curve::timeIsSet() const +{ + return timeIsSet_; +} + +void Curve::unsettime() +{ + timeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/DeleteDomainRequest.cpp b/aad/src/v2/model/DeleteDomainRequest.cpp new file mode 100644 index 000000000..6c9f6a260 --- /dev/null +++ b/aad/src/v2/model/DeleteDomainRequest.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/aad/v2/model/DeleteDomainRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +DeleteDomainRequest::DeleteDomainRequest() +{ + bodyIsSet_ = false; +} + +DeleteDomainRequest::~DeleteDomainRequest() = default; + +void DeleteDomainRequest::validate() +{ +} + +web::json::value DeleteDomainRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool DeleteDomainRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + DeleteDomainV2RequestBody refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +DeleteDomainV2RequestBody DeleteDomainRequest::getBody() const +{ + return body_; +} + +void DeleteDomainRequest::setBody(const DeleteDomainV2RequestBody& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool DeleteDomainRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void DeleteDomainRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/DeleteDomainResponse.cpp b/aad/src/v2/model/DeleteDomainResponse.cpp new file mode 100644 index 000000000..69ed548a3 --- /dev/null +++ b/aad/src/v2/model/DeleteDomainResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/aad/v2/model/DeleteDomainResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +DeleteDomainResponse::DeleteDomainResponse() +{ + bodyIsSet_ = false; +} + +DeleteDomainResponse::~DeleteDomainResponse() = default; + +void DeleteDomainResponse::validate() +{ +} + +web::json::value DeleteDomainResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool DeleteDomainResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + Object refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +Object DeleteDomainResponse::getBody() const +{ + return body_; +} + +void DeleteDomainResponse::setBody(const Object& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool DeleteDomainResponse::bodyIsSet() const +{ + return bodyIsSet_; +} + +void DeleteDomainResponse::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/DeleteDomainV2RequestBody.cpp b/aad/src/v2/model/DeleteDomainV2RequestBody.cpp new file mode 100644 index 000000000..7f907fc31 --- /dev/null +++ b/aad/src/v2/model/DeleteDomainV2RequestBody.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/aad/v2/model/DeleteDomainV2RequestBody.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +DeleteDomainV2RequestBody::DeleteDomainV2RequestBody() +{ + domainIdIsSet_ = false; +} + +DeleteDomainV2RequestBody::~DeleteDomainV2RequestBody() = default; + +void DeleteDomainV2RequestBody::validate() +{ +} + +web::json::value DeleteDomainV2RequestBody::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainIdIsSet_) { + val[utility::conversions::to_string_t("domain_id")] = ModelBase::toJson(domainId_); + } + + return val; +} +bool DeleteDomainV2RequestBody::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_id")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainId(refVal); + } + } + return ok; +} + + +std::vector& DeleteDomainV2RequestBody::getDomainId() +{ + return domainId_; +} + +void DeleteDomainV2RequestBody::setDomainId(const std::vector& value) +{ + domainId_ = value; + domainIdIsSet_ = true; +} + +bool DeleteDomainV2RequestBody::domainIdIsSet() const +{ + return domainIdIsSet_; +} + +void DeleteDomainV2RequestBody::unsetdomainId() +{ + domainIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/DetailInfo.cpp b/aad/src/v2/model/DetailInfo.cpp new file mode 100644 index 000000000..8c5837125 --- /dev/null +++ b/aad/src/v2/model/DetailInfo.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/aad/v2/model/DetailInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +DetailInfo::DetailInfo() +{ + responseIsSet_ = false; +} + +DetailInfo::~DetailInfo() = default; + +void DetailInfo::validate() +{ +} + +web::json::value DetailInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(responseIsSet_) { + val[utility::conversions::to_string_t("response")] = ModelBase::toJson(response_); + } + + return val; +} +bool DetailInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("response"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("response")); + if(!fieldValue.is_null()) + { + PageRespInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setResponse(refVal); + } + } + return ok; +} + + +PageRespInfo DetailInfo::getResponse() const +{ + return response_; +} + +void DetailInfo::setResponse(const PageRespInfo& value) +{ + response_ = value; + responseIsSet_ = true; +} + +bool DetailInfo::responseIsSet() const +{ + return responseIsSet_; +} + +void DetailInfo::unsetresponse() +{ + responseIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/EmptyJsonResponse.cpp b/aad/src/v2/model/EmptyJsonResponse.cpp new file mode 100644 index 000000000..08a120379 --- /dev/null +++ b/aad/src/v2/model/EmptyJsonResponse.cpp @@ -0,0 +1,44 @@ + + +#include "huaweicloud/aad/v2/model/EmptyJsonResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +EmptyJsonResponse::EmptyJsonResponse() +{ +} + +EmptyJsonResponse::~EmptyJsonResponse() = default; + +void EmptyJsonResponse::validate() +{ +} + +web::json::value EmptyJsonResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + + return val; +} +bool EmptyJsonResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + return ok; +} + + +} +} +} +} +} + + diff --git a/aad/src/v2/model/FlowBps.cpp b/aad/src/v2/model/FlowBps.cpp new file mode 100644 index 000000000..f4c25db68 --- /dev/null +++ b/aad/src/v2/model/FlowBps.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/aad/v2/model/FlowBps.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +FlowBps::FlowBps() +{ + utime_ = 0L; + utimeIsSet_ = false; + attackBps_ = 0; + attackBpsIsSet_ = false; + normalBps_ = 0; + normalBpsIsSet_ = false; +} + +FlowBps::~FlowBps() = default; + +void FlowBps::validate() +{ +} + +web::json::value FlowBps::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(utimeIsSet_) { + val[utility::conversions::to_string_t("utime")] = ModelBase::toJson(utime_); + } + if(attackBpsIsSet_) { + val[utility::conversions::to_string_t("attack_bps")] = ModelBase::toJson(attackBps_); + } + if(normalBpsIsSet_) { + val[utility::conversions::to_string_t("normal_bps")] = ModelBase::toJson(normalBps_); + } + + return val; +} +bool FlowBps::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("utime"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("utime")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setUtime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("attack_bps"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("attack_bps")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAttackBps(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("normal_bps"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("normal_bps")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNormalBps(refVal); + } + } + return ok; +} + + +int64_t FlowBps::getUtime() const +{ + return utime_; +} + +void FlowBps::setUtime(int64_t value) +{ + utime_ = value; + utimeIsSet_ = true; +} + +bool FlowBps::utimeIsSet() const +{ + return utimeIsSet_; +} + +void FlowBps::unsetutime() +{ + utimeIsSet_ = false; +} + +int32_t FlowBps::getAttackBps() const +{ + return attackBps_; +} + +void FlowBps::setAttackBps(int32_t value) +{ + attackBps_ = value; + attackBpsIsSet_ = true; +} + +bool FlowBps::attackBpsIsSet() const +{ + return attackBpsIsSet_; +} + +void FlowBps::unsetattackBps() +{ + attackBpsIsSet_ = false; +} + +int32_t FlowBps::getNormalBps() const +{ + return normalBps_; +} + +void FlowBps::setNormalBps(int32_t value) +{ + normalBps_ = value; + normalBpsIsSet_ = true; +} + +bool FlowBps::normalBpsIsSet() const +{ + return normalBpsIsSet_; +} + +void FlowBps::unsetnormalBps() +{ + normalBpsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/FlowPps.cpp b/aad/src/v2/model/FlowPps.cpp new file mode 100644 index 000000000..fcb6f9bea --- /dev/null +++ b/aad/src/v2/model/FlowPps.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/aad/v2/model/FlowPps.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +FlowPps::FlowPps() +{ + utime_ = 0L; + utimeIsSet_ = false; + attackPps_ = 0; + attackPpsIsSet_ = false; + normalPps_ = 0; + normalPpsIsSet_ = false; +} + +FlowPps::~FlowPps() = default; + +void FlowPps::validate() +{ +} + +web::json::value FlowPps::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(utimeIsSet_) { + val[utility::conversions::to_string_t("utime")] = ModelBase::toJson(utime_); + } + if(attackPpsIsSet_) { + val[utility::conversions::to_string_t("attack_pps")] = ModelBase::toJson(attackPps_); + } + if(normalPpsIsSet_) { + val[utility::conversions::to_string_t("normal_pps")] = ModelBase::toJson(normalPps_); + } + + return val; +} +bool FlowPps::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("utime"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("utime")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setUtime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("attack_pps"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("attack_pps")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAttackPps(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("normal_pps"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("normal_pps")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNormalPps(refVal); + } + } + return ok; +} + + +int64_t FlowPps::getUtime() const +{ + return utime_; +} + +void FlowPps::setUtime(int64_t value) +{ + utime_ = value; + utimeIsSet_ = true; +} + +bool FlowPps::utimeIsSet() const +{ + return utimeIsSet_; +} + +void FlowPps::unsetutime() +{ + utimeIsSet_ = false; +} + +int32_t FlowPps::getAttackPps() const +{ + return attackPps_; +} + +void FlowPps::setAttackPps(int32_t value) +{ + attackPps_ = value; + attackPpsIsSet_ = true; +} + +bool FlowPps::attackPpsIsSet() const +{ + return attackPpsIsSet_; +} + +void FlowPps::unsetattackPps() +{ + attackPpsIsSet_ = false; +} + +int32_t FlowPps::getNormalPps() const +{ + return normalPps_; +} + +void FlowPps::setNormalPps(int32_t value) +{ + normalPps_ = value; + normalPpsIsSet_ = true; +} + +bool FlowPps::normalPpsIsSet() const +{ + return normalPpsIsSet_; +} + +void FlowPps::unsetnormalPps() +{ + normalPpsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/FrequencyControlRule.cpp b/aad/src/v2/model/FrequencyControlRule.cpp new file mode 100644 index 000000000..d586899c1 --- /dev/null +++ b/aad/src/v2/model/FrequencyControlRule.cpp @@ -0,0 +1,671 @@ + + +#include "huaweicloud/aad/v2/model/FrequencyControlRule.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +FrequencyControlRule::FrequencyControlRule() +{ + id_ = ""; + idIsSet_ = false; + producer_ = 0; + producerIsSet_ = false; + name_ = ""; + nameIsSet_ = false; + url_ = ""; + urlIsSet_ = false; + limitNum_ = ""; + limitNumIsSet_ = false; + limitPeriod_ = ""; + limitPeriodIsSet_ = false; + lockTime_ = ""; + lockTimeIsSet_ = false; + tagType_ = ""; + tagTypeIsSet_ = false; + tagIndex_ = ""; + tagIndexIsSet_ = false; + tagConditionIsSet_ = false; + actionIsSet_ = false; + mode_ = ""; + modeIsSet_ = false; + conditionsIsSet_ = false; + unlockNum_ = 0; + unlockNumIsSet_ = false; + domainAggregation_ = false; + domainAggregationIsSet_ = false; + regionAggregation_ = false; + regionAggregationIsSet_ = false; + captchaLockTime_ = 0; + captchaLockTimeIsSet_ = false; + grayscaleTime_ = false; + grayscaleTimeIsSet_ = false; +} + +FrequencyControlRule::~FrequencyControlRule() = default; + +void FrequencyControlRule::validate() +{ +} + +web::json::value FrequencyControlRule::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(idIsSet_) { + val[utility::conversions::to_string_t("id")] = ModelBase::toJson(id_); + } + if(producerIsSet_) { + val[utility::conversions::to_string_t("producer")] = ModelBase::toJson(producer_); + } + if(nameIsSet_) { + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); + } + if(urlIsSet_) { + val[utility::conversions::to_string_t("url")] = ModelBase::toJson(url_); + } + if(limitNumIsSet_) { + val[utility::conversions::to_string_t("limit_num")] = ModelBase::toJson(limitNum_); + } + if(limitPeriodIsSet_) { + val[utility::conversions::to_string_t("limit_period")] = ModelBase::toJson(limitPeriod_); + } + if(lockTimeIsSet_) { + val[utility::conversions::to_string_t("lock_time")] = ModelBase::toJson(lockTime_); + } + if(tagTypeIsSet_) { + val[utility::conversions::to_string_t("tag_type")] = ModelBase::toJson(tagType_); + } + if(tagIndexIsSet_) { + val[utility::conversions::to_string_t("tag_index")] = ModelBase::toJson(tagIndex_); + } + if(tagConditionIsSet_) { + val[utility::conversions::to_string_t("tag_condition")] = ModelBase::toJson(tagCondition_); + } + if(actionIsSet_) { + val[utility::conversions::to_string_t("action")] = ModelBase::toJson(action_); + } + if(modeIsSet_) { + val[utility::conversions::to_string_t("mode")] = ModelBase::toJson(mode_); + } + if(conditionsIsSet_) { + val[utility::conversions::to_string_t("conditions")] = ModelBase::toJson(conditions_); + } + if(unlockNumIsSet_) { + val[utility::conversions::to_string_t("unlock_num")] = ModelBase::toJson(unlockNum_); + } + if(domainAggregationIsSet_) { + val[utility::conversions::to_string_t("domain_aggregation")] = ModelBase::toJson(domainAggregation_); + } + if(regionAggregationIsSet_) { + val[utility::conversions::to_string_t("region_aggregation")] = ModelBase::toJson(regionAggregation_); + } + if(captchaLockTimeIsSet_) { + val[utility::conversions::to_string_t("captcha_lock_time")] = ModelBase::toJson(captchaLockTime_); + } + if(grayscaleTimeIsSet_) { + val[utility::conversions::to_string_t("grayscale_time")] = ModelBase::toJson(grayscaleTime_); + } + + return val; +} +bool FrequencyControlRule::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("producer"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("producer")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setProducer(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("url"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("url")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setUrl(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("limit_num"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("limit_num")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLimitNum(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("limit_period"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("limit_period")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLimitPeriod(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("lock_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("lock_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLockTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("tag_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("tag_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTagType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("tag_index"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("tag_index")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTagIndex(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("tag_condition"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("tag_condition")); + if(!fieldValue.is_null()) + { + TagCondition refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTagCondition(refVal); + } + } + 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()) + { + ActionInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAction(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("mode"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("mode")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setMode(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("conditions"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("conditions")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConditions(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("unlock_num"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("unlock_num")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setUnlockNum(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("domain_aggregation"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_aggregation")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainAggregation(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("region_aggregation"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("region_aggregation")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRegionAggregation(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("captcha_lock_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("captcha_lock_time")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCaptchaLockTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("grayscale_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("grayscale_time")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setGrayscaleTime(refVal); + } + } + return ok; +} + + +std::string FrequencyControlRule::getId() const +{ + return id_; +} + +void FrequencyControlRule::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool FrequencyControlRule::idIsSet() const +{ + return idIsSet_; +} + +void FrequencyControlRule::unsetid() +{ + idIsSet_ = false; +} + +int32_t FrequencyControlRule::getProducer() const +{ + return producer_; +} + +void FrequencyControlRule::setProducer(int32_t value) +{ + producer_ = value; + producerIsSet_ = true; +} + +bool FrequencyControlRule::producerIsSet() const +{ + return producerIsSet_; +} + +void FrequencyControlRule::unsetproducer() +{ + producerIsSet_ = false; +} + +std::string FrequencyControlRule::getName() const +{ + return name_; +} + +void FrequencyControlRule::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool FrequencyControlRule::nameIsSet() const +{ + return nameIsSet_; +} + +void FrequencyControlRule::unsetname() +{ + nameIsSet_ = false; +} + +std::string FrequencyControlRule::getUrl() const +{ + return url_; +} + +void FrequencyControlRule::setUrl(const std::string& value) +{ + url_ = value; + urlIsSet_ = true; +} + +bool FrequencyControlRule::urlIsSet() const +{ + return urlIsSet_; +} + +void FrequencyControlRule::unseturl() +{ + urlIsSet_ = false; +} + +std::string FrequencyControlRule::getLimitNum() const +{ + return limitNum_; +} + +void FrequencyControlRule::setLimitNum(const std::string& value) +{ + limitNum_ = value; + limitNumIsSet_ = true; +} + +bool FrequencyControlRule::limitNumIsSet() const +{ + return limitNumIsSet_; +} + +void FrequencyControlRule::unsetlimitNum() +{ + limitNumIsSet_ = false; +} + +std::string FrequencyControlRule::getLimitPeriod() const +{ + return limitPeriod_; +} + +void FrequencyControlRule::setLimitPeriod(const std::string& value) +{ + limitPeriod_ = value; + limitPeriodIsSet_ = true; +} + +bool FrequencyControlRule::limitPeriodIsSet() const +{ + return limitPeriodIsSet_; +} + +void FrequencyControlRule::unsetlimitPeriod() +{ + limitPeriodIsSet_ = false; +} + +std::string FrequencyControlRule::getLockTime() const +{ + return lockTime_; +} + +void FrequencyControlRule::setLockTime(const std::string& value) +{ + lockTime_ = value; + lockTimeIsSet_ = true; +} + +bool FrequencyControlRule::lockTimeIsSet() const +{ + return lockTimeIsSet_; +} + +void FrequencyControlRule::unsetlockTime() +{ + lockTimeIsSet_ = false; +} + +std::string FrequencyControlRule::getTagType() const +{ + return tagType_; +} + +void FrequencyControlRule::setTagType(const std::string& value) +{ + tagType_ = value; + tagTypeIsSet_ = true; +} + +bool FrequencyControlRule::tagTypeIsSet() const +{ + return tagTypeIsSet_; +} + +void FrequencyControlRule::unsettagType() +{ + tagTypeIsSet_ = false; +} + +std::string FrequencyControlRule::getTagIndex() const +{ + return tagIndex_; +} + +void FrequencyControlRule::setTagIndex(const std::string& value) +{ + tagIndex_ = value; + tagIndexIsSet_ = true; +} + +bool FrequencyControlRule::tagIndexIsSet() const +{ + return tagIndexIsSet_; +} + +void FrequencyControlRule::unsettagIndex() +{ + tagIndexIsSet_ = false; +} + +TagCondition FrequencyControlRule::getTagCondition() const +{ + return tagCondition_; +} + +void FrequencyControlRule::setTagCondition(const TagCondition& value) +{ + tagCondition_ = value; + tagConditionIsSet_ = true; +} + +bool FrequencyControlRule::tagConditionIsSet() const +{ + return tagConditionIsSet_; +} + +void FrequencyControlRule::unsettagCondition() +{ + tagConditionIsSet_ = false; +} + +ActionInfo FrequencyControlRule::getAction() const +{ + return action_; +} + +void FrequencyControlRule::setAction(const ActionInfo& value) +{ + action_ = value; + actionIsSet_ = true; +} + +bool FrequencyControlRule::actionIsSet() const +{ + return actionIsSet_; +} + +void FrequencyControlRule::unsetaction() +{ + actionIsSet_ = false; +} + +std::string FrequencyControlRule::getMode() const +{ + return mode_; +} + +void FrequencyControlRule::setMode(const std::string& value) +{ + mode_ = value; + modeIsSet_ = true; +} + +bool FrequencyControlRule::modeIsSet() const +{ + return modeIsSet_; +} + +void FrequencyControlRule::unsetmode() +{ + modeIsSet_ = false; +} + +std::vector& FrequencyControlRule::getConditions() +{ + return conditions_; +} + +void FrequencyControlRule::setConditions(const std::vector& value) +{ + conditions_ = value; + conditionsIsSet_ = true; +} + +bool FrequencyControlRule::conditionsIsSet() const +{ + return conditionsIsSet_; +} + +void FrequencyControlRule::unsetconditions() +{ + conditionsIsSet_ = false; +} + +int32_t FrequencyControlRule::getUnlockNum() const +{ + return unlockNum_; +} + +void FrequencyControlRule::setUnlockNum(int32_t value) +{ + unlockNum_ = value; + unlockNumIsSet_ = true; +} + +bool FrequencyControlRule::unlockNumIsSet() const +{ + return unlockNumIsSet_; +} + +void FrequencyControlRule::unsetunlockNum() +{ + unlockNumIsSet_ = false; +} + +bool FrequencyControlRule::isDomainAggregation() const +{ + return domainAggregation_; +} + +void FrequencyControlRule::setDomainAggregation(bool value) +{ + domainAggregation_ = value; + domainAggregationIsSet_ = true; +} + +bool FrequencyControlRule::domainAggregationIsSet() const +{ + return domainAggregationIsSet_; +} + +void FrequencyControlRule::unsetdomainAggregation() +{ + domainAggregationIsSet_ = false; +} + +bool FrequencyControlRule::isRegionAggregation() const +{ + return regionAggregation_; +} + +void FrequencyControlRule::setRegionAggregation(bool value) +{ + regionAggregation_ = value; + regionAggregationIsSet_ = true; +} + +bool FrequencyControlRule::regionAggregationIsSet() const +{ + return regionAggregationIsSet_; +} + +void FrequencyControlRule::unsetregionAggregation() +{ + regionAggregationIsSet_ = false; +} + +int32_t FrequencyControlRule::getCaptchaLockTime() const +{ + return captchaLockTime_; +} + +void FrequencyControlRule::setCaptchaLockTime(int32_t value) +{ + captchaLockTime_ = value; + captchaLockTimeIsSet_ = true; +} + +bool FrequencyControlRule::captchaLockTimeIsSet() const +{ + return captchaLockTimeIsSet_; +} + +void FrequencyControlRule::unsetcaptchaLockTime() +{ + captchaLockTimeIsSet_ = false; +} + +bool FrequencyControlRule::isGrayscaleTime() const +{ + return grayscaleTime_; +} + +void FrequencyControlRule::setGrayscaleTime(bool value) +{ + grayscaleTime_ = value; + grayscaleTimeIsSet_ = true; +} + +bool FrequencyControlRule::grayscaleTimeIsSet() const +{ + return grayscaleTimeIsSet_; +} + +void FrequencyControlRule::unsetgrayscaleTime() +{ + grayscaleTimeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/InstanceDomainItem.cpp b/aad/src/v2/model/InstanceDomainItem.cpp new file mode 100644 index 000000000..fb7c87bc0 --- /dev/null +++ b/aad/src/v2/model/InstanceDomainItem.cpp @@ -0,0 +1,428 @@ + + +#include "huaweicloud/aad/v2/model/InstanceDomainItem.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +InstanceDomainItem::InstanceDomainItem() +{ + domainId_ = ""; + domainIdIsSet_ = false; + domainName_ = ""; + domainNameIsSet_ = false; + cname_ = ""; + cnameIsSet_ = false; + domainStatus_ = ""; + domainStatusIsSet_ = false; + ccStatus_ = 0; + ccStatusIsSet_ = false; + httpsCertStatus_ = 0; + httpsCertStatusIsSet_ = false; + certName_ = ""; + certNameIsSet_ = false; + protocolTypeIsSet_ = false; + realServerType_ = 0; + realServerTypeIsSet_ = false; + realServers_ = ""; + realServersIsSet_ = false; + wafStatus_ = 0; + wafStatusIsSet_ = false; +} + +InstanceDomainItem::~InstanceDomainItem() = default; + +void InstanceDomainItem::validate() +{ +} + +web::json::value InstanceDomainItem::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainIdIsSet_) { + val[utility::conversions::to_string_t("domain_id")] = ModelBase::toJson(domainId_); + } + if(domainNameIsSet_) { + val[utility::conversions::to_string_t("domain_name")] = ModelBase::toJson(domainName_); + } + if(cnameIsSet_) { + val[utility::conversions::to_string_t("cname")] = ModelBase::toJson(cname_); + } + if(domainStatusIsSet_) { + val[utility::conversions::to_string_t("domain_status")] = ModelBase::toJson(domainStatus_); + } + if(ccStatusIsSet_) { + val[utility::conversions::to_string_t("cc_status")] = ModelBase::toJson(ccStatus_); + } + if(httpsCertStatusIsSet_) { + val[utility::conversions::to_string_t("https_cert_status")] = ModelBase::toJson(httpsCertStatus_); + } + if(certNameIsSet_) { + val[utility::conversions::to_string_t("cert_name")] = ModelBase::toJson(certName_); + } + if(protocolTypeIsSet_) { + val[utility::conversions::to_string_t("protocol_type")] = ModelBase::toJson(protocolType_); + } + if(realServerTypeIsSet_) { + val[utility::conversions::to_string_t("real_server_type")] = ModelBase::toJson(realServerType_); + } + if(realServersIsSet_) { + val[utility::conversions::to_string_t("real_servers")] = ModelBase::toJson(realServers_); + } + if(wafStatusIsSet_) { + val[utility::conversions::to_string_t("waf_status")] = ModelBase::toJson(wafStatus_); + } + + return val; +} +bool InstanceDomainItem::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("domain_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("cname"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cname")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCname(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("domain_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_status")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainStatus(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("cc_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cc_status")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCcStatus(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("https_cert_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("https_cert_status")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setHttpsCertStatus(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("cert_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cert_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCertName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("protocol_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("protocol_type")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setProtocolType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("real_server_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("real_server_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRealServerType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("real_servers"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("real_servers")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRealServers(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("waf_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("waf_status")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setWafStatus(refVal); + } + } + return ok; +} + + +std::string InstanceDomainItem::getDomainId() const +{ + return domainId_; +} + +void InstanceDomainItem::setDomainId(const std::string& value) +{ + domainId_ = value; + domainIdIsSet_ = true; +} + +bool InstanceDomainItem::domainIdIsSet() const +{ + return domainIdIsSet_; +} + +void InstanceDomainItem::unsetdomainId() +{ + domainIdIsSet_ = false; +} + +std::string InstanceDomainItem::getDomainName() const +{ + return domainName_; +} + +void InstanceDomainItem::setDomainName(const std::string& value) +{ + domainName_ = value; + domainNameIsSet_ = true; +} + +bool InstanceDomainItem::domainNameIsSet() const +{ + return domainNameIsSet_; +} + +void InstanceDomainItem::unsetdomainName() +{ + domainNameIsSet_ = false; +} + +std::string InstanceDomainItem::getCname() const +{ + return cname_; +} + +void InstanceDomainItem::setCname(const std::string& value) +{ + cname_ = value; + cnameIsSet_ = true; +} + +bool InstanceDomainItem::cnameIsSet() const +{ + return cnameIsSet_; +} + +void InstanceDomainItem::unsetcname() +{ + cnameIsSet_ = false; +} + +std::string InstanceDomainItem::getDomainStatus() const +{ + return domainStatus_; +} + +void InstanceDomainItem::setDomainStatus(const std::string& value) +{ + domainStatus_ = value; + domainStatusIsSet_ = true; +} + +bool InstanceDomainItem::domainStatusIsSet() const +{ + return domainStatusIsSet_; +} + +void InstanceDomainItem::unsetdomainStatus() +{ + domainStatusIsSet_ = false; +} + +int32_t InstanceDomainItem::getCcStatus() const +{ + return ccStatus_; +} + +void InstanceDomainItem::setCcStatus(int32_t value) +{ + ccStatus_ = value; + ccStatusIsSet_ = true; +} + +bool InstanceDomainItem::ccStatusIsSet() const +{ + return ccStatusIsSet_; +} + +void InstanceDomainItem::unsetccStatus() +{ + ccStatusIsSet_ = false; +} + +int32_t InstanceDomainItem::getHttpsCertStatus() const +{ + return httpsCertStatus_; +} + +void InstanceDomainItem::setHttpsCertStatus(int32_t value) +{ + httpsCertStatus_ = value; + httpsCertStatusIsSet_ = true; +} + +bool InstanceDomainItem::httpsCertStatusIsSet() const +{ + return httpsCertStatusIsSet_; +} + +void InstanceDomainItem::unsethttpsCertStatus() +{ + httpsCertStatusIsSet_ = false; +} + +std::string InstanceDomainItem::getCertName() const +{ + return certName_; +} + +void InstanceDomainItem::setCertName(const std::string& value) +{ + certName_ = value; + certNameIsSet_ = true; +} + +bool InstanceDomainItem::certNameIsSet() const +{ + return certNameIsSet_; +} + +void InstanceDomainItem::unsetcertName() +{ + certNameIsSet_ = false; +} + +std::vector& InstanceDomainItem::getProtocolType() +{ + return protocolType_; +} + +void InstanceDomainItem::setProtocolType(const std::vector& value) +{ + protocolType_ = value; + protocolTypeIsSet_ = true; +} + +bool InstanceDomainItem::protocolTypeIsSet() const +{ + return protocolTypeIsSet_; +} + +void InstanceDomainItem::unsetprotocolType() +{ + protocolTypeIsSet_ = false; +} + +int32_t InstanceDomainItem::getRealServerType() const +{ + return realServerType_; +} + +void InstanceDomainItem::setRealServerType(int32_t value) +{ + realServerType_ = value; + realServerTypeIsSet_ = true; +} + +bool InstanceDomainItem::realServerTypeIsSet() const +{ + return realServerTypeIsSet_; +} + +void InstanceDomainItem::unsetrealServerType() +{ + realServerTypeIsSet_ = false; +} + +std::string InstanceDomainItem::getRealServers() const +{ + return realServers_; +} + +void InstanceDomainItem::setRealServers(const std::string& value) +{ + realServers_ = value; + realServersIsSet_ = true; +} + +bool InstanceDomainItem::realServersIsSet() const +{ + return realServersIsSet_; +} + +void InstanceDomainItem::unsetrealServers() +{ + realServersIsSet_ = false; +} + +int32_t InstanceDomainItem::getWafStatus() const +{ + return wafStatus_; +} + +void InstanceDomainItem::setWafStatus(int32_t value) +{ + wafStatus_ = value; + wafStatusIsSet_ = true; +} + +bool InstanceDomainItem::wafStatusIsSet() const +{ + return wafStatusIsSet_; +} + +void InstanceDomainItem::unsetwafStatus() +{ + wafStatusIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/Ips.cpp b/aad/src/v2/model/Ips.cpp new file mode 100644 index 000000000..3d53f591e --- /dev/null +++ b/aad/src/v2/model/Ips.cpp @@ -0,0 +1,254 @@ + + +#include "huaweicloud/aad/v2/model/Ips.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +Ips::Ips() +{ + ipId_ = ""; + ipIdIsSet_ = false; + ip_ = ""; + ipIsSet_ = false; + isp_ = ""; + ispIsSet_ = false; + dataCenter_ = ""; + dataCenterIsSet_ = false; + foreignSwitchStatus_ = 0; + foreignSwitchStatusIsSet_ = false; + udpSwitchStatus_ = 0; + udpSwitchStatusIsSet_ = false; +} + +Ips::~Ips() = default; + +void Ips::validate() +{ +} + +web::json::value Ips::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(ipIdIsSet_) { + val[utility::conversions::to_string_t("ip_id")] = ModelBase::toJson(ipId_); + } + if(ipIsSet_) { + val[utility::conversions::to_string_t("ip")] = ModelBase::toJson(ip_); + } + if(ispIsSet_) { + val[utility::conversions::to_string_t("isp")] = ModelBase::toJson(isp_); + } + if(dataCenterIsSet_) { + val[utility::conversions::to_string_t("data_center")] = ModelBase::toJson(dataCenter_); + } + if(foreignSwitchStatusIsSet_) { + val[utility::conversions::to_string_t("foreign_switch_status")] = ModelBase::toJson(foreignSwitchStatus_); + } + if(udpSwitchStatusIsSet_) { + val[utility::conversions::to_string_t("udp_switch_status")] = ModelBase::toJson(udpSwitchStatus_); + } + + return val; +} +bool Ips::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("ip_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ip_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIpId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ip"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ip")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("isp"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("isp")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("data_center"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("data_center")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDataCenter(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("foreign_switch_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("foreign_switch_status")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setForeignSwitchStatus(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("udp_switch_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("udp_switch_status")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setUdpSwitchStatus(refVal); + } + } + return ok; +} + + +std::string Ips::getIpId() const +{ + return ipId_; +} + +void Ips::setIpId(const std::string& value) +{ + ipId_ = value; + ipIdIsSet_ = true; +} + +bool Ips::ipIdIsSet() const +{ + return ipIdIsSet_; +} + +void Ips::unsetipId() +{ + ipIdIsSet_ = false; +} + +std::string Ips::getIp() const +{ + return ip_; +} + +void Ips::setIp(const std::string& value) +{ + ip_ = value; + ipIsSet_ = true; +} + +bool Ips::ipIsSet() const +{ + return ipIsSet_; +} + +void Ips::unsetip() +{ + ipIsSet_ = false; +} + +std::string Ips::getIsp() const +{ + return isp_; +} + +void Ips::setIsp(const std::string& value) +{ + isp_ = value; + ispIsSet_ = true; +} + +bool Ips::ispIsSet() const +{ + return ispIsSet_; +} + +void Ips::unsetisp() +{ + ispIsSet_ = false; +} + +std::string Ips::getDataCenter() const +{ + return dataCenter_; +} + +void Ips::setDataCenter(const std::string& value) +{ + dataCenter_ = value; + dataCenterIsSet_ = true; +} + +bool Ips::dataCenterIsSet() const +{ + return dataCenterIsSet_; +} + +void Ips::unsetdataCenter() +{ + dataCenterIsSet_ = false; +} + +int32_t Ips::getForeignSwitchStatus() const +{ + return foreignSwitchStatus_; +} + +void Ips::setForeignSwitchStatus(int32_t value) +{ + foreignSwitchStatus_ = value; + foreignSwitchStatusIsSet_ = true; +} + +bool Ips::foreignSwitchStatusIsSet() const +{ + return foreignSwitchStatusIsSet_; +} + +void Ips::unsetforeignSwitchStatus() +{ + foreignSwitchStatusIsSet_ = false; +} + +int32_t Ips::getUdpSwitchStatus() const +{ + return udpSwitchStatus_; +} + +void Ips::setUdpSwitchStatus(int32_t value) +{ + udpSwitchStatus_ = value; + udpSwitchStatusIsSet_ = true; +} + +bool Ips::udpSwitchStatusIsSet() const +{ + return udpSwitchStatusIsSet_; +} + +void Ips::unsetudpSwitchStatus() +{ + udpSwitchStatusIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListConnectionNumberData.cpp b/aad/src/v2/model/ListConnectionNumberData.cpp new file mode 100644 index 000000000..78d1f7435 --- /dev/null +++ b/aad/src/v2/model/ListConnectionNumberData.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/aad/v2/model/ListConnectionNumberData.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListConnectionNumberData::ListConnectionNumberData() +{ + name_ = ""; + nameIsSet_ = false; + listIsSet_ = false; +} + +ListConnectionNumberData::~ListConnectionNumberData() = default; + +void ListConnectionNumberData::validate() +{ +} + +web::json::value ListConnectionNumberData::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(nameIsSet_) { + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); + } + if(listIsSet_) { + val[utility::conversions::to_string_t("list")] = ModelBase::toJson(list_); + } + + return val; +} +bool ListConnectionNumberData::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("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); + } + } + return ok; +} + + +std::string ListConnectionNumberData::getName() const +{ + return name_; +} + +void ListConnectionNumberData::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool ListConnectionNumberData::nameIsSet() const +{ + return nameIsSet_; +} + +void ListConnectionNumberData::unsetname() +{ + nameIsSet_ = false; +} + +std::vector& ListConnectionNumberData::getList() +{ + return list_; +} + +void ListConnectionNumberData::setList(const std::vector& value) +{ + list_ = value; + listIsSet_ = true; +} + +bool ListConnectionNumberData::listIsSet() const +{ + return listIsSet_; +} + +void ListConnectionNumberData::unsetlist() +{ + listIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListConnectionNumberDataList.cpp b/aad/src/v2/model/ListConnectionNumberDataList.cpp new file mode 100644 index 000000000..193089f3e --- /dev/null +++ b/aad/src/v2/model/ListConnectionNumberDataList.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/aad/v2/model/ListConnectionNumberDataList.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListConnectionNumberDataList::ListConnectionNumberDataList() +{ + time_ = 0; + timeIsSet_ = false; + value_ = 0; + valueIsSet_ = false; +} + +ListConnectionNumberDataList::~ListConnectionNumberDataList() = default; + +void ListConnectionNumberDataList::validate() +{ +} + +web::json::value ListConnectionNumberDataList::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(timeIsSet_) { + val[utility::conversions::to_string_t("time")] = ModelBase::toJson(time_); + } + if(valueIsSet_) { + val[utility::conversions::to_string_t("value")] = ModelBase::toJson(value_); + } + + return val; +} +bool ListConnectionNumberDataList::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTime(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()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setValue(refVal); + } + } + return ok; +} + + +int32_t ListConnectionNumberDataList::getTime() const +{ + return time_; +} + +void ListConnectionNumberDataList::setTime(int32_t value) +{ + time_ = value; + timeIsSet_ = true; +} + +bool ListConnectionNumberDataList::timeIsSet() const +{ + return timeIsSet_; +} + +void ListConnectionNumberDataList::unsettime() +{ + timeIsSet_ = false; +} + +int32_t ListConnectionNumberDataList::getValue() const +{ + return value_; +} + +void ListConnectionNumberDataList::setValue(int32_t value) +{ + value_ = value; + valueIsSet_ = true; +} + +bool ListConnectionNumberDataList::valueIsSet() const +{ + return valueIsSet_; +} + +void ListConnectionNumberDataList::unsetvalue() +{ + valueIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListDDoSAttackEventRequest.cpp b/aad/src/v2/model/ListDDoSAttackEventRequest.cpp new file mode 100644 index 000000000..68c1a3188 --- /dev/null +++ b/aad/src/v2/model/ListDDoSAttackEventRequest.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/aad/v2/model/ListDDoSAttackEventRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListDDoSAttackEventRequest::ListDDoSAttackEventRequest() +{ + instanceId_ = ""; + instanceIdIsSet_ = false; + bodyIsSet_ = false; +} + +ListDDoSAttackEventRequest::~ListDDoSAttackEventRequest() = default; + +void ListDDoSAttackEventRequest::validate() +{ +} + +web::json::value ListDDoSAttackEventRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(instanceIdIsSet_) { + val[utility::conversions::to_string_t("instance_id")] = ModelBase::toJson(instanceId_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool ListDDoSAttackEventRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + ListDDoSAttackEventRequestBody refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string ListDDoSAttackEventRequest::getInstanceId() const +{ + return instanceId_; +} + +void ListDDoSAttackEventRequest::setInstanceId(const std::string& value) +{ + instanceId_ = value; + instanceIdIsSet_ = true; +} + +bool ListDDoSAttackEventRequest::instanceIdIsSet() const +{ + return instanceIdIsSet_; +} + +void ListDDoSAttackEventRequest::unsetinstanceId() +{ + instanceIdIsSet_ = false; +} + +ListDDoSAttackEventRequestBody ListDDoSAttackEventRequest::getBody() const +{ + return body_; +} + +void ListDDoSAttackEventRequest::setBody(const ListDDoSAttackEventRequestBody& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool ListDDoSAttackEventRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void ListDDoSAttackEventRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListDDoSAttackEventRequestBody.cpp b/aad/src/v2/model/ListDDoSAttackEventRequestBody.cpp new file mode 100644 index 000000000..92ff8aa74 --- /dev/null +++ b/aad/src/v2/model/ListDDoSAttackEventRequestBody.cpp @@ -0,0 +1,324 @@ + + +#include "huaweicloud/aad/v2/model/ListDDoSAttackEventRequestBody.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListDDoSAttackEventRequestBody::ListDDoSAttackEventRequestBody() +{ + startTime_ = ""; + startTimeIsSet_ = false; + endTime_ = ""; + endTimeIsSet_ = false; + offset_ = 0; + offsetIsSet_ = false; + limit_ = 0; + limitIsSet_ = false; + ip_ = ""; + ipIsSet_ = false; + attackFlowLow_ = ""; + attackFlowLowIsSet_ = false; + attackFlowUp_ = ""; + attackFlowUpIsSet_ = false; + attackStatus_ = ""; + attackStatusIsSet_ = false; +} + +ListDDoSAttackEventRequestBody::~ListDDoSAttackEventRequestBody() = default; + +void ListDDoSAttackEventRequestBody::validate() +{ +} + +web::json::value ListDDoSAttackEventRequestBody::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(startTimeIsSet_) { + val[utility::conversions::to_string_t("start_time")] = ModelBase::toJson(startTime_); + } + if(endTimeIsSet_) { + val[utility::conversions::to_string_t("end_time")] = ModelBase::toJson(endTime_); + } + if(offsetIsSet_) { + val[utility::conversions::to_string_t("offset")] = ModelBase::toJson(offset_); + } + if(limitIsSet_) { + val[utility::conversions::to_string_t("limit")] = ModelBase::toJson(limit_); + } + if(ipIsSet_) { + val[utility::conversions::to_string_t("ip")] = ModelBase::toJson(ip_); + } + if(attackFlowLowIsSet_) { + val[utility::conversions::to_string_t("attack_flow_low")] = ModelBase::toJson(attackFlowLow_); + } + if(attackFlowUpIsSet_) { + val[utility::conversions::to_string_t("attack_flow_up")] = ModelBase::toJson(attackFlowUp_); + } + if(attackStatusIsSet_) { + val[utility::conversions::to_string_t("attack_status")] = ModelBase::toJson(attackStatus_); + } + + return val; +} +bool ListDDoSAttackEventRequestBody::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("start_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("start_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStartTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("end_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("end_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEndTime(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); + } + } + if(val.has_field(utility::conversions::to_string_t("ip"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ip")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("attack_flow_low"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("attack_flow_low")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAttackFlowLow(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("attack_flow_up"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("attack_flow_up")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAttackFlowUp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("attack_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("attack_status")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAttackStatus(refVal); + } + } + return ok; +} + + +std::string ListDDoSAttackEventRequestBody::getStartTime() const +{ + return startTime_; +} + +void ListDDoSAttackEventRequestBody::setStartTime(const std::string& value) +{ + startTime_ = value; + startTimeIsSet_ = true; +} + +bool ListDDoSAttackEventRequestBody::startTimeIsSet() const +{ + return startTimeIsSet_; +} + +void ListDDoSAttackEventRequestBody::unsetstartTime() +{ + startTimeIsSet_ = false; +} + +std::string ListDDoSAttackEventRequestBody::getEndTime() const +{ + return endTime_; +} + +void ListDDoSAttackEventRequestBody::setEndTime(const std::string& value) +{ + endTime_ = value; + endTimeIsSet_ = true; +} + +bool ListDDoSAttackEventRequestBody::endTimeIsSet() const +{ + return endTimeIsSet_; +} + +void ListDDoSAttackEventRequestBody::unsetendTime() +{ + endTimeIsSet_ = false; +} + +int32_t ListDDoSAttackEventRequestBody::getOffset() const +{ + return offset_; +} + +void ListDDoSAttackEventRequestBody::setOffset(int32_t value) +{ + offset_ = value; + offsetIsSet_ = true; +} + +bool ListDDoSAttackEventRequestBody::offsetIsSet() const +{ + return offsetIsSet_; +} + +void ListDDoSAttackEventRequestBody::unsetoffset() +{ + offsetIsSet_ = false; +} + +int32_t ListDDoSAttackEventRequestBody::getLimit() const +{ + return limit_; +} + +void ListDDoSAttackEventRequestBody::setLimit(int32_t value) +{ + limit_ = value; + limitIsSet_ = true; +} + +bool ListDDoSAttackEventRequestBody::limitIsSet() const +{ + return limitIsSet_; +} + +void ListDDoSAttackEventRequestBody::unsetlimit() +{ + limitIsSet_ = false; +} + +std::string ListDDoSAttackEventRequestBody::getIp() const +{ + return ip_; +} + +void ListDDoSAttackEventRequestBody::setIp(const std::string& value) +{ + ip_ = value; + ipIsSet_ = true; +} + +bool ListDDoSAttackEventRequestBody::ipIsSet() const +{ + return ipIsSet_; +} + +void ListDDoSAttackEventRequestBody::unsetip() +{ + ipIsSet_ = false; +} + +std::string ListDDoSAttackEventRequestBody::getAttackFlowLow() const +{ + return attackFlowLow_; +} + +void ListDDoSAttackEventRequestBody::setAttackFlowLow(const std::string& value) +{ + attackFlowLow_ = value; + attackFlowLowIsSet_ = true; +} + +bool ListDDoSAttackEventRequestBody::attackFlowLowIsSet() const +{ + return attackFlowLowIsSet_; +} + +void ListDDoSAttackEventRequestBody::unsetattackFlowLow() +{ + attackFlowLowIsSet_ = false; +} + +std::string ListDDoSAttackEventRequestBody::getAttackFlowUp() const +{ + return attackFlowUp_; +} + +void ListDDoSAttackEventRequestBody::setAttackFlowUp(const std::string& value) +{ + attackFlowUp_ = value; + attackFlowUpIsSet_ = true; +} + +bool ListDDoSAttackEventRequestBody::attackFlowUpIsSet() const +{ + return attackFlowUpIsSet_; +} + +void ListDDoSAttackEventRequestBody::unsetattackFlowUp() +{ + attackFlowUpIsSet_ = false; +} + +std::string ListDDoSAttackEventRequestBody::getAttackStatus() const +{ + return attackStatus_; +} + +void ListDDoSAttackEventRequestBody::setAttackStatus(const std::string& value) +{ + attackStatus_ = value; + attackStatusIsSet_ = true; +} + +bool ListDDoSAttackEventRequestBody::attackStatusIsSet() const +{ + return attackStatusIsSet_; +} + +void ListDDoSAttackEventRequestBody::unsetattackStatus() +{ + attackStatusIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListDDoSAttackEventResponse.cpp b/aad/src/v2/model/ListDDoSAttackEventResponse.cpp new file mode 100644 index 000000000..c5b876acf --- /dev/null +++ b/aad/src/v2/model/ListDDoSAttackEventResponse.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/aad/v2/model/ListDDoSAttackEventResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListDDoSAttackEventResponse::ListDDoSAttackEventResponse() +{ + total_ = 0; + totalIsSet_ = false; + dataIsSet_ = false; +} + +ListDDoSAttackEventResponse::~ListDDoSAttackEventResponse() = default; + +void ListDDoSAttackEventResponse::validate() +{ +} + +web::json::value ListDDoSAttackEventResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(totalIsSet_) { + val[utility::conversions::to_string_t("total")] = ModelBase::toJson(total_); + } + if(dataIsSet_) { + val[utility::conversions::to_string_t("data")] = ModelBase::toJson(data_); + } + + return val; +} +bool ListDDoSAttackEventResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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); + } + } + 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; +} + + +int32_t ListDDoSAttackEventResponse::getTotal() const +{ + return total_; +} + +void ListDDoSAttackEventResponse::setTotal(int32_t value) +{ + total_ = value; + totalIsSet_ = true; +} + +bool ListDDoSAttackEventResponse::totalIsSet() const +{ + return totalIsSet_; +} + +void ListDDoSAttackEventResponse::unsettotal() +{ + totalIsSet_ = false; +} + +std::vector& ListDDoSAttackEventResponse::getData() +{ + return data_; +} + +void ListDDoSAttackEventResponse::setData(const std::vector& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ListDDoSAttackEventResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void ListDDoSAttackEventResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListDDoSConnectionNumberRequest.cpp b/aad/src/v2/model/ListDDoSConnectionNumberRequest.cpp new file mode 100644 index 000000000..8db28ba6d --- /dev/null +++ b/aad/src/v2/model/ListDDoSConnectionNumberRequest.cpp @@ -0,0 +1,184 @@ + + +#include "huaweicloud/aad/v2/model/ListDDoSConnectionNumberRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListDDoSConnectionNumberRequest::ListDDoSConnectionNumberRequest() +{ + startTime_ = ""; + startTimeIsSet_ = false; + endTime_ = ""; + endTimeIsSet_ = false; + instanceId_ = ""; + instanceIdIsSet_ = false; + ip_ = ""; + ipIsSet_ = false; +} + +ListDDoSConnectionNumberRequest::~ListDDoSConnectionNumberRequest() = default; + +void ListDDoSConnectionNumberRequest::validate() +{ +} + +web::json::value ListDDoSConnectionNumberRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(startTimeIsSet_) { + val[utility::conversions::to_string_t("start_time")] = ModelBase::toJson(startTime_); + } + if(endTimeIsSet_) { + val[utility::conversions::to_string_t("end_time")] = ModelBase::toJson(endTime_); + } + if(instanceIdIsSet_) { + val[utility::conversions::to_string_t("instance_id")] = ModelBase::toJson(instanceId_); + } + if(ipIsSet_) { + val[utility::conversions::to_string_t("ip")] = ModelBase::toJson(ip_); + } + + return val; +} +bool ListDDoSConnectionNumberRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("start_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("start_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStartTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("end_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("end_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEndTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ip"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ip")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIp(refVal); + } + } + return ok; +} + + +std::string ListDDoSConnectionNumberRequest::getStartTime() const +{ + return startTime_; +} + +void ListDDoSConnectionNumberRequest::setStartTime(const std::string& value) +{ + startTime_ = value; + startTimeIsSet_ = true; +} + +bool ListDDoSConnectionNumberRequest::startTimeIsSet() const +{ + return startTimeIsSet_; +} + +void ListDDoSConnectionNumberRequest::unsetstartTime() +{ + startTimeIsSet_ = false; +} + +std::string ListDDoSConnectionNumberRequest::getEndTime() const +{ + return endTime_; +} + +void ListDDoSConnectionNumberRequest::setEndTime(const std::string& value) +{ + endTime_ = value; + endTimeIsSet_ = true; +} + +bool ListDDoSConnectionNumberRequest::endTimeIsSet() const +{ + return endTimeIsSet_; +} + +void ListDDoSConnectionNumberRequest::unsetendTime() +{ + endTimeIsSet_ = false; +} + +std::string ListDDoSConnectionNumberRequest::getInstanceId() const +{ + return instanceId_; +} + +void ListDDoSConnectionNumberRequest::setInstanceId(const std::string& value) +{ + instanceId_ = value; + instanceIdIsSet_ = true; +} + +bool ListDDoSConnectionNumberRequest::instanceIdIsSet() const +{ + return instanceIdIsSet_; +} + +void ListDDoSConnectionNumberRequest::unsetinstanceId() +{ + instanceIdIsSet_ = false; +} + +std::string ListDDoSConnectionNumberRequest::getIp() const +{ + return ip_; +} + +void ListDDoSConnectionNumberRequest::setIp(const std::string& value) +{ + ip_ = value; + ipIsSet_ = true; +} + +bool ListDDoSConnectionNumberRequest::ipIsSet() const +{ + return ipIsSet_; +} + +void ListDDoSConnectionNumberRequest::unsetip() +{ + ipIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListDDoSConnectionNumberResponse.cpp b/aad/src/v2/model/ListDDoSConnectionNumberResponse.cpp new file mode 100644 index 000000000..688dc6c78 --- /dev/null +++ b/aad/src/v2/model/ListDDoSConnectionNumberResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/aad/v2/model/ListDDoSConnectionNumberResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListDDoSConnectionNumberResponse::ListDDoSConnectionNumberResponse() +{ + dataIsSet_ = false; +} + +ListDDoSConnectionNumberResponse::~ListDDoSConnectionNumberResponse() = default; + +void ListDDoSConnectionNumberResponse::validate() +{ +} + +web::json::value ListDDoSConnectionNumberResponse::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 ListDDoSConnectionNumberResponse::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& ListDDoSConnectionNumberResponse::getData() +{ + return data_; +} + +void ListDDoSConnectionNumberResponse::setData(const std::vector& value) +{ + data_ = value; + dataIsSet_ = true; +} + +bool ListDDoSConnectionNumberResponse::dataIsSet() const +{ + return dataIsSet_; +} + +void ListDDoSConnectionNumberResponse::unsetdata() +{ + dataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListDDoSEventData.cpp b/aad/src/v2/model/ListDDoSEventData.cpp new file mode 100644 index 000000000..29c742df2 --- /dev/null +++ b/aad/src/v2/model/ListDDoSEventData.cpp @@ -0,0 +1,429 @@ + + +#include "huaweicloud/aad/v2/model/ListDDoSEventData.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListDDoSEventData::ListDDoSEventData() +{ + zoneIp_ = ""; + zoneIpIsSet_ = false; + startTime_ = ""; + startTimeIsSet_ = false; + endTime_ = ""; + endTimeIsSet_ = false; + maxDropKbps_ = ""; + maxDropKbpsIsSet_ = false; + maxDropPps_ = ""; + maxDropPpsIsSet_ = false; + maxInKbps_ = ""; + maxInKbpsIsSet_ = false; + maxInPps_ = ""; + maxInPpsIsSet_ = false; + attackTypes_ = ""; + attackTypesIsSet_ = false; + attackIps_ = ""; + attackIpsIsSet_ = false; + attackIpsDesc_ = ""; + attackIpsDescIsSet_ = false; + attackStatus_ = ""; + attackStatusIsSet_ = false; +} + +ListDDoSEventData::~ListDDoSEventData() = default; + +void ListDDoSEventData::validate() +{ +} + +web::json::value ListDDoSEventData::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(zoneIpIsSet_) { + val[utility::conversions::to_string_t("zone_ip")] = ModelBase::toJson(zoneIp_); + } + if(startTimeIsSet_) { + val[utility::conversions::to_string_t("start_time")] = ModelBase::toJson(startTime_); + } + if(endTimeIsSet_) { + val[utility::conversions::to_string_t("end_time")] = ModelBase::toJson(endTime_); + } + if(maxDropKbpsIsSet_) { + val[utility::conversions::to_string_t("max_drop_kbps")] = ModelBase::toJson(maxDropKbps_); + } + if(maxDropPpsIsSet_) { + val[utility::conversions::to_string_t("max_drop_pps")] = ModelBase::toJson(maxDropPps_); + } + if(maxInKbpsIsSet_) { + val[utility::conversions::to_string_t("max_in_kbps")] = ModelBase::toJson(maxInKbps_); + } + if(maxInPpsIsSet_) { + val[utility::conversions::to_string_t("max_in_pps")] = ModelBase::toJson(maxInPps_); + } + if(attackTypesIsSet_) { + val[utility::conversions::to_string_t("attack_types")] = ModelBase::toJson(attackTypes_); + } + if(attackIpsIsSet_) { + val[utility::conversions::to_string_t("attack_ips")] = ModelBase::toJson(attackIps_); + } + if(attackIpsDescIsSet_) { + val[utility::conversions::to_string_t("attack_ips_desc")] = ModelBase::toJson(attackIpsDesc_); + } + if(attackStatusIsSet_) { + val[utility::conversions::to_string_t("attack_status")] = ModelBase::toJson(attackStatus_); + } + + return val; +} +bool ListDDoSEventData::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("zone_ip"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("zone_ip")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setZoneIp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("start_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("start_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStartTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("end_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("end_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEndTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("max_drop_kbps"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("max_drop_kbps")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setMaxDropKbps(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("max_drop_pps"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("max_drop_pps")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setMaxDropPps(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("max_in_kbps"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("max_in_kbps")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setMaxInKbps(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("max_in_pps"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("max_in_pps")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setMaxInPps(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("attack_types"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("attack_types")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAttackTypes(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("attack_ips"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("attack_ips")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAttackIps(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("attack_ips_desc"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("attack_ips_desc")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAttackIpsDesc(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("attack_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("attack_status")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAttackStatus(refVal); + } + } + return ok; +} + + +std::string ListDDoSEventData::getZoneIp() const +{ + return zoneIp_; +} + +void ListDDoSEventData::setZoneIp(const std::string& value) +{ + zoneIp_ = value; + zoneIpIsSet_ = true; +} + +bool ListDDoSEventData::zoneIpIsSet() const +{ + return zoneIpIsSet_; +} + +void ListDDoSEventData::unsetzoneIp() +{ + zoneIpIsSet_ = false; +} + +std::string ListDDoSEventData::getStartTime() const +{ + return startTime_; +} + +void ListDDoSEventData::setStartTime(const std::string& value) +{ + startTime_ = value; + startTimeIsSet_ = true; +} + +bool ListDDoSEventData::startTimeIsSet() const +{ + return startTimeIsSet_; +} + +void ListDDoSEventData::unsetstartTime() +{ + startTimeIsSet_ = false; +} + +std::string ListDDoSEventData::getEndTime() const +{ + return endTime_; +} + +void ListDDoSEventData::setEndTime(const std::string& value) +{ + endTime_ = value; + endTimeIsSet_ = true; +} + +bool ListDDoSEventData::endTimeIsSet() const +{ + return endTimeIsSet_; +} + +void ListDDoSEventData::unsetendTime() +{ + endTimeIsSet_ = false; +} + +std::string ListDDoSEventData::getMaxDropKbps() const +{ + return maxDropKbps_; +} + +void ListDDoSEventData::setMaxDropKbps(const std::string& value) +{ + maxDropKbps_ = value; + maxDropKbpsIsSet_ = true; +} + +bool ListDDoSEventData::maxDropKbpsIsSet() const +{ + return maxDropKbpsIsSet_; +} + +void ListDDoSEventData::unsetmaxDropKbps() +{ + maxDropKbpsIsSet_ = false; +} + +std::string ListDDoSEventData::getMaxDropPps() const +{ + return maxDropPps_; +} + +void ListDDoSEventData::setMaxDropPps(const std::string& value) +{ + maxDropPps_ = value; + maxDropPpsIsSet_ = true; +} + +bool ListDDoSEventData::maxDropPpsIsSet() const +{ + return maxDropPpsIsSet_; +} + +void ListDDoSEventData::unsetmaxDropPps() +{ + maxDropPpsIsSet_ = false; +} + +std::string ListDDoSEventData::getMaxInKbps() const +{ + return maxInKbps_; +} + +void ListDDoSEventData::setMaxInKbps(const std::string& value) +{ + maxInKbps_ = value; + maxInKbpsIsSet_ = true; +} + +bool ListDDoSEventData::maxInKbpsIsSet() const +{ + return maxInKbpsIsSet_; +} + +void ListDDoSEventData::unsetmaxInKbps() +{ + maxInKbpsIsSet_ = false; +} + +std::string ListDDoSEventData::getMaxInPps() const +{ + return maxInPps_; +} + +void ListDDoSEventData::setMaxInPps(const std::string& value) +{ + maxInPps_ = value; + maxInPpsIsSet_ = true; +} + +bool ListDDoSEventData::maxInPpsIsSet() const +{ + return maxInPpsIsSet_; +} + +void ListDDoSEventData::unsetmaxInPps() +{ + maxInPpsIsSet_ = false; +} + +std::string ListDDoSEventData::getAttackTypes() const +{ + return attackTypes_; +} + +void ListDDoSEventData::setAttackTypes(const std::string& value) +{ + attackTypes_ = value; + attackTypesIsSet_ = true; +} + +bool ListDDoSEventData::attackTypesIsSet() const +{ + return attackTypesIsSet_; +} + +void ListDDoSEventData::unsetattackTypes() +{ + attackTypesIsSet_ = false; +} + +std::string ListDDoSEventData::getAttackIps() const +{ + return attackIps_; +} + +void ListDDoSEventData::setAttackIps(const std::string& value) +{ + attackIps_ = value; + attackIpsIsSet_ = true; +} + +bool ListDDoSEventData::attackIpsIsSet() const +{ + return attackIpsIsSet_; +} + +void ListDDoSEventData::unsetattackIps() +{ + attackIpsIsSet_ = false; +} + +std::string ListDDoSEventData::getAttackIpsDesc() const +{ + return attackIpsDesc_; +} + +void ListDDoSEventData::setAttackIpsDesc(const std::string& value) +{ + attackIpsDesc_ = value; + attackIpsDescIsSet_ = true; +} + +bool ListDDoSEventData::attackIpsDescIsSet() const +{ + return attackIpsDescIsSet_; +} + +void ListDDoSEventData::unsetattackIpsDesc() +{ + attackIpsDescIsSet_ = false; +} + +std::string ListDDoSEventData::getAttackStatus() const +{ + return attackStatus_; +} + +void ListDDoSEventData::setAttackStatus(const std::string& value) +{ + attackStatus_ = value; + attackStatusIsSet_ = true; +} + +bool ListDDoSEventData::attackStatusIsSet() const +{ + return attackStatusIsSet_; +} + +void ListDDoSEventData::unsetattackStatus() +{ + attackStatusIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListDDoSFlowRequest.cpp b/aad/src/v2/model/ListDDoSFlowRequest.cpp new file mode 100644 index 000000000..844507941 --- /dev/null +++ b/aad/src/v2/model/ListDDoSFlowRequest.cpp @@ -0,0 +1,219 @@ + + +#include "huaweicloud/aad/v2/model/ListDDoSFlowRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListDDoSFlowRequest::ListDDoSFlowRequest() +{ + instanceId_ = ""; + instanceIdIsSet_ = false; + ip_ = ""; + ipIsSet_ = false; + type_ = ""; + typeIsSet_ = false; + startTime_ = ""; + startTimeIsSet_ = false; + endTime_ = ""; + endTimeIsSet_ = false; +} + +ListDDoSFlowRequest::~ListDDoSFlowRequest() = default; + +void ListDDoSFlowRequest::validate() +{ +} + +web::json::value ListDDoSFlowRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(instanceIdIsSet_) { + val[utility::conversions::to_string_t("instance_id")] = ModelBase::toJson(instanceId_); + } + if(ipIsSet_) { + val[utility::conversions::to_string_t("ip")] = ModelBase::toJson(ip_); + } + if(typeIsSet_) { + val[utility::conversions::to_string_t("type")] = ModelBase::toJson(type_); + } + if(startTimeIsSet_) { + val[utility::conversions::to_string_t("start_time")] = ModelBase::toJson(startTime_); + } + if(endTimeIsSet_) { + val[utility::conversions::to_string_t("end_time")] = ModelBase::toJson(endTime_); + } + + return val; +} +bool ListDDoSFlowRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ip"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ip")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("start_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("start_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStartTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("end_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("end_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEndTime(refVal); + } + } + return ok; +} + + +std::string ListDDoSFlowRequest::getInstanceId() const +{ + return instanceId_; +} + +void ListDDoSFlowRequest::setInstanceId(const std::string& value) +{ + instanceId_ = value; + instanceIdIsSet_ = true; +} + +bool ListDDoSFlowRequest::instanceIdIsSet() const +{ + return instanceIdIsSet_; +} + +void ListDDoSFlowRequest::unsetinstanceId() +{ + instanceIdIsSet_ = false; +} + +std::string ListDDoSFlowRequest::getIp() const +{ + return ip_; +} + +void ListDDoSFlowRequest::setIp(const std::string& value) +{ + ip_ = value; + ipIsSet_ = true; +} + +bool ListDDoSFlowRequest::ipIsSet() const +{ + return ipIsSet_; +} + +void ListDDoSFlowRequest::unsetip() +{ + ipIsSet_ = false; +} + +std::string ListDDoSFlowRequest::getType() const +{ + return type_; +} + +void ListDDoSFlowRequest::setType(const std::string& value) +{ + type_ = value; + typeIsSet_ = true; +} + +bool ListDDoSFlowRequest::typeIsSet() const +{ + return typeIsSet_; +} + +void ListDDoSFlowRequest::unsettype() +{ + typeIsSet_ = false; +} + +std::string ListDDoSFlowRequest::getStartTime() const +{ + return startTime_; +} + +void ListDDoSFlowRequest::setStartTime(const std::string& value) +{ + startTime_ = value; + startTimeIsSet_ = true; +} + +bool ListDDoSFlowRequest::startTimeIsSet() const +{ + return startTimeIsSet_; +} + +void ListDDoSFlowRequest::unsetstartTime() +{ + startTimeIsSet_ = false; +} + +std::string ListDDoSFlowRequest::getEndTime() const +{ + return endTime_; +} + +void ListDDoSFlowRequest::setEndTime(const std::string& value) +{ + endTime_ = value; + endTimeIsSet_ = true; +} + +bool ListDDoSFlowRequest::endTimeIsSet() const +{ + return endTimeIsSet_; +} + +void ListDDoSFlowRequest::unsetendTime() +{ + endTimeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListDDoSFlowResponse.cpp b/aad/src/v2/model/ListDDoSFlowResponse.cpp new file mode 100644 index 000000000..716ea1301 --- /dev/null +++ b/aad/src/v2/model/ListDDoSFlowResponse.cpp @@ -0,0 +1,112 @@ + + +#include "huaweicloud/aad/v2/model/ListDDoSFlowResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListDDoSFlowResponse::ListDDoSFlowResponse() +{ + flowBpsIsSet_ = false; + flowPpsIsSet_ = false; +} + +ListDDoSFlowResponse::~ListDDoSFlowResponse() = default; + +void ListDDoSFlowResponse::validate() +{ +} + +web::json::value ListDDoSFlowResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(flowBpsIsSet_) { + val[utility::conversions::to_string_t("flow_bps")] = ModelBase::toJson(flowBps_); + } + if(flowPpsIsSet_) { + val[utility::conversions::to_string_t("flow_pps")] = ModelBase::toJson(flowPps_); + } + + return val; +} +bool ListDDoSFlowResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("flow_bps"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("flow_bps")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFlowBps(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("flow_pps"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("flow_pps")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFlowPps(refVal); + } + } + return ok; +} + + +std::vector& ListDDoSFlowResponse::getFlowBps() +{ + return flowBps_; +} + +void ListDDoSFlowResponse::setFlowBps(const std::vector& value) +{ + flowBps_ = value; + flowBpsIsSet_ = true; +} + +bool ListDDoSFlowResponse::flowBpsIsSet() const +{ + return flowBpsIsSet_; +} + +void ListDDoSFlowResponse::unsetflowBps() +{ + flowBpsIsSet_ = false; +} + +std::vector& ListDDoSFlowResponse::getFlowPps() +{ + return flowPps_; +} + +void ListDDoSFlowResponse::setFlowPps(const std::vector& value) +{ + flowPps_ = value; + flowPpsIsSet_ = true; +} + +bool ListDDoSFlowResponse::flowPpsIsSet() const +{ + return flowPpsIsSet_; +} + +void ListDDoSFlowResponse::unsetflowPps() +{ + flowPpsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListFrequencyControlRuleRequest.cpp b/aad/src/v2/model/ListFrequencyControlRuleRequest.cpp new file mode 100644 index 000000000..f4ec412b3 --- /dev/null +++ b/aad/src/v2/model/ListFrequencyControlRuleRequest.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/aad/v2/model/ListFrequencyControlRuleRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListFrequencyControlRuleRequest::ListFrequencyControlRuleRequest() +{ + domainName_ = ""; + domainNameIsSet_ = false; +} + +ListFrequencyControlRuleRequest::~ListFrequencyControlRuleRequest() = default; + +void ListFrequencyControlRuleRequest::validate() +{ +} + +web::json::value ListFrequencyControlRuleRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainNameIsSet_) { + val[utility::conversions::to_string_t("domain_name")] = ModelBase::toJson(domainName_); + } + + return val; +} +bool ListFrequencyControlRuleRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainName(refVal); + } + } + return ok; +} + + +std::string ListFrequencyControlRuleRequest::getDomainName() const +{ + return domainName_; +} + +void ListFrequencyControlRuleRequest::setDomainName(const std::string& value) +{ + domainName_ = value; + domainNameIsSet_ = true; +} + +bool ListFrequencyControlRuleRequest::domainNameIsSet() const +{ + return domainNameIsSet_; +} + +void ListFrequencyControlRuleRequest::unsetdomainName() +{ + domainNameIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListFrequencyControlRuleResponse.cpp b/aad/src/v2/model/ListFrequencyControlRuleResponse.cpp new file mode 100644 index 000000000..9cec2b084 --- /dev/null +++ b/aad/src/v2/model/ListFrequencyControlRuleResponse.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/aad/v2/model/ListFrequencyControlRuleResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListFrequencyControlRuleResponse::ListFrequencyControlRuleResponse() +{ + total_ = 0; + totalIsSet_ = false; + itemsIsSet_ = false; +} + +ListFrequencyControlRuleResponse::~ListFrequencyControlRuleResponse() = default; + +void ListFrequencyControlRuleResponse::validate() +{ +} + +web::json::value ListFrequencyControlRuleResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(totalIsSet_) { + val[utility::conversions::to_string_t("total")] = ModelBase::toJson(total_); + } + if(itemsIsSet_) { + val[utility::conversions::to_string_t("items")] = ModelBase::toJson(items_); + } + + return val; +} +bool ListFrequencyControlRuleResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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); + } + } + if(val.has_field(utility::conversions::to_string_t("items"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("items")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setItems(refVal); + } + } + return ok; +} + + +int32_t ListFrequencyControlRuleResponse::getTotal() const +{ + return total_; +} + +void ListFrequencyControlRuleResponse::setTotal(int32_t value) +{ + total_ = value; + totalIsSet_ = true; +} + +bool ListFrequencyControlRuleResponse::totalIsSet() const +{ + return totalIsSet_; +} + +void ListFrequencyControlRuleResponse::unsettotal() +{ + totalIsSet_ = false; +} + +std::vector& ListFrequencyControlRuleResponse::getItems() +{ + return items_; +} + +void ListFrequencyControlRuleResponse::setItems(const std::vector& value) +{ + items_ = value; + itemsIsSet_ = true; +} + +bool ListFrequencyControlRuleResponse::itemsIsSet() const +{ + return itemsIsSet_; +} + +void ListFrequencyControlRuleResponse::unsetitems() +{ + itemsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListInstanceDomainsRequest.cpp b/aad/src/v2/model/ListInstanceDomainsRequest.cpp new file mode 100644 index 000000000..776e57dd1 --- /dev/null +++ b/aad/src/v2/model/ListInstanceDomainsRequest.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/aad/v2/model/ListInstanceDomainsRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListInstanceDomainsRequest::ListInstanceDomainsRequest() +{ + instanceId_ = ""; + instanceIdIsSet_ = false; +} + +ListInstanceDomainsRequest::~ListInstanceDomainsRequest() = default; + +void ListInstanceDomainsRequest::validate() +{ +} + +web::json::value ListInstanceDomainsRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(instanceIdIsSet_) { + val[utility::conversions::to_string_t("instance_id")] = ModelBase::toJson(instanceId_); + } + + return val; +} +bool ListInstanceDomainsRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceId(refVal); + } + } + return ok; +} + + +std::string ListInstanceDomainsRequest::getInstanceId() const +{ + return instanceId_; +} + +void ListInstanceDomainsRequest::setInstanceId(const std::string& value) +{ + instanceId_ = value; + instanceIdIsSet_ = true; +} + +bool ListInstanceDomainsRequest::instanceIdIsSet() const +{ + return instanceIdIsSet_; +} + +void ListInstanceDomainsRequest::unsetinstanceId() +{ + instanceIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListInstanceDomainsResponse.cpp b/aad/src/v2/model/ListInstanceDomainsResponse.cpp new file mode 100644 index 000000000..27f4fcb85 --- /dev/null +++ b/aad/src/v2/model/ListInstanceDomainsResponse.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/aad/v2/model/ListInstanceDomainsResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListInstanceDomainsResponse::ListInstanceDomainsResponse() +{ + instanceId_ = ""; + instanceIdIsSet_ = false; + instanceName_ = ""; + instanceNameIsSet_ = false; + domainsIsSet_ = false; +} + +ListInstanceDomainsResponse::~ListInstanceDomainsResponse() = default; + +void ListInstanceDomainsResponse::validate() +{ +} + +web::json::value ListInstanceDomainsResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(instanceIdIsSet_) { + val[utility::conversions::to_string_t("instance_id")] = ModelBase::toJson(instanceId_); + } + if(instanceNameIsSet_) { + val[utility::conversions::to_string_t("instance_name")] = ModelBase::toJson(instanceName_); + } + if(domainsIsSet_) { + val[utility::conversions::to_string_t("domains")] = ModelBase::toJson(domains_); + } + + return val; +} +bool ListInstanceDomainsResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("instance_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("domains"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domains")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomains(refVal); + } + } + return ok; +} + + +std::string ListInstanceDomainsResponse::getInstanceId() const +{ + return instanceId_; +} + +void ListInstanceDomainsResponse::setInstanceId(const std::string& value) +{ + instanceId_ = value; + instanceIdIsSet_ = true; +} + +bool ListInstanceDomainsResponse::instanceIdIsSet() const +{ + return instanceIdIsSet_; +} + +void ListInstanceDomainsResponse::unsetinstanceId() +{ + instanceIdIsSet_ = false; +} + +std::string ListInstanceDomainsResponse::getInstanceName() const +{ + return instanceName_; +} + +void ListInstanceDomainsResponse::setInstanceName(const std::string& value) +{ + instanceName_ = value; + instanceNameIsSet_ = true; +} + +bool ListInstanceDomainsResponse::instanceNameIsSet() const +{ + return instanceNameIsSet_; +} + +void ListInstanceDomainsResponse::unsetinstanceName() +{ + instanceNameIsSet_ = false; +} + +std::vector& ListInstanceDomainsResponse::getDomains() +{ + return domains_; +} + +void ListInstanceDomainsResponse::setDomains(const std::vector& value) +{ + domains_ = value; + domainsIsSet_ = true; +} + +bool ListInstanceDomainsResponse::domainsIsSet() const +{ + return domainsIsSet_; +} + +void ListInstanceDomainsResponse::unsetdomains() +{ + domainsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListWafAttackEventRequest.cpp b/aad/src/v2/model/ListWafAttackEventRequest.cpp new file mode 100644 index 000000000..2165edc54 --- /dev/null +++ b/aad/src/v2/model/ListWafAttackEventRequest.cpp @@ -0,0 +1,324 @@ + + +#include "huaweicloud/aad/v2/model/ListWafAttackEventRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListWafAttackEventRequest::ListWafAttackEventRequest() +{ + domains_ = ""; + domainsIsSet_ = false; + startTime_ = ""; + startTimeIsSet_ = false; + endTime_ = ""; + endTimeIsSet_ = false; + recent_ = ""; + recentIsSet_ = false; + overseasType_ = 0; + overseasTypeIsSet_ = false; + sip_ = ""; + sipIsSet_ = false; + limit_ = 0; + limitIsSet_ = false; + offset_ = 0; + offsetIsSet_ = false; +} + +ListWafAttackEventRequest::~ListWafAttackEventRequest() = default; + +void ListWafAttackEventRequest::validate() +{ +} + +web::json::value ListWafAttackEventRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainsIsSet_) { + val[utility::conversions::to_string_t("domains")] = ModelBase::toJson(domains_); + } + if(startTimeIsSet_) { + val[utility::conversions::to_string_t("start_time")] = ModelBase::toJson(startTime_); + } + if(endTimeIsSet_) { + val[utility::conversions::to_string_t("end_time")] = ModelBase::toJson(endTime_); + } + if(recentIsSet_) { + val[utility::conversions::to_string_t("recent")] = ModelBase::toJson(recent_); + } + if(overseasTypeIsSet_) { + val[utility::conversions::to_string_t("overseas_type")] = ModelBase::toJson(overseasType_); + } + if(sipIsSet_) { + val[utility::conversions::to_string_t("sip")] = ModelBase::toJson(sip_); + } + if(limitIsSet_) { + val[utility::conversions::to_string_t("limit")] = ModelBase::toJson(limit_); + } + if(offsetIsSet_) { + val[utility::conversions::to_string_t("offset")] = ModelBase::toJson(offset_); + } + + return val; +} +bool ListWafAttackEventRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domains"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domains")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomains(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("start_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("start_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStartTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("end_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("end_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEndTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("recent"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("recent")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRecent(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("overseas_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("overseas_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOverseasType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("sip"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sip")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSip(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); + } + } + return ok; +} + + +std::string ListWafAttackEventRequest::getDomains() const +{ + return domains_; +} + +void ListWafAttackEventRequest::setDomains(const std::string& value) +{ + domains_ = value; + domainsIsSet_ = true; +} + +bool ListWafAttackEventRequest::domainsIsSet() const +{ + return domainsIsSet_; +} + +void ListWafAttackEventRequest::unsetdomains() +{ + domainsIsSet_ = false; +} + +std::string ListWafAttackEventRequest::getStartTime() const +{ + return startTime_; +} + +void ListWafAttackEventRequest::setStartTime(const std::string& value) +{ + startTime_ = value; + startTimeIsSet_ = true; +} + +bool ListWafAttackEventRequest::startTimeIsSet() const +{ + return startTimeIsSet_; +} + +void ListWafAttackEventRequest::unsetstartTime() +{ + startTimeIsSet_ = false; +} + +std::string ListWafAttackEventRequest::getEndTime() const +{ + return endTime_; +} + +void ListWafAttackEventRequest::setEndTime(const std::string& value) +{ + endTime_ = value; + endTimeIsSet_ = true; +} + +bool ListWafAttackEventRequest::endTimeIsSet() const +{ + return endTimeIsSet_; +} + +void ListWafAttackEventRequest::unsetendTime() +{ + endTimeIsSet_ = false; +} + +std::string ListWafAttackEventRequest::getRecent() const +{ + return recent_; +} + +void ListWafAttackEventRequest::setRecent(const std::string& value) +{ + recent_ = value; + recentIsSet_ = true; +} + +bool ListWafAttackEventRequest::recentIsSet() const +{ + return recentIsSet_; +} + +void ListWafAttackEventRequest::unsetrecent() +{ + recentIsSet_ = false; +} + +int32_t ListWafAttackEventRequest::getOverseasType() const +{ + return overseasType_; +} + +void ListWafAttackEventRequest::setOverseasType(int32_t value) +{ + overseasType_ = value; + overseasTypeIsSet_ = true; +} + +bool ListWafAttackEventRequest::overseasTypeIsSet() const +{ + return overseasTypeIsSet_; +} + +void ListWafAttackEventRequest::unsetoverseasType() +{ + overseasTypeIsSet_ = false; +} + +std::string ListWafAttackEventRequest::getSip() const +{ + return sip_; +} + +void ListWafAttackEventRequest::setSip(const std::string& value) +{ + sip_ = value; + sipIsSet_ = true; +} + +bool ListWafAttackEventRequest::sipIsSet() const +{ + return sipIsSet_; +} + +void ListWafAttackEventRequest::unsetsip() +{ + sipIsSet_ = false; +} + +int32_t ListWafAttackEventRequest::getLimit() const +{ + return limit_; +} + +void ListWafAttackEventRequest::setLimit(int32_t value) +{ + limit_ = value; + limitIsSet_ = true; +} + +bool ListWafAttackEventRequest::limitIsSet() const +{ + return limitIsSet_; +} + +void ListWafAttackEventRequest::unsetlimit() +{ + limitIsSet_ = false; +} + +int32_t ListWafAttackEventRequest::getOffset() const +{ + return offset_; +} + +void ListWafAttackEventRequest::setOffset(int32_t value) +{ + offset_ = value; + offsetIsSet_ = true; +} + +bool ListWafAttackEventRequest::offsetIsSet() const +{ + return offsetIsSet_; +} + +void ListWafAttackEventRequest::unsetoffset() +{ + offsetIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListWafAttackEventResponse.cpp b/aad/src/v2/model/ListWafAttackEventResponse.cpp new file mode 100644 index 000000000..211bb9826 --- /dev/null +++ b/aad/src/v2/model/ListWafAttackEventResponse.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/aad/v2/model/ListWafAttackEventResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListWafAttackEventResponse::ListWafAttackEventResponse() +{ + total_ = 0; + totalIsSet_ = false; + listIsSet_ = false; +} + +ListWafAttackEventResponse::~ListWafAttackEventResponse() = default; + +void ListWafAttackEventResponse::validate() +{ +} + +web::json::value ListWafAttackEventResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(totalIsSet_) { + val[utility::conversions::to_string_t("total")] = ModelBase::toJson(total_); + } + if(listIsSet_) { + val[utility::conversions::to_string_t("list")] = ModelBase::toJson(list_); + } + + return val; +} +bool ListWafAttackEventResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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); + } + } + 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); + } + } + return ok; +} + + +int32_t ListWafAttackEventResponse::getTotal() const +{ + return total_; +} + +void ListWafAttackEventResponse::setTotal(int32_t value) +{ + total_ = value; + totalIsSet_ = true; +} + +bool ListWafAttackEventResponse::totalIsSet() const +{ + return totalIsSet_; +} + +void ListWafAttackEventResponse::unsettotal() +{ + totalIsSet_ = false; +} + +std::vector& ListWafAttackEventResponse::getList() +{ + return list_; +} + +void ListWafAttackEventResponse::setList(const std::vector& value) +{ + list_ = value; + listIsSet_ = true; +} + +bool ListWafAttackEventResponse::listIsSet() const +{ + return listIsSet_; +} + +void ListWafAttackEventResponse::unsetlist() +{ + listIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListWafAttackEventlist.cpp b/aad/src/v2/model/ListWafAttackEventlist.cpp new file mode 100644 index 000000000..af7cde664 --- /dev/null +++ b/aad/src/v2/model/ListWafAttackEventlist.cpp @@ -0,0 +1,323 @@ + + +#include "huaweicloud/aad/v2/model/ListWafAttackEventlist.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListWafAttackEventlist::ListWafAttackEventlist() +{ + id_ = ""; + idIsSet_ = false; + domain_ = ""; + domainIsSet_ = false; + time_ = 0; + timeIsSet_ = false; + sip_ = ""; + sipIsSet_ = false; + action_ = ""; + actionIsSet_ = false; + url_ = ""; + urlIsSet_ = false; + type_ = ""; + typeIsSet_ = false; + backendIsSet_ = false; +} + +ListWafAttackEventlist::~ListWafAttackEventlist() = default; + +void ListWafAttackEventlist::validate() +{ +} + +web::json::value ListWafAttackEventlist::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(idIsSet_) { + val[utility::conversions::to_string_t("id")] = ModelBase::toJson(id_); + } + if(domainIsSet_) { + val[utility::conversions::to_string_t("domain")] = ModelBase::toJson(domain_); + } + if(timeIsSet_) { + val[utility::conversions::to_string_t("time")] = ModelBase::toJson(time_); + } + if(sipIsSet_) { + val[utility::conversions::to_string_t("sip")] = ModelBase::toJson(sip_); + } + if(actionIsSet_) { + val[utility::conversions::to_string_t("action")] = ModelBase::toJson(action_); + } + if(urlIsSet_) { + val[utility::conversions::to_string_t("url")] = ModelBase::toJson(url_); + } + if(typeIsSet_) { + val[utility::conversions::to_string_t("type")] = ModelBase::toJson(type_); + } + if(backendIsSet_) { + val[utility::conversions::to_string_t("backend")] = ModelBase::toJson(backend_); + } + + return val; +} +bool ListWafAttackEventlist::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("domain"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomain(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()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("sip"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sip")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSip(refVal); + } + } + 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()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAction(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("url"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("url")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setUrl(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("backend"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("backend")); + if(!fieldValue.is_null()) + { + Backend refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBackend(refVal); + } + } + return ok; +} + + +std::string ListWafAttackEventlist::getId() const +{ + return id_; +} + +void ListWafAttackEventlist::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool ListWafAttackEventlist::idIsSet() const +{ + return idIsSet_; +} + +void ListWafAttackEventlist::unsetid() +{ + idIsSet_ = false; +} + +std::string ListWafAttackEventlist::getDomain() const +{ + return domain_; +} + +void ListWafAttackEventlist::setDomain(const std::string& value) +{ + domain_ = value; + domainIsSet_ = true; +} + +bool ListWafAttackEventlist::domainIsSet() const +{ + return domainIsSet_; +} + +void ListWafAttackEventlist::unsetdomain() +{ + domainIsSet_ = false; +} + +int32_t ListWafAttackEventlist::getTime() const +{ + return time_; +} + +void ListWafAttackEventlist::setTime(int32_t value) +{ + time_ = value; + timeIsSet_ = true; +} + +bool ListWafAttackEventlist::timeIsSet() const +{ + return timeIsSet_; +} + +void ListWafAttackEventlist::unsettime() +{ + timeIsSet_ = false; +} + +std::string ListWafAttackEventlist::getSip() const +{ + return sip_; +} + +void ListWafAttackEventlist::setSip(const std::string& value) +{ + sip_ = value; + sipIsSet_ = true; +} + +bool ListWafAttackEventlist::sipIsSet() const +{ + return sipIsSet_; +} + +void ListWafAttackEventlist::unsetsip() +{ + sipIsSet_ = false; +} + +std::string ListWafAttackEventlist::getAction() const +{ + return action_; +} + +void ListWafAttackEventlist::setAction(const std::string& value) +{ + action_ = value; + actionIsSet_ = true; +} + +bool ListWafAttackEventlist::actionIsSet() const +{ + return actionIsSet_; +} + +void ListWafAttackEventlist::unsetaction() +{ + actionIsSet_ = false; +} + +std::string ListWafAttackEventlist::getUrl() const +{ + return url_; +} + +void ListWafAttackEventlist::setUrl(const std::string& value) +{ + url_ = value; + urlIsSet_ = true; +} + +bool ListWafAttackEventlist::urlIsSet() const +{ + return urlIsSet_; +} + +void ListWafAttackEventlist::unseturl() +{ + urlIsSet_ = false; +} + +std::string ListWafAttackEventlist::getType() const +{ + return type_; +} + +void ListWafAttackEventlist::setType(const std::string& value) +{ + type_ = value; + typeIsSet_ = true; +} + +bool ListWafAttackEventlist::typeIsSet() const +{ + return typeIsSet_; +} + +void ListWafAttackEventlist::unsettype() +{ + typeIsSet_ = false; +} + +Backend ListWafAttackEventlist::getBackend() const +{ + return backend_; +} + +void ListWafAttackEventlist::setBackend(const Backend& value) +{ + backend_ = value; + backendIsSet_ = true; +} + +bool ListWafAttackEventlist::backendIsSet() const +{ + return backendIsSet_; +} + +void ListWafAttackEventlist::unsetbackend() +{ + backendIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListWafBandwidthRequest.cpp b/aad/src/v2/model/ListWafBandwidthRequest.cpp new file mode 100644 index 000000000..65872ea0a --- /dev/null +++ b/aad/src/v2/model/ListWafBandwidthRequest.cpp @@ -0,0 +1,254 @@ + + +#include "huaweicloud/aad/v2/model/ListWafBandwidthRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListWafBandwidthRequest::ListWafBandwidthRequest() +{ + domains_ = ""; + domainsIsSet_ = false; + valueType_ = ""; + valueTypeIsSet_ = false; + startTime_ = ""; + startTimeIsSet_ = false; + endTime_ = ""; + endTimeIsSet_ = false; + recent_ = ""; + recentIsSet_ = false; + overseasType_ = 0; + overseasTypeIsSet_ = false; +} + +ListWafBandwidthRequest::~ListWafBandwidthRequest() = default; + +void ListWafBandwidthRequest::validate() +{ +} + +web::json::value ListWafBandwidthRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainsIsSet_) { + val[utility::conversions::to_string_t("domains")] = ModelBase::toJson(domains_); + } + if(valueTypeIsSet_) { + val[utility::conversions::to_string_t("value_type")] = ModelBase::toJson(valueType_); + } + if(startTimeIsSet_) { + val[utility::conversions::to_string_t("start_time")] = ModelBase::toJson(startTime_); + } + if(endTimeIsSet_) { + val[utility::conversions::to_string_t("end_time")] = ModelBase::toJson(endTime_); + } + if(recentIsSet_) { + val[utility::conversions::to_string_t("recent")] = ModelBase::toJson(recent_); + } + if(overseasTypeIsSet_) { + val[utility::conversions::to_string_t("overseas_type")] = ModelBase::toJson(overseasType_); + } + + return val; +} +bool ListWafBandwidthRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domains"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domains")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomains(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("value_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("value_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setValueType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("start_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("start_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStartTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("end_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("end_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEndTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("recent"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("recent")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRecent(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("overseas_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("overseas_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOverseasType(refVal); + } + } + return ok; +} + + +std::string ListWafBandwidthRequest::getDomains() const +{ + return domains_; +} + +void ListWafBandwidthRequest::setDomains(const std::string& value) +{ + domains_ = value; + domainsIsSet_ = true; +} + +bool ListWafBandwidthRequest::domainsIsSet() const +{ + return domainsIsSet_; +} + +void ListWafBandwidthRequest::unsetdomains() +{ + domainsIsSet_ = false; +} + +std::string ListWafBandwidthRequest::getValueType() const +{ + return valueType_; +} + +void ListWafBandwidthRequest::setValueType(const std::string& value) +{ + valueType_ = value; + valueTypeIsSet_ = true; +} + +bool ListWafBandwidthRequest::valueTypeIsSet() const +{ + return valueTypeIsSet_; +} + +void ListWafBandwidthRequest::unsetvalueType() +{ + valueTypeIsSet_ = false; +} + +std::string ListWafBandwidthRequest::getStartTime() const +{ + return startTime_; +} + +void ListWafBandwidthRequest::setStartTime(const std::string& value) +{ + startTime_ = value; + startTimeIsSet_ = true; +} + +bool ListWafBandwidthRequest::startTimeIsSet() const +{ + return startTimeIsSet_; +} + +void ListWafBandwidthRequest::unsetstartTime() +{ + startTimeIsSet_ = false; +} + +std::string ListWafBandwidthRequest::getEndTime() const +{ + return endTime_; +} + +void ListWafBandwidthRequest::setEndTime(const std::string& value) +{ + endTime_ = value; + endTimeIsSet_ = true; +} + +bool ListWafBandwidthRequest::endTimeIsSet() const +{ + return endTimeIsSet_; +} + +void ListWafBandwidthRequest::unsetendTime() +{ + endTimeIsSet_ = false; +} + +std::string ListWafBandwidthRequest::getRecent() const +{ + return recent_; +} + +void ListWafBandwidthRequest::setRecent(const std::string& value) +{ + recent_ = value; + recentIsSet_ = true; +} + +bool ListWafBandwidthRequest::recentIsSet() const +{ + return recentIsSet_; +} + +void ListWafBandwidthRequest::unsetrecent() +{ + recentIsSet_ = false; +} + +int32_t ListWafBandwidthRequest::getOverseasType() const +{ + return overseasType_; +} + +void ListWafBandwidthRequest::setOverseasType(int32_t value) +{ + overseasType_ = value; + overseasTypeIsSet_ = true; +} + +bool ListWafBandwidthRequest::overseasTypeIsSet() const +{ + return overseasTypeIsSet_; +} + +void ListWafBandwidthRequest::unsetoverseasType() +{ + overseasTypeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListWafBandwidthResponse.cpp b/aad/src/v2/model/ListWafBandwidthResponse.cpp new file mode 100644 index 000000000..69d5ee40c --- /dev/null +++ b/aad/src/v2/model/ListWafBandwidthResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/aad/v2/model/ListWafBandwidthResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListWafBandwidthResponse::ListWafBandwidthResponse() +{ + curveIsSet_ = false; +} + +ListWafBandwidthResponse::~ListWafBandwidthResponse() = default; + +void ListWafBandwidthResponse::validate() +{ +} + +web::json::value ListWafBandwidthResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(curveIsSet_) { + val[utility::conversions::to_string_t("curve")] = ModelBase::toJson(curve_); + } + + return val; +} +bool ListWafBandwidthResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("curve"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("curve")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCurve(refVal); + } + } + return ok; +} + + +std::vector& ListWafBandwidthResponse::getCurve() +{ + return curve_; +} + +void ListWafBandwidthResponse::setCurve(const std::vector& value) +{ + curve_ = value; + curveIsSet_ = true; +} + +bool ListWafBandwidthResponse::curveIsSet() const +{ + return curveIsSet_; +} + +void ListWafBandwidthResponse::unsetcurve() +{ + curveIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListWafCustomRuleRequest.cpp b/aad/src/v2/model/ListWafCustomRuleRequest.cpp new file mode 100644 index 000000000..ca12fdab1 --- /dev/null +++ b/aad/src/v2/model/ListWafCustomRuleRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/aad/v2/model/ListWafCustomRuleRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListWafCustomRuleRequest::ListWafCustomRuleRequest() +{ + domainName_ = ""; + domainNameIsSet_ = false; + overseasType_ = 0; + overseasTypeIsSet_ = false; +} + +ListWafCustomRuleRequest::~ListWafCustomRuleRequest() = default; + +void ListWafCustomRuleRequest::validate() +{ +} + +web::json::value ListWafCustomRuleRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainNameIsSet_) { + val[utility::conversions::to_string_t("domain_name")] = ModelBase::toJson(domainName_); + } + if(overseasTypeIsSet_) { + val[utility::conversions::to_string_t("overseas_type")] = ModelBase::toJson(overseasType_); + } + + return val; +} +bool ListWafCustomRuleRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("overseas_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("overseas_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOverseasType(refVal); + } + } + return ok; +} + + +std::string ListWafCustomRuleRequest::getDomainName() const +{ + return domainName_; +} + +void ListWafCustomRuleRequest::setDomainName(const std::string& value) +{ + domainName_ = value; + domainNameIsSet_ = true; +} + +bool ListWafCustomRuleRequest::domainNameIsSet() const +{ + return domainNameIsSet_; +} + +void ListWafCustomRuleRequest::unsetdomainName() +{ + domainNameIsSet_ = false; +} + +int32_t ListWafCustomRuleRequest::getOverseasType() const +{ + return overseasType_; +} + +void ListWafCustomRuleRequest::setOverseasType(int32_t value) +{ + overseasType_ = value; + overseasTypeIsSet_ = true; +} + +bool ListWafCustomRuleRequest::overseasTypeIsSet() const +{ + return overseasTypeIsSet_; +} + +void ListWafCustomRuleRequest::unsetoverseasType() +{ + overseasTypeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListWafCustomRuleResponse.cpp b/aad/src/v2/model/ListWafCustomRuleResponse.cpp new file mode 100644 index 000000000..ddbbb13d9 --- /dev/null +++ b/aad/src/v2/model/ListWafCustomRuleResponse.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/aad/v2/model/ListWafCustomRuleResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListWafCustomRuleResponse::ListWafCustomRuleResponse() +{ + total_ = 0; + totalIsSet_ = false; + itemsIsSet_ = false; +} + +ListWafCustomRuleResponse::~ListWafCustomRuleResponse() = default; + +void ListWafCustomRuleResponse::validate() +{ +} + +web::json::value ListWafCustomRuleResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(totalIsSet_) { + val[utility::conversions::to_string_t("total")] = ModelBase::toJson(total_); + } + if(itemsIsSet_) { + val[utility::conversions::to_string_t("items")] = ModelBase::toJson(items_); + } + + return val; +} +bool ListWafCustomRuleResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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); + } + } + if(val.has_field(utility::conversions::to_string_t("items"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("items")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setItems(refVal); + } + } + return ok; +} + + +int32_t ListWafCustomRuleResponse::getTotal() const +{ + return total_; +} + +void ListWafCustomRuleResponse::setTotal(int32_t value) +{ + total_ = value; + totalIsSet_ = true; +} + +bool ListWafCustomRuleResponse::totalIsSet() const +{ + return totalIsSet_; +} + +void ListWafCustomRuleResponse::unsettotal() +{ + totalIsSet_ = false; +} + +std::vector& ListWafCustomRuleResponse::getItems() +{ + return items_; +} + +void ListWafCustomRuleResponse::setItems(const std::vector& value) +{ + items_ = value; + itemsIsSet_ = true; +} + +bool ListWafCustomRuleResponse::itemsIsSet() const +{ + return itemsIsSet_; +} + +void ListWafCustomRuleResponse::unsetitems() +{ + itemsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListWafGeoIpRuleRequest.cpp b/aad/src/v2/model/ListWafGeoIpRuleRequest.cpp new file mode 100644 index 000000000..c002baa07 --- /dev/null +++ b/aad/src/v2/model/ListWafGeoIpRuleRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/aad/v2/model/ListWafGeoIpRuleRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListWafGeoIpRuleRequest::ListWafGeoIpRuleRequest() +{ + domainName_ = ""; + domainNameIsSet_ = false; + overseasType_ = 0; + overseasTypeIsSet_ = false; +} + +ListWafGeoIpRuleRequest::~ListWafGeoIpRuleRequest() = default; + +void ListWafGeoIpRuleRequest::validate() +{ +} + +web::json::value ListWafGeoIpRuleRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainNameIsSet_) { + val[utility::conversions::to_string_t("domain_name")] = ModelBase::toJson(domainName_); + } + if(overseasTypeIsSet_) { + val[utility::conversions::to_string_t("overseas_type")] = ModelBase::toJson(overseasType_); + } + + return val; +} +bool ListWafGeoIpRuleRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("overseas_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("overseas_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOverseasType(refVal); + } + } + return ok; +} + + +std::string ListWafGeoIpRuleRequest::getDomainName() const +{ + return domainName_; +} + +void ListWafGeoIpRuleRequest::setDomainName(const std::string& value) +{ + domainName_ = value; + domainNameIsSet_ = true; +} + +bool ListWafGeoIpRuleRequest::domainNameIsSet() const +{ + return domainNameIsSet_; +} + +void ListWafGeoIpRuleRequest::unsetdomainName() +{ + domainNameIsSet_ = false; +} + +int32_t ListWafGeoIpRuleRequest::getOverseasType() const +{ + return overseasType_; +} + +void ListWafGeoIpRuleRequest::setOverseasType(int32_t value) +{ + overseasType_ = value; + overseasTypeIsSet_ = true; +} + +bool ListWafGeoIpRuleRequest::overseasTypeIsSet() const +{ + return overseasTypeIsSet_; +} + +void ListWafGeoIpRuleRequest::unsetoverseasType() +{ + overseasTypeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListWafGeoIpRuleResponse.cpp b/aad/src/v2/model/ListWafGeoIpRuleResponse.cpp new file mode 100644 index 000000000..810589ad2 --- /dev/null +++ b/aad/src/v2/model/ListWafGeoIpRuleResponse.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/aad/v2/model/ListWafGeoIpRuleResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListWafGeoIpRuleResponse::ListWafGeoIpRuleResponse() +{ + total_ = 0; + totalIsSet_ = false; + itemsIsSet_ = false; +} + +ListWafGeoIpRuleResponse::~ListWafGeoIpRuleResponse() = default; + +void ListWafGeoIpRuleResponse::validate() +{ +} + +web::json::value ListWafGeoIpRuleResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(totalIsSet_) { + val[utility::conversions::to_string_t("total")] = ModelBase::toJson(total_); + } + if(itemsIsSet_) { + val[utility::conversions::to_string_t("items")] = ModelBase::toJson(items_); + } + + return val; +} +bool ListWafGeoIpRuleResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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); + } + } + if(val.has_field(utility::conversions::to_string_t("items"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("items")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setItems(refVal); + } + } + return ok; +} + + +int32_t ListWafGeoIpRuleResponse::getTotal() const +{ + return total_; +} + +void ListWafGeoIpRuleResponse::setTotal(int32_t value) +{ + total_ = value; + totalIsSet_ = true; +} + +bool ListWafGeoIpRuleResponse::totalIsSet() const +{ + return totalIsSet_; +} + +void ListWafGeoIpRuleResponse::unsettotal() +{ + totalIsSet_ = false; +} + +std::vector& ListWafGeoIpRuleResponse::getItems() +{ + return items_; +} + +void ListWafGeoIpRuleResponse::setItems(const std::vector& value) +{ + items_ = value; + itemsIsSet_ = true; +} + +bool ListWafGeoIpRuleResponse::itemsIsSet() const +{ + return itemsIsSet_; +} + +void ListWafGeoIpRuleResponse::unsetitems() +{ + itemsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListWafQpsRequest.cpp b/aad/src/v2/model/ListWafQpsRequest.cpp new file mode 100644 index 000000000..f0fb8ac4b --- /dev/null +++ b/aad/src/v2/model/ListWafQpsRequest.cpp @@ -0,0 +1,254 @@ + + +#include "huaweicloud/aad/v2/model/ListWafQpsRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListWafQpsRequest::ListWafQpsRequest() +{ + domains_ = ""; + domainsIsSet_ = false; + valueType_ = ""; + valueTypeIsSet_ = false; + startTime_ = ""; + startTimeIsSet_ = false; + endTime_ = ""; + endTimeIsSet_ = false; + recent_ = ""; + recentIsSet_ = false; + overseasType_ = 0; + overseasTypeIsSet_ = false; +} + +ListWafQpsRequest::~ListWafQpsRequest() = default; + +void ListWafQpsRequest::validate() +{ +} + +web::json::value ListWafQpsRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainsIsSet_) { + val[utility::conversions::to_string_t("domains")] = ModelBase::toJson(domains_); + } + if(valueTypeIsSet_) { + val[utility::conversions::to_string_t("value_type")] = ModelBase::toJson(valueType_); + } + if(startTimeIsSet_) { + val[utility::conversions::to_string_t("start_time")] = ModelBase::toJson(startTime_); + } + if(endTimeIsSet_) { + val[utility::conversions::to_string_t("end_time")] = ModelBase::toJson(endTime_); + } + if(recentIsSet_) { + val[utility::conversions::to_string_t("recent")] = ModelBase::toJson(recent_); + } + if(overseasTypeIsSet_) { + val[utility::conversions::to_string_t("overseas_type")] = ModelBase::toJson(overseasType_); + } + + return val; +} +bool ListWafQpsRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domains"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domains")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomains(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("value_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("value_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setValueType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("start_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("start_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStartTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("end_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("end_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEndTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("recent"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("recent")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRecent(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("overseas_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("overseas_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOverseasType(refVal); + } + } + return ok; +} + + +std::string ListWafQpsRequest::getDomains() const +{ + return domains_; +} + +void ListWafQpsRequest::setDomains(const std::string& value) +{ + domains_ = value; + domainsIsSet_ = true; +} + +bool ListWafQpsRequest::domainsIsSet() const +{ + return domainsIsSet_; +} + +void ListWafQpsRequest::unsetdomains() +{ + domainsIsSet_ = false; +} + +std::string ListWafQpsRequest::getValueType() const +{ + return valueType_; +} + +void ListWafQpsRequest::setValueType(const std::string& value) +{ + valueType_ = value; + valueTypeIsSet_ = true; +} + +bool ListWafQpsRequest::valueTypeIsSet() const +{ + return valueTypeIsSet_; +} + +void ListWafQpsRequest::unsetvalueType() +{ + valueTypeIsSet_ = false; +} + +std::string ListWafQpsRequest::getStartTime() const +{ + return startTime_; +} + +void ListWafQpsRequest::setStartTime(const std::string& value) +{ + startTime_ = value; + startTimeIsSet_ = true; +} + +bool ListWafQpsRequest::startTimeIsSet() const +{ + return startTimeIsSet_; +} + +void ListWafQpsRequest::unsetstartTime() +{ + startTimeIsSet_ = false; +} + +std::string ListWafQpsRequest::getEndTime() const +{ + return endTime_; +} + +void ListWafQpsRequest::setEndTime(const std::string& value) +{ + endTime_ = value; + endTimeIsSet_ = true; +} + +bool ListWafQpsRequest::endTimeIsSet() const +{ + return endTimeIsSet_; +} + +void ListWafQpsRequest::unsetendTime() +{ + endTimeIsSet_ = false; +} + +std::string ListWafQpsRequest::getRecent() const +{ + return recent_; +} + +void ListWafQpsRequest::setRecent(const std::string& value) +{ + recent_ = value; + recentIsSet_ = true; +} + +bool ListWafQpsRequest::recentIsSet() const +{ + return recentIsSet_; +} + +void ListWafQpsRequest::unsetrecent() +{ + recentIsSet_ = false; +} + +int32_t ListWafQpsRequest::getOverseasType() const +{ + return overseasType_; +} + +void ListWafQpsRequest::setOverseasType(int32_t value) +{ + overseasType_ = value; + overseasTypeIsSet_ = true; +} + +bool ListWafQpsRequest::overseasTypeIsSet() const +{ + return overseasTypeIsSet_; +} + +void ListWafQpsRequest::unsetoverseasType() +{ + overseasTypeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListWafQpsResponse.cpp b/aad/src/v2/model/ListWafQpsResponse.cpp new file mode 100644 index 000000000..c0d48e0a7 --- /dev/null +++ b/aad/src/v2/model/ListWafQpsResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/aad/v2/model/ListWafQpsResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListWafQpsResponse::ListWafQpsResponse() +{ + curveIsSet_ = false; +} + +ListWafQpsResponse::~ListWafQpsResponse() = default; + +void ListWafQpsResponse::validate() +{ +} + +web::json::value ListWafQpsResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(curveIsSet_) { + val[utility::conversions::to_string_t("curve")] = ModelBase::toJson(curve_); + } + + return val; +} +bool ListWafQpsResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("curve"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("curve")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCurve(refVal); + } + } + return ok; +} + + +std::vector& ListWafQpsResponse::getCurve() +{ + return curve_; +} + +void ListWafQpsResponse::setCurve(const std::vector& value) +{ + curve_ = value; + curveIsSet_ = true; +} + +bool ListWafQpsResponse::curveIsSet() const +{ + return curveIsSet_; +} + +void ListWafQpsResponse::unsetcurve() +{ + curveIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListWafWhiteIpRuleRequest.cpp b/aad/src/v2/model/ListWafWhiteIpRuleRequest.cpp new file mode 100644 index 000000000..adb1562e2 --- /dev/null +++ b/aad/src/v2/model/ListWafWhiteIpRuleRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/aad/v2/model/ListWafWhiteIpRuleRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListWafWhiteIpRuleRequest::ListWafWhiteIpRuleRequest() +{ + domainName_ = ""; + domainNameIsSet_ = false; + overseasType_ = 0; + overseasTypeIsSet_ = false; +} + +ListWafWhiteIpRuleRequest::~ListWafWhiteIpRuleRequest() = default; + +void ListWafWhiteIpRuleRequest::validate() +{ +} + +web::json::value ListWafWhiteIpRuleRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainNameIsSet_) { + val[utility::conversions::to_string_t("domain_name")] = ModelBase::toJson(domainName_); + } + if(overseasTypeIsSet_) { + val[utility::conversions::to_string_t("overseas_type")] = ModelBase::toJson(overseasType_); + } + + return val; +} +bool ListWafWhiteIpRuleRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("overseas_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("overseas_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOverseasType(refVal); + } + } + return ok; +} + + +std::string ListWafWhiteIpRuleRequest::getDomainName() const +{ + return domainName_; +} + +void ListWafWhiteIpRuleRequest::setDomainName(const std::string& value) +{ + domainName_ = value; + domainNameIsSet_ = true; +} + +bool ListWafWhiteIpRuleRequest::domainNameIsSet() const +{ + return domainNameIsSet_; +} + +void ListWafWhiteIpRuleRequest::unsetdomainName() +{ + domainNameIsSet_ = false; +} + +int32_t ListWafWhiteIpRuleRequest::getOverseasType() const +{ + return overseasType_; +} + +void ListWafWhiteIpRuleRequest::setOverseasType(int32_t value) +{ + overseasType_ = value; + overseasTypeIsSet_ = true; +} + +bool ListWafWhiteIpRuleRequest::overseasTypeIsSet() const +{ + return overseasTypeIsSet_; +} + +void ListWafWhiteIpRuleRequest::unsetoverseasType() +{ + overseasTypeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListWafWhiteIpRuleResponse.cpp b/aad/src/v2/model/ListWafWhiteIpRuleResponse.cpp new file mode 100644 index 000000000..59b52de43 --- /dev/null +++ b/aad/src/v2/model/ListWafWhiteIpRuleResponse.cpp @@ -0,0 +1,147 @@ + + +#include "huaweicloud/aad/v2/model/ListWafWhiteIpRuleResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListWafWhiteIpRuleResponse::ListWafWhiteIpRuleResponse() +{ + total_ = 0; + totalIsSet_ = false; + blackIsSet_ = false; + whiteIsSet_ = false; +} + +ListWafWhiteIpRuleResponse::~ListWafWhiteIpRuleResponse() = default; + +void ListWafWhiteIpRuleResponse::validate() +{ +} + +web::json::value ListWafWhiteIpRuleResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(totalIsSet_) { + val[utility::conversions::to_string_t("total")] = ModelBase::toJson(total_); + } + if(blackIsSet_) { + val[utility::conversions::to_string_t("black")] = ModelBase::toJson(black_); + } + if(whiteIsSet_) { + val[utility::conversions::to_string_t("white")] = ModelBase::toJson(white_); + } + + return val; +} +bool ListWafWhiteIpRuleResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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); + } + } + if(val.has_field(utility::conversions::to_string_t("black"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("black")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBlack(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("white"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("white")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setWhite(refVal); + } + } + return ok; +} + + +int32_t ListWafWhiteIpRuleResponse::getTotal() const +{ + return total_; +} + +void ListWafWhiteIpRuleResponse::setTotal(int32_t value) +{ + total_ = value; + totalIsSet_ = true; +} + +bool ListWafWhiteIpRuleResponse::totalIsSet() const +{ + return totalIsSet_; +} + +void ListWafWhiteIpRuleResponse::unsettotal() +{ + totalIsSet_ = false; +} + +std::vector& ListWafWhiteIpRuleResponse::getBlack() +{ + return black_; +} + +void ListWafWhiteIpRuleResponse::setBlack(const std::vector& value) +{ + black_ = value; + blackIsSet_ = true; +} + +bool ListWafWhiteIpRuleResponse::blackIsSet() const +{ + return blackIsSet_; +} + +void ListWafWhiteIpRuleResponse::unsetblack() +{ + blackIsSet_ = false; +} + +std::vector& ListWafWhiteIpRuleResponse::getWhite() +{ + return white_; +} + +void ListWafWhiteIpRuleResponse::setWhite(const std::vector& value) +{ + white_ = value; + whiteIsSet_ = true; +} + +bool ListWafWhiteIpRuleResponse::whiteIsSet() const +{ + return whiteIsSet_; +} + +void ListWafWhiteIpRuleResponse::unsetwhite() +{ + whiteIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListWhiteBlackIpRuleRequest.cpp b/aad/src/v2/model/ListWhiteBlackIpRuleRequest.cpp new file mode 100644 index 000000000..e905fc558 --- /dev/null +++ b/aad/src/v2/model/ListWhiteBlackIpRuleRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/aad/v2/model/ListWhiteBlackIpRuleRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListWhiteBlackIpRuleRequest::ListWhiteBlackIpRuleRequest() +{ + type_ = ""; + typeIsSet_ = false; + instanceId_ = ""; + instanceIdIsSet_ = false; +} + +ListWhiteBlackIpRuleRequest::~ListWhiteBlackIpRuleRequest() = default; + +void ListWhiteBlackIpRuleRequest::validate() +{ +} + +web::json::value ListWhiteBlackIpRuleRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(typeIsSet_) { + val[utility::conversions::to_string_t("type")] = ModelBase::toJson(type_); + } + if(instanceIdIsSet_) { + val[utility::conversions::to_string_t("instance_id")] = ModelBase::toJson(instanceId_); + } + + return val; +} +bool ListWhiteBlackIpRuleRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceId(refVal); + } + } + return ok; +} + + +std::string ListWhiteBlackIpRuleRequest::getType() const +{ + return type_; +} + +void ListWhiteBlackIpRuleRequest::setType(const std::string& value) +{ + type_ = value; + typeIsSet_ = true; +} + +bool ListWhiteBlackIpRuleRequest::typeIsSet() const +{ + return typeIsSet_; +} + +void ListWhiteBlackIpRuleRequest::unsettype() +{ + typeIsSet_ = false; +} + +std::string ListWhiteBlackIpRuleRequest::getInstanceId() const +{ + return instanceId_; +} + +void ListWhiteBlackIpRuleRequest::setInstanceId(const std::string& value) +{ + instanceId_ = value; + instanceIdIsSet_ = true; +} + +bool ListWhiteBlackIpRuleRequest::instanceIdIsSet() const +{ + return instanceIdIsSet_; +} + +void ListWhiteBlackIpRuleRequest::unsetinstanceId() +{ + instanceIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ListWhiteBlackIpRuleResponse.cpp b/aad/src/v2/model/ListWhiteBlackIpRuleResponse.cpp new file mode 100644 index 000000000..4e2d9f534 --- /dev/null +++ b/aad/src/v2/model/ListWhiteBlackIpRuleResponse.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/aad/v2/model/ListWhiteBlackIpRuleResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ListWhiteBlackIpRuleResponse::ListWhiteBlackIpRuleResponse() +{ + total_ = 0; + totalIsSet_ = false; + ipsIsSet_ = false; +} + +ListWhiteBlackIpRuleResponse::~ListWhiteBlackIpRuleResponse() = default; + +void ListWhiteBlackIpRuleResponse::validate() +{ +} + +web::json::value ListWhiteBlackIpRuleResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(totalIsSet_) { + val[utility::conversions::to_string_t("total")] = ModelBase::toJson(total_); + } + if(ipsIsSet_) { + val[utility::conversions::to_string_t("ips")] = ModelBase::toJson(ips_); + } + + return val; +} +bool ListWhiteBlackIpRuleResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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); + } + } + if(val.has_field(utility::conversions::to_string_t("ips"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIps(refVal); + } + } + return ok; +} + + +int32_t ListWhiteBlackIpRuleResponse::getTotal() const +{ + return total_; +} + +void ListWhiteBlackIpRuleResponse::setTotal(int32_t value) +{ + total_ = value; + totalIsSet_ = true; +} + +bool ListWhiteBlackIpRuleResponse::totalIsSet() const +{ + return totalIsSet_; +} + +void ListWhiteBlackIpRuleResponse::unsettotal() +{ + totalIsSet_ = false; +} + +std::vector& ListWhiteBlackIpRuleResponse::getIps() +{ + return ips_; +} + +void ListWhiteBlackIpRuleResponse::setIps(const std::vector& value) +{ + ips_ = value; + ipsIsSet_ = true; +} + +bool ListWhiteBlackIpRuleResponse::ipsIsSet() const +{ + return ipsIsSet_; +} + +void ListWhiteBlackIpRuleResponse::unsetips() +{ + ipsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/PageRespInfo.cpp b/aad/src/v2/model/PageRespInfo.cpp new file mode 100644 index 000000000..4b22336bf --- /dev/null +++ b/aad/src/v2/model/PageRespInfo.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/aad/v2/model/PageRespInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +PageRespInfo::PageRespInfo() +{ + contentType_ = ""; + contentTypeIsSet_ = false; + content_ = ""; + contentIsSet_ = false; +} + +PageRespInfo::~PageRespInfo() = default; + +void PageRespInfo::validate() +{ +} + +web::json::value PageRespInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(contentTypeIsSet_) { + val[utility::conversions::to_string_t("content_type")] = ModelBase::toJson(contentType_); + } + if(contentIsSet_) { + val[utility::conversions::to_string_t("content")] = ModelBase::toJson(content_); + } + + return val; +} +bool PageRespInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("content_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("content_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setContentType(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); + } + } + return ok; +} + + +std::string PageRespInfo::getContentType() const +{ + return contentType_; +} + +void PageRespInfo::setContentType(const std::string& value) +{ + contentType_ = value; + contentTypeIsSet_ = true; +} + +bool PageRespInfo::contentTypeIsSet() const +{ + return contentTypeIsSet_; +} + +void PageRespInfo::unsetcontentType() +{ + contentTypeIsSet_ = false; +} + +std::string PageRespInfo::getContent() const +{ + return content_; +} + +void PageRespInfo::setContent(const std::string& value) +{ + content_ = value; + contentIsSet_ = true; +} + +bool PageRespInfo::contentIsSet() const +{ + return contentIsSet_; +} + +void PageRespInfo::unsetcontent() +{ + contentIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/Point.cpp b/aad/src/v2/model/Point.cpp new file mode 100644 index 000000000..1c5348f4e --- /dev/null +++ b/aad/src/v2/model/Point.cpp @@ -0,0 +1,254 @@ + + +#include "huaweicloud/aad/v2/model/Point.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +Point::Point() +{ + time_ = 0; + timeIsSet_ = false; + total_ = 0; + totalIsSet_ = false; + attack_ = 0; + attackIsSet_ = false; + basic_ = 0; + basicIsSet_ = false; + cc_ = 0; + ccIsSet_ = false; + customCustom_ = 0; + customCustomIsSet_ = false; +} + +Point::~Point() = default; + +void Point::validate() +{ +} + +web::json::value Point::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(timeIsSet_) { + val[utility::conversions::to_string_t("time")] = ModelBase::toJson(time_); + } + if(totalIsSet_) { + val[utility::conversions::to_string_t("total")] = ModelBase::toJson(total_); + } + if(attackIsSet_) { + val[utility::conversions::to_string_t("attack")] = ModelBase::toJson(attack_); + } + if(basicIsSet_) { + val[utility::conversions::to_string_t("basic")] = ModelBase::toJson(basic_); + } + if(ccIsSet_) { + val[utility::conversions::to_string_t("cc")] = ModelBase::toJson(cc_); + } + if(customCustomIsSet_) { + val[utility::conversions::to_string_t("custom_custom")] = ModelBase::toJson(customCustom_); + } + + return val; +} +bool Point::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTime(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); + } + } + if(val.has_field(utility::conversions::to_string_t("attack"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("attack")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAttack(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("basic"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("basic")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBasic(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("cc"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cc")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCc(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("custom_custom"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("custom_custom")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCustomCustom(refVal); + } + } + return ok; +} + + +int32_t Point::getTime() const +{ + return time_; +} + +void Point::setTime(int32_t value) +{ + time_ = value; + timeIsSet_ = true; +} + +bool Point::timeIsSet() const +{ + return timeIsSet_; +} + +void Point::unsettime() +{ + timeIsSet_ = false; +} + +int32_t Point::getTotal() const +{ + return total_; +} + +void Point::setTotal(int32_t value) +{ + total_ = value; + totalIsSet_ = true; +} + +bool Point::totalIsSet() const +{ + return totalIsSet_; +} + +void Point::unsettotal() +{ + totalIsSet_ = false; +} + +int32_t Point::getAttack() const +{ + return attack_; +} + +void Point::setAttack(int32_t value) +{ + attack_ = value; + attackIsSet_ = true; +} + +bool Point::attackIsSet() const +{ + return attackIsSet_; +} + +void Point::unsetattack() +{ + attackIsSet_ = false; +} + +int32_t Point::getBasic() const +{ + return basic_; +} + +void Point::setBasic(int32_t value) +{ + basic_ = value; + basicIsSet_ = true; +} + +bool Point::basicIsSet() const +{ + return basicIsSet_; +} + +void Point::unsetbasic() +{ + basicIsSet_ = false; +} + +int32_t Point::getCc() const +{ + return cc_; +} + +void Point::setCc(int32_t value) +{ + cc_ = value; + ccIsSet_ = true; +} + +bool Point::ccIsSet() const +{ + return ccIsSet_; +} + +void Point::unsetcc() +{ + ccIsSet_ = false; +} + +int32_t Point::getCustomCustom() const +{ + return customCustom_; +} + +void Point::setCustomCustom(int32_t value) +{ + customCustom_ = value; + customCustomIsSet_ = true; +} + +bool Point::customCustomIsSet() const +{ + return customCustomIsSet_; +} + +void Point::unsetcustomCustom() +{ + customCustomIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ShowDomainCertificateRequest.cpp b/aad/src/v2/model/ShowDomainCertificateRequest.cpp new file mode 100644 index 000000000..9ac4fc2f2 --- /dev/null +++ b/aad/src/v2/model/ShowDomainCertificateRequest.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/aad/v2/model/ShowDomainCertificateRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ShowDomainCertificateRequest::ShowDomainCertificateRequest() +{ + domainId_ = ""; + domainIdIsSet_ = false; +} + +ShowDomainCertificateRequest::~ShowDomainCertificateRequest() = default; + +void ShowDomainCertificateRequest::validate() +{ +} + +web::json::value ShowDomainCertificateRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainIdIsSet_) { + val[utility::conversions::to_string_t("domain_id")] = ModelBase::toJson(domainId_); + } + + return val; +} +bool ShowDomainCertificateRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainId(refVal); + } + } + return ok; +} + + +std::string ShowDomainCertificateRequest::getDomainId() const +{ + return domainId_; +} + +void ShowDomainCertificateRequest::setDomainId(const std::string& value) +{ + domainId_ = value; + domainIdIsSet_ = true; +} + +bool ShowDomainCertificateRequest::domainIdIsSet() const +{ + return domainIdIsSet_; +} + +void ShowDomainCertificateRequest::unsetdomainId() +{ + domainIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ShowDomainCertificateResponse.cpp b/aad/src/v2/model/ShowDomainCertificateResponse.cpp new file mode 100644 index 000000000..5d03a4297 --- /dev/null +++ b/aad/src/v2/model/ShowDomainCertificateResponse.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/aad/v2/model/ShowDomainCertificateResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ShowDomainCertificateResponse::ShowDomainCertificateResponse() +{ + domainId_ = ""; + domainIdIsSet_ = false; + domainName_ = ""; + domainNameIsSet_ = false; + certInfoIsSet_ = false; +} + +ShowDomainCertificateResponse::~ShowDomainCertificateResponse() = default; + +void ShowDomainCertificateResponse::validate() +{ +} + +web::json::value ShowDomainCertificateResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainIdIsSet_) { + val[utility::conversions::to_string_t("domain_id")] = ModelBase::toJson(domainId_); + } + if(domainNameIsSet_) { + val[utility::conversions::to_string_t("domain_name")] = ModelBase::toJson(domainName_); + } + if(certInfoIsSet_) { + val[utility::conversions::to_string_t("cert_info")] = ModelBase::toJson(certInfo_); + } + + return val; +} +bool ShowDomainCertificateResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("domain_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("cert_info"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cert_info")); + if(!fieldValue.is_null()) + { + CertInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCertInfo(refVal); + } + } + return ok; +} + + +std::string ShowDomainCertificateResponse::getDomainId() const +{ + return domainId_; +} + +void ShowDomainCertificateResponse::setDomainId(const std::string& value) +{ + domainId_ = value; + domainIdIsSet_ = true; +} + +bool ShowDomainCertificateResponse::domainIdIsSet() const +{ + return domainIdIsSet_; +} + +void ShowDomainCertificateResponse::unsetdomainId() +{ + domainIdIsSet_ = false; +} + +std::string ShowDomainCertificateResponse::getDomainName() const +{ + return domainName_; +} + +void ShowDomainCertificateResponse::setDomainName(const std::string& value) +{ + domainName_ = value; + domainNameIsSet_ = true; +} + +bool ShowDomainCertificateResponse::domainNameIsSet() const +{ + return domainNameIsSet_; +} + +void ShowDomainCertificateResponse::unsetdomainName() +{ + domainNameIsSet_ = false; +} + +CertInfo ShowDomainCertificateResponse::getCertInfo() const +{ + return certInfo_; +} + +void ShowDomainCertificateResponse::setCertInfo(const CertInfo& value) +{ + certInfo_ = value; + certInfoIsSet_ = true; +} + +bool ShowDomainCertificateResponse::certInfoIsSet() const +{ + return certInfoIsSet_; +} + +void ShowDomainCertificateResponse::unsetcertInfo() +{ + certInfoIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ShowFlowBlockRequest.cpp b/aad/src/v2/model/ShowFlowBlockRequest.cpp new file mode 100644 index 000000000..3dbb2c13d --- /dev/null +++ b/aad/src/v2/model/ShowFlowBlockRequest.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/aad/v2/model/ShowFlowBlockRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ShowFlowBlockRequest::ShowFlowBlockRequest() +{ + instanceId_ = ""; + instanceIdIsSet_ = false; +} + +ShowFlowBlockRequest::~ShowFlowBlockRequest() = default; + +void ShowFlowBlockRequest::validate() +{ +} + +web::json::value ShowFlowBlockRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(instanceIdIsSet_) { + val[utility::conversions::to_string_t("instance_id")] = ModelBase::toJson(instanceId_); + } + + return val; +} +bool ShowFlowBlockRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceId(refVal); + } + } + return ok; +} + + +std::string ShowFlowBlockRequest::getInstanceId() const +{ + return instanceId_; +} + +void ShowFlowBlockRequest::setInstanceId(const std::string& value) +{ + instanceId_ = value; + instanceIdIsSet_ = true; +} + +bool ShowFlowBlockRequest::instanceIdIsSet() const +{ + return instanceIdIsSet_; +} + +void ShowFlowBlockRequest::unsetinstanceId() +{ + instanceIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ShowFlowBlockResponse.cpp b/aad/src/v2/model/ShowFlowBlockResponse.cpp new file mode 100644 index 000000000..4430ef681 --- /dev/null +++ b/aad/src/v2/model/ShowFlowBlockResponse.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/aad/v2/model/ShowFlowBlockResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ShowFlowBlockResponse::ShowFlowBlockResponse() +{ + total_ = 0; + totalIsSet_ = false; + ipsIsSet_ = false; +} + +ShowFlowBlockResponse::~ShowFlowBlockResponse() = default; + +void ShowFlowBlockResponse::validate() +{ +} + +web::json::value ShowFlowBlockResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(totalIsSet_) { + val[utility::conversions::to_string_t("total")] = ModelBase::toJson(total_); + } + if(ipsIsSet_) { + val[utility::conversions::to_string_t("ips")] = ModelBase::toJson(ips_); + } + + return val; +} +bool ShowFlowBlockResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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); + } + } + if(val.has_field(utility::conversions::to_string_t("ips"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ips")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIps(refVal); + } + } + return ok; +} + + +int32_t ShowFlowBlockResponse::getTotal() const +{ + return total_; +} + +void ShowFlowBlockResponse::setTotal(int32_t value) +{ + total_ = value; + totalIsSet_ = true; +} + +bool ShowFlowBlockResponse::totalIsSet() const +{ + return totalIsSet_; +} + +void ShowFlowBlockResponse::unsettotal() +{ + totalIsSet_ = false; +} + +std::vector& ShowFlowBlockResponse::getIps() +{ + return ips_; +} + +void ShowFlowBlockResponse::setIps(const std::vector& value) +{ + ips_ = value; + ipsIsSet_ = true; +} + +bool ShowFlowBlockResponse::ipsIsSet() const +{ + return ipsIsSet_; +} + +void ShowFlowBlockResponse::unsetips() +{ + ipsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ShowWafPolicyRequest.cpp b/aad/src/v2/model/ShowWafPolicyRequest.cpp new file mode 100644 index 000000000..ec32a8267 --- /dev/null +++ b/aad/src/v2/model/ShowWafPolicyRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/aad/v2/model/ShowWafPolicyRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ShowWafPolicyRequest::ShowWafPolicyRequest() +{ + domainName_ = ""; + domainNameIsSet_ = false; + overseasType_ = 0; + overseasTypeIsSet_ = false; +} + +ShowWafPolicyRequest::~ShowWafPolicyRequest() = default; + +void ShowWafPolicyRequest::validate() +{ +} + +web::json::value ShowWafPolicyRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainNameIsSet_) { + val[utility::conversions::to_string_t("domain_name")] = ModelBase::toJson(domainName_); + } + if(overseasTypeIsSet_) { + val[utility::conversions::to_string_t("overseas_type")] = ModelBase::toJson(overseasType_); + } + + return val; +} +bool ShowWafPolicyRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("overseas_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("overseas_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOverseasType(refVal); + } + } + return ok; +} + + +std::string ShowWafPolicyRequest::getDomainName() const +{ + return domainName_; +} + +void ShowWafPolicyRequest::setDomainName(const std::string& value) +{ + domainName_ = value; + domainNameIsSet_ = true; +} + +bool ShowWafPolicyRequest::domainNameIsSet() const +{ + return domainNameIsSet_; +} + +void ShowWafPolicyRequest::unsetdomainName() +{ + domainNameIsSet_ = false; +} + +int32_t ShowWafPolicyRequest::getOverseasType() const +{ + return overseasType_; +} + +void ShowWafPolicyRequest::setOverseasType(int32_t value) +{ + overseasType_ = value; + overseasTypeIsSet_ = true; +} + +bool ShowWafPolicyRequest::overseasTypeIsSet() const +{ + return overseasTypeIsSet_; +} + +void ShowWafPolicyRequest::unsetoverseasType() +{ + overseasTypeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ShowWafPolicyResponse.cpp b/aad/src/v2/model/ShowWafPolicyResponse.cpp new file mode 100644 index 000000000..2d033291e --- /dev/null +++ b/aad/src/v2/model/ShowWafPolicyResponse.cpp @@ -0,0 +1,218 @@ + + +#include "huaweicloud/aad/v2/model/ShowWafPolicyResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ShowWafPolicyResponse::ShowWafPolicyResponse() +{ + domainName_ = ""; + domainNameIsSet_ = false; + overseasType_ = 0; + overseasTypeIsSet_ = false; + optionsIsSet_ = false; + level_ = 0; + levelIsSet_ = false; + mode_ = 0; + modeIsSet_ = false; +} + +ShowWafPolicyResponse::~ShowWafPolicyResponse() = default; + +void ShowWafPolicyResponse::validate() +{ +} + +web::json::value ShowWafPolicyResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(domainNameIsSet_) { + val[utility::conversions::to_string_t("domain_name")] = ModelBase::toJson(domainName_); + } + if(overseasTypeIsSet_) { + val[utility::conversions::to_string_t("overseas_type")] = ModelBase::toJson(overseasType_); + } + if(optionsIsSet_) { + val[utility::conversions::to_string_t("options")] = ModelBase::toJson(options_); + } + if(levelIsSet_) { + val[utility::conversions::to_string_t("level")] = ModelBase::toJson(level_); + } + if(modeIsSet_) { + val[utility::conversions::to_string_t("mode")] = ModelBase::toJson(mode_); + } + + return val; +} +bool ShowWafPolicyResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("domain_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("overseas_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("overseas_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOverseasType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("options"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("options")); + if(!fieldValue.is_null()) + { + WafPolicyOptions refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOptions(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("level"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("level")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLevel(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("mode"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("mode")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setMode(refVal); + } + } + return ok; +} + + +std::string ShowWafPolicyResponse::getDomainName() const +{ + return domainName_; +} + +void ShowWafPolicyResponse::setDomainName(const std::string& value) +{ + domainName_ = value; + domainNameIsSet_ = true; +} + +bool ShowWafPolicyResponse::domainNameIsSet() const +{ + return domainNameIsSet_; +} + +void ShowWafPolicyResponse::unsetdomainName() +{ + domainNameIsSet_ = false; +} + +int32_t ShowWafPolicyResponse::getOverseasType() const +{ + return overseasType_; +} + +void ShowWafPolicyResponse::setOverseasType(int32_t value) +{ + overseasType_ = value; + overseasTypeIsSet_ = true; +} + +bool ShowWafPolicyResponse::overseasTypeIsSet() const +{ + return overseasTypeIsSet_; +} + +void ShowWafPolicyResponse::unsetoverseasType() +{ + overseasTypeIsSet_ = false; +} + +WafPolicyOptions ShowWafPolicyResponse::getOptions() const +{ + return options_; +} + +void ShowWafPolicyResponse::setOptions(const WafPolicyOptions& value) +{ + options_ = value; + optionsIsSet_ = true; +} + +bool ShowWafPolicyResponse::optionsIsSet() const +{ + return optionsIsSet_; +} + +void ShowWafPolicyResponse::unsetoptions() +{ + optionsIsSet_ = false; +} + +int32_t ShowWafPolicyResponse::getLevel() const +{ + return level_; +} + +void ShowWafPolicyResponse::setLevel(int32_t value) +{ + level_ = value; + levelIsSet_ = true; +} + +bool ShowWafPolicyResponse::levelIsSet() const +{ + return levelIsSet_; +} + +void ShowWafPolicyResponse::unsetlevel() +{ + levelIsSet_ = false; +} + +int32_t ShowWafPolicyResponse::getMode() const +{ + return mode_; +} + +void ShowWafPolicyResponse::setMode(int32_t value) +{ + mode_ = value; + modeIsSet_ = true; +} + +bool ShowWafPolicyResponse::modeIsSet() const +{ + return modeIsSet_; +} + +void ShowWafPolicyResponse::unsetmode() +{ + modeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ShowWafQpsRequest.cpp b/aad/src/v2/model/ShowWafQpsRequest.cpp new file mode 100644 index 000000000..b27b3dd56 --- /dev/null +++ b/aad/src/v2/model/ShowWafQpsRequest.cpp @@ -0,0 +1,219 @@ + + +#include "huaweicloud/aad/v2/model/ShowWafQpsRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ShowWafQpsRequest::ShowWafQpsRequest() +{ + recent_ = ""; + recentIsSet_ = false; + domains_ = ""; + domainsIsSet_ = false; + startTime_ = ""; + startTimeIsSet_ = false; + endTime_ = ""; + endTimeIsSet_ = false; + overseasType_ = 0; + overseasTypeIsSet_ = false; +} + +ShowWafQpsRequest::~ShowWafQpsRequest() = default; + +void ShowWafQpsRequest::validate() +{ +} + +web::json::value ShowWafQpsRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(recentIsSet_) { + val[utility::conversions::to_string_t("recent")] = ModelBase::toJson(recent_); + } + if(domainsIsSet_) { + val[utility::conversions::to_string_t("domains")] = ModelBase::toJson(domains_); + } + if(startTimeIsSet_) { + val[utility::conversions::to_string_t("start_time")] = ModelBase::toJson(startTime_); + } + if(endTimeIsSet_) { + val[utility::conversions::to_string_t("end_time")] = ModelBase::toJson(endTime_); + } + if(overseasTypeIsSet_) { + val[utility::conversions::to_string_t("overseas_type")] = ModelBase::toJson(overseasType_); + } + + return val; +} +bool ShowWafQpsRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("recent"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("recent")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRecent(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("domains"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domains")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomains(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("start_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("start_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStartTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("end_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("end_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEndTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("overseas_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("overseas_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOverseasType(refVal); + } + } + return ok; +} + + +std::string ShowWafQpsRequest::getRecent() const +{ + return recent_; +} + +void ShowWafQpsRequest::setRecent(const std::string& value) +{ + recent_ = value; + recentIsSet_ = true; +} + +bool ShowWafQpsRequest::recentIsSet() const +{ + return recentIsSet_; +} + +void ShowWafQpsRequest::unsetrecent() +{ + recentIsSet_ = false; +} + +std::string ShowWafQpsRequest::getDomains() const +{ + return domains_; +} + +void ShowWafQpsRequest::setDomains(const std::string& value) +{ + domains_ = value; + domainsIsSet_ = true; +} + +bool ShowWafQpsRequest::domainsIsSet() const +{ + return domainsIsSet_; +} + +void ShowWafQpsRequest::unsetdomains() +{ + domainsIsSet_ = false; +} + +std::string ShowWafQpsRequest::getStartTime() const +{ + return startTime_; +} + +void ShowWafQpsRequest::setStartTime(const std::string& value) +{ + startTime_ = value; + startTimeIsSet_ = true; +} + +bool ShowWafQpsRequest::startTimeIsSet() const +{ + return startTimeIsSet_; +} + +void ShowWafQpsRequest::unsetstartTime() +{ + startTimeIsSet_ = false; +} + +std::string ShowWafQpsRequest::getEndTime() const +{ + return endTime_; +} + +void ShowWafQpsRequest::setEndTime(const std::string& value) +{ + endTime_ = value; + endTimeIsSet_ = true; +} + +bool ShowWafQpsRequest::endTimeIsSet() const +{ + return endTimeIsSet_; +} + +void ShowWafQpsRequest::unsetendTime() +{ + endTimeIsSet_ = false; +} + +int32_t ShowWafQpsRequest::getOverseasType() const +{ + return overseasType_; +} + +void ShowWafQpsRequest::setOverseasType(int32_t value) +{ + overseasType_ = value; + overseasTypeIsSet_ = true; +} + +bool ShowWafQpsRequest::overseasTypeIsSet() const +{ + return overseasTypeIsSet_; +} + +void ShowWafQpsRequest::unsetoverseasType() +{ + overseasTypeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/ShowWafQpsResponse.cpp b/aad/src/v2/model/ShowWafQpsResponse.cpp new file mode 100644 index 000000000..ae3046b43 --- /dev/null +++ b/aad/src/v2/model/ShowWafQpsResponse.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/aad/v2/model/ShowWafQpsResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +ShowWafQpsResponse::ShowWafQpsResponse() +{ + qps_ = 0; + qpsIsSet_ = false; +} + +ShowWafQpsResponse::~ShowWafQpsResponse() = default; + +void ShowWafQpsResponse::validate() +{ +} + +web::json::value ShowWafQpsResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(qpsIsSet_) { + val[utility::conversions::to_string_t("qps")] = ModelBase::toJson(qps_); + } + + return val; +} +bool ShowWafQpsResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("qps"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("qps")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setQps(refVal); + } + } + return ok; +} + + +int32_t ShowWafQpsResponse::getQps() const +{ + return qps_; +} + +void ShowWafQpsResponse::setQps(int32_t value) +{ + qps_ = value; + qpsIsSet_ = true; +} + +bool ShowWafQpsResponse::qpsIsSet() const +{ + return qpsIsSet_; +} + +void ShowWafQpsResponse::unsetqps() +{ + qpsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/TagCondition.cpp b/aad/src/v2/model/TagCondition.cpp new file mode 100644 index 000000000..5be4c93d9 --- /dev/null +++ b/aad/src/v2/model/TagCondition.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/aad/v2/model/TagCondition.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +TagCondition::TagCondition() +{ + category_ = ""; + categoryIsSet_ = false; + contentsIsSet_ = false; +} + +TagCondition::~TagCondition() = default; + +void TagCondition::validate() +{ +} + +web::json::value TagCondition::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(categoryIsSet_) { + val[utility::conversions::to_string_t("category")] = ModelBase::toJson(category_); + } + if(contentsIsSet_) { + val[utility::conversions::to_string_t("contents")] = ModelBase::toJson(contents_); + } + + return val; +} +bool TagCondition::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("category"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("category")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCategory(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("contents"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("contents")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setContents(refVal); + } + } + return ok; +} + + +std::string TagCondition::getCategory() const +{ + return category_; +} + +void TagCondition::setCategory(const std::string& value) +{ + category_ = value; + categoryIsSet_ = true; +} + +bool TagCondition::categoryIsSet() const +{ + return categoryIsSet_; +} + +void TagCondition::unsetcategory() +{ + categoryIsSet_ = false; +} + +std::vector& TagCondition::getContents() +{ + return contents_; +} + +void TagCondition::setContents(const std::vector& value) +{ + contents_ = value; + contentsIsSet_ = true; +} + +bool TagCondition::contentsIsSet() const +{ + return contentsIsSet_; +} + +void TagCondition::unsetcontents() +{ + contentsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/UpgradeInstanceData.cpp b/aad/src/v2/model/UpgradeInstanceData.cpp new file mode 100644 index 000000000..a0ce51329 --- /dev/null +++ b/aad/src/v2/model/UpgradeInstanceData.cpp @@ -0,0 +1,219 @@ + + +#include "huaweicloud/aad/v2/model/UpgradeInstanceData.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +UpgradeInstanceData::UpgradeInstanceData() +{ + basicBandwidth_ = ""; + basicBandwidthIsSet_ = false; + elasticBandwidth_ = ""; + elasticBandwidthIsSet_ = false; + serviceBandwidth_ = 0; + serviceBandwidthIsSet_ = false; + portNum_ = 0; + portNumIsSet_ = false; + bindDomainNum_ = 0; + bindDomainNumIsSet_ = false; +} + +UpgradeInstanceData::~UpgradeInstanceData() = default; + +void UpgradeInstanceData::validate() +{ +} + +web::json::value UpgradeInstanceData::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(basicBandwidthIsSet_) { + val[utility::conversions::to_string_t("basic_bandwidth")] = ModelBase::toJson(basicBandwidth_); + } + if(elasticBandwidthIsSet_) { + val[utility::conversions::to_string_t("elastic_bandwidth")] = ModelBase::toJson(elasticBandwidth_); + } + if(serviceBandwidthIsSet_) { + val[utility::conversions::to_string_t("service_bandwidth")] = ModelBase::toJson(serviceBandwidth_); + } + if(portNumIsSet_) { + val[utility::conversions::to_string_t("port_num")] = ModelBase::toJson(portNum_); + } + if(bindDomainNumIsSet_) { + val[utility::conversions::to_string_t("bind_domain_num")] = ModelBase::toJson(bindDomainNum_); + } + + return val; +} +bool UpgradeInstanceData::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("basic_bandwidth"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("basic_bandwidth")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBasicBandwidth(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("elastic_bandwidth"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("elastic_bandwidth")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setElasticBandwidth(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("service_bandwidth"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("service_bandwidth")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setServiceBandwidth(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("port_num"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("port_num")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPortNum(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("bind_domain_num"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("bind_domain_num")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBindDomainNum(refVal); + } + } + return ok; +} + + +std::string UpgradeInstanceData::getBasicBandwidth() const +{ + return basicBandwidth_; +} + +void UpgradeInstanceData::setBasicBandwidth(const std::string& value) +{ + basicBandwidth_ = value; + basicBandwidthIsSet_ = true; +} + +bool UpgradeInstanceData::basicBandwidthIsSet() const +{ + return basicBandwidthIsSet_; +} + +void UpgradeInstanceData::unsetbasicBandwidth() +{ + basicBandwidthIsSet_ = false; +} + +std::string UpgradeInstanceData::getElasticBandwidth() const +{ + return elasticBandwidth_; +} + +void UpgradeInstanceData::setElasticBandwidth(const std::string& value) +{ + elasticBandwidth_ = value; + elasticBandwidthIsSet_ = true; +} + +bool UpgradeInstanceData::elasticBandwidthIsSet() const +{ + return elasticBandwidthIsSet_; +} + +void UpgradeInstanceData::unsetelasticBandwidth() +{ + elasticBandwidthIsSet_ = false; +} + +int32_t UpgradeInstanceData::getServiceBandwidth() const +{ + return serviceBandwidth_; +} + +void UpgradeInstanceData::setServiceBandwidth(int32_t value) +{ + serviceBandwidth_ = value; + serviceBandwidthIsSet_ = true; +} + +bool UpgradeInstanceData::serviceBandwidthIsSet() const +{ + return serviceBandwidthIsSet_; +} + +void UpgradeInstanceData::unsetserviceBandwidth() +{ + serviceBandwidthIsSet_ = false; +} + +int32_t UpgradeInstanceData::getPortNum() const +{ + return portNum_; +} + +void UpgradeInstanceData::setPortNum(int32_t value) +{ + portNum_ = value; + portNumIsSet_ = true; +} + +bool UpgradeInstanceData::portNumIsSet() const +{ + return portNumIsSet_; +} + +void UpgradeInstanceData::unsetportNum() +{ + portNumIsSet_ = false; +} + +int32_t UpgradeInstanceData::getBindDomainNum() const +{ + return bindDomainNum_; +} + +void UpgradeInstanceData::setBindDomainNum(int32_t value) +{ + bindDomainNum_ = value; + bindDomainNumIsSet_ = true; +} + +bool UpgradeInstanceData::bindDomainNumIsSet() const +{ + return bindDomainNumIsSet_; +} + +void UpgradeInstanceData::unsetbindDomainNum() +{ + bindDomainNumIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/UpgradeInstanceSpecRequest.cpp b/aad/src/v2/model/UpgradeInstanceSpecRequest.cpp new file mode 100644 index 000000000..1bcf35dc1 --- /dev/null +++ b/aad/src/v2/model/UpgradeInstanceSpecRequest.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/aad/v2/model/UpgradeInstanceSpecRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +UpgradeInstanceSpecRequest::UpgradeInstanceSpecRequest() +{ + bodyIsSet_ = false; +} + +UpgradeInstanceSpecRequest::~UpgradeInstanceSpecRequest() = default; + +void UpgradeInstanceSpecRequest::validate() +{ +} + +web::json::value UpgradeInstanceSpecRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool UpgradeInstanceSpecRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + UpgradeInstanceSpecV2RequestBody refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +UpgradeInstanceSpecV2RequestBody UpgradeInstanceSpecRequest::getBody() const +{ + return body_; +} + +void UpgradeInstanceSpecRequest::setBody(const UpgradeInstanceSpecV2RequestBody& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UpgradeInstanceSpecRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UpgradeInstanceSpecRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/UpgradeInstanceSpecResponse.cpp b/aad/src/v2/model/UpgradeInstanceSpecResponse.cpp new file mode 100644 index 000000000..d8b8868d2 --- /dev/null +++ b/aad/src/v2/model/UpgradeInstanceSpecResponse.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/aad/v2/model/UpgradeInstanceSpecResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +UpgradeInstanceSpecResponse::UpgradeInstanceSpecResponse() +{ + orderId_ = ""; + orderIdIsSet_ = false; +} + +UpgradeInstanceSpecResponse::~UpgradeInstanceSpecResponse() = default; + +void UpgradeInstanceSpecResponse::validate() +{ +} + +web::json::value UpgradeInstanceSpecResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(orderIdIsSet_) { + val[utility::conversions::to_string_t("order_id")] = ModelBase::toJson(orderId_); + } + + return val; +} +bool UpgradeInstanceSpecResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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); + } + } + return ok; +} + + +std::string UpgradeInstanceSpecResponse::getOrderId() const +{ + return orderId_; +} + +void UpgradeInstanceSpecResponse::setOrderId(const std::string& value) +{ + orderId_ = value; + orderIdIsSet_ = true; +} + +bool UpgradeInstanceSpecResponse::orderIdIsSet() const +{ + return orderIdIsSet_; +} + +void UpgradeInstanceSpecResponse::unsetorderId() +{ + orderIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/UpgradeInstanceSpecV2RequestBody.cpp b/aad/src/v2/model/UpgradeInstanceSpecV2RequestBody.cpp new file mode 100644 index 000000000..f1fbd63ad --- /dev/null +++ b/aad/src/v2/model/UpgradeInstanceSpecV2RequestBody.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/aad/v2/model/UpgradeInstanceSpecV2RequestBody.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +UpgradeInstanceSpecV2RequestBody::UpgradeInstanceSpecV2RequestBody() +{ + instanceId_ = ""; + instanceIdIsSet_ = false; + upgradeDataIsSet_ = false; +} + +UpgradeInstanceSpecV2RequestBody::~UpgradeInstanceSpecV2RequestBody() = default; + +void UpgradeInstanceSpecV2RequestBody::validate() +{ +} + +web::json::value UpgradeInstanceSpecV2RequestBody::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(instanceIdIsSet_) { + val[utility::conversions::to_string_t("instance_id")] = ModelBase::toJson(instanceId_); + } + if(upgradeDataIsSet_) { + val[utility::conversions::to_string_t("upgrade_data")] = ModelBase::toJson(upgradeData_); + } + + return val; +} +bool UpgradeInstanceSpecV2RequestBody::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("upgrade_data"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("upgrade_data")); + if(!fieldValue.is_null()) + { + UpgradeInstanceData refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setUpgradeData(refVal); + } + } + return ok; +} + + +std::string UpgradeInstanceSpecV2RequestBody::getInstanceId() const +{ + return instanceId_; +} + +void UpgradeInstanceSpecV2RequestBody::setInstanceId(const std::string& value) +{ + instanceId_ = value; + instanceIdIsSet_ = true; +} + +bool UpgradeInstanceSpecV2RequestBody::instanceIdIsSet() const +{ + return instanceIdIsSet_; +} + +void UpgradeInstanceSpecV2RequestBody::unsetinstanceId() +{ + instanceIdIsSet_ = false; +} + +UpgradeInstanceData UpgradeInstanceSpecV2RequestBody::getUpgradeData() const +{ + return upgradeData_; +} + +void UpgradeInstanceSpecV2RequestBody::setUpgradeData(const UpgradeInstanceData& value) +{ + upgradeData_ = value; + upgradeDataIsSet_ = true; +} + +bool UpgradeInstanceSpecV2RequestBody::upgradeDataIsSet() const +{ + return upgradeDataIsSet_; +} + +void UpgradeInstanceSpecV2RequestBody::unsetupgradeData() +{ + upgradeDataIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/WafCustomCondition.cpp b/aad/src/v2/model/WafCustomCondition.cpp new file mode 100644 index 000000000..0c0b63276 --- /dev/null +++ b/aad/src/v2/model/WafCustomCondition.cpp @@ -0,0 +1,183 @@ + + +#include "huaweicloud/aad/v2/model/WafCustomCondition.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +WafCustomCondition::WafCustomCondition() +{ + category_ = ""; + categoryIsSet_ = false; + index_ = ""; + indexIsSet_ = false; + logicOperation_ = ""; + logicOperationIsSet_ = false; + contentsIsSet_ = false; +} + +WafCustomCondition::~WafCustomCondition() = default; + +void WafCustomCondition::validate() +{ +} + +web::json::value WafCustomCondition::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(categoryIsSet_) { + val[utility::conversions::to_string_t("category")] = ModelBase::toJson(category_); + } + if(indexIsSet_) { + val[utility::conversions::to_string_t("index")] = ModelBase::toJson(index_); + } + if(logicOperationIsSet_) { + val[utility::conversions::to_string_t("logic_operation")] = ModelBase::toJson(logicOperation_); + } + if(contentsIsSet_) { + val[utility::conversions::to_string_t("contents")] = ModelBase::toJson(contents_); + } + + return val; +} +bool WafCustomCondition::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("category"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("category")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCategory(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("index"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("index")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIndex(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("logic_operation"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("logic_operation")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setLogicOperation(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("contents"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("contents")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setContents(refVal); + } + } + return ok; +} + + +std::string WafCustomCondition::getCategory() const +{ + return category_; +} + +void WafCustomCondition::setCategory(const std::string& value) +{ + category_ = value; + categoryIsSet_ = true; +} + +bool WafCustomCondition::categoryIsSet() const +{ + return categoryIsSet_; +} + +void WafCustomCondition::unsetcategory() +{ + categoryIsSet_ = false; +} + +std::string WafCustomCondition::getIndex() const +{ + return index_; +} + +void WafCustomCondition::setIndex(const std::string& value) +{ + index_ = value; + indexIsSet_ = true; +} + +bool WafCustomCondition::indexIsSet() const +{ + return indexIsSet_; +} + +void WafCustomCondition::unsetindex() +{ + indexIsSet_ = false; +} + +std::string WafCustomCondition::getLogicOperation() const +{ + return logicOperation_; +} + +void WafCustomCondition::setLogicOperation(const std::string& value) +{ + logicOperation_ = value; + logicOperationIsSet_ = true; +} + +bool WafCustomCondition::logicOperationIsSet() const +{ + return logicOperationIsSet_; +} + +void WafCustomCondition::unsetlogicOperation() +{ + logicOperationIsSet_ = false; +} + +std::vector& WafCustomCondition::getContents() +{ + return contents_; +} + +void WafCustomCondition::setContents(const std::vector& value) +{ + contents_ = value; + contentsIsSet_ = true; +} + +bool WafCustomCondition::contentsIsSet() const +{ + return contentsIsSet_; +} + +void WafCustomCondition::unsetcontents() +{ + contentsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/WafCustomRule.cpp b/aad/src/v2/model/WafCustomRule.cpp new file mode 100644 index 000000000..da9abfafe --- /dev/null +++ b/aad/src/v2/model/WafCustomRule.cpp @@ -0,0 +1,392 @@ + + +#include "huaweicloud/aad/v2/model/WafCustomRule.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +WafCustomRule::WafCustomRule() +{ + id_ = ""; + idIsSet_ = false; + name_ = ""; + nameIsSet_ = false; + time_ = false; + timeIsSet_ = false; + start_ = 0L; + startIsSet_ = false; + terminal_ = 0L; + terminalIsSet_ = false; + priority_ = 0; + priorityIsSet_ = false; + conditionsIsSet_ = false; + actionIsSet_ = false; + domainName_ = ""; + domainNameIsSet_ = false; + overseasType_ = 0; + overseasTypeIsSet_ = false; +} + +WafCustomRule::~WafCustomRule() = default; + +void WafCustomRule::validate() +{ +} + +web::json::value WafCustomRule::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(timeIsSet_) { + val[utility::conversions::to_string_t("time")] = ModelBase::toJson(time_); + } + if(startIsSet_) { + val[utility::conversions::to_string_t("start")] = ModelBase::toJson(start_); + } + if(terminalIsSet_) { + val[utility::conversions::to_string_t("terminal")] = ModelBase::toJson(terminal_); + } + if(priorityIsSet_) { + val[utility::conversions::to_string_t("priority")] = ModelBase::toJson(priority_); + } + if(conditionsIsSet_) { + val[utility::conversions::to_string_t("conditions")] = ModelBase::toJson(conditions_); + } + if(actionIsSet_) { + val[utility::conversions::to_string_t("action")] = ModelBase::toJson(action_); + } + if(domainNameIsSet_) { + val[utility::conversions::to_string_t("domain_name")] = ModelBase::toJson(domainName_); + } + if(overseasTypeIsSet_) { + val[utility::conversions::to_string_t("overseas_type")] = ModelBase::toJson(overseasType_); + } + + return val; +} +bool WafCustomRule::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("time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("time")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("start"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("start")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStart(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("terminal"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("terminal")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTerminal(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("priority"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("priority")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPriority(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("conditions"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("conditions")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConditions(refVal); + } + } + 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()) + { + WafCustomRuleAction refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAction(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("domain_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("domain_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDomainName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("overseas_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("overseas_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOverseasType(refVal); + } + } + return ok; +} + + +std::string WafCustomRule::getId() const +{ + return id_; +} + +void WafCustomRule::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool WafCustomRule::idIsSet() const +{ + return idIsSet_; +} + +void WafCustomRule::unsetid() +{ + idIsSet_ = false; +} + +std::string WafCustomRule::getName() const +{ + return name_; +} + +void WafCustomRule::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool WafCustomRule::nameIsSet() const +{ + return nameIsSet_; +} + +void WafCustomRule::unsetname() +{ + nameIsSet_ = false; +} + +bool WafCustomRule::isTime() const +{ + return time_; +} + +void WafCustomRule::setTime(bool value) +{ + time_ = value; + timeIsSet_ = true; +} + +bool WafCustomRule::timeIsSet() const +{ + return timeIsSet_; +} + +void WafCustomRule::unsettime() +{ + timeIsSet_ = false; +} + +int64_t WafCustomRule::getStart() const +{ + return start_; +} + +void WafCustomRule::setStart(int64_t value) +{ + start_ = value; + startIsSet_ = true; +} + +bool WafCustomRule::startIsSet() const +{ + return startIsSet_; +} + +void WafCustomRule::unsetstart() +{ + startIsSet_ = false; +} + +int64_t WafCustomRule::getTerminal() const +{ + return terminal_; +} + +void WafCustomRule::setTerminal(int64_t value) +{ + terminal_ = value; + terminalIsSet_ = true; +} + +bool WafCustomRule::terminalIsSet() const +{ + return terminalIsSet_; +} + +void WafCustomRule::unsetterminal() +{ + terminalIsSet_ = false; +} + +int32_t WafCustomRule::getPriority() const +{ + return priority_; +} + +void WafCustomRule::setPriority(int32_t value) +{ + priority_ = value; + priorityIsSet_ = true; +} + +bool WafCustomRule::priorityIsSet() const +{ + return priorityIsSet_; +} + +void WafCustomRule::unsetpriority() +{ + priorityIsSet_ = false; +} + +std::vector& WafCustomRule::getConditions() +{ + return conditions_; +} + +void WafCustomRule::setConditions(const std::vector& value) +{ + conditions_ = value; + conditionsIsSet_ = true; +} + +bool WafCustomRule::conditionsIsSet() const +{ + return conditionsIsSet_; +} + +void WafCustomRule::unsetconditions() +{ + conditionsIsSet_ = false; +} + +WafCustomRuleAction WafCustomRule::getAction() const +{ + return action_; +} + +void WafCustomRule::setAction(const WafCustomRuleAction& value) +{ + action_ = value; + actionIsSet_ = true; +} + +bool WafCustomRule::actionIsSet() const +{ + return actionIsSet_; +} + +void WafCustomRule::unsetaction() +{ + actionIsSet_ = false; +} + +std::string WafCustomRule::getDomainName() const +{ + return domainName_; +} + +void WafCustomRule::setDomainName(const std::string& value) +{ + domainName_ = value; + domainNameIsSet_ = true; +} + +bool WafCustomRule::domainNameIsSet() const +{ + return domainNameIsSet_; +} + +void WafCustomRule::unsetdomainName() +{ + domainNameIsSet_ = false; +} + +int32_t WafCustomRule::getOverseasType() const +{ + return overseasType_; +} + +void WafCustomRule::setOverseasType(int32_t value) +{ + overseasType_ = value; + overseasTypeIsSet_ = true; +} + +bool WafCustomRule::overseasTypeIsSet() const +{ + return overseasTypeIsSet_; +} + +void WafCustomRule::unsetoverseasType() +{ + overseasTypeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/WafCustomRuleAction.cpp b/aad/src/v2/model/WafCustomRuleAction.cpp new file mode 100644 index 000000000..ef3eb385d --- /dev/null +++ b/aad/src/v2/model/WafCustomRuleAction.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/aad/v2/model/WafCustomRuleAction.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +WafCustomRuleAction::WafCustomRuleAction() +{ + category_ = ""; + categoryIsSet_ = false; +} + +WafCustomRuleAction::~WafCustomRuleAction() = default; + +void WafCustomRuleAction::validate() +{ +} + +web::json::value WafCustomRuleAction::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(categoryIsSet_) { + val[utility::conversions::to_string_t("category")] = ModelBase::toJson(category_); + } + + return val; +} +bool WafCustomRuleAction::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("category"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("category")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCategory(refVal); + } + } + return ok; +} + + +std::string WafCustomRuleAction::getCategory() const +{ + return category_; +} + +void WafCustomRuleAction::setCategory(const std::string& value) +{ + category_ = value; + categoryIsSet_ = true; +} + +bool WafCustomRuleAction::categoryIsSet() const +{ + return categoryIsSet_; +} + +void WafCustomRuleAction::unsetcategory() +{ + categoryIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/WafGeoIpRule.cpp b/aad/src/v2/model/WafGeoIpRule.cpp new file mode 100644 index 000000000..4fe942ecd --- /dev/null +++ b/aad/src/v2/model/WafGeoIpRule.cpp @@ -0,0 +1,254 @@ + + +#include "huaweicloud/aad/v2/model/WafGeoIpRule.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +WafGeoIpRule::WafGeoIpRule() +{ + geoip_ = ""; + geoipIsSet_ = false; + id_ = ""; + idIsSet_ = false; + name_ = ""; + nameIsSet_ = false; + overseasType_ = 0; + overseasTypeIsSet_ = false; + timestamp_ = 0; + timestampIsSet_ = false; + white_ = 0; + whiteIsSet_ = false; +} + +WafGeoIpRule::~WafGeoIpRule() = default; + +void WafGeoIpRule::validate() +{ +} + +web::json::value WafGeoIpRule::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(geoipIsSet_) { + val[utility::conversions::to_string_t("geoip")] = ModelBase::toJson(geoip_); + } + 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(overseasTypeIsSet_) { + val[utility::conversions::to_string_t("overseas_type")] = ModelBase::toJson(overseasType_); + } + if(timestampIsSet_) { + val[utility::conversions::to_string_t("timestamp")] = ModelBase::toJson(timestamp_); + } + if(whiteIsSet_) { + val[utility::conversions::to_string_t("white")] = ModelBase::toJson(white_); + } + + return val; +} +bool WafGeoIpRule::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("geoip"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("geoip")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setGeoip(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); + } + } + if(val.has_field(utility::conversions::to_string_t("overseas_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("overseas_type")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOverseasType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("timestamp"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("timestamp")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTimestamp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("white"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("white")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setWhite(refVal); + } + } + return ok; +} + + +std::string WafGeoIpRule::getGeoip() const +{ + return geoip_; +} + +void WafGeoIpRule::setGeoip(const std::string& value) +{ + geoip_ = value; + geoipIsSet_ = true; +} + +bool WafGeoIpRule::geoipIsSet() const +{ + return geoipIsSet_; +} + +void WafGeoIpRule::unsetgeoip() +{ + geoipIsSet_ = false; +} + +std::string WafGeoIpRule::getId() const +{ + return id_; +} + +void WafGeoIpRule::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool WafGeoIpRule::idIsSet() const +{ + return idIsSet_; +} + +void WafGeoIpRule::unsetid() +{ + idIsSet_ = false; +} + +std::string WafGeoIpRule::getName() const +{ + return name_; +} + +void WafGeoIpRule::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool WafGeoIpRule::nameIsSet() const +{ + return nameIsSet_; +} + +void WafGeoIpRule::unsetname() +{ + nameIsSet_ = false; +} + +int32_t WafGeoIpRule::getOverseasType() const +{ + return overseasType_; +} + +void WafGeoIpRule::setOverseasType(int32_t value) +{ + overseasType_ = value; + overseasTypeIsSet_ = true; +} + +bool WafGeoIpRule::overseasTypeIsSet() const +{ + return overseasTypeIsSet_; +} + +void WafGeoIpRule::unsetoverseasType() +{ + overseasTypeIsSet_ = false; +} + +int32_t WafGeoIpRule::getTimestamp() const +{ + return timestamp_; +} + +void WafGeoIpRule::setTimestamp(int32_t value) +{ + timestamp_ = value; + timestampIsSet_ = true; +} + +bool WafGeoIpRule::timestampIsSet() const +{ + return timestampIsSet_; +} + +void WafGeoIpRule::unsettimestamp() +{ + timestampIsSet_ = false; +} + +int32_t WafGeoIpRule::getWhite() const +{ + return white_; +} + +void WafGeoIpRule::setWhite(int32_t value) +{ + white_ = value; + whiteIsSet_ = true; +} + +bool WafGeoIpRule::whiteIsSet() const +{ + return whiteIsSet_; +} + +void WafGeoIpRule::unsetwhite() +{ + whiteIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/aad/src/v2/model/WafPolicyOptions.cpp b/aad/src/v2/model/WafPolicyOptions.cpp new file mode 100644 index 000000000..981ff19eb --- /dev/null +++ b/aad/src/v2/model/WafPolicyOptions.cpp @@ -0,0 +1,219 @@ + + +#include "huaweicloud/aad/v2/model/WafPolicyOptions.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Aad { +namespace V2 { +namespace Model { + + + + +WafPolicyOptions::WafPolicyOptions() +{ + cc_ = false; + ccIsSet_ = false; + custom_ = false; + customIsSet_ = false; + geoip_ = false; + geoipIsSet_ = false; + whiteblackip_ = false; + whiteblackipIsSet_ = false; + modulexEnabled_ = false; + modulexEnabledIsSet_ = false; +} + +WafPolicyOptions::~WafPolicyOptions() = default; + +void WafPolicyOptions::validate() +{ +} + +web::json::value WafPolicyOptions::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(ccIsSet_) { + val[utility::conversions::to_string_t("cc")] = ModelBase::toJson(cc_); + } + if(customIsSet_) { + val[utility::conversions::to_string_t("custom")] = ModelBase::toJson(custom_); + } + if(geoipIsSet_) { + val[utility::conversions::to_string_t("geoip")] = ModelBase::toJson(geoip_); + } + if(whiteblackipIsSet_) { + val[utility::conversions::to_string_t("whiteblackip")] = ModelBase::toJson(whiteblackip_); + } + if(modulexEnabledIsSet_) { + val[utility::conversions::to_string_t("modulex_enabled")] = ModelBase::toJson(modulexEnabled_); + } + + return val; +} +bool WafPolicyOptions::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("cc"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cc")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCc(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("custom"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("custom")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCustom(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("geoip"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("geoip")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setGeoip(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("whiteblackip"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("whiteblackip")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setWhiteblackip(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("modulex_enabled"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("modulex_enabled")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setModulexEnabled(refVal); + } + } + return ok; +} + + +bool WafPolicyOptions::isCc() const +{ + return cc_; +} + +void WafPolicyOptions::setCc(bool value) +{ + cc_ = value; + ccIsSet_ = true; +} + +bool WafPolicyOptions::ccIsSet() const +{ + return ccIsSet_; +} + +void WafPolicyOptions::unsetcc() +{ + ccIsSet_ = false; +} + +bool WafPolicyOptions::isCustom() const +{ + return custom_; +} + +void WafPolicyOptions::setCustom(bool value) +{ + custom_ = value; + customIsSet_ = true; +} + +bool WafPolicyOptions::customIsSet() const +{ + return customIsSet_; +} + +void WafPolicyOptions::unsetcustom() +{ + customIsSet_ = false; +} + +bool WafPolicyOptions::isGeoip() const +{ + return geoip_; +} + +void WafPolicyOptions::setGeoip(bool value) +{ + geoip_ = value; + geoipIsSet_ = true; +} + +bool WafPolicyOptions::geoipIsSet() const +{ + return geoipIsSet_; +} + +void WafPolicyOptions::unsetgeoip() +{ + geoipIsSet_ = false; +} + +bool WafPolicyOptions::isWhiteblackip() const +{ + return whiteblackip_; +} + +void WafPolicyOptions::setWhiteblackip(bool value) +{ + whiteblackip_ = value; + whiteblackipIsSet_ = true; +} + +bool WafPolicyOptions::whiteblackipIsSet() const +{ + return whiteblackipIsSet_; +} + +void WafPolicyOptions::unsetwhiteblackip() +{ + whiteblackipIsSet_ = false; +} + +bool WafPolicyOptions::isModulexEnabled() const +{ + return modulexEnabled_; +} + +void WafPolicyOptions::setModulexEnabled(bool value) +{ + modulexEnabled_ = value; + modulexEnabledIsSet_ = true; +} + +bool WafPolicyOptions::modulexEnabledIsSet() const +{ + return modulexEnabledIsSet_; +} + +void WafPolicyOptions::unsetmodulexEnabled() +{ + modulexEnabledIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/include/huaweicloud/drs/v3/model/QueryJobResp.h b/drs/include/huaweicloud/drs/v3/model/QueryJobResp.h index c302a4632..3e6e378f8 100644 --- a/drs/include/huaweicloud/drs/v3/model/QueryJobResp.h +++ b/drs/include/huaweicloud/drs/v3/model/QueryJobResp.h @@ -276,13 +276,13 @@ class HUAWEICLOUD_DRS_V3_EXPORT QueryJobResp void setSchemaType(const std::string& value); /// - /// 节点个数。 + /// 节点个数。MongoDB数据库时对应源端分片个数,源库为集群时必填,[1-32],MySQL双主灾备时会默认设置为2。 /// - std::string getNodeNum() const; + int32_t getNodeNum() const; bool nodeNumIsSet() const; void unsetnodeNum(); - void setNodeNum(const std::string& value); + void setNodeNum(int32_t value); /// /// 对象选择开关 @@ -651,7 +651,7 @@ class HUAWEICLOUD_DRS_V3_EXPORT QueryJobResp bool speedLimitIsSet_; std::string schemaType_; bool schemaTypeIsSet_; - std::string nodeNum_; + int32_t nodeNum_; bool nodeNumIsSet_; bool objectSwitch_; bool objectSwitchIsSet_; diff --git a/drs/include/huaweicloud/drs/v5/DrsClient.h b/drs/include/huaweicloud/drs/v5/DrsClient.h index 2481b6128..9627a588d 100644 --- a/drs/include/huaweicloud/drs/v5/DrsClient.h +++ b/drs/include/huaweicloud/drs/v5/DrsClient.h @@ -29,9 +29,13 @@ #include #include #include +#include +#include #include #include #include +#include +#include #include #include #include @@ -47,14 +51,24 @@ #include #include #include +#include +#include +#include #include #include +#include +#include +#include #include +#include +#include #include #include #include #include #include +#include +#include #include #include #include @@ -75,6 +89,8 @@ #include #include #include +#include +#include #include #include #include @@ -83,6 +99,8 @@ #include #include #include +#include +#include #include #include #include @@ -93,6 +111,8 @@ #include #include #include +#include +#include #include #include #include @@ -100,6 +120,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -155,6 +178,8 @@ #include #include #include +#include +#include #include #include #include @@ -168,10 +193,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -179,6 +206,8 @@ #include #include #include +#include +#include #include #include #include @@ -275,6 +304,14 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr batchTagAction( BatchTagActionRequest &request ); + // 按需转包周期 + // + // DRS同步和灾备任务按需计费转包周期计费。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr changeToPeriod( + ChangeToPeriodRequest &request + ); // 数据过滤规则校验 // // 数据过滤规则校验 @@ -283,6 +320,14 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr checkDataFilter( CheckDataFilterRequest &request ); + // 清除DDL告警 + // + // 清除DDL告警 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr cleanAlarms( + CleanAlarmsRequest &request + ); // 采集指定数据库表的列信息 // // 采集指定数据库表的列信息 @@ -345,6 +390,14 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr countInstanceByTags( CountInstanceByTagsRequest &request ); + // 创建连接 + // + // 创建单个连接,该连接可以为线下自建库或云上RDS等,目前支持的数据库引擎包括MySQL、PostgreSQL、Oracle和MongoDB。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr createConnection( + CreateConnectionRequest &request + ); // 创建任务 // // 创建单个任务,根据请求参数不同,可以创建单个实时迁移、实时同步、实时灾备等任务。 @@ -353,7 +406,27 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr createJob( CreateJobRequest &request ); - // 删除驱动文件 + // 创建备份迁移任务 + // + // 该接口主要用于三种常见场景下备份迁移任务的配置。 + // 备份迁移支持如下的常见场景: + // - 通过OBS桶备份文件进行全量数据迁移。 + // - 通过OBS桶备份文件进行全量+增量数据迁移。 + // - 通过RDS全量备份进行全量数据迁移。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr createReplicationJob( + CreateReplicationJobRequest &request + ); + // 删除连接 + // + // 删除租户指定的连接。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr deleteConnection( + DeleteConnectionRequest &request + ); + // 删除驱动文件(不再推广) // // 删除驱动文件。 // @@ -369,6 +442,14 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr deleteJob( DeleteJobRequest &request ); + // 删除备份迁移任务 + // + // 对于已经完成的备份迁移任务,可以选择删除迁移任务。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr deleteReplicationJob( + DeleteReplicationJobRequest &request + ); // 删除驱动文件 // // 删除驱动文件。 @@ -433,6 +514,14 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr listAsyncJobs( ListAsyncJobsRequest &request ); + // 查询连接列表 + // + // 查询连接列表,可根据连接类型进行查询。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listConnections( + ListConnectionsRequest &request + ); // 查询数据库对象信息 // // 查询数据库对象信息。 @@ -457,7 +546,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr listInstanceTags( ListInstanceTagsRequest &request ); - // 查询驱动文件列表 + // 查询驱动文件列表(不再推广) // // 查询驱动文件列表。 // @@ -465,6 +554,14 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr listJdbcDrivers( ListJdbcDriversRequest &request ); + // 查询增量DDL列表 + // + // 查询增量DDL列表,可根据status查询 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listJobDdls( + ListJobDdlsRequest &request + ); // 查询任务的参数配置修改历史 // // 查询任务的参数配置修改历史 @@ -507,6 +604,14 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr listProjectTags( ListProjectTagsRequest &request ); + // 查询备份迁移任务列表 + // + // 获取当前备份迁移任务列表,不包含已删除的任务。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr listReplicationJobs( + ListReplicationJobsRequest &request + ); // 查询项目标签 // // 查询租户在指定Project中实例类型的所有资源标签集合。 @@ -531,6 +636,14 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr listsAgencyPermissions( ListsAgencyPermissionsRequest &request ); + // 修改连接 + // + // 修改创建的连接信息。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr modifyConnection( + ModifyConnectionRequest &request + ); // 获取指定任务操作信息 // // 获取指定任务允许、不允许、当前操作信息。 @@ -729,6 +842,14 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr showReplayResults( ShowReplayResultsRequest &request ); + // 查询备份迁移任务详细信息 + // + // 获取指定备份迁移任务详细信息。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showReplicationJob( + ShowReplicationJobRequest &request + ); // 查询是否支持对象选择和列映射 // // 查询任务支持的对象选择类型、列映射、支持搜索的对象类型等信息。 @@ -753,7 +874,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr stopJobAction( StopJobActionRequest &request ); - // 同步驱动文件 + // 同步驱动文件(不再推广) // // 同步驱动文件。 // @@ -811,6 +932,14 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr updateJobConfigurations( UpdateJobConfigurationsRequest &request ); + // 修改备份迁移任务信息 + // + // 修改指定备份迁移任务信息,任务名与任务描述。 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr updateReplicationJob( + UpdateReplicationJobRequest &request + ); // 更新增量任务启动位点 // // 更新增量任务的启动位点。 @@ -828,7 +957,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsClient : public Client std::shared_ptr uploadDbObjectTemplate( UploadDbObjectTemplateRequest &request ); - // 上传驱动文件 + // 上传驱动文件(不再推广) // // 上传驱动文件。 // diff --git a/drs/include/huaweicloud/drs/v5/DrsMeta.h b/drs/include/huaweicloud/drs/v5/DrsMeta.h index 333211183..aa030dbc0 100644 --- a/drs/include/huaweicloud/drs/v5/DrsMeta.h +++ b/drs/include/huaweicloud/drs/v5/DrsMeta.h @@ -20,7 +20,9 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsMeta { static HttpRequestDef genRequestDefForBatchExecuteJobActions(); static HttpRequestDef genRequestDefForBatchStopJobsAction(); static HttpRequestDef genRequestDefForBatchTagAction(); + static HttpRequestDef genRequestDefForChangeToPeriod(); static HttpRequestDef genRequestDefForCheckDataFilter(); + static HttpRequestDef genRequestDefForCleanAlarms(); static HttpRequestDef genRequestDefForCollectColumns(); static HttpRequestDef genRequestDefForCollectDbObjectsAsync(); static HttpRequestDef genRequestDefForCollectDbObjectsInfo(); @@ -28,9 +30,13 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsMeta { static HttpRequestDef genRequestDefForCommitAsyncJob(); static HttpRequestDef genRequestDefForCopyJob(); static HttpRequestDef genRequestDefForCountInstanceByTags(); + static HttpRequestDef genRequestDefForCreateConnection(); static HttpRequestDef genRequestDefForCreateJob(); + static HttpRequestDef genRequestDefForCreateReplicationJob(); + static HttpRequestDef genRequestDefForDeleteConnection(); static HttpRequestDef genRequestDefForDeleteJdbcDriver(); static HttpRequestDef genRequestDefForDeleteJob(); + static HttpRequestDef genRequestDefForDeleteReplicationJob(); static HttpRequestDef genRequestDefForDeleteUserJdbcDriver(); static HttpRequestDef genRequestDefForDownloadBatchCreateTemplate(); static HttpRequestDef genRequestDefForDownloadDbObjectTemplate(); @@ -39,18 +45,22 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsMeta { static HttpRequestDef genRequestDefForImportBatchCreateJobs(); static HttpRequestDef genRequestDefForListAsyncJobDetail(); static HttpRequestDef genRequestDefForListAsyncJobs(); + static HttpRequestDef genRequestDefForListConnections(); static HttpRequestDef genRequestDefForListDbObjects(); static HttpRequestDef genRequestDefForListInstanceByTags(); static HttpRequestDef genRequestDefForListInstanceTags(); static HttpRequestDef genRequestDefForListJdbcDrivers(); + static HttpRequestDef genRequestDefForListJobDdls(); static HttpRequestDef genRequestDefForListJobHistoryParameters(); static HttpRequestDef genRequestDefForListJobParameters(); static HttpRequestDef genRequestDefForListJobs(); static HttpRequestDef genRequestDefForListLinks(); static HttpRequestDef genRequestDefForListProjectTags(); + static HttpRequestDef genRequestDefForListReplicationJobs(); static HttpRequestDef genRequestDefForListTags(); static HttpRequestDef genRequestDefForListUserJdbcDrivers(); static HttpRequestDef genRequestDefForListsAgencyPermissions(); + static HttpRequestDef genRequestDefForModifyConnection(); static HttpRequestDef genRequestDefForShowActions(); static HttpRequestDef genRequestDefForShowColumnInfoResult(); static HttpRequestDef genRequestDefForShowComparePolicy(); @@ -75,6 +85,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsMeta { static HttpRequestDef genRequestDefForShowPositionResult(); static HttpRequestDef genRequestDefForShowProgressData(); static HttpRequestDef genRequestDefForShowReplayResults(); + static HttpRequestDef genRequestDefForShowReplicationJob(); static HttpRequestDef genRequestDefForShowSupportObjectType(); static HttpRequestDef genRequestDefForShowUpdateObjectSavingStatus(); static HttpRequestDef genRequestDefForStopJobAction(); @@ -85,6 +96,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT DrsMeta { static HttpRequestDef genRequestDefForUpdateDataProgress(); static HttpRequestDef genRequestDefForUpdateJob(); static HttpRequestDef genRequestDefForUpdateJobConfigurations(); + static HttpRequestDef genRequestDefForUpdateReplicationJob(); static HttpRequestDef genRequestDefForUpdateStartPosition(); static HttpRequestDef genRequestDefForUploadDbObjectTemplate(); static HttpRequestDef genRequestDefForUploadJdbcDriver(); diff --git a/drs/include/huaweicloud/drs/v5/model/BackupFileInfo.h b/drs/include/huaweicloud/drs/v5/model/BackupFileInfo.h new file mode 100644 index 000000000..e4078f16e --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/BackupFileInfo.h @@ -0,0 +1,97 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupFileInfo_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupFileInfo_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 备份文件信息。 +/// +class HUAWEICLOUD_DRS_V5_EXPORT BackupFileInfo + : public ModelBase +{ +public: + BackupFileInfo(); + virtual ~BackupFileInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// BackupFileInfo members + + /// + /// 备份文件名称。 + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + /// + /// OBS桶中文件路径。 OBS场景:必选 RDS场景:缺省 + /// + + std::string getObsPath() const; + bool obsPathIsSet() const; + void unsetobsPath(); + void setObsPath(const std::string& value); + + /// + /// bak文件数据库版本。 OBS场景:缺省 RDS场景:必选 + /// + + std::string getRdsVersion() const; + bool rdsVersionIsSet() const; + void unsetrdsVersion(); + void setRdsVersion(const std::string& value); + + /// + /// bak文件所属实例。 OBS场景:缺省 RDS场景:必选 + /// + + std::string getRdsSourceInstanceId() const; + bool rdsSourceInstanceIdIsSet() const; + void unsetrdsSourceInstanceId(); + void setRdsSourceInstanceId(const std::string& value); + + +protected: + std::string name_; + bool nameIsSet_; + std::string obsPath_; + bool obsPathIsSet_; + std::string rdsVersion_; + bool rdsVersionIsSet_; + std::string rdsSourceInstanceId_; + bool rdsSourceInstanceIdIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupFileInfo_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/BackupFileResp.h b/drs/include/huaweicloud/drs/v5/model/BackupFileResp.h new file mode 100644 index 000000000..4c93fdb81 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/BackupFileResp.h @@ -0,0 +1,86 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupFileResp_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupFileResp_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 备份文件信息体。 +/// +class HUAWEICLOUD_DRS_V5_EXPORT BackupFileResp + : public ModelBase +{ +public: + BackupFileResp(); + virtual ~BackupFileResp(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// BackupFileResp members + + /// + /// 文件名称。 + /// + + std::string getFileName() const; + bool fileNameIsSet() const; + void unsetfileName(); + void setFileName(const std::string& value); + + /// + /// 备份文件大小。 + /// + + std::string getFileSize() const; + bool fileSizeIsSet() const; + void unsetfileSize(); + void setFileSize(const std::string& value); + + /// + /// 备份文件最近修改时间。 + /// + + std::string getFileLastModify() const; + bool fileLastModifyIsSet() const; + void unsetfileLastModify(); + void setFileLastModify(const std::string& value); + + +protected: + std::string fileName_; + bool fileNameIsSet_; + std::string fileSize_; + bool fileSizeIsSet_; + std::string fileLastModify_; + bool fileLastModifyIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupFileResp_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/BackupInfo.h b/drs/include/huaweicloud/drs/v5/model/BackupInfo.h new file mode 100644 index 000000000..e70d8dbcb --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/BackupInfo.h @@ -0,0 +1,88 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupInfo_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupInfo_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 备份文件信息。 +/// +class HUAWEICLOUD_DRS_V5_EXPORT BackupInfo + : public ModelBase +{ +public: + BackupInfo(); + virtual ~BackupInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// BackupInfo members + + /// + /// 备份文件来源:(全部大写) - OBS:存放在OBS中的备份文件。 - RDS:RDS实例的备份文件。 + /// + + std::string getFileSource() const; + bool fileSourceIsSet() const; + void unsetfileSource(); + void setFileSource(const std::string& value); + + /// + /// OBS桶名称,使用OBS桶备份文件恢复时必填。 约束:长度范围为3~63个字符,仅支持小写字母、数字、中划线(-)、点(.),且只能以字母或数字开头和结尾,禁止使用IP地址。 如果选择从OBS桶获取备份文件必填,参考登录[客户端登录](https://support.huaweicloud.com/clientogw-obs/zh-cn_topic_0045829058.html)OBS Browser客户端,首页为OBS桶列表,可以获取到备份文件所在桶的名称。 + /// + + std::string getBucketName() const; + bool bucketNameIsSet() const; + void unsetbucketName(); + void setBucketName(const std::string& value); + + /// + /// 备份文件信息列表。 + /// + + std::vector& getFiles(); + bool filesIsSet() const; + void unsetfiles(); + void setFiles(const std::vector& value); + + +protected: + std::string fileSource_; + bool fileSourceIsSet_; + std::string bucketName_; + bool bucketNameIsSet_; + std::vector files_; + bool filesIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupInfo_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/BackupInfoResp.h b/drs/include/huaweicloud/drs/v5/model/BackupInfoResp.h new file mode 100644 index 000000000..5493b0cb2 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/BackupInfoResp.h @@ -0,0 +1,88 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupInfoResp_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupInfoResp_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 备份文件信息 +/// +class HUAWEICLOUD_DRS_V5_EXPORT BackupInfoResp + : public ModelBase +{ +public: + BackupInfoResp(); + virtual ~BackupInfoResp(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// BackupInfoResp members + + /// + /// 备份文件来源,包括OBS和RDS两种。 + /// + + std::string getFileSource() const; + bool fileSourceIsSet() const; + void unsetfileSource(); + void setFileSource(const std::string& value); + + /// + /// OBS桶名称。 + /// + + std::string getBucketName() const; + bool bucketNameIsSet() const; + void unsetbucketName(); + void setBucketName(const std::string& value); + + /// + /// 备份文件列表。 + /// + + std::vector& getFileInfo(); + bool fileInfoIsSet() const; + void unsetfileInfo(); + void setFileInfo(const std::vector& value); + + +protected: + std::string fileSource_; + bool fileSourceIsSet_; + std::string bucketName_; + bool bucketNameIsSet_; + std::vector fileInfo_; + bool fileInfoIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupInfoResp_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/BackupJobBaseInfo.h b/drs/include/huaweicloud/drs/v5/model/BackupJobBaseInfo.h new file mode 100644 index 000000000..6c3f31fd8 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/BackupJobBaseInfo.h @@ -0,0 +1,110 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupJobBaseInfo_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupJobBaseInfo_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 创建备份迁移任务基本信息体。 +/// +class HUAWEICLOUD_DRS_V5_EXPORT BackupJobBaseInfo + : public ModelBase +{ +public: + BackupJobBaseInfo(); + virtual ~BackupJobBaseInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// BackupJobBaseInfo members + + /// + /// 任务名称。 约束:任务名称在4位到50位之间,不区分大小写,可以包含字母、数字、中划线或下划线,不能包括其他特殊字符。 - 最小长度:4 - 最大长度:50 + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + /// + /// 数据库引擎。 - sqlserver:RDS for SQL Server引擎 + /// + + std::string getEngineType() const; + bool engineTypeIsSet() const; + void unsetengineType(); + void setEngineType(const std::string& value); + + /// + /// 任务描述。 + /// + + std::string getDescription() const; + bool descriptionIsSet() const; + void unsetdescription(); + void setDescription(const std::string& value); + + /// + /// 标签信息。 标签的值可以包含任意语种字母、数字、空格和_ . : / = + - @。 + /// + + std::vector& getTags(); + bool tagsIsSet() const; + void unsettags(); + void setTags(const std::vector& value); + + /// + /// 企业项目ID。 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + std::string name_; + bool nameIsSet_; + std::string engineType_; + bool engineTypeIsSet_; + std::string description_; + bool descriptionIsSet_; + std::vector tags_; + bool tagsIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupJobBaseInfo_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/BackupJobEndpointInfo.h b/drs/include/huaweicloud/drs/v5/model/BackupJobEndpointInfo.h new file mode 100644 index 000000000..1ff88674c --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/BackupJobEndpointInfo.h @@ -0,0 +1,86 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupJobEndpointInfo_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupJobEndpointInfo_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 备份迁移任务恢复目标RDS for SQL Server实例信息。 +/// +class HUAWEICLOUD_DRS_V5_EXPORT BackupJobEndpointInfo + : public ModelBase +{ +public: + BackupJobEndpointInfo(); + virtual ~BackupJobEndpointInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// BackupJobEndpointInfo members + + /// + /// 备份迁移任务恢复目标RDS for SQL Server实例ID。 + /// + + std::string getTargetInstanceId() const; + bool targetInstanceIdIsSet() const; + void unsettargetInstanceId(); + void setTargetInstanceId(const std::string& value); + + /// + /// 目标实例是否开启FileStream模式。可通过RDS for SQL Server详情接口获取。 + /// + + std::string getMsFileStreamStatus() const; + bool msFileStreamStatusIsSet() const; + void unsetmsFileStreamStatus(); + void setMsFileStreamStatus(const std::string& value); + + /// + /// RDS for SQL Server备份文件的文件ID,通过RDS全量恢复时必填。可通过云数据库RDS备份管理页面获取。 + /// + + std::string getFileId() const; + bool fileIdIsSet() const; + void unsetfileId(); + void setFileId(const std::string& value); + + +protected: + std::string targetInstanceId_; + bool targetInstanceIdIsSet_; + std::string msFileStreamStatus_; + bool msFileStreamStatusIsSet_; + std::string fileId_; + bool fileIdIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupJobEndpointInfo_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/BackupRestoreOptionInfo.h b/drs/include/huaweicloud/drs/v5/model/BackupRestoreOptionInfo.h new file mode 100644 index 000000000..b0fc54570 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/BackupRestoreOptionInfo.h @@ -0,0 +1,143 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupRestoreOptionInfo_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupRestoreOptionInfo_H_ + + +#include + +#include +#include +#include + +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 备份迁移参数。 +/// +class HUAWEICLOUD_DRS_V5_EXPORT BackupRestoreOptionInfo + : public ModelBase +{ +public: + BackupRestoreOptionInfo(); + virtual ~BackupRestoreOptionInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// BackupRestoreOptionInfo members + + /// + /// 是否覆盖目标数据库,不填默认为false。 值为“true”表示覆盖。 值为“false”表示不覆盖。 + /// + + bool isIsCover() const; + bool isCoverIsSet() const; + void unsetisCover(); + void setIsCover(bool value); + + /// + /// 是否默认恢复,默认恢复所有数据库。 “true”是代表默认恢复还原备份文件中的全部数据库。 “false”代表需要在db_names这个字段中指定需要恢复的数据库名。 + /// + + bool isIsDefaultRestore() const; + bool isDefaultRestoreIsSet() const; + void unsetisDefaultRestore(); + void setIsDefaultRestore(bool value); + + /// + /// 一次典型的增量恢复过程,会涉及多次恢复增量备份。每个增量备份恢复均会使目标数据库保持还原中状态,此时数据库不可读写,直至最后一个增量备份恢复完成后,数据库才能变成可用状态。此后数据库将无法继续进行增量恢复,所以确定为最后一个备份的场景有: 一次性全量迁移,后续将不再进行增量恢复时,设置该字段值为“true”。 增量恢复流程中,确定为最后割接阶段的最后一个增量备份时,设置该字段值为“false”。 + /// + + bool isIsLastBackup() const; + bool isLastBackupIsSet() const; + void unsetisLastBackup(); + void setIsLastBackup(bool value); + + /// + /// 是否执行预校验。 true:执行。 false:不执行。 + /// + + bool isIsPrecheck() const; + bool isPrecheckIsSet() const; + void unsetisPrecheck(); + void setIsPrecheck(bool value); + + /// + /// 恢复模式: “full”表示全量迁移。 “incre”表示增量迁移 。 + /// + + std::string getRecoveryMode() const; + bool recoveryModeIsSet() const; + void unsetrecoveryMode(); + void setRecoveryMode(const std::string& value); + + /// + /// 数据库名称。 + /// + + std::vector& getDbNames(); + bool dbNamesIsSet() const; + void unsetdbNames(); + void setDbNames(const std::vector& value); + + /// + /// 该字段为一个map,目前使用格式key是\"\",value是新数据库名字。 该功能将忽略备份文件中原有的数据库名,通过DRS将其恢复为指定的新数据库名。 使用条件: - 备份文件中只有一个数据库。 - 备份文件是全量备份类型(待恢复备份类型选择:全量备份),且是一次性恢复(最后一个备份选择:是)。 + /// + + std::map& getResetDbNameMap(); + bool resetDbNameMapIsSet() const; + void unsetresetDbNameMap(); + void setResetDbNameMap(const std::map& value); + + /// + /// 该参数控制使用OBS桶中备份文件恢复时,当任务结束时是否删除下载到RDS for SQL server磁盘中的OBS备份文件,默认删除。 - true 删除 - false 不删除 + /// + + bool isIsDeleteBackupFile() const; + bool isDeleteBackupFileIsSet() const; + void unsetisDeleteBackupFile(); + void setIsDeleteBackupFile(bool value); + + +protected: + bool isCover_; + bool isCoverIsSet_; + bool isDefaultRestore_; + bool isDefaultRestoreIsSet_; + bool isLastBackup_; + bool isLastBackupIsSet_; + bool isPrecheck_; + bool isPrecheckIsSet_; + std::string recoveryMode_; + bool recoveryModeIsSet_; + std::vector dbNames_; + bool dbNamesIsSet_; + std::map resetDbNameMap_; + bool resetDbNameMapIsSet_; + bool isDeleteBackupFile_; + bool isDeleteBackupFileIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_BackupRestoreOptionInfo_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/ChangeToPeriodRequest.h b/drs/include/huaweicloud/drs/v5/model/ChangeToPeriodRequest.h new file mode 100644 index 000000000..67fdacb32 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ChangeToPeriodRequest.h @@ -0,0 +1,94 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ChangeToPeriodRequest_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ChangeToPeriodRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT ChangeToPeriodRequest + : public ModelBase +{ +public: + ChangeToPeriodRequest(); + virtual ~ChangeToPeriodRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ChangeToPeriodRequest members + + /// + /// 转包周期的任务ID。 + /// + + std::string getJobId() const; + bool jobIdIsSet() const; + void unsetjobId(); + void setJobId(const std::string& value); + + /// + /// 请求语言类型。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// + /// + + ToPeriodReq getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const ToPeriodReq& value); + + +protected: + std::string jobId_; + bool jobIdIsSet_; + std::string xLanguage_; + bool xLanguageIsSet_; + ToPeriodReq body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ChangeToPeriodRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ChangeToPeriodRequest_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/ChangeToPeriodResponse.h b/drs/include/huaweicloud/drs/v5/model/ChangeToPeriodResponse.h new file mode 100644 index 000000000..b76fd3d01 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ChangeToPeriodResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ChangeToPeriodResponse_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ChangeToPeriodResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT ChangeToPeriodResponse + : public ModelBase, public HttpResponse +{ +public: + ChangeToPeriodResponse(); + virtual ~ChangeToPeriodResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ChangeToPeriodResponse members + + /// + /// 订单ID。 + /// + + std::string getOrderId() const; + bool orderIdIsSet() const; + void unsetorderId(); + void setOrderId(const std::string& value); + + +protected: + std::string orderId_; + bool orderIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ChangeToPeriodResponse_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/CheckDataFilterResponse.h b/drs/include/huaweicloud/drs/v5/model/CheckDataFilterResponse.h index 4cf445ca8..02b602e38 100644 --- a/drs/include/huaweicloud/drs/v5/model/CheckDataFilterResponse.h +++ b/drs/include/huaweicloud/drs/v5/model/CheckDataFilterResponse.h @@ -48,7 +48,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT CheckDataFilterResponse void setId(const std::string& value); /// - /// 查询状态 + /// 查询状态 pending:处理中 failed:失败 success:成功 /// std::string getStatus() const; diff --git a/drs/include/huaweicloud/drs/v5/model/CleanAlarmsRequest.h b/drs/include/huaweicloud/drs/v5/model/CleanAlarmsRequest.h new file mode 100644 index 000000000..fce0fdaea --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/CleanAlarmsRequest.h @@ -0,0 +1,93 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_CleanAlarmsRequest_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_CleanAlarmsRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT CleanAlarmsRequest + : public ModelBase +{ +public: + CleanAlarmsRequest(); + virtual ~CleanAlarmsRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CleanAlarmsRequest members + + /// + /// 请求语言类型。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// 任务ID。 + /// + + std::string getJobId() const; + bool jobIdIsSet() const; + void unsetjobId(); + void setJobId(const std::string& value); + + /// + /// DDL序列号。 + /// + + std::string getAlarmId() const; + bool alarmIdIsSet() const; + void unsetalarmId(); + void setAlarmId(const std::string& value); + + +protected: + std::string xLanguage_; + bool xLanguageIsSet_; + std::string jobId_; + bool jobIdIsSet_; + std::string alarmId_; + bool alarmIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + CleanAlarmsRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_CleanAlarmsRequest_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/CleanAlarmsResponse.h b/drs/include/huaweicloud/drs/v5/model/CleanAlarmsResponse.h new file mode 100644 index 000000000..e8ab8f88d --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/CleanAlarmsResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_CleanAlarmsResponse_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_CleanAlarmsResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT CleanAlarmsResponse + : public ModelBase, public HttpResponse +{ +public: + CleanAlarmsResponse(); + virtual ~CleanAlarmsResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CleanAlarmsResponse members + + /// + /// 空响应体。 + /// + + Object getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const Object& value); + + +protected: + Object body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_CleanAlarmsResponse_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/CollectColumnsResponse.h b/drs/include/huaweicloud/drs/v5/model/CollectColumnsResponse.h index 275168070..fd7e4e351 100644 --- a/drs/include/huaweicloud/drs/v5/model/CollectColumnsResponse.h +++ b/drs/include/huaweicloud/drs/v5/model/CollectColumnsResponse.h @@ -48,7 +48,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT CollectColumnsResponse void setId(const std::string& value); /// - /// 查询状态 + /// 查询状态 pending:处理中 failed:失败 success:成功 /// std::string getStatus() const; diff --git a/drs/include/huaweicloud/drs/v5/model/CollectDbObjectsAsyncResponse.h b/drs/include/huaweicloud/drs/v5/model/CollectDbObjectsAsyncResponse.h index 1d29a3df9..0f406c8c7 100644 --- a/drs/include/huaweicloud/drs/v5/model/CollectDbObjectsAsyncResponse.h +++ b/drs/include/huaweicloud/drs/v5/model/CollectDbObjectsAsyncResponse.h @@ -48,7 +48,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT CollectDbObjectsAsyncResponse void setId(const std::string& value); /// - /// 查询状态 + /// 查询状态 pending:处理中 failed:失败 success:成功 /// std::string getStatus() const; diff --git a/drs/include/huaweicloud/drs/v5/model/CollectDbObjectsInfoResponse.h b/drs/include/huaweicloud/drs/v5/model/CollectDbObjectsInfoResponse.h index 90333838a..8943d284f 100644 --- a/drs/include/huaweicloud/drs/v5/model/CollectDbObjectsInfoResponse.h +++ b/drs/include/huaweicloud/drs/v5/model/CollectDbObjectsInfoResponse.h @@ -48,7 +48,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT CollectDbObjectsInfoResponse void setId(const std::string& value); /// - /// 查询状态 + /// 查询状态 pending:处理中 failed:失败 success:成功 /// std::string getStatus() const; diff --git a/drs/include/huaweicloud/drs/v5/model/CollectPositionAsyncResponse.h b/drs/include/huaweicloud/drs/v5/model/CollectPositionAsyncResponse.h index 7e6e157fa..a89204236 100644 --- a/drs/include/huaweicloud/drs/v5/model/CollectPositionAsyncResponse.h +++ b/drs/include/huaweicloud/drs/v5/model/CollectPositionAsyncResponse.h @@ -48,7 +48,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT CollectPositionAsyncResponse void setId(const std::string& value); /// - /// 查询状态 + /// 查询状态 pending:处理中 failed:失败 success:成功 /// std::string getStatus() const; diff --git a/drs/include/huaweicloud/drs/v5/model/ConnectionConfig.h b/drs/include/huaweicloud/drs/v5/model/ConnectionConfig.h new file mode 100644 index 000000000..c82fd4835 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ConnectionConfig.h @@ -0,0 +1,64 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ConnectionConfig_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ConnectionConfig_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_DRS_V5_EXPORT ConnectionConfig + : public ModelBase +{ +public: + ConnectionConfig(); + virtual ~ConnectionConfig(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ConnectionConfig members + + /// + /// 驱动程序名称。 + /// + + std::string getDriverName() const; + bool driverNameIsSet() const; + void unsetdriverName(); + void setDriverName(const std::string& value); + + +protected: + std::string driverName_; + bool driverNameIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ConnectionConfig_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/ConnectionResp.h b/drs/include/huaweicloud/drs/v5/model/ConnectionResp.h new file mode 100644 index 000000000..e8497075c --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ConnectionResp.h @@ -0,0 +1,167 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ConnectionResp_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ConnectionResp_H_ + + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 连接响应体。 +/// +class HUAWEICLOUD_DRS_V5_EXPORT ConnectionResp + : public ModelBase +{ +public: + ConnectionResp(); + virtual ~ConnectionResp(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ConnectionResp members + + /// + /// 连接ID。 + /// + + std::string getConnectionId() const; + bool connectionIdIsSet() const; + void unsetconnectionId(); + void setConnectionId(const std::string& value); + + /// + /// 连接名称。 + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + /// + /// 连接创建时间,格式为时间戳。 + /// + + int64_t getCreateTime() const; + bool createTimeIsSet() const; + void unsetcreateTime(); + void setCreateTime(int64_t value); + + /// + /// 连接类型。 + /// + + std::string getDbType() const; + bool dbTypeIsSet() const; + void unsetdbType(); + void setDbType(const std::string& value); + + /// + /// + /// + + ConnectionConfig getConfig() const; + bool configIsSet() const; + void unsetconfig(); + void setConfig(const ConnectionConfig& value); + + /// + /// + /// + + BaseEndpoint getEndpoint() const; + bool endpointIsSet() const; + void unsetendpoint(); + void setEndpoint(const BaseEndpoint& value); + + /// + /// + /// + + CloudVpcInfo getVpc() const; + bool vpcIsSet() const; + void unsetvpc(); + void setVpc(const CloudVpcInfo& value); + + /// + /// + /// + + EndpointSslConfig getSsl() const; + bool sslIsSet() const; + void unsetssl(); + void setSsl(const EndpointSslConfig& value); + + /// + /// 企业项目ID。 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + /// + /// 描述。 + /// + + std::string getDescription() const; + bool descriptionIsSet() const; + void unsetdescription(); + void setDescription(const std::string& value); + + +protected: + std::string connectionId_; + bool connectionIdIsSet_; + std::string name_; + bool nameIsSet_; + int64_t createTime_; + bool createTimeIsSet_; + std::string dbType_; + bool dbTypeIsSet_; + ConnectionConfig config_; + bool configIsSet_; + BaseEndpoint endpoint_; + bool endpointIsSet_; + CloudVpcInfo vpc_; + bool vpcIsSet_; + EndpointSslConfig ssl_; + bool sslIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + std::string description_; + bool descriptionIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ConnectionResp_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/CreateConnectionReq.h b/drs/include/huaweicloud/drs/v5/model/CreateConnectionReq.h new file mode 100644 index 000000000..0626a82ed --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/CreateConnectionReq.h @@ -0,0 +1,157 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateConnectionReq_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateConnectionReq_H_ + + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 创建连接请求体。 +/// +class HUAWEICLOUD_DRS_V5_EXPORT CreateConnectionReq + : public ModelBase +{ +public: + CreateConnectionReq(); + virtual ~CreateConnectionReq(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateConnectionReq members + + /// + /// 连接名称。 约束:连接名称在4位到50位之间,不区分大小写,可以包含字母、数字、中划线或下划线,不能包括其他特殊字符。 + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + /// + /// 连接类型,包含: - mysql - postgresql - mongodb - oracle + /// + + std::string getDbType() const; + bool dbTypeIsSet() const; + void unsetdbType(); + void setDbType(const std::string& value); + + /// + /// + /// + + ConnectionConfig getConfig() const; + bool configIsSet() const; + void unsetconfig(); + void setConfig(const ConnectionConfig& value); + + /// + /// 描述,长度不能超过255个字符。 + /// + + std::string getDescription() const; + bool descriptionIsSet() const; + void unsetdescription(); + void setDescription(const std::string& value); + + /// + /// + /// + + BaseEndpoint getEndpoint() const; + bool endpointIsSet() const; + void unsetendpoint(); + void setEndpoint(const BaseEndpoint& value); + + /// + /// + /// + + CloudVpcInfo getVpc() const; + bool vpcIsSet() const; + void unsetvpc(); + void setVpc(const CloudVpcInfo& value); + + /// + /// + /// + + EndpointSslConfig getSsl() const; + bool sslIsSet() const; + void unsetssl(); + void setSsl(const EndpointSslConfig& value); + + /// + /// + /// + + CloudBaseInfo getCloud() const; + bool cloudIsSet() const; + void unsetcloud(); + void setCloud(const CloudBaseInfo& value); + + /// + /// 企业项目ID。 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + std::string name_; + bool nameIsSet_; + std::string dbType_; + bool dbTypeIsSet_; + ConnectionConfig config_; + bool configIsSet_; + std::string description_; + bool descriptionIsSet_; + BaseEndpoint endpoint_; + bool endpointIsSet_; + CloudVpcInfo vpc_; + bool vpcIsSet_; + EndpointSslConfig ssl_; + bool sslIsSet_; + CloudBaseInfo cloud_; + bool cloudIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateConnectionReq_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/CreateConnectionRequest.h b/drs/include/huaweicloud/drs/v5/model/CreateConnectionRequest.h new file mode 100644 index 000000000..4d265c0f4 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/CreateConnectionRequest.h @@ -0,0 +1,83 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateConnectionRequest_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateConnectionRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT CreateConnectionRequest + : public ModelBase +{ +public: + CreateConnectionRequest(); + virtual ~CreateConnectionRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateConnectionRequest members + + /// + /// 请求语言类型。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// + /// + + CreateConnectionReq getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const CreateConnectionReq& value); + + +protected: + std::string xLanguage_; + bool xLanguageIsSet_; + CreateConnectionReq body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + CreateConnectionRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateConnectionRequest_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/CreateConnectionResponse.h b/drs/include/huaweicloud/drs/v5/model/CreateConnectionResponse.h new file mode 100644 index 000000000..2977e4adb --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/CreateConnectionResponse.h @@ -0,0 +1,170 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateConnectionResponse_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateConnectionResponse_H_ + + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT CreateConnectionResponse + : public ModelBase, public HttpResponse +{ +public: + CreateConnectionResponse(); + virtual ~CreateConnectionResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateConnectionResponse members + + /// + /// 连接ID。 + /// + + std::string getConnectionId() const; + bool connectionIdIsSet() const; + void unsetconnectionId(); + void setConnectionId(const std::string& value); + + /// + /// 连接名称。 + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + /// + /// 连接创建时间,格式为时间戳。 + /// + + int64_t getCreateTime() const; + bool createTimeIsSet() const; + void unsetcreateTime(); + void setCreateTime(int64_t value); + + /// + /// 连接类型。 + /// + + std::string getDbType() const; + bool dbTypeIsSet() const; + void unsetdbType(); + void setDbType(const std::string& value); + + /// + /// + /// + + ConnectionConfig getConfig() const; + bool configIsSet() const; + void unsetconfig(); + void setConfig(const ConnectionConfig& value); + + /// + /// + /// + + BaseEndpoint getEndpoint() const; + bool endpointIsSet() const; + void unsetendpoint(); + void setEndpoint(const BaseEndpoint& value); + + /// + /// + /// + + CloudVpcInfo getVpc() const; + bool vpcIsSet() const; + void unsetvpc(); + void setVpc(const CloudVpcInfo& value); + + /// + /// + /// + + EndpointSslConfig getSsl() const; + bool sslIsSet() const; + void unsetssl(); + void setSsl(const EndpointSslConfig& value); + + /// + /// 企业项目ID。 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + /// + /// 描述。 + /// + + std::string getDescription() const; + bool descriptionIsSet() const; + void unsetdescription(); + void setDescription(const std::string& value); + + +protected: + std::string connectionId_; + bool connectionIdIsSet_; + std::string name_; + bool nameIsSet_; + int64_t createTime_; + bool createTimeIsSet_; + std::string dbType_; + bool dbTypeIsSet_; + ConnectionConfig config_; + bool configIsSet_; + BaseEndpoint endpoint_; + bool endpointIsSet_; + CloudVpcInfo vpc_; + bool vpcIsSet_; + EndpointSslConfig ssl_; + bool sslIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + std::string description_; + bool descriptionIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateConnectionResponse_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/CreateOfflineTaskReq.h b/drs/include/huaweicloud/drs/v5/model/CreateOfflineTaskReq.h new file mode 100644 index 000000000..a9270ca6c --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/CreateOfflineTaskReq.h @@ -0,0 +1,100 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateOfflineTaskReq_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateOfflineTaskReq_H_ + + +#include + +#include +#include +#include + +#include +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 创建备份迁移任务请求。 +/// +class HUAWEICLOUD_DRS_V5_EXPORT CreateOfflineTaskReq + : public ModelBase +{ +public: + CreateOfflineTaskReq(); + virtual ~CreateOfflineTaskReq(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateOfflineTaskReq members + + /// + /// + /// + + BackupJobBaseInfo getBaseInfo() const; + bool baseInfoIsSet() const; + void unsetbaseInfo(); + void setBaseInfo(const BackupJobBaseInfo& value); + + /// + /// + /// + + BackupJobEndpointInfo getTargetDbInfo() const; + bool targetDbInfoIsSet() const; + void unsettargetDbInfo(); + void setTargetDbInfo(const BackupJobEndpointInfo& value); + + /// + /// + /// + + BackupInfo getBackupInfo() const; + bool backupInfoIsSet() const; + void unsetbackupInfo(); + void setBackupInfo(const BackupInfo& value); + + /// + /// + /// + + BackupRestoreOptionInfo getOptions() const; + bool optionsIsSet() const; + void unsetoptions(); + void setOptions(const BackupRestoreOptionInfo& value); + + +protected: + BackupJobBaseInfo baseInfo_; + bool baseInfoIsSet_; + BackupJobEndpointInfo targetDbInfo_; + bool targetDbInfoIsSet_; + BackupInfo backupInfo_; + bool backupInfoIsSet_; + BackupRestoreOptionInfo options_; + bool optionsIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateOfflineTaskReq_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/CreateReplicationJobRequest.h b/drs/include/huaweicloud/drs/v5/model/CreateReplicationJobRequest.h new file mode 100644 index 000000000..221532efb --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/CreateReplicationJobRequest.h @@ -0,0 +1,83 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateReplicationJobRequest_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateReplicationJobRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT CreateReplicationJobRequest + : public ModelBase +{ +public: + CreateReplicationJobRequest(); + virtual ~CreateReplicationJobRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateReplicationJobRequest members + + /// + /// 请求语言类型。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// + /// + + CreateOfflineTaskReq getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const CreateOfflineTaskReq& value); + + +protected: + std::string xLanguage_; + bool xLanguageIsSet_; + CreateOfflineTaskReq body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + CreateReplicationJobRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateReplicationJobRequest_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/CreateReplicationJobResponse.h b/drs/include/huaweicloud/drs/v5/model/CreateReplicationJobResponse.h new file mode 100644 index 000000000..5f2b5ec12 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/CreateReplicationJobResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateReplicationJobResponse_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateReplicationJobResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT CreateReplicationJobResponse + : public ModelBase, public HttpResponse +{ +public: + CreateReplicationJobResponse(); + virtual ~CreateReplicationJobResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// CreateReplicationJobResponse members + + /// + /// 任务ID。 + /// + + std::string getJobId() const; + bool jobIdIsSet() const; + void unsetjobId(); + void setJobId(const std::string& value); + + +protected: + std::string jobId_; + bool jobIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_CreateReplicationJobResponse_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/DdlAlarmResp.h b/drs/include/huaweicloud/drs/v5/model/DdlAlarmResp.h new file mode 100644 index 000000000..3c4bfa09b --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/DdlAlarmResp.h @@ -0,0 +1,141 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_DdlAlarmResp_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_DdlAlarmResp_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// DDL告警信息响应体。 +/// +class HUAWEICLOUD_DRS_V5_EXPORT DdlAlarmResp + : public ModelBase +{ +public: + DdlAlarmResp(); + virtual ~DdlAlarmResp(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DdlAlarmResp members + + /// + /// 记录唯一序号。 + /// + + int64_t getSeqno() const; + bool seqnoIsSet() const; + void unsetseqno(); + void setSeqno(int64_t value); + + /// + /// 数据源库位点。 + /// + + std::string getCheckpoint() const; + bool checkpointIsSet() const; + void unsetcheckpoint(); + void setCheckpoint(const std::string& value); + + /// + /// DDL告警状态。0无告警,1告警中。 + /// + + int32_t getStatus() const; + bool statusIsSet() const; + void unsetstatus(); + void setStatus(int32_t value); + + /// + /// DDL在源库执行时间。 + /// + + int64_t getDdlTimestamp() const; + bool ddlTimestampIsSet() const; + void unsetddlTimestamp(); + void setDdlTimestamp(int64_t value); + + /// + /// DDL内容。 + /// + + std::string getDdlText() const; + bool ddlTextIsSet() const; + void unsetddlText(); + void setDdlText(const std::string& value); + + /// + /// DDL执行结果。false执行失败,true执行成功。 + /// + + bool isExeResult() const; + bool exeResultIsSet() const; + void unsetexeResult(); + void setExeResult(bool value); + + /// + /// 数据记录时间。 + /// + + int64_t getRecordTime() const; + bool recordTimeIsSet() const; + void unsetrecordTime(); + void setRecordTime(int64_t value); + + /// + /// DDL告警清理时间。 + /// + + int64_t getCleanTime() const; + bool cleanTimeIsSet() const; + void unsetcleanTime(); + void setCleanTime(int64_t value); + + +protected: + int64_t seqno_; + bool seqnoIsSet_; + std::string checkpoint_; + bool checkpointIsSet_; + int32_t status_; + bool statusIsSet_; + int64_t ddlTimestamp_; + bool ddlTimestampIsSet_; + std::string ddlText_; + bool ddlTextIsSet_; + bool exeResult_; + bool exeResultIsSet_; + int64_t recordTime_; + bool recordTimeIsSet_; + int64_t cleanTime_; + bool cleanTimeIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_DdlAlarmResp_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/DeleteConnectionRequest.h b/drs/include/huaweicloud/drs/v5/model/DeleteConnectionRequest.h new file mode 100644 index 000000000..c610245b5 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/DeleteConnectionRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteConnectionRequest_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteConnectionRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT DeleteConnectionRequest + : public ModelBase +{ +public: + DeleteConnectionRequest(); + virtual ~DeleteConnectionRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteConnectionRequest members + + /// + /// 连接ID。 + /// + + std::string getConnectionId() const; + bool connectionIdIsSet() const; + void unsetconnectionId(); + void setConnectionId(const std::string& value); + + /// + /// 请求语言类型。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + +protected: + std::string connectionId_; + bool connectionIdIsSet_; + std::string xLanguage_; + bool xLanguageIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + DeleteConnectionRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteConnectionRequest_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/DeleteConnectionResponse.h b/drs/include/huaweicloud/drs/v5/model/DeleteConnectionResponse.h new file mode 100644 index 000000000..4a38ec746 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/DeleteConnectionResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteConnectionResponse_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteConnectionResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT DeleteConnectionResponse + : public ModelBase, public HttpResponse +{ +public: + DeleteConnectionResponse(); + virtual ~DeleteConnectionResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteConnectionResponse members + + /// + /// 空响应体。 + /// + + Object getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const Object& value); + + +protected: + Object body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteConnectionResponse_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/DeleteReplicationJobRequest.h b/drs/include/huaweicloud/drs/v5/model/DeleteReplicationJobRequest.h new file mode 100644 index 000000000..4e201644e --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/DeleteReplicationJobRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteReplicationJobRequest_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteReplicationJobRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT DeleteReplicationJobRequest + : public ModelBase +{ +public: + DeleteReplicationJobRequest(); + virtual ~DeleteReplicationJobRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteReplicationJobRequest members + + /// + /// 请求语言类型。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// 备份迁移任务ID。 + /// + + std::string getJobId() const; + bool jobIdIsSet() const; + void unsetjobId(); + void setJobId(const std::string& value); + + +protected: + std::string xLanguage_; + bool xLanguageIsSet_; + std::string jobId_; + bool jobIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + DeleteReplicationJobRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteReplicationJobRequest_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/DeleteReplicationJobResponse.h b/drs/include/huaweicloud/drs/v5/model/DeleteReplicationJobResponse.h new file mode 100644 index 000000000..9bc79c678 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/DeleteReplicationJobResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteReplicationJobResponse_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteReplicationJobResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT DeleteReplicationJobResponse + : public ModelBase, public HttpResponse +{ +public: + DeleteReplicationJobResponse(); + virtual ~DeleteReplicationJobResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// DeleteReplicationJobResponse members + + /// + /// 空响应体。 + /// + + Object getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const Object& value); + + +protected: + Object body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_DeleteReplicationJobResponse_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/ListConnectionsRequest.h b/drs/include/huaweicloud/drs/v5/model/ListConnectionsRequest.h new file mode 100644 index 000000000..eee05fca3 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ListConnectionsRequest.h @@ -0,0 +1,214 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ListConnectionsRequest_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ListConnectionsRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT ListConnectionsRequest + : public ModelBase +{ +public: + ListConnectionsRequest(); + virtual ~ListConnectionsRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListConnectionsRequest members + + /// + /// 请求语言类型。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// 连接ID。 + /// + + std::string getConnectionId() const; + bool connectionIdIsSet() const; + void unsetconnectionId(); + void setConnectionId(const std::string& value); + + /// + /// 连接类型。 - mysql - oracle - postgresql - mongodb + /// + + std::string getDbType() const; + bool dbTypeIsSet() const; + void unsetdbType(); + void setDbType(const std::string& value); + + /// + /// 连接名称,忽略大小写。 + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + /// + /// 云上数据库实例ID。 + /// + + std::string getInstId() const; + bool instIdIsSet() const; + void unsetinstId(); + void setInstId(const std::string& value); + + /// + /// 连接IP。 + /// + + std::string getIp() const; + bool ipIsSet() const; + void unsetip(); + void setIp(const std::string& value); + + /// + /// 连接描述。 + /// + + std::string getDescription() const; + bool descriptionIsSet() const; + void unsetdescription(); + void setDescription(const std::string& value); + + /// + /// 时间区间用“,”分割。示例:2024-05-17T07:46:00.414Z,2024-05-20T07:46:00.999Z。 + /// + + std::string getCreateTime() const; + bool createTimeIsSet() const; + void unsetcreateTime(); + void setCreateTime(const std::string& value); + + /// + /// 企业项目ID。 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + /// + /// 偏移量,默认值为0,表示查询该偏移量后面的记录。 + /// + + int32_t getOffset() const; + bool offsetIsSet() const; + void unsetoffset(); + void setOffset(int32_t value); + + /// + /// 查询返回记录的数量限制,默认值为10。 + /// + + int32_t getLimit() const; + bool limitIsSet() const; + void unsetlimit(); + void setLimit(int32_t value); + + /// + /// 值为“true”时会使得offset和limit参数失效并返回所有记录。 + /// + + bool isFetchAll() const; + bool fetchAllIsSet() const; + void unsetfetchAll(); + void setFetchAll(bool value); + + /// + /// 返回结果按该关键字排序,默认为“created_at”。 + /// + + std::string getSortKey() const; + bool sortKeyIsSet() const; + void unsetsortKey(); + void setSortKey(const std::string& value); + + /// + /// 降序或升序(分别对应desc和asc,默认为“desc”)。 + /// + + std::string getSortDir() const; + bool sortDirIsSet() const; + void unsetsortDir(); + void setSortDir(const std::string& value); + + +protected: + std::string xLanguage_; + bool xLanguageIsSet_; + std::string connectionId_; + bool connectionIdIsSet_; + std::string dbType_; + bool dbTypeIsSet_; + std::string name_; + bool nameIsSet_; + std::string instId_; + bool instIdIsSet_; + std::string ip_; + bool ipIsSet_; + std::string description_; + bool descriptionIsSet_; + std::string createTime_; + bool createTimeIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + int32_t offset_; + bool offsetIsSet_; + int32_t limit_; + bool limitIsSet_; + bool fetchAll_; + bool fetchAllIsSet_; + std::string sortKey_; + bool sortKeyIsSet_; + std::string sortDir_; + bool sortDirIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListConnectionsRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ListConnectionsRequest_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/ListConnectionsResponse.h b/drs/include/huaweicloud/drs/v5/model/ListConnectionsResponse.h new file mode 100644 index 000000000..285fd66cc --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ListConnectionsResponse.h @@ -0,0 +1,79 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ListConnectionsResponse_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ListConnectionsResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT ListConnectionsResponse + : public ModelBase, public HttpResponse +{ +public: + ListConnectionsResponse(); + virtual ~ListConnectionsResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListConnectionsResponse members + + /// + /// 连接信息列表。 + /// + + std::vector& getConnections(); + bool connectionsIsSet() const; + void unsetconnections(); + void setConnections(const std::vector& value); + + /// + /// 列表中的项目总数,与分页无关。 + /// + + int32_t getCount() const; + bool countIsSet() const; + void unsetcount(); + void setCount(int32_t value); + + +protected: + std::vector connections_; + bool connectionsIsSet_; + int32_t count_; + bool countIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ListConnectionsResponse_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/ListJobDdlsRequest.h b/drs/include/huaweicloud/drs/v5/model/ListJobDdlsRequest.h new file mode 100644 index 000000000..c67e38339 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ListJobDdlsRequest.h @@ -0,0 +1,137 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ListJobDdlsRequest_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ListJobDdlsRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT ListJobDdlsRequest + : public ModelBase +{ +public: + ListJobDdlsRequest(); + virtual ~ListJobDdlsRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListJobDdlsRequest members + + /// + /// 请求语言类型。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// 偏移量,默认值为0,表示查询该偏移量后面的记录。 + /// + + int32_t getOffset() const; + bool offsetIsSet() const; + void unsetoffset(); + void setOffset(int32_t value); + + /// + /// 查询返回记录的数量限制.默认值为10。 + /// + + int32_t getLimit() const; + bool limitIsSet() const; + void unsetlimit(); + void setLimit(int32_t value); + + /// + /// DDL序列起始值。 + /// + + int64_t getStartSeqNo() const; + bool startSeqNoIsSet() const; + void unsetstartSeqNo(); + void setStartSeqNo(int64_t value); + + /// + /// DDL序列结束值。 + /// + + int64_t getEndSeqNo() const; + bool endSeqNoIsSet() const; + void unsetendSeqNo(); + void setEndSeqNo(int64_t value); + + /// + /// DDL状态,0为无告警,1为告警中。 + /// + + int32_t getStatus() const; + bool statusIsSet() const; + void unsetstatus(); + void setStatus(int32_t value); + + /// + /// 任务ID。 + /// + + std::string getJobId() const; + bool jobIdIsSet() const; + void unsetjobId(); + void setJobId(const std::string& value); + + +protected: + std::string xLanguage_; + bool xLanguageIsSet_; + int32_t offset_; + bool offsetIsSet_; + int32_t limit_; + bool limitIsSet_; + int64_t startSeqNo_; + bool startSeqNoIsSet_; + int64_t endSeqNo_; + bool endSeqNoIsSet_; + int32_t status_; + bool statusIsSet_; + std::string jobId_; + bool jobIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListJobDdlsRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ListJobDdlsRequest_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/ListJobDdlsResponse.h b/drs/include/huaweicloud/drs/v5/model/ListJobDdlsResponse.h new file mode 100644 index 000000000..e5436bb82 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ListJobDdlsResponse.h @@ -0,0 +1,79 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ListJobDdlsResponse_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ListJobDdlsResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT ListJobDdlsResponse + : public ModelBase, public HttpResponse +{ +public: + ListJobDdlsResponse(); + virtual ~ListJobDdlsResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListJobDdlsResponse members + + /// + /// DDL告警信息列表。 + /// + + std::vector& getDdlList(); + bool ddlListIsSet() const; + void unsetddlList(); + void setDdlList(const std::vector& value); + + /// + /// 列表中的项目总数,与分页无关。 + /// + + int32_t getCount() const; + bool countIsSet() const; + void unsetcount(); + void setCount(int32_t value); + + +protected: + std::vector ddlList_; + bool ddlListIsSet_; + int32_t count_; + bool countIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ListJobDdlsResponse_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/ListReplicationJobsRequest.h b/drs/include/huaweicloud/drs/v5/model/ListReplicationJobsRequest.h new file mode 100644 index 000000000..100b9e85f --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ListReplicationJobsRequest.h @@ -0,0 +1,204 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ListReplicationJobsRequest_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ListReplicationJobsRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT ListReplicationJobsRequest + : public ModelBase +{ +public: + ListReplicationJobsRequest(); + virtual ~ListReplicationJobsRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListReplicationJobsRequest members + + /// + /// 请求语言类型。 en-us:英文 zh-cn:中文 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// 任务名称,支持模糊搜索。 + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + /// + /// 备份迁移任务状态。 TRANSFERRING:恢复中 SUCCESS:成功 FAILED:失败 PRECHECK FAILED:预检查失败 + /// + + std::string getStatus() const; + bool statusIsSet() const; + void unsetstatus(); + void setStatus(const std::string& value); + + /// + /// 数据库实例ID,最大数量为10。 + /// + + std::vector& getDbsInstanceIds(); + bool dbsInstanceIdsIsSet() const; + void unsetdbsInstanceIds(); + void setDbsInstanceIds(const std::vector& value); + + /// + /// 描述。 + /// + + std::string getDescription() const; + bool descriptionIsSet() const; + void unsetdescription(); + void setDescription(const std::string& value); + + /// + /// 创建时间。 + /// + + std::string getCreateAt() const; + bool createAtIsSet() const; + void unsetcreateAt(); + void setCreateAt(const std::string& value); + + /// + /// 完成时间。 + /// + + std::string getCompletedAt() const; + bool completedAtIsSet() const; + void unsetcompletedAt(); + void setCompletedAt(const std::string& value); + + /// + /// 企业项目ID。 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + /// + /// 标签。 + /// + + std::string getTags() const; + bool tagsIsSet() const; + void unsettags(); + void setTags(const std::string& value); + + /// + /// 查询返回记录的数量限制,默认值为10。 + /// + + int32_t getLimit() const; + bool limitIsSet() const; + void unsetlimit(); + void setLimit(int32_t value); + + /// + /// 偏移量,默认值为0,表示查询该偏移量后面的记录。 + /// + + int32_t getOffset() const; + bool offsetIsSet() const; + void unsetoffset(); + void setOffset(int32_t value); + + /// + /// 排序字段。 + /// + + std::string getSortKey() const; + bool sortKeyIsSet() const; + void unsetsortKey(); + void setSortKey(const std::string& value); + + /// + /// 排序方法。 + /// + + std::string getSortDir() const; + bool sortDirIsSet() const; + void unsetsortDir(); + void setSortDir(const std::string& value); + + +protected: + std::string xLanguage_; + bool xLanguageIsSet_; + std::string name_; + bool nameIsSet_; + std::string status_; + bool statusIsSet_; + std::vector dbsInstanceIds_; + bool dbsInstanceIdsIsSet_; + std::string description_; + bool descriptionIsSet_; + std::string createAt_; + bool createAtIsSet_; + std::string completedAt_; + bool completedAtIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + std::string tags_; + bool tagsIsSet_; + int32_t limit_; + bool limitIsSet_; + int32_t offset_; + bool offsetIsSet_; + std::string sortKey_; + bool sortKeyIsSet_; + std::string sortDir_; + bool sortDirIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ListReplicationJobsRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ListReplicationJobsRequest_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/ListReplicationJobsResponse.h b/drs/include/huaweicloud/drs/v5/model/ListReplicationJobsResponse.h new file mode 100644 index 000000000..47f707eea --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ListReplicationJobsResponse.h @@ -0,0 +1,79 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ListReplicationJobsResponse_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ListReplicationJobsResponse_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT ListReplicationJobsResponse + : public ModelBase, public HttpResponse +{ +public: + ListReplicationJobsResponse(); + virtual ~ListReplicationJobsResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ListReplicationJobsResponse members + + /// + /// 备份迁移任务总数。 + /// + + int32_t getCount() const; + bool countIsSet() const; + void unsetcount(); + void setCount(int32_t value); + + /// + /// 备份迁移任务列表。 + /// + + std::vector& getJobs(); + bool jobsIsSet() const; + void unsetjobs(); + void setJobs(const std::vector& value); + + +protected: + int32_t count_; + bool countIsSet_; + std::vector jobs_; + bool jobsIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ListReplicationJobsResponse_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/ModifyConnectionRequest.h b/drs/include/huaweicloud/drs/v5/model/ModifyConnectionRequest.h new file mode 100644 index 000000000..44759ad36 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ModifyConnectionRequest.h @@ -0,0 +1,94 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ModifyConnectionRequest_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ModifyConnectionRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT ModifyConnectionRequest + : public ModelBase +{ +public: + ModifyConnectionRequest(); + virtual ~ModifyConnectionRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ModifyConnectionRequest members + + /// + /// 请求语言类型。 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// 连接ID + /// + + std::string getConnectionId() const; + bool connectionIdIsSet() const; + void unsetconnectionId(); + void setConnectionId(const std::string& value); + + /// + /// + /// + + UpdateConnectionReq getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const UpdateConnectionReq& value); + + +protected: + std::string xLanguage_; + bool xLanguageIsSet_; + std::string connectionId_; + bool connectionIdIsSet_; + UpdateConnectionReq body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ModifyConnectionRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ModifyConnectionRequest_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/ModifyConnectionResponse.h b/drs/include/huaweicloud/drs/v5/model/ModifyConnectionResponse.h new file mode 100644 index 000000000..1fcf9c789 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ModifyConnectionResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ModifyConnectionResponse_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ModifyConnectionResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT ModifyConnectionResponse + : public ModelBase, public HttpResponse +{ +public: + ModifyConnectionResponse(); + virtual ~ModifyConnectionResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ModifyConnectionResponse members + + /// + /// 空响应体。 + /// + + Object getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const Object& value); + + +protected: + Object body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ModifyConnectionResponse_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/ModifyOfflineTaskReq.h b/drs/include/huaweicloud/drs/v5/model/ModifyOfflineTaskReq.h new file mode 100644 index 000000000..4797aa870 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ModifyOfflineTaskReq.h @@ -0,0 +1,75 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ModifyOfflineTaskReq_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ModifyOfflineTaskReq_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 修改离线迁移任务请求。 +/// +class HUAWEICLOUD_DRS_V5_EXPORT ModifyOfflineTaskReq + : public ModelBase +{ +public: + ModifyOfflineTaskReq(); + virtual ~ModifyOfflineTaskReq(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ModifyOfflineTaskReq members + + /// + /// 备份迁移任务名称。 + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + /// + /// 备份迁移任务描述。 + /// + + std::string getDescription() const; + bool descriptionIsSet() const; + void unsetdescription(); + void setDescription(const std::string& value); + + +protected: + std::string name_; + bool nameIsSet_; + std::string description_; + bool descriptionIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ModifyOfflineTaskReq_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/OfflineTaskInfo.h b/drs/include/huaweicloud/drs/v5/model/OfflineTaskInfo.h new file mode 100644 index 000000000..5f1bb5656 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/OfflineTaskInfo.h @@ -0,0 +1,152 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_OfflineTaskInfo_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_OfflineTaskInfo_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 备份迁移任务列表信息体。 +/// +class HUAWEICLOUD_DRS_V5_EXPORT OfflineTaskInfo + : public ModelBase +{ +public: + OfflineTaskInfo(); + virtual ~OfflineTaskInfo(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// OfflineTaskInfo members + + /// + /// 任务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); + + /// + /// 任务状态。 - TRANSFERRING:恢复中 - SUCCESS:成功 - FAILED:失败 - PRECHECK FAILED:预检查失败 + /// + + std::string getStatus() const; + bool statusIsSet() const; + void unsetstatus(); + void setStatus(const std::string& value); + + /// + /// 数据库引擎。 - sqlserver:RDS for SQL Server引擎 + /// + + std::string getEngineType() const; + bool engineTypeIsSet() const; + void unsetengineType(); + void setEngineType(const std::string& value); + + /// + /// 错误日志。 + /// + + std::string getErrorLog() const; + bool errorLogIsSet() const; + void unseterrorLog(); + void setErrorLog(const std::string& value); + + /// + /// 描述。 + /// + + std::string getDescription() const; + bool descriptionIsSet() const; + void unsetdescription(); + void setDescription(const std::string& value); + + /// + /// 任务创建时间。 + /// + + std::string getCreateTime() const; + bool createTimeIsSet() const; + void unsetcreateTime(); + void setCreateTime(const std::string& value); + + /// + /// 任务完成时间。 + /// + + std::string getFinishTime() const; + bool finishTimeIsSet() const; + void unsetfinishTime(); + void setFinishTime(const std::string& value); + + /// + /// 企业项目。 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + std::string id_; + bool idIsSet_; + std::string name_; + bool nameIsSet_; + std::string status_; + bool statusIsSet_; + std::string engineType_; + bool engineTypeIsSet_; + std::string errorLog_; + bool errorLogIsSet_; + std::string description_; + bool descriptionIsSet_; + std::string createTime_; + bool createTimeIsSet_; + std::string finishTime_; + bool finishTimeIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_OfflineTaskInfo_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/ResourceTag.h b/drs/include/huaweicloud/drs/v5/model/ResourceTag.h index 626f5cbf2..9ff4349c8 100644 --- a/drs/include/huaweicloud/drs/v5/model/ResourceTag.h +++ b/drs/include/huaweicloud/drs/v5/model/ResourceTag.h @@ -48,7 +48,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT ResourceTag void setKey(const std::string& value); /// - /// 标签值。 约束:最大长度43,只能包含字母、数字、下划线、中划线和中文。 + /// 标签值。标签的值可以包含任意语种字母、数字、空格和_ . : / = + - @。 /// std::string getValue() const; diff --git a/drs/include/huaweicloud/drs/v5/model/ShowDataProcessingRulesResultResponse.h b/drs/include/huaweicloud/drs/v5/model/ShowDataProcessingRulesResultResponse.h index 69b681c5c..f1dd48acd 100644 --- a/drs/include/huaweicloud/drs/v5/model/ShowDataProcessingRulesResultResponse.h +++ b/drs/include/huaweicloud/drs/v5/model/ShowDataProcessingRulesResultResponse.h @@ -48,7 +48,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT ShowDataProcessingRulesResultResponse void setId(const std::string& value); /// - /// 查询状态 + /// 查询状态 pending:处理中 failed:失败 success:成功 /// std::string getStatus() const; diff --git a/drs/include/huaweicloud/drs/v5/model/ShowReplicationJobRequest.h b/drs/include/huaweicloud/drs/v5/model/ShowReplicationJobRequest.h new file mode 100644 index 000000000..cb563103b --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ShowReplicationJobRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ShowReplicationJobRequest_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ShowReplicationJobRequest_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT ShowReplicationJobRequest + : public ModelBase +{ +public: + ShowReplicationJobRequest(); + virtual ~ShowReplicationJobRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowReplicationJobRequest members + + /// + /// 备份迁移任务ID。 + /// + + std::string getJobId() const; + bool jobIdIsSet() const; + void unsetjobId(); + void setJobId(const std::string& value); + + /// + /// 请求语言类型。 en-us:英文 zh-cn:中文 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + +protected: + std::string jobId_; + bool jobIdIsSet_; + std::string xLanguage_; + bool xLanguageIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowReplicationJobRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ShowReplicationJobRequest_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/ShowReplicationJobResponse.h b/drs/include/huaweicloud/drs/v5/model/ShowReplicationJobResponse.h new file mode 100644 index 000000000..e6a1b8df5 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ShowReplicationJobResponse.h @@ -0,0 +1,181 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ShowReplicationJobResponse_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ShowReplicationJobResponse_H_ + + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT ShowReplicationJobResponse + : public ModelBase, public HttpResponse +{ +public: + ShowReplicationJobResponse(); + virtual ~ShowReplicationJobResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowReplicationJobResponse 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 getCreateTime() const; + bool createTimeIsSet() const; + void unsetcreateTime(); + void setCreateTime(const std::string& value); + + /// + /// 任务完成时间。 + /// + + std::string getFinishTime() const; + bool finishTimeIsSet() const; + void unsetfinishTime(); + void setFinishTime(const std::string& value); + + /// + /// + /// + + BackupInfoResp getBackupInfo() const; + bool backupInfoIsSet() const; + void unsetbackupInfo(); + void setBackupInfo(const BackupInfoResp& value); + + /// + /// + /// + + BackupJobBaseInfo getBaseInfo() const; + bool baseInfoIsSet() const; + void unsetbaseInfo(); + void setBaseInfo(const BackupJobBaseInfo& value); + + /// + /// + /// + + BackupJobEndpointInfo getTargetDbInfo() const; + bool targetDbInfoIsSet() const; + void unsettargetDbInfo(); + void setTargetDbInfo(const BackupJobEndpointInfo& value); + + /// + /// + /// + + BackupRestoreOptionInfo getOptions() const; + bool optionsIsSet() const; + void unsetoptions(); + void setOptions(const BackupRestoreOptionInfo& value); + + /// + /// 备份恢复数据库映射新名称。 + /// + + std::string getNewDbNames() const; + bool newDbNamesIsSet() const; + void unsetnewDbNames(); + void setNewDbNames(const std::string& value); + + /// + /// RDS实例名称。 + /// + + std::string getInstanceName() const; + bool instanceNameIsSet() const; + void unsetinstanceName(); + void setInstanceName(const std::string& value); + + /// + /// 迁移过程中失败原因。 + /// + + std::string getErrorLog() const; + bool errorLogIsSet() const; + void unseterrorLog(); + void setErrorLog(const std::string& value); + + +protected: + std::string id_; + bool idIsSet_; + std::string status_; + bool statusIsSet_; + std::string createTime_; + bool createTimeIsSet_; + std::string finishTime_; + bool finishTimeIsSet_; + BackupInfoResp backupInfo_; + bool backupInfoIsSet_; + BackupJobBaseInfo baseInfo_; + bool baseInfoIsSet_; + BackupJobEndpointInfo targetDbInfo_; + bool targetDbInfoIsSet_; + BackupRestoreOptionInfo options_; + bool optionsIsSet_; + std::string newDbNames_; + bool newDbNamesIsSet_; + std::string instanceName_; + bool instanceNameIsSet_; + std::string errorLog_; + bool errorLogIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ShowReplicationJobResponse_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/ShowUpdateObjectSavingStatusResponse.h b/drs/include/huaweicloud/drs/v5/model/ShowUpdateObjectSavingStatusResponse.h index 314e09ca5..c2ff35725 100644 --- a/drs/include/huaweicloud/drs/v5/model/ShowUpdateObjectSavingStatusResponse.h +++ b/drs/include/huaweicloud/drs/v5/model/ShowUpdateObjectSavingStatusResponse.h @@ -48,7 +48,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT ShowUpdateObjectSavingStatusResponse void setId(const std::string& value); /// - /// 查询状态 + /// 查询状态 pending:处理中 failed:失败 success:成功 /// std::string getStatus() const; diff --git a/drs/include/huaweicloud/drs/v5/model/ToPeriodReq.h b/drs/include/huaweicloud/drs/v5/model/ToPeriodReq.h new file mode 100644 index 000000000..35b540cf3 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/ToPeriodReq.h @@ -0,0 +1,97 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_ToPeriodReq_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_ToPeriodReq_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 任务按需转包周期请求体 +/// +class HUAWEICLOUD_DRS_V5_EXPORT ToPeriodReq + : public ModelBase +{ +public: + ToPeriodReq(); + virtual ~ToPeriodReq(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ToPeriodReq members + + /// + /// 订单类型,取值: - 2:包月 - 3:包年 + /// + + std::string getPeriodType() const; + bool periodTypeIsSet() const; + void unsetperiodType(); + void setPeriodType(const std::string& value); + + /// + /// 订单周期数 + /// + + int32_t getPeriodNum() const; + bool periodNumIsSet() const; + void unsetperiodNum(); + void setPeriodNum(int32_t value); + + /// + /// 是否自动续费 + /// + + bool isIsAutoRenew() const; + bool isAutoRenewIsSet() const; + void unsetisAutoRenew(); + void setIsAutoRenew(bool value); + + /// + /// 是否自动支付 + /// + + bool isIsAutoPay() const; + bool isAutoPayIsSet() const; + void unsetisAutoPay(); + void setIsAutoPay(bool value); + + +protected: + std::string periodType_; + bool periodTypeIsSet_; + int32_t periodNum_; + bool periodNumIsSet_; + bool isAutoRenew_; + bool isAutoRenewIsSet_; + bool isAutoPay_; + bool isAutoPayIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_ToPeriodReq_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/UpdateConnectionReq.h b/drs/include/huaweicloud/drs/v5/model/UpdateConnectionReq.h new file mode 100644 index 000000000..cff1c32e0 --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/UpdateConnectionReq.h @@ -0,0 +1,157 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_UpdateConnectionReq_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_UpdateConnectionReq_H_ + + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// 修改连接请求。 +/// +class HUAWEICLOUD_DRS_V5_EXPORT UpdateConnectionReq + : public ModelBase +{ +public: + UpdateConnectionReq(); + virtual ~UpdateConnectionReq(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateConnectionReq members + + /// + /// 连接名称。 + /// + + std::string getName() const; + bool nameIsSet() const; + void unsetname(); + void setName(const std::string& value); + + /// + /// 数据库类型。 + /// + + std::string getDbType() const; + bool dbTypeIsSet() const; + void unsetdbType(); + void setDbType(const std::string& value); + + /// + /// + /// + + ConnectionConfig getConfig() const; + bool configIsSet() const; + void unsetconfig(); + void setConfig(const ConnectionConfig& value); + + /// + /// 连接描述。 + /// + + std::string getDescription() const; + bool descriptionIsSet() const; + void unsetdescription(); + void setDescription(const std::string& value); + + /// + /// + /// + + BaseEndpoint getEndpoint() const; + bool endpointIsSet() const; + void unsetendpoint(); + void setEndpoint(const BaseEndpoint& value); + + /// + /// + /// + + CloudVpcInfo getVpc() const; + bool vpcIsSet() const; + void unsetvpc(); + void setVpc(const CloudVpcInfo& value); + + /// + /// + /// + + EndpointSslConfig getSsl() const; + bool sslIsSet() const; + void unsetssl(); + void setSsl(const EndpointSslConfig& value); + + /// + /// + /// + + CloudBaseInfo getCloud() const; + bool cloudIsSet() const; + void unsetcloud(); + void setCloud(const CloudBaseInfo& value); + + /// + /// 企业项目ID。 + /// + + std::string getEnterpriseProjectId() const; + bool enterpriseProjectIdIsSet() const; + void unsetenterpriseProjectId(); + void setEnterpriseProjectId(const std::string& value); + + +protected: + std::string name_; + bool nameIsSet_; + std::string dbType_; + bool dbTypeIsSet_; + ConnectionConfig config_; + bool configIsSet_; + std::string description_; + bool descriptionIsSet_; + BaseEndpoint endpoint_; + bool endpointIsSet_; + CloudVpcInfo vpc_; + bool vpcIsSet_; + EndpointSslConfig ssl_; + bool sslIsSet_; + CloudBaseInfo cloud_; + bool cloudIsSet_; + std::string enterpriseProjectId_; + bool enterpriseProjectIdIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_UpdateConnectionReq_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/UpdateDataProgressResponse.h b/drs/include/huaweicloud/drs/v5/model/UpdateDataProgressResponse.h index 6e821f60b..cf1a32ea6 100644 --- a/drs/include/huaweicloud/drs/v5/model/UpdateDataProgressResponse.h +++ b/drs/include/huaweicloud/drs/v5/model/UpdateDataProgressResponse.h @@ -48,7 +48,7 @@ class HUAWEICLOUD_DRS_V5_EXPORT UpdateDataProgressResponse void setId(const std::string& value); /// - /// 查询状态 + /// 查询状态 pending:处理中 failed:失败 success:成功 /// std::string getStatus() const; diff --git a/drs/include/huaweicloud/drs/v5/model/UpdateReplicationJobRequest.h b/drs/include/huaweicloud/drs/v5/model/UpdateReplicationJobRequest.h new file mode 100644 index 000000000..ab479cf9a --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/UpdateReplicationJobRequest.h @@ -0,0 +1,94 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_UpdateReplicationJobRequest_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_UpdateReplicationJobRequest_H_ + + +#include + +#include +#include +#include + +#include +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Request Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT UpdateReplicationJobRequest + : public ModelBase +{ +public: + UpdateReplicationJobRequest(); + virtual ~UpdateReplicationJobRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateReplicationJobRequest members + + /// + /// 备份迁移任务ID。 + /// + + std::string getJobId() const; + bool jobIdIsSet() const; + void unsetjobId(); + void setJobId(const std::string& value); + + /// + /// 请求语言类型。 en-us:英文 zh-cn:中文 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// + /// + + ModifyOfflineTaskReq getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const ModifyOfflineTaskReq& value); + + +protected: + std::string jobId_; + bool jobIdIsSet_; + std::string xLanguage_; + bool xLanguageIsSet_; + ModifyOfflineTaskReq body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + UpdateReplicationJobRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_UpdateReplicationJobRequest_H_ diff --git a/drs/include/huaweicloud/drs/v5/model/UpdateReplicationJobResponse.h b/drs/include/huaweicloud/drs/v5/model/UpdateReplicationJobResponse.h new file mode 100644 index 000000000..beb58467d --- /dev/null +++ b/drs/include/huaweicloud/drs/v5/model/UpdateReplicationJobResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_DRS_V5_MODEL_UpdateReplicationJobResponse_H_ +#define HUAWEICLOUD_SDK_DRS_V5_MODEL_UpdateReplicationJobResponse_H_ + + +#include + +#include +#include +#include + +#include + +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// Response Object +/// +class HUAWEICLOUD_DRS_V5_EXPORT UpdateReplicationJobResponse + : public ModelBase, public HttpResponse +{ +public: + UpdateReplicationJobResponse(); + virtual ~UpdateReplicationJobResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateReplicationJobResponse members + + /// + /// 空响应体。 + /// + + Object getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const Object& value); + + +protected: + Object body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_DRS_V5_MODEL_UpdateReplicationJobResponse_H_ diff --git a/drs/src/v3/model/QueryJobResp.cpp b/drs/src/v3/model/QueryJobResp.cpp index c786f1fc6..21d029c47 100644 --- a/drs/src/v3/model/QueryJobResp.cpp +++ b/drs/src/v3/model/QueryJobResp.cpp @@ -56,7 +56,7 @@ QueryJobResp::QueryJobResp() speedLimitIsSet_ = false; schemaType_ = ""; schemaTypeIsSet_ = false; - nodeNum_ = ""; + nodeNum_ = 0; nodeNumIsSet_ = false; objectSwitch_ = false; objectSwitchIsSet_ = false; @@ -551,7 +551,7 @@ bool QueryJobResp::fromJson(const web::json::value& val) const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("node_num")); if(!fieldValue.is_null()) { - std::string refVal; + int32_t refVal; ok &= ModelBase::fromJson(fieldValue, refVal); setNodeNum(refVal); } @@ -1400,12 +1400,12 @@ void QueryJobResp::unsetschemaType() schemaTypeIsSet_ = false; } -std::string QueryJobResp::getNodeNum() const +int32_t QueryJobResp::getNodeNum() const { return nodeNum_; } -void QueryJobResp::setNodeNum(const std::string& value) +void QueryJobResp::setNodeNum(int32_t value) { nodeNum_ = value; nodeNumIsSet_ = true; diff --git a/drs/src/v5/DrsClient.cpp b/drs/src/v5/DrsClient.cpp index 72c46c729..68a011e58 100644 --- a/drs/src/v5/DrsClient.cpp +++ b/drs/src/v5/DrsClient.cpp @@ -346,6 +346,51 @@ std::shared_ptr DrsClient::batchTagAction(BatchTagAction return localVarResult; } +std::shared_ptr DrsClient::changeToPeriod(ChangeToPeriodRequest &request) +{ + std::string localVarPath = "/v5/{project_id}/job/{job_id}/change-to-period"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["job_id"] = parameterToString(request.getJobId()); + + 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, DrsMeta::genRequestDefForChangeToPeriod()); + + 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 DrsClient::checkDataFilter(CheckDataFilterRequest &request) { std::string localVarPath = "/v5/{project_id}/job/{job_id}/data-filtering/check"; @@ -391,6 +436,40 @@ std::shared_ptr DrsClient::checkDataFilter(CheckDataFil return localVarResult; } +std::shared_ptr DrsClient::cleanAlarms(CleanAlarmsRequest &request) +{ + std::string localVarPath = "/v5/{project_id}/jobs/{job_id}/alarms/{alarm_id}/clean"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["job_id"] = parameterToString(request.getJobId()); + localVarPathParams["alarm_id"] = parameterToString(request.getAlarmId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.xLanguageIsSet()) { + localVarHeaderParams["X-Language"] = parameterToString(request.getXLanguage()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("POST", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, DrsMeta::genRequestDefForCleanAlarms()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr DrsClient::collectColumns(CollectColumnsRequest &request) { std::string localVarPath = "/v5/{project_id}/job/{job_id}/columns/collect"; @@ -696,6 +775,50 @@ std::shared_ptr DrsClient::countInstanceByTags(Coun return localVarResult; } +std::shared_ptr DrsClient::createConnection(CreateConnectionRequest &request) +{ + std::string localVarPath = "/v5/{project_id}/connections"; + + 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, DrsMeta::genRequestDefForCreateConnection()); + + 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 DrsClient::createJob(CreateJobRequest &request) { std::string localVarPath = "/v5/{project_id}/jobs"; @@ -740,6 +863,83 @@ std::shared_ptr DrsClient::createJob(CreateJobRequest &reques return localVarResult; } +std::shared_ptr DrsClient::createReplicationJob(CreateReplicationJobRequest &request) +{ + std::string localVarPath = "/v5/{project_id}/backup-migration-jobs"; + + 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, DrsMeta::genRequestDefForCreateReplicationJob()); + + 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 DrsClient::deleteConnection(DeleteConnectionRequest &request) +{ + std::string localVarPath = "/v5/{project_id}/connections/{connection_id}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["connection_id"] = parameterToString(request.getConnectionId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.xLanguageIsSet()) { + localVarHeaderParams["X-Language"] = parameterToString(request.getXLanguage()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("DELETE", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, DrsMeta::genRequestDefForDeleteConnection()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr DrsClient::deleteJdbcDriver(DeleteJdbcDriverRequest &request) { std::string localVarPath = "/v5/{project_id}/jdbc-drivers"; @@ -817,6 +1017,39 @@ std::shared_ptr DrsClient::deleteJob(DeleteJobRequest &reques return localVarResult; } +std::shared_ptr DrsClient::deleteReplicationJob(DeleteReplicationJobRequest &request) +{ + std::string localVarPath = "/v5/{project_id}/backup-migration-jobs/{job_id}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["job_id"] = parameterToString(request.getJobId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.xLanguageIsSet()) { + localVarHeaderParams["X-Language"] = parameterToString(request.getXLanguage()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("DELETE", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, DrsMeta::genRequestDefForDeleteReplicationJob()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr DrsClient::deleteUserJdbcDriver(DeleteUserJdbcDriverRequest &request) { std::string localVarPath = "/v5/{project_id}/drivers"; @@ -1134,6 +1367,77 @@ std::shared_ptr DrsClient::listAsyncJobs(ListAsyncJobsReq return localVarResult; } +std::shared_ptr DrsClient::listConnections(ListConnectionsRequest &request) +{ + std::string localVarPath = "/v5/{project_id}/connections"; + + 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.connectionIdIsSet()) { + localVarQueryParams["connection_id"] = parameterToString(request.getConnectionId()); + } + if (request.dbTypeIsSet()) { + localVarQueryParams["db_type"] = parameterToString(request.getDbType()); + } + if (request.nameIsSet()) { + localVarQueryParams["name"] = parameterToString(request.getName()); + } + if (request.instIdIsSet()) { + localVarQueryParams["inst_id"] = parameterToString(request.getInstId()); + } + if (request.ipIsSet()) { + localVarQueryParams["ip"] = parameterToString(request.getIp()); + } + if (request.descriptionIsSet()) { + localVarQueryParams["description"] = parameterToString(request.getDescription()); + } + if (request.createTimeIsSet()) { + localVarQueryParams["create_time"] = parameterToString(request.getCreateTime()); + } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + if (request.offsetIsSet()) { + localVarQueryParams["offset"] = parameterToString(request.getOffset()); + } + if (request.limitIsSet()) { + localVarQueryParams["limit"] = parameterToString(request.getLimit()); + } + if (request.fetchAllIsSet()) { + localVarQueryParams["fetch_all"] = parameterToString(request.isFetchAll()); + } + if (request.sortKeyIsSet()) { + localVarQueryParams["sort_key"] = parameterToString(request.getSortKey()); + } + if (request.sortDirIsSet()) { + localVarQueryParams["sort_dir"] = parameterToString(request.getSortDir()); + } + if (request.xLanguageIsSet()) { + localVarHeaderParams["X-Language"] = parameterToString(request.getXLanguage()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, DrsMeta::genRequestDefForListConnections()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr DrsClient::listDbObjects(ListDbObjectsRequest &request) { std::string localVarPath = "/v5/{project_id}/jobs/{job_id}/db-objects"; @@ -1302,6 +1606,54 @@ std::shared_ptr DrsClient::listJdbcDrivers(ListJdbcDriv return localVarResult; } +std::shared_ptr DrsClient::listJobDdls(ListJobDdlsRequest &request) +{ + std::string localVarPath = "/v5/{project_id}/jobs/{job_id}/ddl"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["job_id"] = parameterToString(request.getJobId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.offsetIsSet()) { + localVarQueryParams["offset"] = parameterToString(request.getOffset()); + } + if (request.limitIsSet()) { + localVarQueryParams["limit"] = parameterToString(request.getLimit()); + } + if (request.startSeqNoIsSet()) { + localVarQueryParams["start_seq_no"] = parameterToString(request.getStartSeqNo()); + } + if (request.endSeqNoIsSet()) { + localVarQueryParams["end_seq_no"] = parameterToString(request.getEndSeqNo()); + } + if (request.statusIsSet()) { + localVarQueryParams["status"] = parameterToString(request.getStatus()); + } + if (request.xLanguageIsSet()) { + localVarHeaderParams["X-Language"] = parameterToString(request.getXLanguage()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, DrsMeta::genRequestDefForListJobDdls()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr DrsClient::listJobHistoryParameters(ListJobHistoryParametersRequest &request) { std::string localVarPath = "/v5/{project_id}/jobs/{job_id}/configuration-histories"; @@ -1534,6 +1886,74 @@ std::shared_ptr DrsClient::listProjectTags(ListProjectT return localVarResult; } +std::shared_ptr DrsClient::listReplicationJobs(ListReplicationJobsRequest &request) +{ + std::string localVarPath = "/v5/{project_id}/backup-migration-jobs"; + + 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.nameIsSet()) { + localVarQueryParams["name"] = parameterToString(request.getName()); + } + if (request.statusIsSet()) { + localVarQueryParams["status"] = parameterToString(request.getStatus()); + } + if (request.dbsInstanceIdsIsSet()) { + localVarQueryParams["dbs_instance_ids"] = parameterToString(request.getDbsInstanceIds()); + } + if (request.descriptionIsSet()) { + localVarQueryParams["description"] = parameterToString(request.getDescription()); + } + if (request.createAtIsSet()) { + localVarQueryParams["create_at"] = parameterToString(request.getCreateAt()); + } + if (request.completedAtIsSet()) { + localVarQueryParams["completed_at"] = parameterToString(request.getCompletedAt()); + } + if (request.enterpriseProjectIdIsSet()) { + localVarQueryParams["enterprise_project_id"] = parameterToString(request.getEnterpriseProjectId()); + } + if (request.tagsIsSet()) { + localVarQueryParams["tags"] = parameterToString(request.getTags()); + } + if (request.limitIsSet()) { + localVarQueryParams["limit"] = parameterToString(request.getLimit()); + } + if (request.offsetIsSet()) { + localVarQueryParams["offset"] = parameterToString(request.getOffset()); + } + if (request.sortKeyIsSet()) { + localVarQueryParams["sort_key"] = parameterToString(request.getSortKey()); + } + if (request.sortDirIsSet()) { + localVarQueryParams["sort_dir"] = parameterToString(request.getSortDir()); + } + if (request.xLanguageIsSet()) { + localVarHeaderParams["X-Language"] = parameterToString(request.getXLanguage()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, DrsMeta::genRequestDefForListReplicationJobs()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr DrsClient::listTags(ListTagsRequest &request) { std::string localVarPath = "/v5/{project_id}/{resource_type}/tags"; @@ -1649,6 +2069,51 @@ std::shared_ptr DrsClient::listsAgencyPermission return localVarResult; } +std::shared_ptr DrsClient::modifyConnection(ModifyConnectionRequest &request) +{ + std::string localVarPath = "/v5/{project_id}/connections/{connection_id}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["connection_id"] = parameterToString(request.getConnectionId()); + + 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("PUT", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, DrsMeta::genRequestDefForModifyConnection()); + + 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 DrsClient::showActions(ShowActionsRequest &request) { std::string localVarPath = "/v5/{project_id}/jobs/{job_id}/actions"; @@ -2606,6 +3071,39 @@ std::shared_ptr DrsClient::showReplayResults(ShowRepl return localVarResult; } +std::shared_ptr DrsClient::showReplicationJob(ShowReplicationJobRequest &request) +{ + std::string localVarPath = "/v5/{project_id}/backup-migration-jobs/{job_id}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["job_id"] = parameterToString(request.getJobId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.xLanguageIsSet()) { + localVarHeaderParams["X-Language"] = parameterToString(request.getXLanguage()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, DrsMeta::genRequestDefForShowReplicationJob()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr DrsClient::showSupportObjectType(ShowSupportObjectTypeRequest &request) { std::string localVarPath = "/v5/{project_id}/jobs/{job_id}/object/support"; @@ -3035,6 +3533,51 @@ std::shared_ptr DrsClient::updateJobConfigurati return localVarResult; } +std::shared_ptr DrsClient::updateReplicationJob(UpdateReplicationJobRequest &request) +{ + std::string localVarPath = "/v5/{project_id}/backup-migration-jobs/{job_id}"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["job_id"] = parameterToString(request.getJobId()); + + 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("PUT", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, DrsMeta::genRequestDefForUpdateReplicationJob()); + + 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 DrsClient::updateStartPosition(UpdateStartPositionRequest &request) { std::string localVarPath = "/v5/{project_id}/jobs/{job_id}/start-position"; diff --git a/drs/src/v5/DrsMeta.cpp b/drs/src/v5/DrsMeta.cpp index f0ba1fb80..d32f7cc7e 100644 --- a/drs/src/v5/DrsMeta.cpp +++ b/drs/src/v5/DrsMeta.cpp @@ -106,6 +106,20 @@ HttpRequestDef DrsMeta::genRequestDefForBatchTagAction() { return reqDefBuilder; } +HttpRequestDef DrsMeta::genRequestDefForChangeToPeriod() { + 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 DrsMeta::genRequestDefForCheckDataFilter() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; @@ -120,6 +134,16 @@ HttpRequestDef DrsMeta::genRequestDefForCheckDataFilter() { return reqDefBuilder; } +HttpRequestDef DrsMeta::genRequestDefForCleanAlarms() { + HttpRequestDef reqDefBuilder; + FieldDef headerParamXLanguage; + reqDefBuilder.withRequestField(headerParamXLanguage + .withName("XLanguage") + .withJsonTag("X-Language") + .withLocationType(Header_)); + return reqDefBuilder; +} + HttpRequestDef DrsMeta::genRequestDefForCollectColumns() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; @@ -225,6 +249,20 @@ HttpRequestDef DrsMeta::genRequestDefForCountInstanceByTags() { return reqDefBuilder; } +HttpRequestDef DrsMeta::genRequestDefForCreateConnection() { + 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 DrsMeta::genRequestDefForCreateJob() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; @@ -239,6 +277,30 @@ HttpRequestDef DrsMeta::genRequestDefForCreateJob() { return reqDefBuilder; } +HttpRequestDef DrsMeta::genRequestDefForCreateReplicationJob() { + 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 DrsMeta::genRequestDefForDeleteConnection() { + HttpRequestDef reqDefBuilder; + FieldDef headerParamXLanguage; + reqDefBuilder.withRequestField(headerParamXLanguage + .withName("XLanguage") + .withJsonTag("X-Language") + .withLocationType(Header_)); + return reqDefBuilder; +} + HttpRequestDef DrsMeta::genRequestDefForDeleteJdbcDriver() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; @@ -263,6 +325,16 @@ HttpRequestDef DrsMeta::genRequestDefForDeleteJob() { return reqDefBuilder; } +HttpRequestDef DrsMeta::genRequestDefForDeleteReplicationJob() { + HttpRequestDef reqDefBuilder; + FieldDef headerParamXLanguage; + reqDefBuilder.withRequestField(headerParamXLanguage + .withName("XLanguage") + .withJsonTag("X-Language") + .withLocationType(Header_)); + return reqDefBuilder; +} + HttpRequestDef DrsMeta::genRequestDefForDeleteUserJdbcDriver() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; @@ -389,6 +461,55 @@ HttpRequestDef DrsMeta::genRequestDefForListAsyncJobs() { return reqDefBuilder; } +HttpRequestDef DrsMeta::genRequestDefForListConnections() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("ConnectionId") + .withJsonTag("connection_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("DbType") + .withJsonTag("db_type") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Name") + .withJsonTag("name") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("InstId") + .withJsonTag("inst_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Ip") + .withJsonTag("ip") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Description") + .withJsonTag("description") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("CreateTime") + .withJsonTag("create_time") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Offset") + .withJsonTag("offset") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Limit") + .withJsonTag("limit") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("FetchAll") + .withJsonTag("fetch_all") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("SortKey") + .withJsonTag("sort_key") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("SortDir") + .withJsonTag("sort_dir") + .withLocationType(Query_)); + FieldDef headerParamXLanguage; + reqDefBuilder.withRequestField(headerParamXLanguage + .withName("XLanguage") + .withJsonTag("X-Language") + .withLocationType(Header_)); + return reqDefBuilder; +} + HttpRequestDef DrsMeta::genRequestDefForListDbObjects() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("Offset") @@ -457,6 +578,31 @@ HttpRequestDef DrsMeta::genRequestDefForListJdbcDrivers() { return reqDefBuilder; } +HttpRequestDef DrsMeta::genRequestDefForListJobDdls() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("Offset") + .withJsonTag("offset") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Limit") + .withJsonTag("limit") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("StartSeqNo") + .withJsonTag("start_seq_no") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EndSeqNo") + .withJsonTag("end_seq_no") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Status") + .withJsonTag("status") + .withLocationType(Query_)); + FieldDef headerParamXLanguage; + reqDefBuilder.withRequestField(headerParamXLanguage + .withName("XLanguage") + .withJsonTag("X-Language") + .withLocationType(Header_)); + return reqDefBuilder; +} + HttpRequestDef DrsMeta::genRequestDefForListJobHistoryParameters() { HttpRequestDef reqDefBuilder; reqDefBuilder.withRequestField(FieldDef().withName("Offset") @@ -576,6 +722,52 @@ HttpRequestDef DrsMeta::genRequestDefForListProjectTags() { return reqDefBuilder; } +HttpRequestDef DrsMeta::genRequestDefForListReplicationJobs() { + HttpRequestDef reqDefBuilder; + reqDefBuilder.withRequestField(FieldDef().withName("Name") + .withJsonTag("name") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Status") + .withJsonTag("status") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("DbsInstanceIds") + .withJsonTag("dbs_instance_ids") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Description") + .withJsonTag("description") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("CreateAt") + .withJsonTag("create_at") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("CompletedAt") + .withJsonTag("completed_at") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("EnterpriseProjectId") + .withJsonTag("enterprise_project_id") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Tags") + .withJsonTag("tags") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Limit") + .withJsonTag("limit") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("Offset") + .withJsonTag("offset") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("SortKey") + .withJsonTag("sort_key") + .withLocationType(Query_)); + reqDefBuilder.withRequestField(FieldDef().withName("SortDir") + .withJsonTag("sort_dir") + .withLocationType(Query_)); + FieldDef headerParamXLanguage; + reqDefBuilder.withRequestField(headerParamXLanguage + .withName("XLanguage") + .withJsonTag("X-Language") + .withLocationType(Header_)); + return reqDefBuilder; +} + HttpRequestDef DrsMeta::genRequestDefForListTags() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; @@ -624,6 +816,20 @@ HttpRequestDef DrsMeta::genRequestDefForListsAgencyPermissions() { return reqDefBuilder; } +HttpRequestDef DrsMeta::genRequestDefForModifyConnection() { + 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 DrsMeta::genRequestDefForShowActions() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; @@ -1018,6 +1224,16 @@ HttpRequestDef DrsMeta::genRequestDefForShowReplayResults() { return reqDefBuilder; } +HttpRequestDef DrsMeta::genRequestDefForShowReplicationJob() { + HttpRequestDef reqDefBuilder; + FieldDef headerParamXLanguage; + reqDefBuilder.withRequestField(headerParamXLanguage + .withName("XLanguage") + .withJsonTag("X-Language") + .withLocationType(Header_)); + return reqDefBuilder; +} + HttpRequestDef DrsMeta::genRequestDefForShowSupportObjectType() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; @@ -1153,6 +1369,20 @@ HttpRequestDef DrsMeta::genRequestDefForUpdateJobConfigurations() { return reqDefBuilder; } +HttpRequestDef DrsMeta::genRequestDefForUpdateReplicationJob() { + 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 DrsMeta::genRequestDefForUpdateStartPosition() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; diff --git a/drs/src/v5/model/BackupFileInfo.cpp b/drs/src/v5/model/BackupFileInfo.cpp new file mode 100644 index 000000000..d515a9b76 --- /dev/null +++ b/drs/src/v5/model/BackupFileInfo.cpp @@ -0,0 +1,184 @@ + + +#include "huaweicloud/drs/v5/model/BackupFileInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +BackupFileInfo::BackupFileInfo() +{ + name_ = ""; + nameIsSet_ = false; + obsPath_ = ""; + obsPathIsSet_ = false; + rdsVersion_ = ""; + rdsVersionIsSet_ = false; + rdsSourceInstanceId_ = ""; + rdsSourceInstanceIdIsSet_ = false; +} + +BackupFileInfo::~BackupFileInfo() = default; + +void BackupFileInfo::validate() +{ +} + +web::json::value BackupFileInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(nameIsSet_) { + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); + } + if(obsPathIsSet_) { + val[utility::conversions::to_string_t("obs_path")] = ModelBase::toJson(obsPath_); + } + if(rdsVersionIsSet_) { + val[utility::conversions::to_string_t("rds_version")] = ModelBase::toJson(rdsVersion_); + } + if(rdsSourceInstanceIdIsSet_) { + val[utility::conversions::to_string_t("rds_source_instance_id")] = ModelBase::toJson(rdsSourceInstanceId_); + } + + return val; +} +bool BackupFileInfo::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("obs_path"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("obs_path")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setObsPath(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("rds_version"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("rds_version")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRdsVersion(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("rds_source_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("rds_source_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRdsSourceInstanceId(refVal); + } + } + return ok; +} + + +std::string BackupFileInfo::getName() const +{ + return name_; +} + +void BackupFileInfo::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool BackupFileInfo::nameIsSet() const +{ + return nameIsSet_; +} + +void BackupFileInfo::unsetname() +{ + nameIsSet_ = false; +} + +std::string BackupFileInfo::getObsPath() const +{ + return obsPath_; +} + +void BackupFileInfo::setObsPath(const std::string& value) +{ + obsPath_ = value; + obsPathIsSet_ = true; +} + +bool BackupFileInfo::obsPathIsSet() const +{ + return obsPathIsSet_; +} + +void BackupFileInfo::unsetobsPath() +{ + obsPathIsSet_ = false; +} + +std::string BackupFileInfo::getRdsVersion() const +{ + return rdsVersion_; +} + +void BackupFileInfo::setRdsVersion(const std::string& value) +{ + rdsVersion_ = value; + rdsVersionIsSet_ = true; +} + +bool BackupFileInfo::rdsVersionIsSet() const +{ + return rdsVersionIsSet_; +} + +void BackupFileInfo::unsetrdsVersion() +{ + rdsVersionIsSet_ = false; +} + +std::string BackupFileInfo::getRdsSourceInstanceId() const +{ + return rdsSourceInstanceId_; +} + +void BackupFileInfo::setRdsSourceInstanceId(const std::string& value) +{ + rdsSourceInstanceId_ = value; + rdsSourceInstanceIdIsSet_ = true; +} + +bool BackupFileInfo::rdsSourceInstanceIdIsSet() const +{ + return rdsSourceInstanceIdIsSet_; +} + +void BackupFileInfo::unsetrdsSourceInstanceId() +{ + rdsSourceInstanceIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/BackupFileResp.cpp b/drs/src/v5/model/BackupFileResp.cpp new file mode 100644 index 000000000..434b67579 --- /dev/null +++ b/drs/src/v5/model/BackupFileResp.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/drs/v5/model/BackupFileResp.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +BackupFileResp::BackupFileResp() +{ + fileName_ = ""; + fileNameIsSet_ = false; + fileSize_ = ""; + fileSizeIsSet_ = false; + fileLastModify_ = ""; + fileLastModifyIsSet_ = false; +} + +BackupFileResp::~BackupFileResp() = default; + +void BackupFileResp::validate() +{ +} + +web::json::value BackupFileResp::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(fileNameIsSet_) { + val[utility::conversions::to_string_t("file_name")] = ModelBase::toJson(fileName_); + } + if(fileSizeIsSet_) { + val[utility::conversions::to_string_t("file_size")] = ModelBase::toJson(fileSize_); + } + if(fileLastModifyIsSet_) { + val[utility::conversions::to_string_t("file_last_modify")] = ModelBase::toJson(fileLastModify_); + } + + return val; +} +bool BackupFileResp::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("file_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("file_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFileName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("file_size"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("file_size")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFileSize(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("file_last_modify"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("file_last_modify")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFileLastModify(refVal); + } + } + return ok; +} + + +std::string BackupFileResp::getFileName() const +{ + return fileName_; +} + +void BackupFileResp::setFileName(const std::string& value) +{ + fileName_ = value; + fileNameIsSet_ = true; +} + +bool BackupFileResp::fileNameIsSet() const +{ + return fileNameIsSet_; +} + +void BackupFileResp::unsetfileName() +{ + fileNameIsSet_ = false; +} + +std::string BackupFileResp::getFileSize() const +{ + return fileSize_; +} + +void BackupFileResp::setFileSize(const std::string& value) +{ + fileSize_ = value; + fileSizeIsSet_ = true; +} + +bool BackupFileResp::fileSizeIsSet() const +{ + return fileSizeIsSet_; +} + +void BackupFileResp::unsetfileSize() +{ + fileSizeIsSet_ = false; +} + +std::string BackupFileResp::getFileLastModify() const +{ + return fileLastModify_; +} + +void BackupFileResp::setFileLastModify(const std::string& value) +{ + fileLastModify_ = value; + fileLastModifyIsSet_ = true; +} + +bool BackupFileResp::fileLastModifyIsSet() const +{ + return fileLastModifyIsSet_; +} + +void BackupFileResp::unsetfileLastModify() +{ + fileLastModifyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/BackupInfo.cpp b/drs/src/v5/model/BackupInfo.cpp new file mode 100644 index 000000000..5cbd59fc6 --- /dev/null +++ b/drs/src/v5/model/BackupInfo.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/drs/v5/model/BackupInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +BackupInfo::BackupInfo() +{ + fileSource_ = ""; + fileSourceIsSet_ = false; + bucketName_ = ""; + bucketNameIsSet_ = false; + filesIsSet_ = false; +} + +BackupInfo::~BackupInfo() = default; + +void BackupInfo::validate() +{ +} + +web::json::value BackupInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(fileSourceIsSet_) { + val[utility::conversions::to_string_t("file_source")] = ModelBase::toJson(fileSource_); + } + if(bucketNameIsSet_) { + val[utility::conversions::to_string_t("bucket_name")] = ModelBase::toJson(bucketName_); + } + if(filesIsSet_) { + val[utility::conversions::to_string_t("files")] = ModelBase::toJson(files_); + } + + return val; +} +bool BackupInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("file_source"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("file_source")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFileSource(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("bucket_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("bucket_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBucketName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("files"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("files")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFiles(refVal); + } + } + return ok; +} + + +std::string BackupInfo::getFileSource() const +{ + return fileSource_; +} + +void BackupInfo::setFileSource(const std::string& value) +{ + fileSource_ = value; + fileSourceIsSet_ = true; +} + +bool BackupInfo::fileSourceIsSet() const +{ + return fileSourceIsSet_; +} + +void BackupInfo::unsetfileSource() +{ + fileSourceIsSet_ = false; +} + +std::string BackupInfo::getBucketName() const +{ + return bucketName_; +} + +void BackupInfo::setBucketName(const std::string& value) +{ + bucketName_ = value; + bucketNameIsSet_ = true; +} + +bool BackupInfo::bucketNameIsSet() const +{ + return bucketNameIsSet_; +} + +void BackupInfo::unsetbucketName() +{ + bucketNameIsSet_ = false; +} + +std::vector& BackupInfo::getFiles() +{ + return files_; +} + +void BackupInfo::setFiles(const std::vector& value) +{ + files_ = value; + filesIsSet_ = true; +} + +bool BackupInfo::filesIsSet() const +{ + return filesIsSet_; +} + +void BackupInfo::unsetfiles() +{ + filesIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/BackupInfoResp.cpp b/drs/src/v5/model/BackupInfoResp.cpp new file mode 100644 index 000000000..638677798 --- /dev/null +++ b/drs/src/v5/model/BackupInfoResp.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/drs/v5/model/BackupInfoResp.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +BackupInfoResp::BackupInfoResp() +{ + fileSource_ = ""; + fileSourceIsSet_ = false; + bucketName_ = ""; + bucketNameIsSet_ = false; + fileInfoIsSet_ = false; +} + +BackupInfoResp::~BackupInfoResp() = default; + +void BackupInfoResp::validate() +{ +} + +web::json::value BackupInfoResp::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(fileSourceIsSet_) { + val[utility::conversions::to_string_t("file_source")] = ModelBase::toJson(fileSource_); + } + if(bucketNameIsSet_) { + val[utility::conversions::to_string_t("bucket_name")] = ModelBase::toJson(bucketName_); + } + if(fileInfoIsSet_) { + val[utility::conversions::to_string_t("file_info")] = ModelBase::toJson(fileInfo_); + } + + return val; +} +bool BackupInfoResp::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("file_source"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("file_source")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFileSource(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("bucket_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("bucket_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBucketName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("file_info"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("file_info")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFileInfo(refVal); + } + } + return ok; +} + + +std::string BackupInfoResp::getFileSource() const +{ + return fileSource_; +} + +void BackupInfoResp::setFileSource(const std::string& value) +{ + fileSource_ = value; + fileSourceIsSet_ = true; +} + +bool BackupInfoResp::fileSourceIsSet() const +{ + return fileSourceIsSet_; +} + +void BackupInfoResp::unsetfileSource() +{ + fileSourceIsSet_ = false; +} + +std::string BackupInfoResp::getBucketName() const +{ + return bucketName_; +} + +void BackupInfoResp::setBucketName(const std::string& value) +{ + bucketName_ = value; + bucketNameIsSet_ = true; +} + +bool BackupInfoResp::bucketNameIsSet() const +{ + return bucketNameIsSet_; +} + +void BackupInfoResp::unsetbucketName() +{ + bucketNameIsSet_ = false; +} + +std::vector& BackupInfoResp::getFileInfo() +{ + return fileInfo_; +} + +void BackupInfoResp::setFileInfo(const std::vector& value) +{ + fileInfo_ = value; + fileInfoIsSet_ = true; +} + +bool BackupInfoResp::fileInfoIsSet() const +{ + return fileInfoIsSet_; +} + +void BackupInfoResp::unsetfileInfo() +{ + fileInfoIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/BackupJobBaseInfo.cpp b/drs/src/v5/model/BackupJobBaseInfo.cpp new file mode 100644 index 000000000..8eec9a1a0 --- /dev/null +++ b/drs/src/v5/model/BackupJobBaseInfo.cpp @@ -0,0 +1,218 @@ + + +#include "huaweicloud/drs/v5/model/BackupJobBaseInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +BackupJobBaseInfo::BackupJobBaseInfo() +{ + name_ = ""; + nameIsSet_ = false; + engineType_ = ""; + engineTypeIsSet_ = false; + description_ = ""; + descriptionIsSet_ = false; + tagsIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +BackupJobBaseInfo::~BackupJobBaseInfo() = default; + +void BackupJobBaseInfo::validate() +{ +} + +web::json::value BackupJobBaseInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(nameIsSet_) { + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); + } + if(engineTypeIsSet_) { + val[utility::conversions::to_string_t("engine_type")] = ModelBase::toJson(engineType_); + } + if(descriptionIsSet_) { + val[utility::conversions::to_string_t("description")] = ModelBase::toJson(description_); + } + if(tagsIsSet_) { + val[utility::conversions::to_string_t("tags")] = ModelBase::toJson(tags_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool BackupJobBaseInfo::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("engine_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("engine_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEngineType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("description"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("description")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDescription(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); + } + } + 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 BackupJobBaseInfo::getName() const +{ + return name_; +} + +void BackupJobBaseInfo::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool BackupJobBaseInfo::nameIsSet() const +{ + return nameIsSet_; +} + +void BackupJobBaseInfo::unsetname() +{ + nameIsSet_ = false; +} + +std::string BackupJobBaseInfo::getEngineType() const +{ + return engineType_; +} + +void BackupJobBaseInfo::setEngineType(const std::string& value) +{ + engineType_ = value; + engineTypeIsSet_ = true; +} + +bool BackupJobBaseInfo::engineTypeIsSet() const +{ + return engineTypeIsSet_; +} + +void BackupJobBaseInfo::unsetengineType() +{ + engineTypeIsSet_ = false; +} + +std::string BackupJobBaseInfo::getDescription() const +{ + return description_; +} + +void BackupJobBaseInfo::setDescription(const std::string& value) +{ + description_ = value; + descriptionIsSet_ = true; +} + +bool BackupJobBaseInfo::descriptionIsSet() const +{ + return descriptionIsSet_; +} + +void BackupJobBaseInfo::unsetdescription() +{ + descriptionIsSet_ = false; +} + +std::vector& BackupJobBaseInfo::getTags() +{ + return tags_; +} + +void BackupJobBaseInfo::setTags(const std::vector& value) +{ + tags_ = value; + tagsIsSet_ = true; +} + +bool BackupJobBaseInfo::tagsIsSet() const +{ + return tagsIsSet_; +} + +void BackupJobBaseInfo::unsettags() +{ + tagsIsSet_ = false; +} + +std::string BackupJobBaseInfo::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void BackupJobBaseInfo::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool BackupJobBaseInfo::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void BackupJobBaseInfo::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/BackupJobEndpointInfo.cpp b/drs/src/v5/model/BackupJobEndpointInfo.cpp new file mode 100644 index 000000000..9db58adc4 --- /dev/null +++ b/drs/src/v5/model/BackupJobEndpointInfo.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/drs/v5/model/BackupJobEndpointInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +BackupJobEndpointInfo::BackupJobEndpointInfo() +{ + targetInstanceId_ = ""; + targetInstanceIdIsSet_ = false; + msFileStreamStatus_ = ""; + msFileStreamStatusIsSet_ = false; + fileId_ = ""; + fileIdIsSet_ = false; +} + +BackupJobEndpointInfo::~BackupJobEndpointInfo() = default; + +void BackupJobEndpointInfo::validate() +{ +} + +web::json::value BackupJobEndpointInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(targetInstanceIdIsSet_) { + val[utility::conversions::to_string_t("target_instance_id")] = ModelBase::toJson(targetInstanceId_); + } + if(msFileStreamStatusIsSet_) { + val[utility::conversions::to_string_t("ms_file_stream_status")] = ModelBase::toJson(msFileStreamStatus_); + } + if(fileIdIsSet_) { + val[utility::conversions::to_string_t("file_id")] = ModelBase::toJson(fileId_); + } + + return val; +} +bool BackupJobEndpointInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("target_instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("target_instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTargetInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ms_file_stream_status"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ms_file_stream_status")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setMsFileStreamStatus(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("file_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("file_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFileId(refVal); + } + } + return ok; +} + + +std::string BackupJobEndpointInfo::getTargetInstanceId() const +{ + return targetInstanceId_; +} + +void BackupJobEndpointInfo::setTargetInstanceId(const std::string& value) +{ + targetInstanceId_ = value; + targetInstanceIdIsSet_ = true; +} + +bool BackupJobEndpointInfo::targetInstanceIdIsSet() const +{ + return targetInstanceIdIsSet_; +} + +void BackupJobEndpointInfo::unsettargetInstanceId() +{ + targetInstanceIdIsSet_ = false; +} + +std::string BackupJobEndpointInfo::getMsFileStreamStatus() const +{ + return msFileStreamStatus_; +} + +void BackupJobEndpointInfo::setMsFileStreamStatus(const std::string& value) +{ + msFileStreamStatus_ = value; + msFileStreamStatusIsSet_ = true; +} + +bool BackupJobEndpointInfo::msFileStreamStatusIsSet() const +{ + return msFileStreamStatusIsSet_; +} + +void BackupJobEndpointInfo::unsetmsFileStreamStatus() +{ + msFileStreamStatusIsSet_ = false; +} + +std::string BackupJobEndpointInfo::getFileId() const +{ + return fileId_; +} + +void BackupJobEndpointInfo::setFileId(const std::string& value) +{ + fileId_ = value; + fileIdIsSet_ = true; +} + +bool BackupJobEndpointInfo::fileIdIsSet() const +{ + return fileIdIsSet_; +} + +void BackupJobEndpointInfo::unsetfileId() +{ + fileIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/BackupRestoreOptionInfo.cpp b/drs/src/v5/model/BackupRestoreOptionInfo.cpp new file mode 100644 index 000000000..14ef9574a --- /dev/null +++ b/drs/src/v5/model/BackupRestoreOptionInfo.cpp @@ -0,0 +1,322 @@ + + +#include "huaweicloud/drs/v5/model/BackupRestoreOptionInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +BackupRestoreOptionInfo::BackupRestoreOptionInfo() +{ + isCover_ = false; + isCoverIsSet_ = false; + isDefaultRestore_ = false; + isDefaultRestoreIsSet_ = false; + isLastBackup_ = false; + isLastBackupIsSet_ = false; + isPrecheck_ = false; + isPrecheckIsSet_ = false; + recoveryMode_ = ""; + recoveryModeIsSet_ = false; + dbNamesIsSet_ = false; + resetDbNameMapIsSet_ = false; + isDeleteBackupFile_ = false; + isDeleteBackupFileIsSet_ = false; +} + +BackupRestoreOptionInfo::~BackupRestoreOptionInfo() = default; + +void BackupRestoreOptionInfo::validate() +{ +} + +web::json::value BackupRestoreOptionInfo::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(isCoverIsSet_) { + val[utility::conversions::to_string_t("is_cover")] = ModelBase::toJson(isCover_); + } + if(isDefaultRestoreIsSet_) { + val[utility::conversions::to_string_t("is_default_restore")] = ModelBase::toJson(isDefaultRestore_); + } + if(isLastBackupIsSet_) { + val[utility::conversions::to_string_t("is_last_backup")] = ModelBase::toJson(isLastBackup_); + } + if(isPrecheckIsSet_) { + val[utility::conversions::to_string_t("is_precheck")] = ModelBase::toJson(isPrecheck_); + } + if(recoveryModeIsSet_) { + val[utility::conversions::to_string_t("recovery_mode")] = ModelBase::toJson(recoveryMode_); + } + if(dbNamesIsSet_) { + val[utility::conversions::to_string_t("db_names")] = ModelBase::toJson(dbNames_); + } + if(resetDbNameMapIsSet_) { + val[utility::conversions::to_string_t("reset_db_name_map")] = ModelBase::toJson(resetDbNameMap_); + } + if(isDeleteBackupFileIsSet_) { + val[utility::conversions::to_string_t("is_delete_backup_file")] = ModelBase::toJson(isDeleteBackupFile_); + } + + return val; +} +bool BackupRestoreOptionInfo::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("is_cover"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_cover")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsCover(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("is_default_restore"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_default_restore")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsDefaultRestore(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("is_last_backup"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_last_backup")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsLastBackup(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("is_precheck"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_precheck")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsPrecheck(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("recovery_mode"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("recovery_mode")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRecoveryMode(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("db_names"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("db_names")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDbNames(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("reset_db_name_map"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("reset_db_name_map")); + if(!fieldValue.is_null()) + { + std::map refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setResetDbNameMap(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("is_delete_backup_file"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_delete_backup_file")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsDeleteBackupFile(refVal); + } + } + return ok; +} + + +bool BackupRestoreOptionInfo::isIsCover() const +{ + return isCover_; +} + +void BackupRestoreOptionInfo::setIsCover(bool value) +{ + isCover_ = value; + isCoverIsSet_ = true; +} + +bool BackupRestoreOptionInfo::isCoverIsSet() const +{ + return isCoverIsSet_; +} + +void BackupRestoreOptionInfo::unsetisCover() +{ + isCoverIsSet_ = false; +} + +bool BackupRestoreOptionInfo::isIsDefaultRestore() const +{ + return isDefaultRestore_; +} + +void BackupRestoreOptionInfo::setIsDefaultRestore(bool value) +{ + isDefaultRestore_ = value; + isDefaultRestoreIsSet_ = true; +} + +bool BackupRestoreOptionInfo::isDefaultRestoreIsSet() const +{ + return isDefaultRestoreIsSet_; +} + +void BackupRestoreOptionInfo::unsetisDefaultRestore() +{ + isDefaultRestoreIsSet_ = false; +} + +bool BackupRestoreOptionInfo::isIsLastBackup() const +{ + return isLastBackup_; +} + +void BackupRestoreOptionInfo::setIsLastBackup(bool value) +{ + isLastBackup_ = value; + isLastBackupIsSet_ = true; +} + +bool BackupRestoreOptionInfo::isLastBackupIsSet() const +{ + return isLastBackupIsSet_; +} + +void BackupRestoreOptionInfo::unsetisLastBackup() +{ + isLastBackupIsSet_ = false; +} + +bool BackupRestoreOptionInfo::isIsPrecheck() const +{ + return isPrecheck_; +} + +void BackupRestoreOptionInfo::setIsPrecheck(bool value) +{ + isPrecheck_ = value; + isPrecheckIsSet_ = true; +} + +bool BackupRestoreOptionInfo::isPrecheckIsSet() const +{ + return isPrecheckIsSet_; +} + +void BackupRestoreOptionInfo::unsetisPrecheck() +{ + isPrecheckIsSet_ = false; +} + +std::string BackupRestoreOptionInfo::getRecoveryMode() const +{ + return recoveryMode_; +} + +void BackupRestoreOptionInfo::setRecoveryMode(const std::string& value) +{ + recoveryMode_ = value; + recoveryModeIsSet_ = true; +} + +bool BackupRestoreOptionInfo::recoveryModeIsSet() const +{ + return recoveryModeIsSet_; +} + +void BackupRestoreOptionInfo::unsetrecoveryMode() +{ + recoveryModeIsSet_ = false; +} + +std::vector& BackupRestoreOptionInfo::getDbNames() +{ + return dbNames_; +} + +void BackupRestoreOptionInfo::setDbNames(const std::vector& value) +{ + dbNames_ = value; + dbNamesIsSet_ = true; +} + +bool BackupRestoreOptionInfo::dbNamesIsSet() const +{ + return dbNamesIsSet_; +} + +void BackupRestoreOptionInfo::unsetdbNames() +{ + dbNamesIsSet_ = false; +} + +std::map& BackupRestoreOptionInfo::getResetDbNameMap() +{ + return resetDbNameMap_; +} + +void BackupRestoreOptionInfo::setResetDbNameMap(const std::map& value) +{ + resetDbNameMap_ = value; + resetDbNameMapIsSet_ = true; +} + +bool BackupRestoreOptionInfo::resetDbNameMapIsSet() const +{ + return resetDbNameMapIsSet_; +} + +void BackupRestoreOptionInfo::unsetresetDbNameMap() +{ + resetDbNameMapIsSet_ = false; +} + +bool BackupRestoreOptionInfo::isIsDeleteBackupFile() const +{ + return isDeleteBackupFile_; +} + +void BackupRestoreOptionInfo::setIsDeleteBackupFile(bool value) +{ + isDeleteBackupFile_ = value; + isDeleteBackupFileIsSet_ = true; +} + +bool BackupRestoreOptionInfo::isDeleteBackupFileIsSet() const +{ + return isDeleteBackupFileIsSet_; +} + +void BackupRestoreOptionInfo::unsetisDeleteBackupFile() +{ + isDeleteBackupFileIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ChangeToPeriodRequest.cpp b/drs/src/v5/model/ChangeToPeriodRequest.cpp new file mode 100644 index 000000000..3034879f8 --- /dev/null +++ b/drs/src/v5/model/ChangeToPeriodRequest.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/drs/v5/model/ChangeToPeriodRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ChangeToPeriodRequest::ChangeToPeriodRequest() +{ + jobId_ = ""; + jobIdIsSet_ = false; + xLanguage_ = ""; + xLanguageIsSet_ = false; + bodyIsSet_ = false; +} + +ChangeToPeriodRequest::~ChangeToPeriodRequest() = default; + +void ChangeToPeriodRequest::validate() +{ +} + +web::json::value ChangeToPeriodRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(jobIdIsSet_) { + val[utility::conversions::to_string_t("job_id")] = ModelBase::toJson(jobId_); + } + 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 ChangeToPeriodRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("job_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("job_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setJobId(refVal); + } + } + 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()) + { + ToPeriodReq refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string ChangeToPeriodRequest::getJobId() const +{ + return jobId_; +} + +void ChangeToPeriodRequest::setJobId(const std::string& value) +{ + jobId_ = value; + jobIdIsSet_ = true; +} + +bool ChangeToPeriodRequest::jobIdIsSet() const +{ + return jobIdIsSet_; +} + +void ChangeToPeriodRequest::unsetjobId() +{ + jobIdIsSet_ = false; +} + +std::string ChangeToPeriodRequest::getXLanguage() const +{ + return xLanguage_; +} + +void ChangeToPeriodRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool ChangeToPeriodRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void ChangeToPeriodRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +ToPeriodReq ChangeToPeriodRequest::getBody() const +{ + return body_; +} + +void ChangeToPeriodRequest::setBody(const ToPeriodReq& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool ChangeToPeriodRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void ChangeToPeriodRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ChangeToPeriodResponse.cpp b/drs/src/v5/model/ChangeToPeriodResponse.cpp new file mode 100644 index 000000000..4ff6f41aa --- /dev/null +++ b/drs/src/v5/model/ChangeToPeriodResponse.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/drs/v5/model/ChangeToPeriodResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ChangeToPeriodResponse::ChangeToPeriodResponse() +{ + orderId_ = ""; + orderIdIsSet_ = false; +} + +ChangeToPeriodResponse::~ChangeToPeriodResponse() = default; + +void ChangeToPeriodResponse::validate() +{ +} + +web::json::value ChangeToPeriodResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(orderIdIsSet_) { + val[utility::conversions::to_string_t("order_id")] = ModelBase::toJson(orderId_); + } + + return val; +} +bool ChangeToPeriodResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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); + } + } + return ok; +} + + +std::string ChangeToPeriodResponse::getOrderId() const +{ + return orderId_; +} + +void ChangeToPeriodResponse::setOrderId(const std::string& value) +{ + orderId_ = value; + orderIdIsSet_ = true; +} + +bool ChangeToPeriodResponse::orderIdIsSet() const +{ + return orderIdIsSet_; +} + +void ChangeToPeriodResponse::unsetorderId() +{ + orderIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/CleanAlarmsRequest.cpp b/drs/src/v5/model/CleanAlarmsRequest.cpp new file mode 100644 index 000000000..07696bae1 --- /dev/null +++ b/drs/src/v5/model/CleanAlarmsRequest.cpp @@ -0,0 +1,149 @@ + + +#include "huaweicloud/drs/v5/model/CleanAlarmsRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +CleanAlarmsRequest::CleanAlarmsRequest() +{ + xLanguage_ = ""; + xLanguageIsSet_ = false; + jobId_ = ""; + jobIdIsSet_ = false; + alarmId_ = ""; + alarmIdIsSet_ = false; +} + +CleanAlarmsRequest::~CleanAlarmsRequest() = default; + +void CleanAlarmsRequest::validate() +{ +} + +web::json::value CleanAlarmsRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + if(jobIdIsSet_) { + val[utility::conversions::to_string_t("job_id")] = ModelBase::toJson(jobId_); + } + if(alarmIdIsSet_) { + val[utility::conversions::to_string_t("alarm_id")] = ModelBase::toJson(alarmId_); + } + + return val; +} +bool CleanAlarmsRequest::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("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("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); + } + } + return ok; +} + + +std::string CleanAlarmsRequest::getXLanguage() const +{ + return xLanguage_; +} + +void CleanAlarmsRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool CleanAlarmsRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void CleanAlarmsRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +std::string CleanAlarmsRequest::getJobId() const +{ + return jobId_; +} + +void CleanAlarmsRequest::setJobId(const std::string& value) +{ + jobId_ = value; + jobIdIsSet_ = true; +} + +bool CleanAlarmsRequest::jobIdIsSet() const +{ + return jobIdIsSet_; +} + +void CleanAlarmsRequest::unsetjobId() +{ + jobIdIsSet_ = false; +} + +std::string CleanAlarmsRequest::getAlarmId() const +{ + return alarmId_; +} + +void CleanAlarmsRequest::setAlarmId(const std::string& value) +{ + alarmId_ = value; + alarmIdIsSet_ = true; +} + +bool CleanAlarmsRequest::alarmIdIsSet() const +{ + return alarmIdIsSet_; +} + +void CleanAlarmsRequest::unsetalarmId() +{ + alarmIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/CleanAlarmsResponse.cpp b/drs/src/v5/model/CleanAlarmsResponse.cpp new file mode 100644 index 000000000..255c6b016 --- /dev/null +++ b/drs/src/v5/model/CleanAlarmsResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/drs/v5/model/CleanAlarmsResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +CleanAlarmsResponse::CleanAlarmsResponse() +{ + bodyIsSet_ = false; +} + +CleanAlarmsResponse::~CleanAlarmsResponse() = default; + +void CleanAlarmsResponse::validate() +{ +} + +web::json::value CleanAlarmsResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool CleanAlarmsResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + Object refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +Object CleanAlarmsResponse::getBody() const +{ + return body_; +} + +void CleanAlarmsResponse::setBody(const Object& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool CleanAlarmsResponse::bodyIsSet() const +{ + return bodyIsSet_; +} + +void CleanAlarmsResponse::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ConnectionConfig.cpp b/drs/src/v5/model/ConnectionConfig.cpp new file mode 100644 index 000000000..ff90950f6 --- /dev/null +++ b/drs/src/v5/model/ConnectionConfig.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/drs/v5/model/ConnectionConfig.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ConnectionConfig::ConnectionConfig() +{ + driverName_ = ""; + driverNameIsSet_ = false; +} + +ConnectionConfig::~ConnectionConfig() = default; + +void ConnectionConfig::validate() +{ +} + +web::json::value ConnectionConfig::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(driverNameIsSet_) { + val[utility::conversions::to_string_t("driver_name")] = ModelBase::toJson(driverName_); + } + + return val; +} +bool ConnectionConfig::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("driver_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("driver_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDriverName(refVal); + } + } + return ok; +} + + +std::string ConnectionConfig::getDriverName() const +{ + return driverName_; +} + +void ConnectionConfig::setDriverName(const std::string& value) +{ + driverName_ = value; + driverNameIsSet_ = true; +} + +bool ConnectionConfig::driverNameIsSet() const +{ + return driverNameIsSet_; +} + +void ConnectionConfig::unsetdriverName() +{ + driverNameIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ConnectionResp.cpp b/drs/src/v5/model/ConnectionResp.cpp new file mode 100644 index 000000000..e11b51837 --- /dev/null +++ b/drs/src/v5/model/ConnectionResp.cpp @@ -0,0 +1,390 @@ + + +#include "huaweicloud/drs/v5/model/ConnectionResp.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ConnectionResp::ConnectionResp() +{ + connectionId_ = ""; + connectionIdIsSet_ = false; + name_ = ""; + nameIsSet_ = false; + createTime_ = 0L; + createTimeIsSet_ = false; + dbType_ = ""; + dbTypeIsSet_ = false; + configIsSet_ = false; + endpointIsSet_ = false; + vpcIsSet_ = false; + sslIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; + description_ = ""; + descriptionIsSet_ = false; +} + +ConnectionResp::~ConnectionResp() = default; + +void ConnectionResp::validate() +{ +} + +web::json::value ConnectionResp::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(connectionIdIsSet_) { + val[utility::conversions::to_string_t("connection_id")] = ModelBase::toJson(connectionId_); + } + if(nameIsSet_) { + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); + } + if(createTimeIsSet_) { + val[utility::conversions::to_string_t("create_time")] = ModelBase::toJson(createTime_); + } + if(dbTypeIsSet_) { + val[utility::conversions::to_string_t("db_type")] = ModelBase::toJson(dbType_); + } + if(configIsSet_) { + val[utility::conversions::to_string_t("config")] = ModelBase::toJson(config_); + } + if(endpointIsSet_) { + val[utility::conversions::to_string_t("endpoint")] = ModelBase::toJson(endpoint_); + } + if(vpcIsSet_) { + val[utility::conversions::to_string_t("vpc")] = ModelBase::toJson(vpc_); + } + if(sslIsSet_) { + val[utility::conversions::to_string_t("ssl")] = ModelBase::toJson(ssl_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + if(descriptionIsSet_) { + val[utility::conversions::to_string_t("description")] = ModelBase::toJson(description_); + } + + return val; +} +bool ConnectionResp::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("connection_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("connection_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConnectionId(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("create_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("create_time")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCreateTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("db_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("db_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDbType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("config"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("config")); + if(!fieldValue.is_null()) + { + ConnectionConfig refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConfig(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("endpoint"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("endpoint")); + if(!fieldValue.is_null()) + { + BaseEndpoint refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEndpoint(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("vpc"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("vpc")); + if(!fieldValue.is_null()) + { + CloudVpcInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setVpc(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ssl"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ssl")); + if(!fieldValue.is_null()) + { + EndpointSslConfig refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSsl(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("description"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("description")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDescription(refVal); + } + } + return ok; +} + + +std::string ConnectionResp::getConnectionId() const +{ + return connectionId_; +} + +void ConnectionResp::setConnectionId(const std::string& value) +{ + connectionId_ = value; + connectionIdIsSet_ = true; +} + +bool ConnectionResp::connectionIdIsSet() const +{ + return connectionIdIsSet_; +} + +void ConnectionResp::unsetconnectionId() +{ + connectionIdIsSet_ = false; +} + +std::string ConnectionResp::getName() const +{ + return name_; +} + +void ConnectionResp::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool ConnectionResp::nameIsSet() const +{ + return nameIsSet_; +} + +void ConnectionResp::unsetname() +{ + nameIsSet_ = false; +} + +int64_t ConnectionResp::getCreateTime() const +{ + return createTime_; +} + +void ConnectionResp::setCreateTime(int64_t value) +{ + createTime_ = value; + createTimeIsSet_ = true; +} + +bool ConnectionResp::createTimeIsSet() const +{ + return createTimeIsSet_; +} + +void ConnectionResp::unsetcreateTime() +{ + createTimeIsSet_ = false; +} + +std::string ConnectionResp::getDbType() const +{ + return dbType_; +} + +void ConnectionResp::setDbType(const std::string& value) +{ + dbType_ = value; + dbTypeIsSet_ = true; +} + +bool ConnectionResp::dbTypeIsSet() const +{ + return dbTypeIsSet_; +} + +void ConnectionResp::unsetdbType() +{ + dbTypeIsSet_ = false; +} + +ConnectionConfig ConnectionResp::getConfig() const +{ + return config_; +} + +void ConnectionResp::setConfig(const ConnectionConfig& value) +{ + config_ = value; + configIsSet_ = true; +} + +bool ConnectionResp::configIsSet() const +{ + return configIsSet_; +} + +void ConnectionResp::unsetconfig() +{ + configIsSet_ = false; +} + +BaseEndpoint ConnectionResp::getEndpoint() const +{ + return endpoint_; +} + +void ConnectionResp::setEndpoint(const BaseEndpoint& value) +{ + endpoint_ = value; + endpointIsSet_ = true; +} + +bool ConnectionResp::endpointIsSet() const +{ + return endpointIsSet_; +} + +void ConnectionResp::unsetendpoint() +{ + endpointIsSet_ = false; +} + +CloudVpcInfo ConnectionResp::getVpc() const +{ + return vpc_; +} + +void ConnectionResp::setVpc(const CloudVpcInfo& value) +{ + vpc_ = value; + vpcIsSet_ = true; +} + +bool ConnectionResp::vpcIsSet() const +{ + return vpcIsSet_; +} + +void ConnectionResp::unsetvpc() +{ + vpcIsSet_ = false; +} + +EndpointSslConfig ConnectionResp::getSsl() const +{ + return ssl_; +} + +void ConnectionResp::setSsl(const EndpointSslConfig& value) +{ + ssl_ = value; + sslIsSet_ = true; +} + +bool ConnectionResp::sslIsSet() const +{ + return sslIsSet_; +} + +void ConnectionResp::unsetssl() +{ + sslIsSet_ = false; +} + +std::string ConnectionResp::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ConnectionResp::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ConnectionResp::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ConnectionResp::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +std::string ConnectionResp::getDescription() const +{ + return description_; +} + +void ConnectionResp::setDescription(const std::string& value) +{ + description_ = value; + descriptionIsSet_ = true; +} + +bool ConnectionResp::descriptionIsSet() const +{ + return descriptionIsSet_; +} + +void ConnectionResp::unsetdescription() +{ + descriptionIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/CreateConnectionReq.cpp b/drs/src/v5/model/CreateConnectionReq.cpp new file mode 100644 index 000000000..f701781a5 --- /dev/null +++ b/drs/src/v5/model/CreateConnectionReq.cpp @@ -0,0 +1,354 @@ + + +#include "huaweicloud/drs/v5/model/CreateConnectionReq.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +CreateConnectionReq::CreateConnectionReq() +{ + name_ = ""; + nameIsSet_ = false; + dbType_ = ""; + dbTypeIsSet_ = false; + configIsSet_ = false; + description_ = ""; + descriptionIsSet_ = false; + endpointIsSet_ = false; + vpcIsSet_ = false; + sslIsSet_ = false; + cloudIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +CreateConnectionReq::~CreateConnectionReq() = default; + +void CreateConnectionReq::validate() +{ +} + +web::json::value CreateConnectionReq::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(nameIsSet_) { + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); + } + if(dbTypeIsSet_) { + val[utility::conversions::to_string_t("db_type")] = ModelBase::toJson(dbType_); + } + if(configIsSet_) { + val[utility::conversions::to_string_t("config")] = ModelBase::toJson(config_); + } + if(descriptionIsSet_) { + val[utility::conversions::to_string_t("description")] = ModelBase::toJson(description_); + } + if(endpointIsSet_) { + val[utility::conversions::to_string_t("endpoint")] = ModelBase::toJson(endpoint_); + } + if(vpcIsSet_) { + val[utility::conversions::to_string_t("vpc")] = ModelBase::toJson(vpc_); + } + if(sslIsSet_) { + val[utility::conversions::to_string_t("ssl")] = ModelBase::toJson(ssl_); + } + if(cloudIsSet_) { + val[utility::conversions::to_string_t("cloud")] = ModelBase::toJson(cloud_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool CreateConnectionReq::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("db_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("db_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDbType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("config"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("config")); + if(!fieldValue.is_null()) + { + ConnectionConfig refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConfig(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("description"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("description")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDescription(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("endpoint"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("endpoint")); + if(!fieldValue.is_null()) + { + BaseEndpoint refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEndpoint(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("vpc"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("vpc")); + if(!fieldValue.is_null()) + { + CloudVpcInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setVpc(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ssl"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ssl")); + if(!fieldValue.is_null()) + { + EndpointSslConfig refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSsl(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("cloud"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cloud")); + if(!fieldValue.is_null()) + { + CloudBaseInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCloud(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 CreateConnectionReq::getName() const +{ + return name_; +} + +void CreateConnectionReq::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool CreateConnectionReq::nameIsSet() const +{ + return nameIsSet_; +} + +void CreateConnectionReq::unsetname() +{ + nameIsSet_ = false; +} + +std::string CreateConnectionReq::getDbType() const +{ + return dbType_; +} + +void CreateConnectionReq::setDbType(const std::string& value) +{ + dbType_ = value; + dbTypeIsSet_ = true; +} + +bool CreateConnectionReq::dbTypeIsSet() const +{ + return dbTypeIsSet_; +} + +void CreateConnectionReq::unsetdbType() +{ + dbTypeIsSet_ = false; +} + +ConnectionConfig CreateConnectionReq::getConfig() const +{ + return config_; +} + +void CreateConnectionReq::setConfig(const ConnectionConfig& value) +{ + config_ = value; + configIsSet_ = true; +} + +bool CreateConnectionReq::configIsSet() const +{ + return configIsSet_; +} + +void CreateConnectionReq::unsetconfig() +{ + configIsSet_ = false; +} + +std::string CreateConnectionReq::getDescription() const +{ + return description_; +} + +void CreateConnectionReq::setDescription(const std::string& value) +{ + description_ = value; + descriptionIsSet_ = true; +} + +bool CreateConnectionReq::descriptionIsSet() const +{ + return descriptionIsSet_; +} + +void CreateConnectionReq::unsetdescription() +{ + descriptionIsSet_ = false; +} + +BaseEndpoint CreateConnectionReq::getEndpoint() const +{ + return endpoint_; +} + +void CreateConnectionReq::setEndpoint(const BaseEndpoint& value) +{ + endpoint_ = value; + endpointIsSet_ = true; +} + +bool CreateConnectionReq::endpointIsSet() const +{ + return endpointIsSet_; +} + +void CreateConnectionReq::unsetendpoint() +{ + endpointIsSet_ = false; +} + +CloudVpcInfo CreateConnectionReq::getVpc() const +{ + return vpc_; +} + +void CreateConnectionReq::setVpc(const CloudVpcInfo& value) +{ + vpc_ = value; + vpcIsSet_ = true; +} + +bool CreateConnectionReq::vpcIsSet() const +{ + return vpcIsSet_; +} + +void CreateConnectionReq::unsetvpc() +{ + vpcIsSet_ = false; +} + +EndpointSslConfig CreateConnectionReq::getSsl() const +{ + return ssl_; +} + +void CreateConnectionReq::setSsl(const EndpointSslConfig& value) +{ + ssl_ = value; + sslIsSet_ = true; +} + +bool CreateConnectionReq::sslIsSet() const +{ + return sslIsSet_; +} + +void CreateConnectionReq::unsetssl() +{ + sslIsSet_ = false; +} + +CloudBaseInfo CreateConnectionReq::getCloud() const +{ + return cloud_; +} + +void CreateConnectionReq::setCloud(const CloudBaseInfo& value) +{ + cloud_ = value; + cloudIsSet_ = true; +} + +bool CreateConnectionReq::cloudIsSet() const +{ + return cloudIsSet_; +} + +void CreateConnectionReq::unsetcloud() +{ + cloudIsSet_ = false; +} + +std::string CreateConnectionReq::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void CreateConnectionReq::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool CreateConnectionReq::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void CreateConnectionReq::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/CreateConnectionRequest.cpp b/drs/src/v5/model/CreateConnectionRequest.cpp new file mode 100644 index 000000000..1ac7232c0 --- /dev/null +++ b/drs/src/v5/model/CreateConnectionRequest.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/drs/v5/model/CreateConnectionRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +CreateConnectionRequest::CreateConnectionRequest() +{ + xLanguage_ = ""; + xLanguageIsSet_ = false; + bodyIsSet_ = false; +} + +CreateConnectionRequest::~CreateConnectionRequest() = default; + +void CreateConnectionRequest::validate() +{ +} + +web::json::value CreateConnectionRequest::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 CreateConnectionRequest::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()) + { + CreateConnectionReq refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string CreateConnectionRequest::getXLanguage() const +{ + return xLanguage_; +} + +void CreateConnectionRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool CreateConnectionRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void CreateConnectionRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +CreateConnectionReq CreateConnectionRequest::getBody() const +{ + return body_; +} + +void CreateConnectionRequest::setBody(const CreateConnectionReq& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool CreateConnectionRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void CreateConnectionRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/CreateConnectionResponse.cpp b/drs/src/v5/model/CreateConnectionResponse.cpp new file mode 100644 index 000000000..14e5dce73 --- /dev/null +++ b/drs/src/v5/model/CreateConnectionResponse.cpp @@ -0,0 +1,390 @@ + + +#include "huaweicloud/drs/v5/model/CreateConnectionResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +CreateConnectionResponse::CreateConnectionResponse() +{ + connectionId_ = ""; + connectionIdIsSet_ = false; + name_ = ""; + nameIsSet_ = false; + createTime_ = 0L; + createTimeIsSet_ = false; + dbType_ = ""; + dbTypeIsSet_ = false; + configIsSet_ = false; + endpointIsSet_ = false; + vpcIsSet_ = false; + sslIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; + description_ = ""; + descriptionIsSet_ = false; +} + +CreateConnectionResponse::~CreateConnectionResponse() = default; + +void CreateConnectionResponse::validate() +{ +} + +web::json::value CreateConnectionResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(connectionIdIsSet_) { + val[utility::conversions::to_string_t("connection_id")] = ModelBase::toJson(connectionId_); + } + if(nameIsSet_) { + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); + } + if(createTimeIsSet_) { + val[utility::conversions::to_string_t("create_time")] = ModelBase::toJson(createTime_); + } + if(dbTypeIsSet_) { + val[utility::conversions::to_string_t("db_type")] = ModelBase::toJson(dbType_); + } + if(configIsSet_) { + val[utility::conversions::to_string_t("config")] = ModelBase::toJson(config_); + } + if(endpointIsSet_) { + val[utility::conversions::to_string_t("endpoint")] = ModelBase::toJson(endpoint_); + } + if(vpcIsSet_) { + val[utility::conversions::to_string_t("vpc")] = ModelBase::toJson(vpc_); + } + if(sslIsSet_) { + val[utility::conversions::to_string_t("ssl")] = ModelBase::toJson(ssl_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + if(descriptionIsSet_) { + val[utility::conversions::to_string_t("description")] = ModelBase::toJson(description_); + } + + return val; +} +bool CreateConnectionResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("connection_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("connection_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConnectionId(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("create_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("create_time")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCreateTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("db_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("db_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDbType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("config"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("config")); + if(!fieldValue.is_null()) + { + ConnectionConfig refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConfig(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("endpoint"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("endpoint")); + if(!fieldValue.is_null()) + { + BaseEndpoint refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEndpoint(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("vpc"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("vpc")); + if(!fieldValue.is_null()) + { + CloudVpcInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setVpc(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ssl"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ssl")); + if(!fieldValue.is_null()) + { + EndpointSslConfig refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSsl(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("description"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("description")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDescription(refVal); + } + } + return ok; +} + + +std::string CreateConnectionResponse::getConnectionId() const +{ + return connectionId_; +} + +void CreateConnectionResponse::setConnectionId(const std::string& value) +{ + connectionId_ = value; + connectionIdIsSet_ = true; +} + +bool CreateConnectionResponse::connectionIdIsSet() const +{ + return connectionIdIsSet_; +} + +void CreateConnectionResponse::unsetconnectionId() +{ + connectionIdIsSet_ = false; +} + +std::string CreateConnectionResponse::getName() const +{ + return name_; +} + +void CreateConnectionResponse::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool CreateConnectionResponse::nameIsSet() const +{ + return nameIsSet_; +} + +void CreateConnectionResponse::unsetname() +{ + nameIsSet_ = false; +} + +int64_t CreateConnectionResponse::getCreateTime() const +{ + return createTime_; +} + +void CreateConnectionResponse::setCreateTime(int64_t value) +{ + createTime_ = value; + createTimeIsSet_ = true; +} + +bool CreateConnectionResponse::createTimeIsSet() const +{ + return createTimeIsSet_; +} + +void CreateConnectionResponse::unsetcreateTime() +{ + createTimeIsSet_ = false; +} + +std::string CreateConnectionResponse::getDbType() const +{ + return dbType_; +} + +void CreateConnectionResponse::setDbType(const std::string& value) +{ + dbType_ = value; + dbTypeIsSet_ = true; +} + +bool CreateConnectionResponse::dbTypeIsSet() const +{ + return dbTypeIsSet_; +} + +void CreateConnectionResponse::unsetdbType() +{ + dbTypeIsSet_ = false; +} + +ConnectionConfig CreateConnectionResponse::getConfig() const +{ + return config_; +} + +void CreateConnectionResponse::setConfig(const ConnectionConfig& value) +{ + config_ = value; + configIsSet_ = true; +} + +bool CreateConnectionResponse::configIsSet() const +{ + return configIsSet_; +} + +void CreateConnectionResponse::unsetconfig() +{ + configIsSet_ = false; +} + +BaseEndpoint CreateConnectionResponse::getEndpoint() const +{ + return endpoint_; +} + +void CreateConnectionResponse::setEndpoint(const BaseEndpoint& value) +{ + endpoint_ = value; + endpointIsSet_ = true; +} + +bool CreateConnectionResponse::endpointIsSet() const +{ + return endpointIsSet_; +} + +void CreateConnectionResponse::unsetendpoint() +{ + endpointIsSet_ = false; +} + +CloudVpcInfo CreateConnectionResponse::getVpc() const +{ + return vpc_; +} + +void CreateConnectionResponse::setVpc(const CloudVpcInfo& value) +{ + vpc_ = value; + vpcIsSet_ = true; +} + +bool CreateConnectionResponse::vpcIsSet() const +{ + return vpcIsSet_; +} + +void CreateConnectionResponse::unsetvpc() +{ + vpcIsSet_ = false; +} + +EndpointSslConfig CreateConnectionResponse::getSsl() const +{ + return ssl_; +} + +void CreateConnectionResponse::setSsl(const EndpointSslConfig& value) +{ + ssl_ = value; + sslIsSet_ = true; +} + +bool CreateConnectionResponse::sslIsSet() const +{ + return sslIsSet_; +} + +void CreateConnectionResponse::unsetssl() +{ + sslIsSet_ = false; +} + +std::string CreateConnectionResponse::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void CreateConnectionResponse::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool CreateConnectionResponse::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void CreateConnectionResponse::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +std::string CreateConnectionResponse::getDescription() const +{ + return description_; +} + +void CreateConnectionResponse::setDescription(const std::string& value) +{ + description_ = value; + descriptionIsSet_ = true; +} + +bool CreateConnectionResponse::descriptionIsSet() const +{ + return descriptionIsSet_; +} + +void CreateConnectionResponse::unsetdescription() +{ + descriptionIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/CreateOfflineTaskReq.cpp b/drs/src/v5/model/CreateOfflineTaskReq.cpp new file mode 100644 index 000000000..c9e1351ab --- /dev/null +++ b/drs/src/v5/model/CreateOfflineTaskReq.cpp @@ -0,0 +1,180 @@ + + +#include "huaweicloud/drs/v5/model/CreateOfflineTaskReq.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +CreateOfflineTaskReq::CreateOfflineTaskReq() +{ + baseInfoIsSet_ = false; + targetDbInfoIsSet_ = false; + backupInfoIsSet_ = false; + optionsIsSet_ = false; +} + +CreateOfflineTaskReq::~CreateOfflineTaskReq() = default; + +void CreateOfflineTaskReq::validate() +{ +} + +web::json::value CreateOfflineTaskReq::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(baseInfoIsSet_) { + val[utility::conversions::to_string_t("base_info")] = ModelBase::toJson(baseInfo_); + } + if(targetDbInfoIsSet_) { + val[utility::conversions::to_string_t("target_db_info")] = ModelBase::toJson(targetDbInfo_); + } + if(backupInfoIsSet_) { + val[utility::conversions::to_string_t("backup_info")] = ModelBase::toJson(backupInfo_); + } + if(optionsIsSet_) { + val[utility::conversions::to_string_t("options")] = ModelBase::toJson(options_); + } + + return val; +} +bool CreateOfflineTaskReq::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("base_info"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("base_info")); + if(!fieldValue.is_null()) + { + BackupJobBaseInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBaseInfo(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("target_db_info"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("target_db_info")); + if(!fieldValue.is_null()) + { + BackupJobEndpointInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTargetDbInfo(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("backup_info"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("backup_info")); + if(!fieldValue.is_null()) + { + BackupInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBackupInfo(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("options"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("options")); + if(!fieldValue.is_null()) + { + BackupRestoreOptionInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOptions(refVal); + } + } + return ok; +} + + +BackupJobBaseInfo CreateOfflineTaskReq::getBaseInfo() const +{ + return baseInfo_; +} + +void CreateOfflineTaskReq::setBaseInfo(const BackupJobBaseInfo& value) +{ + baseInfo_ = value; + baseInfoIsSet_ = true; +} + +bool CreateOfflineTaskReq::baseInfoIsSet() const +{ + return baseInfoIsSet_; +} + +void CreateOfflineTaskReq::unsetbaseInfo() +{ + baseInfoIsSet_ = false; +} + +BackupJobEndpointInfo CreateOfflineTaskReq::getTargetDbInfo() const +{ + return targetDbInfo_; +} + +void CreateOfflineTaskReq::setTargetDbInfo(const BackupJobEndpointInfo& value) +{ + targetDbInfo_ = value; + targetDbInfoIsSet_ = true; +} + +bool CreateOfflineTaskReq::targetDbInfoIsSet() const +{ + return targetDbInfoIsSet_; +} + +void CreateOfflineTaskReq::unsettargetDbInfo() +{ + targetDbInfoIsSet_ = false; +} + +BackupInfo CreateOfflineTaskReq::getBackupInfo() const +{ + return backupInfo_; +} + +void CreateOfflineTaskReq::setBackupInfo(const BackupInfo& value) +{ + backupInfo_ = value; + backupInfoIsSet_ = true; +} + +bool CreateOfflineTaskReq::backupInfoIsSet() const +{ + return backupInfoIsSet_; +} + +void CreateOfflineTaskReq::unsetbackupInfo() +{ + backupInfoIsSet_ = false; +} + +BackupRestoreOptionInfo CreateOfflineTaskReq::getOptions() const +{ + return options_; +} + +void CreateOfflineTaskReq::setOptions(const BackupRestoreOptionInfo& value) +{ + options_ = value; + optionsIsSet_ = true; +} + +bool CreateOfflineTaskReq::optionsIsSet() const +{ + return optionsIsSet_; +} + +void CreateOfflineTaskReq::unsetoptions() +{ + optionsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/CreateReplicationJobRequest.cpp b/drs/src/v5/model/CreateReplicationJobRequest.cpp new file mode 100644 index 000000000..214873382 --- /dev/null +++ b/drs/src/v5/model/CreateReplicationJobRequest.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/drs/v5/model/CreateReplicationJobRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +CreateReplicationJobRequest::CreateReplicationJobRequest() +{ + xLanguage_ = ""; + xLanguageIsSet_ = false; + bodyIsSet_ = false; +} + +CreateReplicationJobRequest::~CreateReplicationJobRequest() = default; + +void CreateReplicationJobRequest::validate() +{ +} + +web::json::value CreateReplicationJobRequest::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 CreateReplicationJobRequest::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()) + { + CreateOfflineTaskReq refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string CreateReplicationJobRequest::getXLanguage() const +{ + return xLanguage_; +} + +void CreateReplicationJobRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool CreateReplicationJobRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void CreateReplicationJobRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +CreateOfflineTaskReq CreateReplicationJobRequest::getBody() const +{ + return body_; +} + +void CreateReplicationJobRequest::setBody(const CreateOfflineTaskReq& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool CreateReplicationJobRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void CreateReplicationJobRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/CreateReplicationJobResponse.cpp b/drs/src/v5/model/CreateReplicationJobResponse.cpp new file mode 100644 index 000000000..52a43a0e2 --- /dev/null +++ b/drs/src/v5/model/CreateReplicationJobResponse.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/drs/v5/model/CreateReplicationJobResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +CreateReplicationJobResponse::CreateReplicationJobResponse() +{ + jobId_ = ""; + jobIdIsSet_ = false; +} + +CreateReplicationJobResponse::~CreateReplicationJobResponse() = default; + +void CreateReplicationJobResponse::validate() +{ +} + +web::json::value CreateReplicationJobResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(jobIdIsSet_) { + val[utility::conversions::to_string_t("job_id")] = ModelBase::toJson(jobId_); + } + + return val; +} +bool CreateReplicationJobResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("job_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("job_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setJobId(refVal); + } + } + return ok; +} + + +std::string CreateReplicationJobResponse::getJobId() const +{ + return jobId_; +} + +void CreateReplicationJobResponse::setJobId(const std::string& value) +{ + jobId_ = value; + jobIdIsSet_ = true; +} + +bool CreateReplicationJobResponse::jobIdIsSet() const +{ + return jobIdIsSet_; +} + +void CreateReplicationJobResponse::unsetjobId() +{ + jobIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/DdlAlarmResp.cpp b/drs/src/v5/model/DdlAlarmResp.cpp new file mode 100644 index 000000000..3f57cea8d --- /dev/null +++ b/drs/src/v5/model/DdlAlarmResp.cpp @@ -0,0 +1,324 @@ + + +#include "huaweicloud/drs/v5/model/DdlAlarmResp.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +DdlAlarmResp::DdlAlarmResp() +{ + seqno_ = 0L; + seqnoIsSet_ = false; + checkpoint_ = ""; + checkpointIsSet_ = false; + status_ = 0; + statusIsSet_ = false; + ddlTimestamp_ = 0L; + ddlTimestampIsSet_ = false; + ddlText_ = ""; + ddlTextIsSet_ = false; + exeResult_ = false; + exeResultIsSet_ = false; + recordTime_ = 0L; + recordTimeIsSet_ = false; + cleanTime_ = 0L; + cleanTimeIsSet_ = false; +} + +DdlAlarmResp::~DdlAlarmResp() = default; + +void DdlAlarmResp::validate() +{ +} + +web::json::value DdlAlarmResp::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(seqnoIsSet_) { + val[utility::conversions::to_string_t("seqno")] = ModelBase::toJson(seqno_); + } + if(checkpointIsSet_) { + val[utility::conversions::to_string_t("checkpoint")] = ModelBase::toJson(checkpoint_); + } + if(statusIsSet_) { + val[utility::conversions::to_string_t("status")] = ModelBase::toJson(status_); + } + if(ddlTimestampIsSet_) { + val[utility::conversions::to_string_t("ddl_timestamp")] = ModelBase::toJson(ddlTimestamp_); + } + if(ddlTextIsSet_) { + val[utility::conversions::to_string_t("ddl_text")] = ModelBase::toJson(ddlText_); + } + if(exeResultIsSet_) { + val[utility::conversions::to_string_t("exe_result")] = ModelBase::toJson(exeResult_); + } + if(recordTimeIsSet_) { + val[utility::conversions::to_string_t("record_time")] = ModelBase::toJson(recordTime_); + } + if(cleanTimeIsSet_) { + val[utility::conversions::to_string_t("clean_time")] = ModelBase::toJson(cleanTime_); + } + + return val; +} +bool DdlAlarmResp::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("seqno"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("seqno")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSeqno(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("checkpoint"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("checkpoint")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCheckpoint(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); + } + } + if(val.has_field(utility::conversions::to_string_t("ddl_timestamp"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ddl_timestamp")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDdlTimestamp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ddl_text"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ddl_text")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDdlText(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("exe_result"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("exe_result")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setExeResult(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("record_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("record_time")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRecordTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("clean_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("clean_time")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCleanTime(refVal); + } + } + return ok; +} + + +int64_t DdlAlarmResp::getSeqno() const +{ + return seqno_; +} + +void DdlAlarmResp::setSeqno(int64_t value) +{ + seqno_ = value; + seqnoIsSet_ = true; +} + +bool DdlAlarmResp::seqnoIsSet() const +{ + return seqnoIsSet_; +} + +void DdlAlarmResp::unsetseqno() +{ + seqnoIsSet_ = false; +} + +std::string DdlAlarmResp::getCheckpoint() const +{ + return checkpoint_; +} + +void DdlAlarmResp::setCheckpoint(const std::string& value) +{ + checkpoint_ = value; + checkpointIsSet_ = true; +} + +bool DdlAlarmResp::checkpointIsSet() const +{ + return checkpointIsSet_; +} + +void DdlAlarmResp::unsetcheckpoint() +{ + checkpointIsSet_ = false; +} + +int32_t DdlAlarmResp::getStatus() const +{ + return status_; +} + +void DdlAlarmResp::setStatus(int32_t value) +{ + status_ = value; + statusIsSet_ = true; +} + +bool DdlAlarmResp::statusIsSet() const +{ + return statusIsSet_; +} + +void DdlAlarmResp::unsetstatus() +{ + statusIsSet_ = false; +} + +int64_t DdlAlarmResp::getDdlTimestamp() const +{ + return ddlTimestamp_; +} + +void DdlAlarmResp::setDdlTimestamp(int64_t value) +{ + ddlTimestamp_ = value; + ddlTimestampIsSet_ = true; +} + +bool DdlAlarmResp::ddlTimestampIsSet() const +{ + return ddlTimestampIsSet_; +} + +void DdlAlarmResp::unsetddlTimestamp() +{ + ddlTimestampIsSet_ = false; +} + +std::string DdlAlarmResp::getDdlText() const +{ + return ddlText_; +} + +void DdlAlarmResp::setDdlText(const std::string& value) +{ + ddlText_ = value; + ddlTextIsSet_ = true; +} + +bool DdlAlarmResp::ddlTextIsSet() const +{ + return ddlTextIsSet_; +} + +void DdlAlarmResp::unsetddlText() +{ + ddlTextIsSet_ = false; +} + +bool DdlAlarmResp::isExeResult() const +{ + return exeResult_; +} + +void DdlAlarmResp::setExeResult(bool value) +{ + exeResult_ = value; + exeResultIsSet_ = true; +} + +bool DdlAlarmResp::exeResultIsSet() const +{ + return exeResultIsSet_; +} + +void DdlAlarmResp::unsetexeResult() +{ + exeResultIsSet_ = false; +} + +int64_t DdlAlarmResp::getRecordTime() const +{ + return recordTime_; +} + +void DdlAlarmResp::setRecordTime(int64_t value) +{ + recordTime_ = value; + recordTimeIsSet_ = true; +} + +bool DdlAlarmResp::recordTimeIsSet() const +{ + return recordTimeIsSet_; +} + +void DdlAlarmResp::unsetrecordTime() +{ + recordTimeIsSet_ = false; +} + +int64_t DdlAlarmResp::getCleanTime() const +{ + return cleanTime_; +} + +void DdlAlarmResp::setCleanTime(int64_t value) +{ + cleanTime_ = value; + cleanTimeIsSet_ = true; +} + +bool DdlAlarmResp::cleanTimeIsSet() const +{ + return cleanTimeIsSet_; +} + +void DdlAlarmResp::unsetcleanTime() +{ + cleanTimeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/DeleteConnectionRequest.cpp b/drs/src/v5/model/DeleteConnectionRequest.cpp new file mode 100644 index 000000000..1a1e1826c --- /dev/null +++ b/drs/src/v5/model/DeleteConnectionRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/drs/v5/model/DeleteConnectionRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +DeleteConnectionRequest::DeleteConnectionRequest() +{ + connectionId_ = ""; + connectionIdIsSet_ = false; + xLanguage_ = ""; + xLanguageIsSet_ = false; +} + +DeleteConnectionRequest::~DeleteConnectionRequest() = default; + +void DeleteConnectionRequest::validate() +{ +} + +web::json::value DeleteConnectionRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(connectionIdIsSet_) { + val[utility::conversions::to_string_t("connection_id")] = ModelBase::toJson(connectionId_); + } + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + + return val; +} +bool DeleteConnectionRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("connection_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("connection_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConnectionId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("X-Language"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("X-Language")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setXLanguage(refVal); + } + } + return ok; +} + + +std::string DeleteConnectionRequest::getConnectionId() const +{ + return connectionId_; +} + +void DeleteConnectionRequest::setConnectionId(const std::string& value) +{ + connectionId_ = value; + connectionIdIsSet_ = true; +} + +bool DeleteConnectionRequest::connectionIdIsSet() const +{ + return connectionIdIsSet_; +} + +void DeleteConnectionRequest::unsetconnectionId() +{ + connectionIdIsSet_ = false; +} + +std::string DeleteConnectionRequest::getXLanguage() const +{ + return xLanguage_; +} + +void DeleteConnectionRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool DeleteConnectionRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void DeleteConnectionRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/DeleteConnectionResponse.cpp b/drs/src/v5/model/DeleteConnectionResponse.cpp new file mode 100644 index 000000000..0f2b05e1b --- /dev/null +++ b/drs/src/v5/model/DeleteConnectionResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/drs/v5/model/DeleteConnectionResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +DeleteConnectionResponse::DeleteConnectionResponse() +{ + bodyIsSet_ = false; +} + +DeleteConnectionResponse::~DeleteConnectionResponse() = default; + +void DeleteConnectionResponse::validate() +{ +} + +web::json::value DeleteConnectionResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool DeleteConnectionResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + Object refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +Object DeleteConnectionResponse::getBody() const +{ + return body_; +} + +void DeleteConnectionResponse::setBody(const Object& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool DeleteConnectionResponse::bodyIsSet() const +{ + return bodyIsSet_; +} + +void DeleteConnectionResponse::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/DeleteReplicationJobRequest.cpp b/drs/src/v5/model/DeleteReplicationJobRequest.cpp new file mode 100644 index 000000000..dc6421a1b --- /dev/null +++ b/drs/src/v5/model/DeleteReplicationJobRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/drs/v5/model/DeleteReplicationJobRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +DeleteReplicationJobRequest::DeleteReplicationJobRequest() +{ + xLanguage_ = ""; + xLanguageIsSet_ = false; + jobId_ = ""; + jobIdIsSet_ = false; +} + +DeleteReplicationJobRequest::~DeleteReplicationJobRequest() = default; + +void DeleteReplicationJobRequest::validate() +{ +} + +web::json::value DeleteReplicationJobRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + if(jobIdIsSet_) { + val[utility::conversions::to_string_t("job_id")] = ModelBase::toJson(jobId_); + } + + return val; +} +bool DeleteReplicationJobRequest::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("job_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("job_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setJobId(refVal); + } + } + return ok; +} + + +std::string DeleteReplicationJobRequest::getXLanguage() const +{ + return xLanguage_; +} + +void DeleteReplicationJobRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool DeleteReplicationJobRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void DeleteReplicationJobRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +std::string DeleteReplicationJobRequest::getJobId() const +{ + return jobId_; +} + +void DeleteReplicationJobRequest::setJobId(const std::string& value) +{ + jobId_ = value; + jobIdIsSet_ = true; +} + +bool DeleteReplicationJobRequest::jobIdIsSet() const +{ + return jobIdIsSet_; +} + +void DeleteReplicationJobRequest::unsetjobId() +{ + jobIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/DeleteReplicationJobResponse.cpp b/drs/src/v5/model/DeleteReplicationJobResponse.cpp new file mode 100644 index 000000000..2f0f0a1f7 --- /dev/null +++ b/drs/src/v5/model/DeleteReplicationJobResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/drs/v5/model/DeleteReplicationJobResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +DeleteReplicationJobResponse::DeleteReplicationJobResponse() +{ + bodyIsSet_ = false; +} + +DeleteReplicationJobResponse::~DeleteReplicationJobResponse() = default; + +void DeleteReplicationJobResponse::validate() +{ +} + +web::json::value DeleteReplicationJobResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool DeleteReplicationJobResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + Object refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +Object DeleteReplicationJobResponse::getBody() const +{ + return body_; +} + +void DeleteReplicationJobResponse::setBody(const Object& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool DeleteReplicationJobResponse::bodyIsSet() const +{ + return bodyIsSet_; +} + +void DeleteReplicationJobResponse::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ListConnectionsRequest.cpp b/drs/src/v5/model/ListConnectionsRequest.cpp new file mode 100644 index 000000000..75578ecb3 --- /dev/null +++ b/drs/src/v5/model/ListConnectionsRequest.cpp @@ -0,0 +1,534 @@ + + +#include "huaweicloud/drs/v5/model/ListConnectionsRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ListConnectionsRequest::ListConnectionsRequest() +{ + xLanguage_ = ""; + xLanguageIsSet_ = false; + connectionId_ = ""; + connectionIdIsSet_ = false; + dbType_ = ""; + dbTypeIsSet_ = false; + name_ = ""; + nameIsSet_ = false; + instId_ = ""; + instIdIsSet_ = false; + ip_ = ""; + ipIsSet_ = false; + description_ = ""; + descriptionIsSet_ = false; + createTime_ = ""; + createTimeIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; + offset_ = 0; + offsetIsSet_ = false; + limit_ = 0; + limitIsSet_ = false; + fetchAll_ = false; + fetchAllIsSet_ = false; + sortKey_ = ""; + sortKeyIsSet_ = false; + sortDir_ = ""; + sortDirIsSet_ = false; +} + +ListConnectionsRequest::~ListConnectionsRequest() = default; + +void ListConnectionsRequest::validate() +{ +} + +web::json::value ListConnectionsRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + if(connectionIdIsSet_) { + val[utility::conversions::to_string_t("connection_id")] = ModelBase::toJson(connectionId_); + } + if(dbTypeIsSet_) { + val[utility::conversions::to_string_t("db_type")] = ModelBase::toJson(dbType_); + } + if(nameIsSet_) { + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); + } + if(instIdIsSet_) { + val[utility::conversions::to_string_t("inst_id")] = ModelBase::toJson(instId_); + } + if(ipIsSet_) { + val[utility::conversions::to_string_t("ip")] = ModelBase::toJson(ip_); + } + if(descriptionIsSet_) { + val[utility::conversions::to_string_t("description")] = ModelBase::toJson(description_); + } + if(createTimeIsSet_) { + val[utility::conversions::to_string_t("create_time")] = ModelBase::toJson(createTime_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + if(offsetIsSet_) { + val[utility::conversions::to_string_t("offset")] = ModelBase::toJson(offset_); + } + if(limitIsSet_) { + val[utility::conversions::to_string_t("limit")] = ModelBase::toJson(limit_); + } + if(fetchAllIsSet_) { + val[utility::conversions::to_string_t("fetch_all")] = ModelBase::toJson(fetchAll_); + } + if(sortKeyIsSet_) { + val[utility::conversions::to_string_t("sort_key")] = ModelBase::toJson(sortKey_); + } + if(sortDirIsSet_) { + val[utility::conversions::to_string_t("sort_dir")] = ModelBase::toJson(sortDir_); + } + + return val; +} +bool ListConnectionsRequest::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("connection_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("connection_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConnectionId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("db_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("db_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDbType(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("inst_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("inst_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ip"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ip")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIp(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("description"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("description")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDescription(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("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("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); + } + } + if(val.has_field(utility::conversions::to_string_t("fetch_all"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fetch_all")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFetchAll(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("sort_key"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sort_key")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSortKey(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("sort_dir"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sort_dir")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSortDir(refVal); + } + } + return ok; +} + + +std::string ListConnectionsRequest::getXLanguage() const +{ + return xLanguage_; +} + +void ListConnectionsRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool ListConnectionsRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void ListConnectionsRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +std::string ListConnectionsRequest::getConnectionId() const +{ + return connectionId_; +} + +void ListConnectionsRequest::setConnectionId(const std::string& value) +{ + connectionId_ = value; + connectionIdIsSet_ = true; +} + +bool ListConnectionsRequest::connectionIdIsSet() const +{ + return connectionIdIsSet_; +} + +void ListConnectionsRequest::unsetconnectionId() +{ + connectionIdIsSet_ = false; +} + +std::string ListConnectionsRequest::getDbType() const +{ + return dbType_; +} + +void ListConnectionsRequest::setDbType(const std::string& value) +{ + dbType_ = value; + dbTypeIsSet_ = true; +} + +bool ListConnectionsRequest::dbTypeIsSet() const +{ + return dbTypeIsSet_; +} + +void ListConnectionsRequest::unsetdbType() +{ + dbTypeIsSet_ = false; +} + +std::string ListConnectionsRequest::getName() const +{ + return name_; +} + +void ListConnectionsRequest::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool ListConnectionsRequest::nameIsSet() const +{ + return nameIsSet_; +} + +void ListConnectionsRequest::unsetname() +{ + nameIsSet_ = false; +} + +std::string ListConnectionsRequest::getInstId() const +{ + return instId_; +} + +void ListConnectionsRequest::setInstId(const std::string& value) +{ + instId_ = value; + instIdIsSet_ = true; +} + +bool ListConnectionsRequest::instIdIsSet() const +{ + return instIdIsSet_; +} + +void ListConnectionsRequest::unsetinstId() +{ + instIdIsSet_ = false; +} + +std::string ListConnectionsRequest::getIp() const +{ + return ip_; +} + +void ListConnectionsRequest::setIp(const std::string& value) +{ + ip_ = value; + ipIsSet_ = true; +} + +bool ListConnectionsRequest::ipIsSet() const +{ + return ipIsSet_; +} + +void ListConnectionsRequest::unsetip() +{ + ipIsSet_ = false; +} + +std::string ListConnectionsRequest::getDescription() const +{ + return description_; +} + +void ListConnectionsRequest::setDescription(const std::string& value) +{ + description_ = value; + descriptionIsSet_ = true; +} + +bool ListConnectionsRequest::descriptionIsSet() const +{ + return descriptionIsSet_; +} + +void ListConnectionsRequest::unsetdescription() +{ + descriptionIsSet_ = false; +} + +std::string ListConnectionsRequest::getCreateTime() const +{ + return createTime_; +} + +void ListConnectionsRequest::setCreateTime(const std::string& value) +{ + createTime_ = value; + createTimeIsSet_ = true; +} + +bool ListConnectionsRequest::createTimeIsSet() const +{ + return createTimeIsSet_; +} + +void ListConnectionsRequest::unsetcreateTime() +{ + createTimeIsSet_ = false; +} + +std::string ListConnectionsRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ListConnectionsRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ListConnectionsRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ListConnectionsRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +int32_t ListConnectionsRequest::getOffset() const +{ + return offset_; +} + +void ListConnectionsRequest::setOffset(int32_t value) +{ + offset_ = value; + offsetIsSet_ = true; +} + +bool ListConnectionsRequest::offsetIsSet() const +{ + return offsetIsSet_; +} + +void ListConnectionsRequest::unsetoffset() +{ + offsetIsSet_ = false; +} + +int32_t ListConnectionsRequest::getLimit() const +{ + return limit_; +} + +void ListConnectionsRequest::setLimit(int32_t value) +{ + limit_ = value; + limitIsSet_ = true; +} + +bool ListConnectionsRequest::limitIsSet() const +{ + return limitIsSet_; +} + +void ListConnectionsRequest::unsetlimit() +{ + limitIsSet_ = false; +} + +bool ListConnectionsRequest::isFetchAll() const +{ + return fetchAll_; +} + +void ListConnectionsRequest::setFetchAll(bool value) +{ + fetchAll_ = value; + fetchAllIsSet_ = true; +} + +bool ListConnectionsRequest::fetchAllIsSet() const +{ + return fetchAllIsSet_; +} + +void ListConnectionsRequest::unsetfetchAll() +{ + fetchAllIsSet_ = false; +} + +std::string ListConnectionsRequest::getSortKey() const +{ + return sortKey_; +} + +void ListConnectionsRequest::setSortKey(const std::string& value) +{ + sortKey_ = value; + sortKeyIsSet_ = true; +} + +bool ListConnectionsRequest::sortKeyIsSet() const +{ + return sortKeyIsSet_; +} + +void ListConnectionsRequest::unsetsortKey() +{ + sortKeyIsSet_ = false; +} + +std::string ListConnectionsRequest::getSortDir() const +{ + return sortDir_; +} + +void ListConnectionsRequest::setSortDir(const std::string& value) +{ + sortDir_ = value; + sortDirIsSet_ = true; +} + +bool ListConnectionsRequest::sortDirIsSet() const +{ + return sortDirIsSet_; +} + +void ListConnectionsRequest::unsetsortDir() +{ + sortDirIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ListConnectionsResponse.cpp b/drs/src/v5/model/ListConnectionsResponse.cpp new file mode 100644 index 000000000..81c07b1f1 --- /dev/null +++ b/drs/src/v5/model/ListConnectionsResponse.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/drs/v5/model/ListConnectionsResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ListConnectionsResponse::ListConnectionsResponse() +{ + connectionsIsSet_ = false; + count_ = 0; + countIsSet_ = false; +} + +ListConnectionsResponse::~ListConnectionsResponse() = default; + +void ListConnectionsResponse::validate() +{ +} + +web::json::value ListConnectionsResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(connectionsIsSet_) { + val[utility::conversions::to_string_t("connections")] = ModelBase::toJson(connections_); + } + if(countIsSet_) { + val[utility::conversions::to_string_t("count")] = ModelBase::toJson(count_); + } + + return val; +} +bool ListConnectionsResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("connections"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("connections")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConnections(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("count"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("count")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCount(refVal); + } + } + return ok; +} + + +std::vector& ListConnectionsResponse::getConnections() +{ + return connections_; +} + +void ListConnectionsResponse::setConnections(const std::vector& value) +{ + connections_ = value; + connectionsIsSet_ = true; +} + +bool ListConnectionsResponse::connectionsIsSet() const +{ + return connectionsIsSet_; +} + +void ListConnectionsResponse::unsetconnections() +{ + connectionsIsSet_ = false; +} + +int32_t ListConnectionsResponse::getCount() const +{ + return count_; +} + +void ListConnectionsResponse::setCount(int32_t value) +{ + count_ = value; + countIsSet_ = true; +} + +bool ListConnectionsResponse::countIsSet() const +{ + return countIsSet_; +} + +void ListConnectionsResponse::unsetcount() +{ + countIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ListJobDdlsRequest.cpp b/drs/src/v5/model/ListJobDdlsRequest.cpp new file mode 100644 index 000000000..cb1505995 --- /dev/null +++ b/drs/src/v5/model/ListJobDdlsRequest.cpp @@ -0,0 +1,289 @@ + + +#include "huaweicloud/drs/v5/model/ListJobDdlsRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ListJobDdlsRequest::ListJobDdlsRequest() +{ + xLanguage_ = ""; + xLanguageIsSet_ = false; + offset_ = 0; + offsetIsSet_ = false; + limit_ = 0; + limitIsSet_ = false; + startSeqNo_ = 0L; + startSeqNoIsSet_ = false; + endSeqNo_ = 0L; + endSeqNoIsSet_ = false; + status_ = 0; + statusIsSet_ = false; + jobId_ = ""; + jobIdIsSet_ = false; +} + +ListJobDdlsRequest::~ListJobDdlsRequest() = default; + +void ListJobDdlsRequest::validate() +{ +} + +web::json::value ListJobDdlsRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + if(offsetIsSet_) { + val[utility::conversions::to_string_t("offset")] = ModelBase::toJson(offset_); + } + if(limitIsSet_) { + val[utility::conversions::to_string_t("limit")] = ModelBase::toJson(limit_); + } + if(startSeqNoIsSet_) { + val[utility::conversions::to_string_t("start_seq_no")] = ModelBase::toJson(startSeqNo_); + } + if(endSeqNoIsSet_) { + val[utility::conversions::to_string_t("end_seq_no")] = ModelBase::toJson(endSeqNo_); + } + if(statusIsSet_) { + val[utility::conversions::to_string_t("status")] = ModelBase::toJson(status_); + } + if(jobIdIsSet_) { + val[utility::conversions::to_string_t("job_id")] = ModelBase::toJson(jobId_); + } + + return val; +} +bool ListJobDdlsRequest::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("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); + } + } + if(val.has_field(utility::conversions::to_string_t("start_seq_no"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("start_seq_no")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setStartSeqNo(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("end_seq_no"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("end_seq_no")); + if(!fieldValue.is_null()) + { + int64_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEndSeqNo(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); + } + } + if(val.has_field(utility::conversions::to_string_t("job_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("job_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setJobId(refVal); + } + } + return ok; +} + + +std::string ListJobDdlsRequest::getXLanguage() const +{ + return xLanguage_; +} + +void ListJobDdlsRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool ListJobDdlsRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void ListJobDdlsRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +int32_t ListJobDdlsRequest::getOffset() const +{ + return offset_; +} + +void ListJobDdlsRequest::setOffset(int32_t value) +{ + offset_ = value; + offsetIsSet_ = true; +} + +bool ListJobDdlsRequest::offsetIsSet() const +{ + return offsetIsSet_; +} + +void ListJobDdlsRequest::unsetoffset() +{ + offsetIsSet_ = false; +} + +int32_t ListJobDdlsRequest::getLimit() const +{ + return limit_; +} + +void ListJobDdlsRequest::setLimit(int32_t value) +{ + limit_ = value; + limitIsSet_ = true; +} + +bool ListJobDdlsRequest::limitIsSet() const +{ + return limitIsSet_; +} + +void ListJobDdlsRequest::unsetlimit() +{ + limitIsSet_ = false; +} + +int64_t ListJobDdlsRequest::getStartSeqNo() const +{ + return startSeqNo_; +} + +void ListJobDdlsRequest::setStartSeqNo(int64_t value) +{ + startSeqNo_ = value; + startSeqNoIsSet_ = true; +} + +bool ListJobDdlsRequest::startSeqNoIsSet() const +{ + return startSeqNoIsSet_; +} + +void ListJobDdlsRequest::unsetstartSeqNo() +{ + startSeqNoIsSet_ = false; +} + +int64_t ListJobDdlsRequest::getEndSeqNo() const +{ + return endSeqNo_; +} + +void ListJobDdlsRequest::setEndSeqNo(int64_t value) +{ + endSeqNo_ = value; + endSeqNoIsSet_ = true; +} + +bool ListJobDdlsRequest::endSeqNoIsSet() const +{ + return endSeqNoIsSet_; +} + +void ListJobDdlsRequest::unsetendSeqNo() +{ + endSeqNoIsSet_ = false; +} + +int32_t ListJobDdlsRequest::getStatus() const +{ + return status_; +} + +void ListJobDdlsRequest::setStatus(int32_t value) +{ + status_ = value; + statusIsSet_ = true; +} + +bool ListJobDdlsRequest::statusIsSet() const +{ + return statusIsSet_; +} + +void ListJobDdlsRequest::unsetstatus() +{ + statusIsSet_ = false; +} + +std::string ListJobDdlsRequest::getJobId() const +{ + return jobId_; +} + +void ListJobDdlsRequest::setJobId(const std::string& value) +{ + jobId_ = value; + jobIdIsSet_ = true; +} + +bool ListJobDdlsRequest::jobIdIsSet() const +{ + return jobIdIsSet_; +} + +void ListJobDdlsRequest::unsetjobId() +{ + jobIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ListJobDdlsResponse.cpp b/drs/src/v5/model/ListJobDdlsResponse.cpp new file mode 100644 index 000000000..42748db14 --- /dev/null +++ b/drs/src/v5/model/ListJobDdlsResponse.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/drs/v5/model/ListJobDdlsResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ListJobDdlsResponse::ListJobDdlsResponse() +{ + ddlListIsSet_ = false; + count_ = 0; + countIsSet_ = false; +} + +ListJobDdlsResponse::~ListJobDdlsResponse() = default; + +void ListJobDdlsResponse::validate() +{ +} + +web::json::value ListJobDdlsResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(ddlListIsSet_) { + val[utility::conversions::to_string_t("ddl_list")] = ModelBase::toJson(ddlList_); + } + if(countIsSet_) { + val[utility::conversions::to_string_t("count")] = ModelBase::toJson(count_); + } + + return val; +} +bool ListJobDdlsResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("ddl_list"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ddl_list")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDdlList(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("count"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("count")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCount(refVal); + } + } + return ok; +} + + +std::vector& ListJobDdlsResponse::getDdlList() +{ + return ddlList_; +} + +void ListJobDdlsResponse::setDdlList(const std::vector& value) +{ + ddlList_ = value; + ddlListIsSet_ = true; +} + +bool ListJobDdlsResponse::ddlListIsSet() const +{ + return ddlListIsSet_; +} + +void ListJobDdlsResponse::unsetddlList() +{ + ddlListIsSet_ = false; +} + +int32_t ListJobDdlsResponse::getCount() const +{ + return count_; +} + +void ListJobDdlsResponse::setCount(int32_t value) +{ + count_ = value; + countIsSet_ = true; +} + +bool ListJobDdlsResponse::countIsSet() const +{ + return countIsSet_; +} + +void ListJobDdlsResponse::unsetcount() +{ + countIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ListReplicationJobsRequest.cpp b/drs/src/v5/model/ListReplicationJobsRequest.cpp new file mode 100644 index 000000000..4fb271c38 --- /dev/null +++ b/drs/src/v5/model/ListReplicationJobsRequest.cpp @@ -0,0 +1,498 @@ + + +#include "huaweicloud/drs/v5/model/ListReplicationJobsRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ListReplicationJobsRequest::ListReplicationJobsRequest() +{ + xLanguage_ = ""; + xLanguageIsSet_ = false; + name_ = ""; + nameIsSet_ = false; + status_ = ""; + statusIsSet_ = false; + dbsInstanceIdsIsSet_ = false; + description_ = ""; + descriptionIsSet_ = false; + createAt_ = ""; + createAtIsSet_ = false; + completedAt_ = ""; + completedAtIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; + tags_ = ""; + tagsIsSet_ = false; + limit_ = 0; + limitIsSet_ = false; + offset_ = 0; + offsetIsSet_ = false; + sortKey_ = ""; + sortKeyIsSet_ = false; + sortDir_ = ""; + sortDirIsSet_ = false; +} + +ListReplicationJobsRequest::~ListReplicationJobsRequest() = default; + +void ListReplicationJobsRequest::validate() +{ +} + +web::json::value ListReplicationJobsRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + if(nameIsSet_) { + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); + } + if(statusIsSet_) { + val[utility::conversions::to_string_t("status")] = ModelBase::toJson(status_); + } + if(dbsInstanceIdsIsSet_) { + val[utility::conversions::to_string_t("dbs_instance_ids")] = ModelBase::toJson(dbsInstanceIds_); + } + if(descriptionIsSet_) { + val[utility::conversions::to_string_t("description")] = ModelBase::toJson(description_); + } + if(createAtIsSet_) { + val[utility::conversions::to_string_t("create_at")] = ModelBase::toJson(createAt_); + } + if(completedAtIsSet_) { + val[utility::conversions::to_string_t("completed_at")] = ModelBase::toJson(completedAt_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + if(tagsIsSet_) { + val[utility::conversions::to_string_t("tags")] = ModelBase::toJson(tags_); + } + 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(sortKeyIsSet_) { + val[utility::conversions::to_string_t("sort_key")] = ModelBase::toJson(sortKey_); + } + if(sortDirIsSet_) { + val[utility::conversions::to_string_t("sort_dir")] = ModelBase::toJson(sortDir_); + } + + return val; +} +bool ListReplicationJobsRequest::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("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("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("dbs_instance_ids"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("dbs_instance_ids")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDbsInstanceIds(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("description"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("description")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDescription(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("create_at"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("create_at")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCreateAt(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("completed_at"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("completed_at")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCompletedAt(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("tags"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("tags")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTags(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("sort_key"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sort_key")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSortKey(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("sort_dir"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("sort_dir")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSortDir(refVal); + } + } + return ok; +} + + +std::string ListReplicationJobsRequest::getXLanguage() const +{ + return xLanguage_; +} + +void ListReplicationJobsRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool ListReplicationJobsRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void ListReplicationJobsRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +std::string ListReplicationJobsRequest::getName() const +{ + return name_; +} + +void ListReplicationJobsRequest::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool ListReplicationJobsRequest::nameIsSet() const +{ + return nameIsSet_; +} + +void ListReplicationJobsRequest::unsetname() +{ + nameIsSet_ = false; +} + +std::string ListReplicationJobsRequest::getStatus() const +{ + return status_; +} + +void ListReplicationJobsRequest::setStatus(const std::string& value) +{ + status_ = value; + statusIsSet_ = true; +} + +bool ListReplicationJobsRequest::statusIsSet() const +{ + return statusIsSet_; +} + +void ListReplicationJobsRequest::unsetstatus() +{ + statusIsSet_ = false; +} + +std::vector& ListReplicationJobsRequest::getDbsInstanceIds() +{ + return dbsInstanceIds_; +} + +void ListReplicationJobsRequest::setDbsInstanceIds(const std::vector& value) +{ + dbsInstanceIds_ = value; + dbsInstanceIdsIsSet_ = true; +} + +bool ListReplicationJobsRequest::dbsInstanceIdsIsSet() const +{ + return dbsInstanceIdsIsSet_; +} + +void ListReplicationJobsRequest::unsetdbsInstanceIds() +{ + dbsInstanceIdsIsSet_ = false; +} + +std::string ListReplicationJobsRequest::getDescription() const +{ + return description_; +} + +void ListReplicationJobsRequest::setDescription(const std::string& value) +{ + description_ = value; + descriptionIsSet_ = true; +} + +bool ListReplicationJobsRequest::descriptionIsSet() const +{ + return descriptionIsSet_; +} + +void ListReplicationJobsRequest::unsetdescription() +{ + descriptionIsSet_ = false; +} + +std::string ListReplicationJobsRequest::getCreateAt() const +{ + return createAt_; +} + +void ListReplicationJobsRequest::setCreateAt(const std::string& value) +{ + createAt_ = value; + createAtIsSet_ = true; +} + +bool ListReplicationJobsRequest::createAtIsSet() const +{ + return createAtIsSet_; +} + +void ListReplicationJobsRequest::unsetcreateAt() +{ + createAtIsSet_ = false; +} + +std::string ListReplicationJobsRequest::getCompletedAt() const +{ + return completedAt_; +} + +void ListReplicationJobsRequest::setCompletedAt(const std::string& value) +{ + completedAt_ = value; + completedAtIsSet_ = true; +} + +bool ListReplicationJobsRequest::completedAtIsSet() const +{ + return completedAtIsSet_; +} + +void ListReplicationJobsRequest::unsetcompletedAt() +{ + completedAtIsSet_ = false; +} + +std::string ListReplicationJobsRequest::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void ListReplicationJobsRequest::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool ListReplicationJobsRequest::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void ListReplicationJobsRequest::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +std::string ListReplicationJobsRequest::getTags() const +{ + return tags_; +} + +void ListReplicationJobsRequest::setTags(const std::string& value) +{ + tags_ = value; + tagsIsSet_ = true; +} + +bool ListReplicationJobsRequest::tagsIsSet() const +{ + return tagsIsSet_; +} + +void ListReplicationJobsRequest::unsettags() +{ + tagsIsSet_ = false; +} + +int32_t ListReplicationJobsRequest::getLimit() const +{ + return limit_; +} + +void ListReplicationJobsRequest::setLimit(int32_t value) +{ + limit_ = value; + limitIsSet_ = true; +} + +bool ListReplicationJobsRequest::limitIsSet() const +{ + return limitIsSet_; +} + +void ListReplicationJobsRequest::unsetlimit() +{ + limitIsSet_ = false; +} + +int32_t ListReplicationJobsRequest::getOffset() const +{ + return offset_; +} + +void ListReplicationJobsRequest::setOffset(int32_t value) +{ + offset_ = value; + offsetIsSet_ = true; +} + +bool ListReplicationJobsRequest::offsetIsSet() const +{ + return offsetIsSet_; +} + +void ListReplicationJobsRequest::unsetoffset() +{ + offsetIsSet_ = false; +} + +std::string ListReplicationJobsRequest::getSortKey() const +{ + return sortKey_; +} + +void ListReplicationJobsRequest::setSortKey(const std::string& value) +{ + sortKey_ = value; + sortKeyIsSet_ = true; +} + +bool ListReplicationJobsRequest::sortKeyIsSet() const +{ + return sortKeyIsSet_; +} + +void ListReplicationJobsRequest::unsetsortKey() +{ + sortKeyIsSet_ = false; +} + +std::string ListReplicationJobsRequest::getSortDir() const +{ + return sortDir_; +} + +void ListReplicationJobsRequest::setSortDir(const std::string& value) +{ + sortDir_ = value; + sortDirIsSet_ = true; +} + +bool ListReplicationJobsRequest::sortDirIsSet() const +{ + return sortDirIsSet_; +} + +void ListReplicationJobsRequest::unsetsortDir() +{ + sortDirIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ListReplicationJobsResponse.cpp b/drs/src/v5/model/ListReplicationJobsResponse.cpp new file mode 100644 index 000000000..1052b9168 --- /dev/null +++ b/drs/src/v5/model/ListReplicationJobsResponse.cpp @@ -0,0 +1,113 @@ + + +#include "huaweicloud/drs/v5/model/ListReplicationJobsResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ListReplicationJobsResponse::ListReplicationJobsResponse() +{ + count_ = 0; + countIsSet_ = false; + jobsIsSet_ = false; +} + +ListReplicationJobsResponse::~ListReplicationJobsResponse() = default; + +void ListReplicationJobsResponse::validate() +{ +} + +web::json::value ListReplicationJobsResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(countIsSet_) { + val[utility::conversions::to_string_t("count")] = ModelBase::toJson(count_); + } + if(jobsIsSet_) { + val[utility::conversions::to_string_t("jobs")] = ModelBase::toJson(jobs_); + } + + return val; +} +bool ListReplicationJobsResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("count"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("count")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCount(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("jobs"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("jobs")); + if(!fieldValue.is_null()) + { + std::vector refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setJobs(refVal); + } + } + return ok; +} + + +int32_t ListReplicationJobsResponse::getCount() const +{ + return count_; +} + +void ListReplicationJobsResponse::setCount(int32_t value) +{ + count_ = value; + countIsSet_ = true; +} + +bool ListReplicationJobsResponse::countIsSet() const +{ + return countIsSet_; +} + +void ListReplicationJobsResponse::unsetcount() +{ + countIsSet_ = false; +} + +std::vector& ListReplicationJobsResponse::getJobs() +{ + return jobs_; +} + +void ListReplicationJobsResponse::setJobs(const std::vector& value) +{ + jobs_ = value; + jobsIsSet_ = true; +} + +bool ListReplicationJobsResponse::jobsIsSet() const +{ + return jobsIsSet_; +} + +void ListReplicationJobsResponse::unsetjobs() +{ + jobsIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ModifyConnectionRequest.cpp b/drs/src/v5/model/ModifyConnectionRequest.cpp new file mode 100644 index 000000000..1d0c7941d --- /dev/null +++ b/drs/src/v5/model/ModifyConnectionRequest.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/drs/v5/model/ModifyConnectionRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ModifyConnectionRequest::ModifyConnectionRequest() +{ + xLanguage_ = ""; + xLanguageIsSet_ = false; + connectionId_ = ""; + connectionIdIsSet_ = false; + bodyIsSet_ = false; +} + +ModifyConnectionRequest::~ModifyConnectionRequest() = default; + +void ModifyConnectionRequest::validate() +{ +} + +web::json::value ModifyConnectionRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + if(connectionIdIsSet_) { + val[utility::conversions::to_string_t("connection_id")] = ModelBase::toJson(connectionId_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool ModifyConnectionRequest::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("connection_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("connection_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConnectionId(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()) + { + UpdateConnectionReq refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string ModifyConnectionRequest::getXLanguage() const +{ + return xLanguage_; +} + +void ModifyConnectionRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool ModifyConnectionRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void ModifyConnectionRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +std::string ModifyConnectionRequest::getConnectionId() const +{ + return connectionId_; +} + +void ModifyConnectionRequest::setConnectionId(const std::string& value) +{ + connectionId_ = value; + connectionIdIsSet_ = true; +} + +bool ModifyConnectionRequest::connectionIdIsSet() const +{ + return connectionIdIsSet_; +} + +void ModifyConnectionRequest::unsetconnectionId() +{ + connectionIdIsSet_ = false; +} + +UpdateConnectionReq ModifyConnectionRequest::getBody() const +{ + return body_; +} + +void ModifyConnectionRequest::setBody(const UpdateConnectionReq& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool ModifyConnectionRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void ModifyConnectionRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ModifyConnectionResponse.cpp b/drs/src/v5/model/ModifyConnectionResponse.cpp new file mode 100644 index 000000000..dd33e4b24 --- /dev/null +++ b/drs/src/v5/model/ModifyConnectionResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/drs/v5/model/ModifyConnectionResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ModifyConnectionResponse::ModifyConnectionResponse() +{ + bodyIsSet_ = false; +} + +ModifyConnectionResponse::~ModifyConnectionResponse() = default; + +void ModifyConnectionResponse::validate() +{ +} + +web::json::value ModifyConnectionResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool ModifyConnectionResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + Object refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +Object ModifyConnectionResponse::getBody() const +{ + return body_; +} + +void ModifyConnectionResponse::setBody(const Object& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool ModifyConnectionResponse::bodyIsSet() const +{ + return bodyIsSet_; +} + +void ModifyConnectionResponse::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ModifyOfflineTaskReq.cpp b/drs/src/v5/model/ModifyOfflineTaskReq.cpp new file mode 100644 index 000000000..7e1f168a9 --- /dev/null +++ b/drs/src/v5/model/ModifyOfflineTaskReq.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/drs/v5/model/ModifyOfflineTaskReq.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ModifyOfflineTaskReq::ModifyOfflineTaskReq() +{ + name_ = ""; + nameIsSet_ = false; + description_ = ""; + descriptionIsSet_ = false; +} + +ModifyOfflineTaskReq::~ModifyOfflineTaskReq() = default; + +void ModifyOfflineTaskReq::validate() +{ +} + +web::json::value ModifyOfflineTaskReq::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(nameIsSet_) { + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); + } + if(descriptionIsSet_) { + val[utility::conversions::to_string_t("description")] = ModelBase::toJson(description_); + } + + return val; +} +bool ModifyOfflineTaskReq::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("description"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("description")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDescription(refVal); + } + } + return ok; +} + + +std::string ModifyOfflineTaskReq::getName() const +{ + return name_; +} + +void ModifyOfflineTaskReq::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool ModifyOfflineTaskReq::nameIsSet() const +{ + return nameIsSet_; +} + +void ModifyOfflineTaskReq::unsetname() +{ + nameIsSet_ = false; +} + +std::string ModifyOfflineTaskReq::getDescription() const +{ + return description_; +} + +void ModifyOfflineTaskReq::setDescription(const std::string& value) +{ + description_ = value; + descriptionIsSet_ = true; +} + +bool ModifyOfflineTaskReq::descriptionIsSet() const +{ + return descriptionIsSet_; +} + +void ModifyOfflineTaskReq::unsetdescription() +{ + descriptionIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/OfflineTaskInfo.cpp b/drs/src/v5/model/OfflineTaskInfo.cpp new file mode 100644 index 000000000..a20727237 --- /dev/null +++ b/drs/src/v5/model/OfflineTaskInfo.cpp @@ -0,0 +1,359 @@ + + +#include "huaweicloud/drs/v5/model/OfflineTaskInfo.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +OfflineTaskInfo::OfflineTaskInfo() +{ + id_ = ""; + idIsSet_ = false; + name_ = ""; + nameIsSet_ = false; + status_ = ""; + statusIsSet_ = false; + engineType_ = ""; + engineTypeIsSet_ = false; + errorLog_ = ""; + errorLogIsSet_ = false; + description_ = ""; + descriptionIsSet_ = false; + createTime_ = ""; + createTimeIsSet_ = false; + finishTime_ = ""; + finishTimeIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +OfflineTaskInfo::~OfflineTaskInfo() = default; + +void OfflineTaskInfo::validate() +{ +} + +web::json::value OfflineTaskInfo::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(statusIsSet_) { + val[utility::conversions::to_string_t("status")] = ModelBase::toJson(status_); + } + if(engineTypeIsSet_) { + val[utility::conversions::to_string_t("engine_type")] = ModelBase::toJson(engineType_); + } + if(errorLogIsSet_) { + val[utility::conversions::to_string_t("error_log")] = ModelBase::toJson(errorLog_); + } + if(descriptionIsSet_) { + val[utility::conversions::to_string_t("description")] = ModelBase::toJson(description_); + } + if(createTimeIsSet_) { + val[utility::conversions::to_string_t("create_time")] = ModelBase::toJson(createTime_); + } + if(finishTimeIsSet_) { + val[utility::conversions::to_string_t("finish_time")] = ModelBase::toJson(finishTime_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool OfflineTaskInfo::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("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("engine_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("engine_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEngineType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("error_log"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("error_log")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setErrorLog(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("description"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("description")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDescription(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("finish_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("finish_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFinishTime(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 OfflineTaskInfo::getId() const +{ + return id_; +} + +void OfflineTaskInfo::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool OfflineTaskInfo::idIsSet() const +{ + return idIsSet_; +} + +void OfflineTaskInfo::unsetid() +{ + idIsSet_ = false; +} + +std::string OfflineTaskInfo::getName() const +{ + return name_; +} + +void OfflineTaskInfo::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool OfflineTaskInfo::nameIsSet() const +{ + return nameIsSet_; +} + +void OfflineTaskInfo::unsetname() +{ + nameIsSet_ = false; +} + +std::string OfflineTaskInfo::getStatus() const +{ + return status_; +} + +void OfflineTaskInfo::setStatus(const std::string& value) +{ + status_ = value; + statusIsSet_ = true; +} + +bool OfflineTaskInfo::statusIsSet() const +{ + return statusIsSet_; +} + +void OfflineTaskInfo::unsetstatus() +{ + statusIsSet_ = false; +} + +std::string OfflineTaskInfo::getEngineType() const +{ + return engineType_; +} + +void OfflineTaskInfo::setEngineType(const std::string& value) +{ + engineType_ = value; + engineTypeIsSet_ = true; +} + +bool OfflineTaskInfo::engineTypeIsSet() const +{ + return engineTypeIsSet_; +} + +void OfflineTaskInfo::unsetengineType() +{ + engineTypeIsSet_ = false; +} + +std::string OfflineTaskInfo::getErrorLog() const +{ + return errorLog_; +} + +void OfflineTaskInfo::setErrorLog(const std::string& value) +{ + errorLog_ = value; + errorLogIsSet_ = true; +} + +bool OfflineTaskInfo::errorLogIsSet() const +{ + return errorLogIsSet_; +} + +void OfflineTaskInfo::unseterrorLog() +{ + errorLogIsSet_ = false; +} + +std::string OfflineTaskInfo::getDescription() const +{ + return description_; +} + +void OfflineTaskInfo::setDescription(const std::string& value) +{ + description_ = value; + descriptionIsSet_ = true; +} + +bool OfflineTaskInfo::descriptionIsSet() const +{ + return descriptionIsSet_; +} + +void OfflineTaskInfo::unsetdescription() +{ + descriptionIsSet_ = false; +} + +std::string OfflineTaskInfo::getCreateTime() const +{ + return createTime_; +} + +void OfflineTaskInfo::setCreateTime(const std::string& value) +{ + createTime_ = value; + createTimeIsSet_ = true; +} + +bool OfflineTaskInfo::createTimeIsSet() const +{ + return createTimeIsSet_; +} + +void OfflineTaskInfo::unsetcreateTime() +{ + createTimeIsSet_ = false; +} + +std::string OfflineTaskInfo::getFinishTime() const +{ + return finishTime_; +} + +void OfflineTaskInfo::setFinishTime(const std::string& value) +{ + finishTime_ = value; + finishTimeIsSet_ = true; +} + +bool OfflineTaskInfo::finishTimeIsSet() const +{ + return finishTimeIsSet_; +} + +void OfflineTaskInfo::unsetfinishTime() +{ + finishTimeIsSet_ = false; +} + +std::string OfflineTaskInfo::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void OfflineTaskInfo::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool OfflineTaskInfo::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void OfflineTaskInfo::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ShowReplicationJobRequest.cpp b/drs/src/v5/model/ShowReplicationJobRequest.cpp new file mode 100644 index 000000000..ef1afac03 --- /dev/null +++ b/drs/src/v5/model/ShowReplicationJobRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/drs/v5/model/ShowReplicationJobRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ShowReplicationJobRequest::ShowReplicationJobRequest() +{ + jobId_ = ""; + jobIdIsSet_ = false; + xLanguage_ = ""; + xLanguageIsSet_ = false; +} + +ShowReplicationJobRequest::~ShowReplicationJobRequest() = default; + +void ShowReplicationJobRequest::validate() +{ +} + +web::json::value ShowReplicationJobRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(jobIdIsSet_) { + val[utility::conversions::to_string_t("job_id")] = ModelBase::toJson(jobId_); + } + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + + return val; +} +bool ShowReplicationJobRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("job_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("job_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setJobId(refVal); + } + } + 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); + } + } + return ok; +} + + +std::string ShowReplicationJobRequest::getJobId() const +{ + return jobId_; +} + +void ShowReplicationJobRequest::setJobId(const std::string& value) +{ + jobId_ = value; + jobIdIsSet_ = true; +} + +bool ShowReplicationJobRequest::jobIdIsSet() const +{ + return jobIdIsSet_; +} + +void ShowReplicationJobRequest::unsetjobId() +{ + jobIdIsSet_ = false; +} + +std::string ShowReplicationJobRequest::getXLanguage() const +{ + return xLanguage_; +} + +void ShowReplicationJobRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool ShowReplicationJobRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void ShowReplicationJobRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ShowReplicationJobResponse.cpp b/drs/src/v5/model/ShowReplicationJobResponse.cpp new file mode 100644 index 000000000..feb4f6a67 --- /dev/null +++ b/drs/src/v5/model/ShowReplicationJobResponse.cpp @@ -0,0 +1,425 @@ + + +#include "huaweicloud/drs/v5/model/ShowReplicationJobResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ShowReplicationJobResponse::ShowReplicationJobResponse() +{ + id_ = ""; + idIsSet_ = false; + status_ = ""; + statusIsSet_ = false; + createTime_ = ""; + createTimeIsSet_ = false; + finishTime_ = ""; + finishTimeIsSet_ = false; + backupInfoIsSet_ = false; + baseInfoIsSet_ = false; + targetDbInfoIsSet_ = false; + optionsIsSet_ = false; + newDbNames_ = ""; + newDbNamesIsSet_ = false; + instanceName_ = ""; + instanceNameIsSet_ = false; + errorLog_ = ""; + errorLogIsSet_ = false; +} + +ShowReplicationJobResponse::~ShowReplicationJobResponse() = default; + +void ShowReplicationJobResponse::validate() +{ +} + +web::json::value ShowReplicationJobResponse::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(createTimeIsSet_) { + val[utility::conversions::to_string_t("create_time")] = ModelBase::toJson(createTime_); + } + if(finishTimeIsSet_) { + val[utility::conversions::to_string_t("finish_time")] = ModelBase::toJson(finishTime_); + } + if(backupInfoIsSet_) { + val[utility::conversions::to_string_t("backup_info")] = ModelBase::toJson(backupInfo_); + } + if(baseInfoIsSet_) { + val[utility::conversions::to_string_t("base_info")] = ModelBase::toJson(baseInfo_); + } + if(targetDbInfoIsSet_) { + val[utility::conversions::to_string_t("target_db_info")] = ModelBase::toJson(targetDbInfo_); + } + if(optionsIsSet_) { + val[utility::conversions::to_string_t("options")] = ModelBase::toJson(options_); + } + if(newDbNamesIsSet_) { + val[utility::conversions::to_string_t("new_db_names")] = ModelBase::toJson(newDbNames_); + } + if(instanceNameIsSet_) { + val[utility::conversions::to_string_t("instance_name")] = ModelBase::toJson(instanceName_); + } + if(errorLogIsSet_) { + val[utility::conversions::to_string_t("error_log")] = ModelBase::toJson(errorLog_); + } + + return val; +} +bool ShowReplicationJobResponse::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("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("finish_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("finish_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setFinishTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("backup_info"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("backup_info")); + if(!fieldValue.is_null()) + { + BackupInfoResp refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBackupInfo(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("base_info"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("base_info")); + if(!fieldValue.is_null()) + { + BackupJobBaseInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBaseInfo(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("target_db_info"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("target_db_info")); + if(!fieldValue.is_null()) + { + BackupJobEndpointInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setTargetDbInfo(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("options"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("options")); + if(!fieldValue.is_null()) + { + BackupRestoreOptionInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setOptions(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("new_db_names"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("new_db_names")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setNewDbNames(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("instance_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceName(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("error_log"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("error_log")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setErrorLog(refVal); + } + } + return ok; +} + + +std::string ShowReplicationJobResponse::getId() const +{ + return id_; +} + +void ShowReplicationJobResponse::setId(const std::string& value) +{ + id_ = value; + idIsSet_ = true; +} + +bool ShowReplicationJobResponse::idIsSet() const +{ + return idIsSet_; +} + +void ShowReplicationJobResponse::unsetid() +{ + idIsSet_ = false; +} + +std::string ShowReplicationJobResponse::getStatus() const +{ + return status_; +} + +void ShowReplicationJobResponse::setStatus(const std::string& value) +{ + status_ = value; + statusIsSet_ = true; +} + +bool ShowReplicationJobResponse::statusIsSet() const +{ + return statusIsSet_; +} + +void ShowReplicationJobResponse::unsetstatus() +{ + statusIsSet_ = false; +} + +std::string ShowReplicationJobResponse::getCreateTime() const +{ + return createTime_; +} + +void ShowReplicationJobResponse::setCreateTime(const std::string& value) +{ + createTime_ = value; + createTimeIsSet_ = true; +} + +bool ShowReplicationJobResponse::createTimeIsSet() const +{ + return createTimeIsSet_; +} + +void ShowReplicationJobResponse::unsetcreateTime() +{ + createTimeIsSet_ = false; +} + +std::string ShowReplicationJobResponse::getFinishTime() const +{ + return finishTime_; +} + +void ShowReplicationJobResponse::setFinishTime(const std::string& value) +{ + finishTime_ = value; + finishTimeIsSet_ = true; +} + +bool ShowReplicationJobResponse::finishTimeIsSet() const +{ + return finishTimeIsSet_; +} + +void ShowReplicationJobResponse::unsetfinishTime() +{ + finishTimeIsSet_ = false; +} + +BackupInfoResp ShowReplicationJobResponse::getBackupInfo() const +{ + return backupInfo_; +} + +void ShowReplicationJobResponse::setBackupInfo(const BackupInfoResp& value) +{ + backupInfo_ = value; + backupInfoIsSet_ = true; +} + +bool ShowReplicationJobResponse::backupInfoIsSet() const +{ + return backupInfoIsSet_; +} + +void ShowReplicationJobResponse::unsetbackupInfo() +{ + backupInfoIsSet_ = false; +} + +BackupJobBaseInfo ShowReplicationJobResponse::getBaseInfo() const +{ + return baseInfo_; +} + +void ShowReplicationJobResponse::setBaseInfo(const BackupJobBaseInfo& value) +{ + baseInfo_ = value; + baseInfoIsSet_ = true; +} + +bool ShowReplicationJobResponse::baseInfoIsSet() const +{ + return baseInfoIsSet_; +} + +void ShowReplicationJobResponse::unsetbaseInfo() +{ + baseInfoIsSet_ = false; +} + +BackupJobEndpointInfo ShowReplicationJobResponse::getTargetDbInfo() const +{ + return targetDbInfo_; +} + +void ShowReplicationJobResponse::setTargetDbInfo(const BackupJobEndpointInfo& value) +{ + targetDbInfo_ = value; + targetDbInfoIsSet_ = true; +} + +bool ShowReplicationJobResponse::targetDbInfoIsSet() const +{ + return targetDbInfoIsSet_; +} + +void ShowReplicationJobResponse::unsettargetDbInfo() +{ + targetDbInfoIsSet_ = false; +} + +BackupRestoreOptionInfo ShowReplicationJobResponse::getOptions() const +{ + return options_; +} + +void ShowReplicationJobResponse::setOptions(const BackupRestoreOptionInfo& value) +{ + options_ = value; + optionsIsSet_ = true; +} + +bool ShowReplicationJobResponse::optionsIsSet() const +{ + return optionsIsSet_; +} + +void ShowReplicationJobResponse::unsetoptions() +{ + optionsIsSet_ = false; +} + +std::string ShowReplicationJobResponse::getNewDbNames() const +{ + return newDbNames_; +} + +void ShowReplicationJobResponse::setNewDbNames(const std::string& value) +{ + newDbNames_ = value; + newDbNamesIsSet_ = true; +} + +bool ShowReplicationJobResponse::newDbNamesIsSet() const +{ + return newDbNamesIsSet_; +} + +void ShowReplicationJobResponse::unsetnewDbNames() +{ + newDbNamesIsSet_ = false; +} + +std::string ShowReplicationJobResponse::getInstanceName() const +{ + return instanceName_; +} + +void ShowReplicationJobResponse::setInstanceName(const std::string& value) +{ + instanceName_ = value; + instanceNameIsSet_ = true; +} + +bool ShowReplicationJobResponse::instanceNameIsSet() const +{ + return instanceNameIsSet_; +} + +void ShowReplicationJobResponse::unsetinstanceName() +{ + instanceNameIsSet_ = false; +} + +std::string ShowReplicationJobResponse::getErrorLog() const +{ + return errorLog_; +} + +void ShowReplicationJobResponse::setErrorLog(const std::string& value) +{ + errorLog_ = value; + errorLogIsSet_ = true; +} + +bool ShowReplicationJobResponse::errorLogIsSet() const +{ + return errorLogIsSet_; +} + +void ShowReplicationJobResponse::unseterrorLog() +{ + errorLogIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/ToPeriodReq.cpp b/drs/src/v5/model/ToPeriodReq.cpp new file mode 100644 index 000000000..03580149e --- /dev/null +++ b/drs/src/v5/model/ToPeriodReq.cpp @@ -0,0 +1,184 @@ + + +#include "huaweicloud/drs/v5/model/ToPeriodReq.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +ToPeriodReq::ToPeriodReq() +{ + periodType_ = ""; + periodTypeIsSet_ = false; + periodNum_ = 0; + periodNumIsSet_ = false; + isAutoRenew_ = false; + isAutoRenewIsSet_ = false; + isAutoPay_ = false; + isAutoPayIsSet_ = false; +} + +ToPeriodReq::~ToPeriodReq() = default; + +void ToPeriodReq::validate() +{ +} + +web::json::value ToPeriodReq::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(periodTypeIsSet_) { + val[utility::conversions::to_string_t("period_type")] = ModelBase::toJson(periodType_); + } + if(periodNumIsSet_) { + val[utility::conversions::to_string_t("period_num")] = ModelBase::toJson(periodNum_); + } + if(isAutoRenewIsSet_) { + val[utility::conversions::to_string_t("is_auto_renew")] = ModelBase::toJson(isAutoRenew_); + } + if(isAutoPayIsSet_) { + val[utility::conversions::to_string_t("is_auto_pay")] = ModelBase::toJson(isAutoPay_); + } + + return val; +} +bool ToPeriodReq::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("period_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("period_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPeriodType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("period_num"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("period_num")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPeriodNum(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("is_auto_renew"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_auto_renew")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsAutoRenew(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("is_auto_pay"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("is_auto_pay")); + if(!fieldValue.is_null()) + { + bool refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setIsAutoPay(refVal); + } + } + return ok; +} + + +std::string ToPeriodReq::getPeriodType() const +{ + return periodType_; +} + +void ToPeriodReq::setPeriodType(const std::string& value) +{ + periodType_ = value; + periodTypeIsSet_ = true; +} + +bool ToPeriodReq::periodTypeIsSet() const +{ + return periodTypeIsSet_; +} + +void ToPeriodReq::unsetperiodType() +{ + periodTypeIsSet_ = false; +} + +int32_t ToPeriodReq::getPeriodNum() const +{ + return periodNum_; +} + +void ToPeriodReq::setPeriodNum(int32_t value) +{ + periodNum_ = value; + periodNumIsSet_ = true; +} + +bool ToPeriodReq::periodNumIsSet() const +{ + return periodNumIsSet_; +} + +void ToPeriodReq::unsetperiodNum() +{ + periodNumIsSet_ = false; +} + +bool ToPeriodReq::isIsAutoRenew() const +{ + return isAutoRenew_; +} + +void ToPeriodReq::setIsAutoRenew(bool value) +{ + isAutoRenew_ = value; + isAutoRenewIsSet_ = true; +} + +bool ToPeriodReq::isAutoRenewIsSet() const +{ + return isAutoRenewIsSet_; +} + +void ToPeriodReq::unsetisAutoRenew() +{ + isAutoRenewIsSet_ = false; +} + +bool ToPeriodReq::isIsAutoPay() const +{ + return isAutoPay_; +} + +void ToPeriodReq::setIsAutoPay(bool value) +{ + isAutoPay_ = value; + isAutoPayIsSet_ = true; +} + +bool ToPeriodReq::isAutoPayIsSet() const +{ + return isAutoPayIsSet_; +} + +void ToPeriodReq::unsetisAutoPay() +{ + isAutoPayIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/UpdateConnectionReq.cpp b/drs/src/v5/model/UpdateConnectionReq.cpp new file mode 100644 index 000000000..ab1f6c40c --- /dev/null +++ b/drs/src/v5/model/UpdateConnectionReq.cpp @@ -0,0 +1,354 @@ + + +#include "huaweicloud/drs/v5/model/UpdateConnectionReq.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +UpdateConnectionReq::UpdateConnectionReq() +{ + name_ = ""; + nameIsSet_ = false; + dbType_ = ""; + dbTypeIsSet_ = false; + configIsSet_ = false; + description_ = ""; + descriptionIsSet_ = false; + endpointIsSet_ = false; + vpcIsSet_ = false; + sslIsSet_ = false; + cloudIsSet_ = false; + enterpriseProjectId_ = ""; + enterpriseProjectIdIsSet_ = false; +} + +UpdateConnectionReq::~UpdateConnectionReq() = default; + +void UpdateConnectionReq::validate() +{ +} + +web::json::value UpdateConnectionReq::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(nameIsSet_) { + val[utility::conversions::to_string_t("name")] = ModelBase::toJson(name_); + } + if(dbTypeIsSet_) { + val[utility::conversions::to_string_t("db_type")] = ModelBase::toJson(dbType_); + } + if(configIsSet_) { + val[utility::conversions::to_string_t("config")] = ModelBase::toJson(config_); + } + if(descriptionIsSet_) { + val[utility::conversions::to_string_t("description")] = ModelBase::toJson(description_); + } + if(endpointIsSet_) { + val[utility::conversions::to_string_t("endpoint")] = ModelBase::toJson(endpoint_); + } + if(vpcIsSet_) { + val[utility::conversions::to_string_t("vpc")] = ModelBase::toJson(vpc_); + } + if(sslIsSet_) { + val[utility::conversions::to_string_t("ssl")] = ModelBase::toJson(ssl_); + } + if(cloudIsSet_) { + val[utility::conversions::to_string_t("cloud")] = ModelBase::toJson(cloud_); + } + if(enterpriseProjectIdIsSet_) { + val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_); + } + + return val; +} +bool UpdateConnectionReq::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("db_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("db_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDbType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("config"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("config")); + if(!fieldValue.is_null()) + { + ConnectionConfig refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setConfig(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("description"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("description")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setDescription(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("endpoint"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("endpoint")); + if(!fieldValue.is_null()) + { + BaseEndpoint refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setEndpoint(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("vpc"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("vpc")); + if(!fieldValue.is_null()) + { + CloudVpcInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setVpc(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("ssl"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("ssl")); + if(!fieldValue.is_null()) + { + EndpointSslConfig refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSsl(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("cloud"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("cloud")); + if(!fieldValue.is_null()) + { + CloudBaseInfo refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setCloud(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 UpdateConnectionReq::getName() const +{ + return name_; +} + +void UpdateConnectionReq::setName(const std::string& value) +{ + name_ = value; + nameIsSet_ = true; +} + +bool UpdateConnectionReq::nameIsSet() const +{ + return nameIsSet_; +} + +void UpdateConnectionReq::unsetname() +{ + nameIsSet_ = false; +} + +std::string UpdateConnectionReq::getDbType() const +{ + return dbType_; +} + +void UpdateConnectionReq::setDbType(const std::string& value) +{ + dbType_ = value; + dbTypeIsSet_ = true; +} + +bool UpdateConnectionReq::dbTypeIsSet() const +{ + return dbTypeIsSet_; +} + +void UpdateConnectionReq::unsetdbType() +{ + dbTypeIsSet_ = false; +} + +ConnectionConfig UpdateConnectionReq::getConfig() const +{ + return config_; +} + +void UpdateConnectionReq::setConfig(const ConnectionConfig& value) +{ + config_ = value; + configIsSet_ = true; +} + +bool UpdateConnectionReq::configIsSet() const +{ + return configIsSet_; +} + +void UpdateConnectionReq::unsetconfig() +{ + configIsSet_ = false; +} + +std::string UpdateConnectionReq::getDescription() const +{ + return description_; +} + +void UpdateConnectionReq::setDescription(const std::string& value) +{ + description_ = value; + descriptionIsSet_ = true; +} + +bool UpdateConnectionReq::descriptionIsSet() const +{ + return descriptionIsSet_; +} + +void UpdateConnectionReq::unsetdescription() +{ + descriptionIsSet_ = false; +} + +BaseEndpoint UpdateConnectionReq::getEndpoint() const +{ + return endpoint_; +} + +void UpdateConnectionReq::setEndpoint(const BaseEndpoint& value) +{ + endpoint_ = value; + endpointIsSet_ = true; +} + +bool UpdateConnectionReq::endpointIsSet() const +{ + return endpointIsSet_; +} + +void UpdateConnectionReq::unsetendpoint() +{ + endpointIsSet_ = false; +} + +CloudVpcInfo UpdateConnectionReq::getVpc() const +{ + return vpc_; +} + +void UpdateConnectionReq::setVpc(const CloudVpcInfo& value) +{ + vpc_ = value; + vpcIsSet_ = true; +} + +bool UpdateConnectionReq::vpcIsSet() const +{ + return vpcIsSet_; +} + +void UpdateConnectionReq::unsetvpc() +{ + vpcIsSet_ = false; +} + +EndpointSslConfig UpdateConnectionReq::getSsl() const +{ + return ssl_; +} + +void UpdateConnectionReq::setSsl(const EndpointSslConfig& value) +{ + ssl_ = value; + sslIsSet_ = true; +} + +bool UpdateConnectionReq::sslIsSet() const +{ + return sslIsSet_; +} + +void UpdateConnectionReq::unsetssl() +{ + sslIsSet_ = false; +} + +CloudBaseInfo UpdateConnectionReq::getCloud() const +{ + return cloud_; +} + +void UpdateConnectionReq::setCloud(const CloudBaseInfo& value) +{ + cloud_ = value; + cloudIsSet_ = true; +} + +bool UpdateConnectionReq::cloudIsSet() const +{ + return cloudIsSet_; +} + +void UpdateConnectionReq::unsetcloud() +{ + cloudIsSet_ = false; +} + +std::string UpdateConnectionReq::getEnterpriseProjectId() const +{ + return enterpriseProjectId_; +} + +void UpdateConnectionReq::setEnterpriseProjectId(const std::string& value) +{ + enterpriseProjectId_ = value; + enterpriseProjectIdIsSet_ = true; +} + +bool UpdateConnectionReq::enterpriseProjectIdIsSet() const +{ + return enterpriseProjectIdIsSet_; +} + +void UpdateConnectionReq::unsetenterpriseProjectId() +{ + enterpriseProjectIdIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/UpdateReplicationJobRequest.cpp b/drs/src/v5/model/UpdateReplicationJobRequest.cpp new file mode 100644 index 000000000..ec4b487cd --- /dev/null +++ b/drs/src/v5/model/UpdateReplicationJobRequest.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/drs/v5/model/UpdateReplicationJobRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +UpdateReplicationJobRequest::UpdateReplicationJobRequest() +{ + jobId_ = ""; + jobIdIsSet_ = false; + xLanguage_ = ""; + xLanguageIsSet_ = false; + bodyIsSet_ = false; +} + +UpdateReplicationJobRequest::~UpdateReplicationJobRequest() = default; + +void UpdateReplicationJobRequest::validate() +{ +} + +web::json::value UpdateReplicationJobRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(jobIdIsSet_) { + val[utility::conversions::to_string_t("job_id")] = ModelBase::toJson(jobId_); + } + 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 UpdateReplicationJobRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("job_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("job_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setJobId(refVal); + } + } + 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()) + { + ModifyOfflineTaskReq refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string UpdateReplicationJobRequest::getJobId() const +{ + return jobId_; +} + +void UpdateReplicationJobRequest::setJobId(const std::string& value) +{ + jobId_ = value; + jobIdIsSet_ = true; +} + +bool UpdateReplicationJobRequest::jobIdIsSet() const +{ + return jobIdIsSet_; +} + +void UpdateReplicationJobRequest::unsetjobId() +{ + jobIdIsSet_ = false; +} + +std::string UpdateReplicationJobRequest::getXLanguage() const +{ + return xLanguage_; +} + +void UpdateReplicationJobRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool UpdateReplicationJobRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void UpdateReplicationJobRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +ModifyOfflineTaskReq UpdateReplicationJobRequest::getBody() const +{ + return body_; +} + +void UpdateReplicationJobRequest::setBody(const ModifyOfflineTaskReq& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UpdateReplicationJobRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UpdateReplicationJobRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/drs/src/v5/model/UpdateReplicationJobResponse.cpp b/drs/src/v5/model/UpdateReplicationJobResponse.cpp new file mode 100644 index 000000000..2a47bf2cb --- /dev/null +++ b/drs/src/v5/model/UpdateReplicationJobResponse.cpp @@ -0,0 +1,78 @@ + + +#include "huaweicloud/drs/v5/model/UpdateReplicationJobResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Drs { +namespace V5 { +namespace Model { + + + + +UpdateReplicationJobResponse::UpdateReplicationJobResponse() +{ + bodyIsSet_ = false; +} + +UpdateReplicationJobResponse::~UpdateReplicationJobResponse() = default; + +void UpdateReplicationJobResponse::validate() +{ +} + +web::json::value UpdateReplicationJobResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool UpdateReplicationJobResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + Object refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +Object UpdateReplicationJobResponse::getBody() const +{ + return body_; +} + +void UpdateReplicationJobResponse::setBody(const Object& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UpdateReplicationJobResponse::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UpdateReplicationJobResponse::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/evs/include/huaweicloud/evs/v2/model/ListVolumesRequest.h b/evs/include/huaweicloud/evs/v2/model/ListVolumesRequest.h index 91bf3fb2f..a97dbd596 100644 --- a/evs/include/huaweicloud/evs/v2/model/ListVolumesRequest.h +++ b/evs/include/huaweicloud/evs/v2/model/ListVolumesRequest.h @@ -200,15 +200,6 @@ class HUAWEICLOUD_EVS_V2_EXPORT ListVolumesRequest void unsetserverId(); void setServerId(const std::string& value); - /// - /// 自动快照策略ID - /// - - std::string getSnapshotPolicyId() const; - bool snapshotPolicyIdIsSet() const; - void unsetsnapshotPolicyId(); - void setSnapshotPolicyId(const std::string& value); - protected: std::string marker_; @@ -247,8 +238,6 @@ class HUAWEICLOUD_EVS_V2_EXPORT ListVolumesRequest bool enterpriseProjectIdIsSet_; std::string serverId_; bool serverIdIsSet_; - std::string snapshotPolicyId_; - bool snapshotPolicyIdIsSet_; #ifdef RTTR_FLAG RTTR_ENABLE() diff --git a/evs/include/huaweicloud/evs/v2/model/VolumeDetail.h b/evs/include/huaweicloud/evs/v2/model/VolumeDetail.h index 22386c0e1..6aa62f584 100644 --- a/evs/include/huaweicloud/evs/v2/model/VolumeDetail.h +++ b/evs/include/huaweicloud/evs/v2/model/VolumeDetail.h @@ -369,15 +369,6 @@ class HUAWEICLOUD_EVS_V2_EXPORT VolumeDetail void unsetthroughput(); void setThroughput(const Throughput& value); - /// - /// 云硬盘关联的自动快照策略ID - /// - - std::string getSnapshotPolicyId() const; - bool snapshotPolicyIdIsSet() const; - void unsetsnapshotPolicyId(); - void setSnapshotPolicyId(const std::string& value); - protected: std::string id_; @@ -452,8 +443,6 @@ class HUAWEICLOUD_EVS_V2_EXPORT VolumeDetail bool iopsIsSet_; Throughput throughput_; bool throughputIsSet_; - std::string snapshotPolicyId_; - bool snapshotPolicyIdIsSet_; }; diff --git a/evs/src/v2/EvsClient.cpp b/evs/src/v2/EvsClient.cpp index 7ef0ea783..5232052a3 100644 --- a/evs/src/v2/EvsClient.cpp +++ b/evs/src/v2/EvsClient.cpp @@ -729,9 +729,6 @@ std::shared_ptr EvsClient::listVolumes(ListVolumesRequest & if (request.serverIdIsSet()) { localVarQueryParams["server_id"] = parameterToString(request.getServerId()); } - if (request.snapshotPolicyIdIsSet()) { - localVarQueryParams["snapshot_policy_id"] = parameterToString(request.getSnapshotPolicyId()); - } std::string localVarHttpBody; diff --git a/evs/src/v2/EvsMeta.cpp b/evs/src/v2/EvsMeta.cpp index a7a14475e..fccc78718 100644 --- a/evs/src/v2/EvsMeta.cpp +++ b/evs/src/v2/EvsMeta.cpp @@ -219,9 +219,6 @@ HttpRequestDef EvsMeta::genRequestDefForListVolumes() { reqDefBuilder.withRequestField(FieldDef().withName("ServerId") .withJsonTag("server_id") .withLocationType(Query_)); - reqDefBuilder.withRequestField(FieldDef().withName("SnapshotPolicyId") - .withJsonTag("snapshot_policy_id") - .withLocationType(Query_)); return reqDefBuilder; } diff --git a/evs/src/v2/model/ListVolumesRequest.cpp b/evs/src/v2/model/ListVolumesRequest.cpp index a56b98e80..2cb17b3b3 100644 --- a/evs/src/v2/model/ListVolumesRequest.cpp +++ b/evs/src/v2/model/ListVolumesRequest.cpp @@ -48,8 +48,6 @@ ListVolumesRequest::ListVolumesRequest() enterpriseProjectIdIsSet_ = false; serverId_ = ""; serverIdIsSet_ = false; - snapshotPolicyId_ = ""; - snapshotPolicyIdIsSet_ = false; } ListVolumesRequest::~ListVolumesRequest() = default; @@ -116,9 +114,6 @@ web::json::value ListVolumesRequest::toJson() const if(serverIdIsSet_) { val[utility::conversions::to_string_t("server_id")] = ModelBase::toJson(serverId_); } - if(snapshotPolicyIdIsSet_) { - val[utility::conversions::to_string_t("snapshot_policy_id")] = ModelBase::toJson(snapshotPolicyId_); - } return val; } @@ -288,15 +283,6 @@ bool ListVolumesRequest::fromJson(const web::json::value& val) setServerId(refVal); } } - if(val.has_field(utility::conversions::to_string_t("snapshot_policy_id"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("snapshot_policy_id")); - if(!fieldValue.is_null()) - { - std::string refVal; - ok &= ModelBase::fromJson(fieldValue, refVal); - setSnapshotPolicyId(refVal); - } - } return ok; } @@ -679,27 +665,6 @@ void ListVolumesRequest::unsetserverId() serverIdIsSet_ = false; } -std::string ListVolumesRequest::getSnapshotPolicyId() const -{ - return snapshotPolicyId_; -} - -void ListVolumesRequest::setSnapshotPolicyId(const std::string& value) -{ - snapshotPolicyId_ = value; - snapshotPolicyIdIsSet_ = true; -} - -bool ListVolumesRequest::snapshotPolicyIdIsSet() const -{ - return snapshotPolicyIdIsSet_; -} - -void ListVolumesRequest::unsetsnapshotPolicyId() -{ - snapshotPolicyIdIsSet_ = false; -} - } } } diff --git a/evs/src/v2/model/VolumeDetail.cpp b/evs/src/v2/model/VolumeDetail.cpp index 7a38a197b..893129d4f 100644 --- a/evs/src/v2/model/VolumeDetail.cpp +++ b/evs/src/v2/model/VolumeDetail.cpp @@ -77,8 +77,6 @@ VolumeDetail::VolumeDetail() serialNumberIsSet_ = false; iopsIsSet_ = false; throughputIsSet_ = false; - snapshotPolicyId_ = ""; - snapshotPolicyIdIsSet_ = false; } VolumeDetail::~VolumeDetail() = default; @@ -199,9 +197,6 @@ web::json::value VolumeDetail::toJson() const if(throughputIsSet_) { val[utility::conversions::to_string_t("throughput")] = ModelBase::toJson(throughput_); } - if(snapshotPolicyIdIsSet_) { - val[utility::conversions::to_string_t("snapshot_policy_id")] = ModelBase::toJson(snapshotPolicyId_); - } return val; } @@ -533,15 +528,6 @@ bool VolumeDetail::fromJson(const web::json::value& val) setThroughput(refVal); } } - if(val.has_field(utility::conversions::to_string_t("snapshot_policy_id"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("snapshot_policy_id")); - if(!fieldValue.is_null()) - { - std::string refVal; - ok &= ModelBase::fromJson(fieldValue, refVal); - setSnapshotPolicyId(refVal); - } - } return ok; } @@ -1302,27 +1288,6 @@ void VolumeDetail::unsetthroughput() throughputIsSet_ = false; } -std::string VolumeDetail::getSnapshotPolicyId() const -{ - return snapshotPolicyId_; -} - -void VolumeDetail::setSnapshotPolicyId(const std::string& value) -{ - snapshotPolicyId_ = value; - snapshotPolicyIdIsSet_ = true; -} - -bool VolumeDetail::snapshotPolicyIdIsSet() const -{ - return snapshotPolicyIdIsSet_; -} - -void VolumeDetail::unsetsnapshotPolicyId() -{ - snapshotPolicyIdIsSet_ = false; -} - } } } diff --git a/gaussdb/include/huaweicloud/gaussdb/v3/model/CheckStarrocksParamsResponse.h b/gaussdb/include/huaweicloud/gaussdb/v3/model/CheckStarrocksParamsResponse.h index 440567dc2..5c843d29a 100644 --- a/gaussdb/include/huaweicloud/gaussdb/v3/model/CheckStarrocksParamsResponse.h +++ b/gaussdb/include/huaweicloud/gaussdb/v3/model/CheckStarrocksParamsResponse.h @@ -43,15 +43,15 @@ class HUAWEICLOUD_GAUSSDB_V3_EXPORT CheckStarrocksParamsResponse /// 参数之间区别的集合。 /// - std::vector& getCheckStarrocksParamsResponce(); - bool checkStarrocksParamsResponceIsSet() const; - void unsetcheckStarrocksParamsResponce(); - void setCheckStarrocksParamsResponce(const std::vector& value); + std::vector& getDifferences(); + bool differencesIsSet() const; + void unsetdifferences(); + void setDifferences(const std::vector& value); protected: - std::vector checkStarrocksParamsResponce_; - bool checkStarrocksParamsResponceIsSet_; + std::vector differences_; + bool differencesIsSet_; #ifdef RTTR_FLAG RTTR_ENABLE() diff --git a/gaussdb/include/huaweicloud/gaussdb/v3/model/StarRocksCreateRequest.h b/gaussdb/include/huaweicloud/gaussdb/v3/model/StarRocksCreateRequest.h index 24fb816b8..ab15ee076 100644 --- a/gaussdb/include/huaweicloud/gaussdb/v3/model/StarRocksCreateRequest.h +++ b/gaussdb/include/huaweicloud/gaussdb/v3/model/StarRocksCreateRequest.h @@ -169,6 +169,15 @@ class HUAWEICLOUD_GAUSSDB_V3_EXPORT StarRocksCreateRequest void unsettagsInfo(); void setTagsInfo(const StarRocksCreateRequest_tags_info& value); + /// + /// 实例安全组ID。默认与Taurus安全组ID一致。 + /// + + std::string getSecurityGroupId() const; + bool securityGroupIdIsSet() const; + void unsetsecurityGroupId(); + void setSecurityGroupId(const std::string& value); + protected: std::string name_; @@ -199,6 +208,8 @@ class HUAWEICLOUD_GAUSSDB_V3_EXPORT StarRocksCreateRequest bool timeZoneIsSet_; StarRocksCreateRequest_tags_info tagsInfo_; bool tagsInfoIsSet_; + std::string securityGroupId_; + bool securityGroupIdIsSet_; }; diff --git a/gaussdb/src/v3/model/CheckStarrocksParamsResponse.cpp b/gaussdb/src/v3/model/CheckStarrocksParamsResponse.cpp index aaf9b6e57..38f7581d1 100644 --- a/gaussdb/src/v3/model/CheckStarrocksParamsResponse.cpp +++ b/gaussdb/src/v3/model/CheckStarrocksParamsResponse.cpp @@ -12,7 +12,7 @@ namespace Model { CheckStarrocksParamsResponse::CheckStarrocksParamsResponse() { - checkStarrocksParamsResponceIsSet_ = false; + differencesIsSet_ = false; } CheckStarrocksParamsResponse::~CheckStarrocksParamsResponse() = default; @@ -25,8 +25,8 @@ web::json::value CheckStarrocksParamsResponse::toJson() const { web::json::value val = web::json::value::object(); - if(checkStarrocksParamsResponceIsSet_) { - val[utility::conversions::to_string_t("check_starrocks_params_responce")] = ModelBase::toJson(checkStarrocksParamsResponce_); + if(differencesIsSet_) { + val[utility::conversions::to_string_t("differences")] = ModelBase::toJson(differences_); } return val; @@ -35,38 +35,38 @@ bool CheckStarrocksParamsResponse::fromJson(const web::json::value& val) { bool ok = true; - if(val.has_field(utility::conversions::to_string_t("check_starrocks_params_responce"))) { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("check_starrocks_params_responce")); + if(val.has_field(utility::conversions::to_string_t("differences"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("differences")); if(!fieldValue.is_null()) { std::vector refVal; ok &= ModelBase::fromJson(fieldValue, refVal); - setCheckStarrocksParamsResponce(refVal); + setDifferences(refVal); } } return ok; } -std::vector& CheckStarrocksParamsResponse::getCheckStarrocksParamsResponce() +std::vector& CheckStarrocksParamsResponse::getDifferences() { - return checkStarrocksParamsResponce_; + return differences_; } -void CheckStarrocksParamsResponse::setCheckStarrocksParamsResponce(const std::vector& value) +void CheckStarrocksParamsResponse::setDifferences(const std::vector& value) { - checkStarrocksParamsResponce_ = value; - checkStarrocksParamsResponceIsSet_ = true; + differences_ = value; + differencesIsSet_ = true; } -bool CheckStarrocksParamsResponse::checkStarrocksParamsResponceIsSet() const +bool CheckStarrocksParamsResponse::differencesIsSet() const { - return checkStarrocksParamsResponceIsSet_; + return differencesIsSet_; } -void CheckStarrocksParamsResponse::unsetcheckStarrocksParamsResponce() +void CheckStarrocksParamsResponse::unsetdifferences() { - checkStarrocksParamsResponceIsSet_ = false; + differencesIsSet_ = false; } } diff --git a/gaussdb/src/v3/model/StarRocksCreateRequest.cpp b/gaussdb/src/v3/model/StarRocksCreateRequest.cpp index ed5e0f81a..fa1de2471 100644 --- a/gaussdb/src/v3/model/StarRocksCreateRequest.cpp +++ b/gaussdb/src/v3/model/StarRocksCreateRequest.cpp @@ -35,6 +35,8 @@ StarRocksCreateRequest::StarRocksCreateRequest() timeZone_ = ""; timeZoneIsSet_ = false; tagsInfoIsSet_ = false; + securityGroupId_ = ""; + securityGroupIdIsSet_ = false; } StarRocksCreateRequest::~StarRocksCreateRequest() = default; @@ -89,6 +91,9 @@ web::json::value StarRocksCreateRequest::toJson() const if(tagsInfoIsSet_) { val[utility::conversions::to_string_t("tags_info")] = ModelBase::toJson(tagsInfo_); } + if(securityGroupIdIsSet_) { + val[utility::conversions::to_string_t("security_group_id")] = ModelBase::toJson(securityGroupId_); + } return val; } @@ -222,6 +227,15 @@ bool StarRocksCreateRequest::fromJson(const web::json::value& val) setTagsInfo(refVal); } } + if(val.has_field(utility::conversions::to_string_t("security_group_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("security_group_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setSecurityGroupId(refVal); + } + } return ok; } @@ -520,6 +534,27 @@ void StarRocksCreateRequest::unsettagsInfo() tagsInfoIsSet_ = false; } +std::string StarRocksCreateRequest::getSecurityGroupId() const +{ + return securityGroupId_; +} + +void StarRocksCreateRequest::setSecurityGroupId(const std::string& value) +{ + securityGroupId_ = value; + securityGroupIdIsSet_ = true; +} + +bool StarRocksCreateRequest::securityGroupIdIsSet() const +{ + return securityGroupIdIsSet_; +} + +void StarRocksCreateRequest::unsetsecurityGroupId() +{ + securityGroupIdIsSet_ = false; +} + } } } diff --git a/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/DeleteManualBackupResponse.h b/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/DeleteManualBackupResponse.h index 6dacb64d4..659a725aa 100644 --- a/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/DeleteManualBackupResponse.h +++ b/gaussdbforopengauss/include/huaweicloud/gaussdbforopengauss/v3/model/DeleteManualBackupResponse.h @@ -9,6 +9,7 @@ #include #include +#include namespace HuaweiCloud { namespace Sdk { @@ -37,8 +38,30 @@ class HUAWEICLOUD_GAUSSDBFOROPENGAUSS_V3_EXPORT DeleteManualBackupResponse ///////////////////////////////////////////// /// DeleteManualBackupResponse members + /// + /// 备份ID。 + /// + + std::string getBackupId() const; + bool backupIdIsSet() const; + void unsetbackupId(); + void setBackupId(const std::string& value); + + /// + /// 备份名称。 + /// + + std::string getBackupName() const; + bool backupNameIsSet() const; + void unsetbackupName(); + void setBackupName(const std::string& value); + protected: + std::string backupId_; + bool backupIdIsSet_; + std::string backupName_; + bool backupNameIsSet_; #ifdef RTTR_FLAG RTTR_ENABLE() diff --git a/gaussdbforopengauss/src/v3/model/DeleteManualBackupResponse.cpp b/gaussdbforopengauss/src/v3/model/DeleteManualBackupResponse.cpp index 52d4e447d..648a98900 100644 --- a/gaussdbforopengauss/src/v3/model/DeleteManualBackupResponse.cpp +++ b/gaussdbforopengauss/src/v3/model/DeleteManualBackupResponse.cpp @@ -12,6 +12,10 @@ namespace Model { DeleteManualBackupResponse::DeleteManualBackupResponse() { + backupId_ = ""; + backupIdIsSet_ = false; + backupName_ = ""; + backupNameIsSet_ = false; } DeleteManualBackupResponse::~DeleteManualBackupResponse() = default; @@ -24,6 +28,12 @@ web::json::value DeleteManualBackupResponse::toJson() const { web::json::value val = web::json::value::object(); + if(backupIdIsSet_) { + val[utility::conversions::to_string_t("backup_id")] = ModelBase::toJson(backupId_); + } + if(backupNameIsSet_) { + val[utility::conversions::to_string_t("backup_name")] = ModelBase::toJson(backupName_); + } return val; } @@ -31,10 +41,70 @@ bool DeleteManualBackupResponse::fromJson(const web::json::value& val) { bool ok = true; + if(val.has_field(utility::conversions::to_string_t("backup_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("backup_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBackupId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("backup_name"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("backup_name")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBackupName(refVal); + } + } return ok; } +std::string DeleteManualBackupResponse::getBackupId() const +{ + return backupId_; +} + +void DeleteManualBackupResponse::setBackupId(const std::string& value) +{ + backupId_ = value; + backupIdIsSet_ = true; +} + +bool DeleteManualBackupResponse::backupIdIsSet() const +{ + return backupIdIsSet_; +} + +void DeleteManualBackupResponse::unsetbackupId() +{ + backupIdIsSet_ = false; +} + +std::string DeleteManualBackupResponse::getBackupName() const +{ + return backupName_; +} + +void DeleteManualBackupResponse::setBackupName(const std::string& value) +{ + backupName_ = value; + backupNameIsSet_ = true; +} + +bool DeleteManualBackupResponse::backupNameIsSet() const +{ + return backupNameIsSet_; +} + +void DeleteManualBackupResponse::unsetbackupName() +{ + backupNameIsSet_ = false; +} + } } } diff --git a/kvs/include/huaweicloud/kvs/v1/model/CreateTableRequestBody.h b/kvs/include/huaweicloud/kvs/v1/model/CreateTableRequestBody.h index 7cfe7097f..7c2c49056 100644 --- a/kvs/include/huaweicloud/kvs/v1/model/CreateTableRequestBody.h +++ b/kvs/include/huaweicloud/kvs/v1/model/CreateTableRequestBody.h @@ -13,6 +13,7 @@ #include #include +#include #include #include #include @@ -55,6 +56,24 @@ class HUAWEICLOUD_KVS_V1_EXPORT CreateTableRequestBody void unsettableName(); void setTableName(const std::string& value); + /// + /// 表计费模式,可为\"provisioned\"或\"on_demand\" - 预置模式:provisioned - 按需模式:on_demand + /// + + std::string getBillMode() const; + bool billModeIsSet() const; + void unsetbillMode(); + void setBillMode(const std::string& value); + + /// + /// + /// + + Provisioned_throughput getProvisionedThroughput() const; + bool provisionedThroughputIsSet() const; + void unsetprovisionedThroughput(); + void setProvisionedThroughput(const Provisioned_throughput& value); + /// /// /// @@ -95,6 +114,10 @@ class HUAWEICLOUD_KVS_V1_EXPORT CreateTableRequestBody protected: std::string tableName_; bool tableNameIsSet_; + std::string billMode_; + bool billModeIsSet_; + Provisioned_throughput provisionedThroughput_; + bool provisionedThroughputIsSet_; Primary_key_schema primaryKeySchema_; bool primaryKeySchemaIsSet_; std::vector localSecondaryIndexSchema_; diff --git a/kvs/include/huaweicloud/kvs/v1/model/CreateTableResponse.h b/kvs/include/huaweicloud/kvs/v1/model/CreateTableResponse.h index 3fab611fe..fab8e8094 100644 --- a/kvs/include/huaweicloud/kvs/v1/model/CreateTableResponse.h +++ b/kvs/include/huaweicloud/kvs/v1/model/CreateTableResponse.h @@ -13,6 +13,7 @@ #include #include +#include #include #include #include @@ -55,6 +56,24 @@ class HUAWEICLOUD_KVS_V1_EXPORT CreateTableResponse void unsettableName(); void setTableName(const std::string& value); + /// + /// 计费模式,可为\"provisioned\"或\"on_demand\" + /// + + std::string getBillMode() const; + bool billModeIsSet() const; + void unsetbillMode(); + void setBillMode(const std::string& value); + + /// + /// + /// + + Provisioned_throughput getProvisionedThroughput() const; + bool provisionedThroughputIsSet() const; + void unsetprovisionedThroughput(); + void setProvisionedThroughput(const Provisioned_throughput& value); + /// /// /// @@ -95,6 +114,10 @@ class HUAWEICLOUD_KVS_V1_EXPORT CreateTableResponse protected: std::string tableName_; bool tableNameIsSet_; + std::string billMode_; + bool billModeIsSet_; + Provisioned_throughput provisionedThroughput_; + bool provisionedThroughputIsSet_; Primary_key_schema primaryKeySchema_; bool primaryKeySchemaIsSet_; std::vector localSecondaryIndexSchema_; diff --git a/kvs/include/huaweicloud/kvs/v1/model/Global_secondary_index.h b/kvs/include/huaweicloud/kvs/v1/model/Global_secondary_index.h index 62f7fcfff..0b2f1d235 100644 --- a/kvs/include/huaweicloud/kvs/v1/model/Global_secondary_index.h +++ b/kvs/include/huaweicloud/kvs/v1/model/Global_secondary_index.h @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -25,7 +26,7 @@ namespace Model { using namespace HuaweiCloud::Sdk::Core::Utils; using namespace HuaweiCloud::Sdk::Core::Http; /// -/// 全局二级索引定义,元素key为数组下标 +/// /// class HUAWEICLOUD_KVS_V1_EXPORT Global_secondary_index : public ModelBase @@ -88,6 +89,15 @@ class HUAWEICLOUD_KVS_V1_EXPORT Global_secondary_index void unsetabstractFields(); void setAbstractFields(const std::vector& value); + /// + /// + /// + + Provisioned_throughput getProvisionedThroughput() const; + bool provisionedThroughputIsSet() const; + void unsetprovisionedThroughput(); + void setProvisionedThroughput(const Provisioned_throughput& value); + protected: std::string indexName_; @@ -100,6 +110,8 @@ class HUAWEICLOUD_KVS_V1_EXPORT Global_secondary_index bool sortKeyFieldsIsSet_; std::vector abstractFields_; bool abstractFieldsIsSet_; + Provisioned_throughput provisionedThroughput_; + bool provisionedThroughputIsSet_; }; diff --git a/kvs/include/huaweicloud/kvs/v1/model/Pre_split_key_options.h b/kvs/include/huaweicloud/kvs/v1/model/Pre_split_key_options.h index 501d5783e..0495940b5 100644 --- a/kvs/include/huaweicloud/kvs/v1/model/Pre_split_key_options.h +++ b/kvs/include/huaweicloud/kvs/v1/model/Pre_split_key_options.h @@ -24,7 +24,7 @@ namespace Model { using namespace HuaweiCloud::Sdk::Core::Utils; using namespace HuaweiCloud::Sdk::Core::Http; /// -/// 在hash分区时,预分裂分区数量。 +/// 按照设定的键值前缀进行预分裂。 /// class HUAWEICLOUD_KVS_V1_EXPORT Pre_split_key_options : public ModelBase @@ -43,16 +43,7 @@ class HUAWEICLOUD_KVS_V1_EXPORT Pre_split_key_options /// Pre_split_key_options members /// - /// 在hash分区时,预分裂分区数量。 - /// - - int32_t getHashCount() const; - bool hashCountIsSet() const; - void unsethashCount(); - void setHashCount(int32_t value); - - /// - /// 在range分区模式有效,最大1000个,与\"hash_count\"二选一。 + /// 在range分区模式有效,最大10个。 /// std::vector& getRangeSplitPoints(); @@ -62,8 +53,6 @@ class HUAWEICLOUD_KVS_V1_EXPORT Pre_split_key_options protected: - int32_t hashCount_; - bool hashCountIsSet_; std::vector rangeSplitPoints_; bool rangeSplitPointsIsSet_; diff --git a/kvs/include/huaweicloud/kvs/v1/model/Provisioned_throughput.h b/kvs/include/huaweicloud/kvs/v1/model/Provisioned_throughput.h new file mode 100644 index 000000000..34fbee355 --- /dev/null +++ b/kvs/include/huaweicloud/kvs/v1/model/Provisioned_throughput.h @@ -0,0 +1,77 @@ + +#ifndef HUAWEICLOUD_SDK_KVS_V1_MODEL_Provisioned_throughput_H_ +#define HUAWEICLOUD_SDK_KVS_V1_MODEL_Provisioned_throughput_H_ + +#include +#include +#include + +#include + +#include +#include +#include + + +namespace HuaweiCloud { +namespace Sdk { +namespace Kvs { +namespace V1 { +namespace Model { + +using namespace HuaweiCloud::Sdk::Core::Utils; +using namespace HuaweiCloud::Sdk::Core::Http; +/// +/// +/// +class HUAWEICLOUD_KVS_V1_EXPORT Provisioned_throughput + : public ModelBase +{ +public: + Provisioned_throughput(); + virtual ~Provisioned_throughput(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + bool fromBson(const Viewer &viewer) override; + bool toBson(Builder &builder) const override; + ///////////////////////////////////////////// + /// Provisioned_throughput members + + /// + /// 预置表级读请求单元数 + /// + + int64_t getRcu() const; + bool rcuIsSet() const; + void unsetrcu(); + void setRcu(int64_t value); + + /// + /// 预置表级写请求单元数 + /// + + int64_t getWcu() const; + bool wcuIsSet() const; + void unsetwcu(); + void setWcu(int64_t value); + + +protected: + int64_t rcu_; + bool rcuIsSet_; + int64_t wcu_; + bool wcuIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_KVS_V1_MODEL_Provisioned_throughput_H_ diff --git a/kvs/src/v1/model/CreateTableRequestBody.cpp b/kvs/src/v1/model/CreateTableRequestBody.cpp index 291e304ad..e8b223956 100644 --- a/kvs/src/v1/model/CreateTableRequestBody.cpp +++ b/kvs/src/v1/model/CreateTableRequestBody.cpp @@ -15,6 +15,9 @@ CreateTableRequestBody::CreateTableRequestBody() { tableName_ = ""; tableNameIsSet_ = false; + billMode_ = ""; + billModeIsSet_ = false; + provisionedThroughputIsSet_ = false; primaryKeySchemaIsSet_ = false; localSecondaryIndexSchemaIsSet_ = false; globalSecondaryIndexSchemaIsSet_ = false; @@ -33,6 +36,12 @@ bool CreateTableRequestBody::toBson(Builder &builder) const if (tableNameIsSet_ && !bson_append(builder, "table_name", tableName_)) { return false; } + if (billModeIsSet_ && !bson_append(builder, "bill_mode", billMode_)) { + return false; + } + if (provisionedThroughputIsSet_ && !bson_append(builder, "provisioned_throughput", provisionedThroughput_)) { + return false; + } if (primaryKeySchemaIsSet_ && !bson_append(builder, "primary_key_schema", primaryKeySchema_)) { return false; } @@ -65,6 +74,24 @@ bool CreateTableRequestBody::fromBson(const Viewer &viewer) continue; } + if (key == "bill_mode") { + if (!bson_get(it, billMode_)) { + return false; + } + billModeIsSet_ = true; + ++it; + continue; + } + + if (key == "provisioned_throughput") { + if (!bson_get(it, provisionedThroughput_)) { + return false; + } + provisionedThroughputIsSet_ = true; + ++it; + continue; + } + if (key == "primary_key_schema") { if (!bson_get(it, primaryKeySchema_)) { return false; @@ -128,6 +155,48 @@ void CreateTableRequestBody::unsettableName() tableNameIsSet_ = false; } +std::string CreateTableRequestBody::getBillMode() const +{ + return billMode_; +} + +void CreateTableRequestBody::setBillMode(const std::string& value) +{ + billMode_ = value; + billModeIsSet_ = true; +} + +bool CreateTableRequestBody::billModeIsSet() const +{ + return billModeIsSet_; +} + +void CreateTableRequestBody::unsetbillMode() +{ + billModeIsSet_ = false; +} + +Provisioned_throughput CreateTableRequestBody::getProvisionedThroughput() const +{ + return provisionedThroughput_; +} + +void CreateTableRequestBody::setProvisionedThroughput(const Provisioned_throughput& value) +{ + provisionedThroughput_ = value; + provisionedThroughputIsSet_ = true; +} + +bool CreateTableRequestBody::provisionedThroughputIsSet() const +{ + return provisionedThroughputIsSet_; +} + +void CreateTableRequestBody::unsetprovisionedThroughput() +{ + provisionedThroughputIsSet_ = false; +} + Primary_key_schema CreateTableRequestBody::getPrimaryKeySchema() const { return primaryKeySchema_; diff --git a/kvs/src/v1/model/CreateTableResponse.cpp b/kvs/src/v1/model/CreateTableResponse.cpp index dbaf8c907..3de81859b 100644 --- a/kvs/src/v1/model/CreateTableResponse.cpp +++ b/kvs/src/v1/model/CreateTableResponse.cpp @@ -15,6 +15,9 @@ CreateTableResponse::CreateTableResponse() { tableName_ = ""; tableNameIsSet_ = false; + billMode_ = ""; + billModeIsSet_ = false; + provisionedThroughputIsSet_ = false; primaryKeySchemaIsSet_ = false; localSecondaryIndexSchemaIsSet_ = false; globalSecondaryIndexSchemaIsSet_ = false; @@ -33,6 +36,12 @@ bool CreateTableResponse::toBson(Builder &builder) const if (tableNameIsSet_ && !bson_append(builder, "table_name", tableName_)) { return false; } + if (billModeIsSet_ && !bson_append(builder, "bill_mode", billMode_)) { + return false; + } + if (provisionedThroughputIsSet_ && !bson_append(builder, "provisioned_throughput", provisionedThroughput_)) { + return false; + } if (primaryKeySchemaIsSet_ && !bson_append(builder, "primary_key_schema", primaryKeySchema_)) { return false; } @@ -65,6 +74,24 @@ bool CreateTableResponse::fromBson(const Viewer &viewer) continue; } + if (key == "bill_mode") { + if (!bson_get(it, billMode_)) { + return false; + } + billModeIsSet_ = true; + ++it; + continue; + } + + if (key == "provisioned_throughput") { + if (!bson_get(it, provisionedThroughput_)) { + return false; + } + provisionedThroughputIsSet_ = true; + ++it; + continue; + } + if (key == "primary_key_schema") { if (!bson_get(it, primaryKeySchema_)) { return false; @@ -128,6 +155,48 @@ void CreateTableResponse::unsettableName() tableNameIsSet_ = false; } +std::string CreateTableResponse::getBillMode() const +{ + return billMode_; +} + +void CreateTableResponse::setBillMode(const std::string& value) +{ + billMode_ = value; + billModeIsSet_ = true; +} + +bool CreateTableResponse::billModeIsSet() const +{ + return billModeIsSet_; +} + +void CreateTableResponse::unsetbillMode() +{ + billModeIsSet_ = false; +} + +Provisioned_throughput CreateTableResponse::getProvisionedThroughput() const +{ + return provisionedThroughput_; +} + +void CreateTableResponse::setProvisionedThroughput(const Provisioned_throughput& value) +{ + provisionedThroughput_ = value; + provisionedThroughputIsSet_ = true; +} + +bool CreateTableResponse::provisionedThroughputIsSet() const +{ + return provisionedThroughputIsSet_; +} + +void CreateTableResponse::unsetprovisionedThroughput() +{ + provisionedThroughputIsSet_ = false; +} + Primary_key_schema CreateTableResponse::getPrimaryKeySchema() const { return primaryKeySchema_; diff --git a/kvs/src/v1/model/Global_secondary_index.cpp b/kvs/src/v1/model/Global_secondary_index.cpp index 9493602e3..7b3d9a9ba 100644 --- a/kvs/src/v1/model/Global_secondary_index.cpp +++ b/kvs/src/v1/model/Global_secondary_index.cpp @@ -20,6 +20,7 @@ Global_secondary_index::Global_secondary_index() shardModeIsSet_ = false; sortKeyFieldsIsSet_ = false; abstractFieldsIsSet_ = false; + provisionedThroughputIsSet_ = false; } Global_secondary_index::~Global_secondary_index() = default; @@ -46,6 +47,9 @@ bool Global_secondary_index::toBson(Builder &builder) const if (abstractFieldsIsSet_ && !bson_append(builder, "abstract_fields", abstractFields_)) { return false; } + if (provisionedThroughputIsSet_ && !bson_append(builder, "provisioned_throughput", provisionedThroughput_)) { + return false; + } return true; } @@ -102,6 +106,15 @@ bool Global_secondary_index::fromBson(const Viewer &viewer) continue; } + if (key == "provisioned_throughput") { + if (!bson_get(it, provisionedThroughput_)) { + return false; + } + provisionedThroughputIsSet_ = true; + ++it; + continue; + } + ++it; } @@ -213,6 +226,27 @@ void Global_secondary_index::unsetabstractFields() abstractFieldsIsSet_ = false; } +Provisioned_throughput Global_secondary_index::getProvisionedThroughput() const +{ + return provisionedThroughput_; +} + +void Global_secondary_index::setProvisionedThroughput(const Provisioned_throughput& value) +{ + provisionedThroughput_ = value; + provisionedThroughputIsSet_ = true; +} + +bool Global_secondary_index::provisionedThroughputIsSet() const +{ + return provisionedThroughputIsSet_; +} + +void Global_secondary_index::unsetprovisionedThroughput() +{ + provisionedThroughputIsSet_ = false; +} + } } } diff --git a/kvs/src/v1/model/Pre_split_key_options.cpp b/kvs/src/v1/model/Pre_split_key_options.cpp index ac9441cb0..8051e5b2c 100644 --- a/kvs/src/v1/model/Pre_split_key_options.cpp +++ b/kvs/src/v1/model/Pre_split_key_options.cpp @@ -13,8 +13,6 @@ namespace Model { Pre_split_key_options::Pre_split_key_options() { - hashCount_ = 0; - hashCountIsSet_ = false; rangeSplitPointsIsSet_ = false; } @@ -27,9 +25,6 @@ void Pre_split_key_options::validate() bool Pre_split_key_options::toBson(Builder &builder) const { - if (hashCountIsSet_ && !bson_append(builder, "hash_count", hashCount_)) { - return false; - } if (rangeSplitPointsIsSet_ && !bson_append(builder, "range_split_points", rangeSplitPoints_)) { return false; } @@ -44,15 +39,6 @@ bool Pre_split_key_options::fromBson(const Viewer &viewer) while (it != viewer.end()) { const std::string &key = it->key(); - if (key == "hash_count") { - if (!bson_get(it, hashCount_)) { - return false; - } - hashCountIsSet_ = true; - ++it; - continue; - } - if (key == "range_split_points") { if (!bson_get(it, rangeSplitPoints_)) { return false; @@ -68,27 +54,6 @@ bool Pre_split_key_options::fromBson(const Viewer &viewer) return true; } -int32_t Pre_split_key_options::getHashCount() const -{ - return hashCount_; -} - -void Pre_split_key_options::setHashCount(int32_t value) -{ - hashCount_ = value; - hashCountIsSet_ = true; -} - -bool Pre_split_key_options::hashCountIsSet() const -{ - return hashCountIsSet_; -} - -void Pre_split_key_options::unsethashCount() -{ - hashCountIsSet_ = false; -} - std::vector& Pre_split_key_options::getRangeSplitPoints() { return rangeSplitPoints_; diff --git a/kvs/src/v1/model/Provisioned_throughput.cpp b/kvs/src/v1/model/Provisioned_throughput.cpp new file mode 100644 index 000000000..ef88b31a1 --- /dev/null +++ b/kvs/src/v1/model/Provisioned_throughput.cpp @@ -0,0 +1,120 @@ + + +#include "huaweicloud/kvs/v1/model/Provisioned_throughput.h" +#include +namespace HuaweiCloud { +namespace Sdk { +namespace Kvs { +namespace V1 { +namespace Model { + + + + +Provisioned_throughput::Provisioned_throughput() +{ + rcu_ = 0L; + rcuIsSet_ = false; + wcu_ = 0L; + wcuIsSet_ = false; +} + +Provisioned_throughput::~Provisioned_throughput() = default; + +void Provisioned_throughput::validate() +{ +} + +bool Provisioned_throughput::toBson(Builder &builder) const +{ + + if (rcuIsSet_ && !bson_append(builder, "rcu", rcu_)) { + return false; + } + if (wcuIsSet_ && !bson_append(builder, "wcu", wcu_)) { + return false; + } + + return true; +} + +bool Provisioned_throughput::fromBson(const Viewer &viewer) +{ + + Viewer::Iterator it = viewer.begin(); + while (it != viewer.end()) { + const std::string &key = it->key(); + + if (key == "rcu") { + if (!bson_get(it, rcu_)) { + return false; + } + rcuIsSet_ = true; + ++it; + continue; + } + + if (key == "wcu") { + if (!bson_get(it, wcu_)) { + return false; + } + wcuIsSet_ = true; + ++it; + continue; + } + + ++it; + } + + return true; +} + +int64_t Provisioned_throughput::getRcu() const +{ + return rcu_; +} + +void Provisioned_throughput::setRcu(int64_t value) +{ + rcu_ = value; + rcuIsSet_ = true; +} + +bool Provisioned_throughput::rcuIsSet() const +{ + return rcuIsSet_; +} + +void Provisioned_throughput::unsetrcu() +{ + rcuIsSet_ = false; +} + +int64_t Provisioned_throughput::getWcu() const +{ + return wcu_; +} + +void Provisioned_throughput::setWcu(int64_t value) +{ + wcu_ = value; + wcuIsSet_ = true; +} + +bool Provisioned_throughput::wcuIsSet() const +{ + return wcuIsSet_; +} + +void Provisioned_throughput::unsetwcu() +{ + wcuIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/rds/include/huaweicloud/rds/v3/RdsClient.h b/rds/include/huaweicloud/rds/v3/RdsClient.h index b21610faa..d3c6973cd 100644 --- a/rds/include/huaweicloud/rds/v3/RdsClient.h +++ b/rds/include/huaweicloud/rds/v3/RdsClient.h @@ -338,6 +338,7 @@ #include #include #include +#include #include #include #include @@ -369,6 +370,8 @@ #include #include #include +#include +#include #include #include #include @@ -499,6 +502,8 @@ #include #include #include +#include +#include #include #include #include @@ -1753,6 +1758,14 @@ class HUAWEICLOUD_RDS_V3_EXPORT RdsClient : public Client std::shared_ptr updateTdeStatus( UpdateTdeStatusRequest &request ); + // RDS实例按需转包周期 + // + // RDS实例按需转包周期 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr updateToPeriod( + UpdateToPeriodRequest &request + ); // // // PostgreSQL数据库升级大版本。 @@ -2138,6 +2151,14 @@ class HUAWEICLOUD_RDS_V3_EXPORT RdsClient : public Client std::shared_ptr showPostgresqlParamValue( ShowPostgresqlParamValueRequest &request ); + // 查询wal日志恢复时间窗 + // + // 查询wal日志恢复时间窗 + // + // Please refer to HUAWEI cloud API Explorer for details. + std::shared_ptr showRecoveryTimeWindow( + ShowRecoveryTimeWindowRequest &request + ); // 获取wal日志延迟回放状态 // // 获取wal日志延迟回放状态 diff --git a/rds/include/huaweicloud/rds/v3/RdsMeta.h b/rds/include/huaweicloud/rds/v3/RdsMeta.h index ebde93798..103d98e4a 100644 --- a/rds/include/huaweicloud/rds/v3/RdsMeta.h +++ b/rds/include/huaweicloud/rds/v3/RdsMeta.h @@ -157,6 +157,7 @@ class HUAWEICLOUD_RDS_V3_EXPORT RdsMeta { static HttpRequestDef genRequestDefForUpdatePostgresqlInstanceAlias(); static HttpRequestDef genRequestDefForUpdateSqlLimit(); static HttpRequestDef genRequestDefForUpdateTdeStatus(); + static HttpRequestDef genRequestDefForUpdateToPeriod(); static HttpRequestDef genRequestDefForUpgradeDbMajorVersion(); static HttpRequestDef genRequestDefForUpgradeDbMajorVersionPreCheck(); static HttpRequestDef genRequestDefForUpgradeDbVersion(); @@ -204,6 +205,7 @@ class HUAWEICLOUD_RDS_V3_EXPORT RdsMeta { static HttpRequestDef genRequestDefForSetPostgresqlDbUserPwd(); static HttpRequestDef genRequestDefForShowInformationAboutDatabaseProxy(); static HttpRequestDef genRequestDefForShowPostgresqlParamValue(); + static HttpRequestDef genRequestDefForShowRecoveryTimeWindow(); static HttpRequestDef genRequestDefForShowReplayDelayStatus(); static HttpRequestDef genRequestDefForStartDatabaseProxy(); static HttpRequestDef genRequestDefForStopDatabaseProxy(); diff --git a/rds/include/huaweicloud/rds/v3/RdsRegion.h b/rds/include/huaweicloud/rds/v3/RdsRegion.h index dd4b4caf6..9334623aa 100644 --- a/rds/include/huaweicloud/rds/v3/RdsRegion.h +++ b/rds/include/huaweicloud/rds/v3/RdsRegion.h @@ -130,6 +130,14 @@ class HUAWEICLOUD_RDS_V3_EXPORT RdsRegion { { "https://rds.ru-moscow-1.myhuaweicloud.com" }); + regions["me-east-1"] = Region("me-east-1", + { + "https://rds.me-east-1.myhuaweicloud.com" + }); + regions["af-north-1"] = Region("af-north-1", + { + "https://rds.af-north-1.myhuaweicloud.com" + }); return regions; } private: diff --git a/rds/include/huaweicloud/rds/v3/model/ShowRecoveryTimeWindowRequest.h b/rds/include/huaweicloud/rds/v3/model/ShowRecoveryTimeWindowRequest.h new file mode 100644 index 000000000..ea61469f1 --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/ShowRecoveryTimeWindowRequest.h @@ -0,0 +1,82 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_ShowRecoveryTimeWindowRequest_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_ShowRecoveryTimeWindowRequest_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; +/// +/// Request Object +/// +class HUAWEICLOUD_RDS_V3_EXPORT ShowRecoveryTimeWindowRequest + : public ModelBase +{ +public: + ShowRecoveryTimeWindowRequest(); + virtual ~ShowRecoveryTimeWindowRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowRecoveryTimeWindowRequest members + + /// + /// 操作的实例ID + /// + + std::string getInstanceId() const; + bool instanceIdIsSet() const; + void unsetinstanceId(); + void setInstanceId(const std::string& value); + + /// + /// 语言 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + +protected: + std::string instanceId_; + bool instanceIdIsSet_; + std::string xLanguage_; + bool xLanguageIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + ShowRecoveryTimeWindowRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_ShowRecoveryTimeWindowRequest_H_ diff --git a/rds/include/huaweicloud/rds/v3/model/ShowRecoveryTimeWindowResponse.h b/rds/include/huaweicloud/rds/v3/model/ShowRecoveryTimeWindowResponse.h new file mode 100644 index 000000000..e0aa3e8b4 --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/ShowRecoveryTimeWindowResponse.h @@ -0,0 +1,78 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_ShowRecoveryTimeWindowResponse_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_ShowRecoveryTimeWindowResponse_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; +/// +/// Response Object +/// +class HUAWEICLOUD_RDS_V3_EXPORT ShowRecoveryTimeWindowResponse + : public ModelBase, public HttpResponse +{ +public: + ShowRecoveryTimeWindowResponse(); + virtual ~ShowRecoveryTimeWindowResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ShowRecoveryTimeWindowResponse members + + /// + /// 恢复时间窗左边界(不包含) + /// + + std::string getRecoveryMinTime() const; + bool recoveryMinTimeIsSet() const; + void unsetrecoveryMinTime(); + void setRecoveryMinTime(const std::string& value); + + /// + /// 恢复时间窗右边界(包含) + /// + + std::string getRecoveryMaxTime() const; + bool recoveryMaxTimeIsSet() const; + void unsetrecoveryMaxTime(); + void setRecoveryMaxTime(const std::string& value); + + +protected: + std::string recoveryMinTime_; + bool recoveryMinTimeIsSet_; + std::string recoveryMaxTime_; + bool recoveryMaxTimeIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_ShowRecoveryTimeWindowResponse_H_ diff --git a/rds/include/huaweicloud/rds/v3/model/ToPeriodReq.h b/rds/include/huaweicloud/rds/v3/model/ToPeriodReq.h new file mode 100644 index 000000000..c6e3c7340 --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/ToPeriodReq.h @@ -0,0 +1,97 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_ToPeriodReq_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_ToPeriodReq_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; +/// +/// RDS实例按需转包周期请求 +/// +class HUAWEICLOUD_RDS_V3_EXPORT ToPeriodReq + : public ModelBase +{ +public: + ToPeriodReq(); + virtual ~ToPeriodReq(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// ToPeriodReq members + + /// + /// 周期类型。MONTH:月;YEAR:年 + /// + + std::string getPeriodType() const; + bool periodTypeIsSet() const; + void unsetperiodType(); + void setPeriodType(const std::string& value); + + /// + /// 周期数。 + /// + + int32_t getPeriodNum() const; + bool periodNumIsSet() const; + void unsetperiodNum(); + void setPeriodNum(int32_t value); + + /// + /// 是否自动支付。YES:自动扣费;NO:手动支付(默认) + /// + + std::string getAutoPayPolicy() const; + bool autoPayPolicyIsSet() const; + void unsetautoPayPolicy(); + void setAutoPayPolicy(const std::string& value); + + /// + /// 是否到期自动续期。YES:自动续费;NO:不自动续费(默认) + /// + + std::string getAutoRenewPolicy() const; + bool autoRenewPolicyIsSet() const; + void unsetautoRenewPolicy(); + void setAutoRenewPolicy(const std::string& value); + + +protected: + std::string periodType_; + bool periodTypeIsSet_; + int32_t periodNum_; + bool periodNumIsSet_; + std::string autoPayPolicy_; + bool autoPayPolicyIsSet_; + std::string autoRenewPolicy_; + bool autoRenewPolicyIsSet_; + +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_ToPeriodReq_H_ diff --git a/rds/include/huaweicloud/rds/v3/model/UpdateToPeriodRequest.h b/rds/include/huaweicloud/rds/v3/model/UpdateToPeriodRequest.h new file mode 100644 index 000000000..4a43b336a --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/UpdateToPeriodRequest.h @@ -0,0 +1,94 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_UpdateToPeriodRequest_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_UpdateToPeriodRequest_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 UpdateToPeriodRequest + : public ModelBase +{ +public: + UpdateToPeriodRequest(); + virtual ~UpdateToPeriodRequest(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateToPeriodRequest members + + /// + /// 操作的实例ID + /// + + std::string getInstanceId() const; + bool instanceIdIsSet() const; + void unsetinstanceId(); + void setInstanceId(const std::string& value); + + /// + /// 语言 + /// + + std::string getXLanguage() const; + bool xLanguageIsSet() const; + void unsetxLanguage(); + void setXLanguage(const std::string& value); + + /// + /// + /// + + ToPeriodReq getBody() const; + bool bodyIsSet() const; + void unsetbody(); + void setBody(const ToPeriodReq& value); + + +protected: + std::string instanceId_; + bool instanceIdIsSet_; + std::string xLanguage_; + bool xLanguageIsSet_; + ToPeriodReq body_; + bool bodyIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +public: + UpdateToPeriodRequest& dereference_from_shared_ptr(std::shared_ptr ptr) { + return *ptr; + } +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_UpdateToPeriodRequest_H_ diff --git a/rds/include/huaweicloud/rds/v3/model/UpdateToPeriodResponse.h b/rds/include/huaweicloud/rds/v3/model/UpdateToPeriodResponse.h new file mode 100644 index 000000000..0e2fe94ba --- /dev/null +++ b/rds/include/huaweicloud/rds/v3/model/UpdateToPeriodResponse.h @@ -0,0 +1,67 @@ + +#ifndef HUAWEICLOUD_SDK_RDS_V3_MODEL_UpdateToPeriodResponse_H_ +#define HUAWEICLOUD_SDK_RDS_V3_MODEL_UpdateToPeriodResponse_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; +/// +/// Response Object +/// +class HUAWEICLOUD_RDS_V3_EXPORT UpdateToPeriodResponse + : public ModelBase, public HttpResponse +{ +public: + UpdateToPeriodResponse(); + virtual ~UpdateToPeriodResponse(); + + ///////////////////////////////////////////// + /// ModelBase overrides + + void validate() override; + web::json::value toJson() const override; + bool fromJson(const web::json::value& json) override; + ///////////////////////////////////////////// + /// UpdateToPeriodResponse members + + /// + /// 转包周期订单ID + /// + + std::string getOrderId() const; + bool orderIdIsSet() const; + void unsetorderId(); + void setOrderId(const std::string& value); + + +protected: + std::string orderId_; + bool orderIdIsSet_; + +#ifdef RTTR_FLAG + RTTR_ENABLE() +#endif +}; + + +} +} +} +} +} + +#endif // HUAWEICLOUD_SDK_RDS_V3_MODEL_UpdateToPeriodResponse_H_ diff --git a/rds/src/v3/RdsClient.cpp b/rds/src/v3/RdsClient.cpp index cdadc46f4..db2917398 100644 --- a/rds/src/v3/RdsClient.cpp +++ b/rds/src/v3/RdsClient.cpp @@ -5923,6 +5923,51 @@ std::shared_ptr RdsClient::updateTdeStatus(UpdateTdeSta return localVarResult; } +std::shared_ptr RdsClient::updateToPeriod(UpdateToPeriodRequest &request) +{ + std::string localVarPath = "/v3/{project_id}/instances/{instance_id}/to-period"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["instance_id"] = parameterToString(request.getInstanceId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", 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::genRequestDefForUpdateToPeriod()); + + 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::upgradeDbMajorVersion(UpgradeDbMajorVersionRequest &request) { std::string localVarPath = "/v3/{project_id}/instances/{instance_id}/major-version/upgrade"; @@ -7844,6 +7889,39 @@ std::shared_ptr RdsClient::showPostgresqlParam return localVarResult; } +std::shared_ptr RdsClient::showRecoveryTimeWindow(ShowRecoveryTimeWindowRequest &request) +{ + std::string localVarPath = "/v3/{project_id}/instances/{instance_id}/recovery-time"; + + std::map localVarQueryParams; + std::map localVarHeaderParams; + std::map localVarFormParams; + std::map localVarPathParams; + + localVarPathParams["instance_id"] = parameterToString(request.getInstanceId()); + + bool isJson = false; + bool isMultiPart = false; + bool isBson = false; + std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson); + localVarHeaderParams["Content-Type"] = contentType; + + if (request.xLanguageIsSet()) { + localVarHeaderParams["X-Language"] = parameterToString(request.getXLanguage()); + } + + std::string localVarHttpBody; + + std::unique_ptr res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams, + localVarHeaderParams, localVarHttpBody, RdsMeta::genRequestDefForShowRecoveryTimeWindow()); + + std::shared_ptr localVarResult = std::make_shared(); + localVarResult->setStatusCode(res->getStatusCode()); + localVarResult->setHeaderParams(res->getHeaderParams()); + localVarResult->setHttpBody(res->getHttpBody()); + + return localVarResult; +} std::shared_ptr RdsClient::showReplayDelayStatus(ShowReplayDelayStatusRequest &request) { std::string localVarPath = "/v3/{project_id}/instances/{instance_id}/replay-delay/show"; diff --git a/rds/src/v3/RdsMeta.cpp b/rds/src/v3/RdsMeta.cpp index 9e13d0ee3..93486b947 100644 --- a/rds/src/v3/RdsMeta.cpp +++ b/rds/src/v3/RdsMeta.cpp @@ -2004,6 +2004,20 @@ HttpRequestDef RdsMeta::genRequestDefForUpdateTdeStatus() { return reqDefBuilder; } +HttpRequestDef RdsMeta::genRequestDefForUpdateToPeriod() { + 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::genRequestDefForUpgradeDbMajorVersion() { HttpRequestDef reqDefBuilder; FieldDef bodyParam; @@ -2604,6 +2618,16 @@ HttpRequestDef RdsMeta::genRequestDefForShowPostgresqlParamValue() { return reqDefBuilder; } +HttpRequestDef RdsMeta::genRequestDefForShowRecoveryTimeWindow() { + HttpRequestDef reqDefBuilder; + FieldDef headerParamXLanguage; + reqDefBuilder.withRequestField(headerParamXLanguage + .withName("XLanguage") + .withJsonTag("X-Language") + .withLocationType(Header_)); + return reqDefBuilder; +} + HttpRequestDef RdsMeta::genRequestDefForShowReplayDelayStatus() { HttpRequestDef reqDefBuilder; FieldDef headerParamXLanguage; diff --git a/rds/src/v3/model/ShowRecoveryTimeWindowRequest.cpp b/rds/src/v3/model/ShowRecoveryTimeWindowRequest.cpp new file mode 100644 index 000000000..d807a1b02 --- /dev/null +++ b/rds/src/v3/model/ShowRecoveryTimeWindowRequest.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/rds/v3/model/ShowRecoveryTimeWindowRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +ShowRecoveryTimeWindowRequest::ShowRecoveryTimeWindowRequest() +{ + instanceId_ = ""; + instanceIdIsSet_ = false; + xLanguage_ = ""; + xLanguageIsSet_ = false; +} + +ShowRecoveryTimeWindowRequest::~ShowRecoveryTimeWindowRequest() = default; + +void ShowRecoveryTimeWindowRequest::validate() +{ +} + +web::json::value ShowRecoveryTimeWindowRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(instanceIdIsSet_) { + val[utility::conversions::to_string_t("instance_id")] = ModelBase::toJson(instanceId_); + } + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + + return val; +} +bool ShowRecoveryTimeWindowRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("X-Language"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("X-Language")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setXLanguage(refVal); + } + } + return ok; +} + + +std::string ShowRecoveryTimeWindowRequest::getInstanceId() const +{ + return instanceId_; +} + +void ShowRecoveryTimeWindowRequest::setInstanceId(const std::string& value) +{ + instanceId_ = value; + instanceIdIsSet_ = true; +} + +bool ShowRecoveryTimeWindowRequest::instanceIdIsSet() const +{ + return instanceIdIsSet_; +} + +void ShowRecoveryTimeWindowRequest::unsetinstanceId() +{ + instanceIdIsSet_ = false; +} + +std::string ShowRecoveryTimeWindowRequest::getXLanguage() const +{ + return xLanguage_; +} + +void ShowRecoveryTimeWindowRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool ShowRecoveryTimeWindowRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void ShowRecoveryTimeWindowRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/rds/src/v3/model/ShowRecoveryTimeWindowResponse.cpp b/rds/src/v3/model/ShowRecoveryTimeWindowResponse.cpp new file mode 100644 index 000000000..9d9e9a4f7 --- /dev/null +++ b/rds/src/v3/model/ShowRecoveryTimeWindowResponse.cpp @@ -0,0 +1,114 @@ + + +#include "huaweicloud/rds/v3/model/ShowRecoveryTimeWindowResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +ShowRecoveryTimeWindowResponse::ShowRecoveryTimeWindowResponse() +{ + recoveryMinTime_ = ""; + recoveryMinTimeIsSet_ = false; + recoveryMaxTime_ = ""; + recoveryMaxTimeIsSet_ = false; +} + +ShowRecoveryTimeWindowResponse::~ShowRecoveryTimeWindowResponse() = default; + +void ShowRecoveryTimeWindowResponse::validate() +{ +} + +web::json::value ShowRecoveryTimeWindowResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(recoveryMinTimeIsSet_) { + val[utility::conversions::to_string_t("recovery_min_time")] = ModelBase::toJson(recoveryMinTime_); + } + if(recoveryMaxTimeIsSet_) { + val[utility::conversions::to_string_t("recovery_max_time")] = ModelBase::toJson(recoveryMaxTime_); + } + + return val; +} +bool ShowRecoveryTimeWindowResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("recovery_min_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("recovery_min_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRecoveryMinTime(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("recovery_max_time"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("recovery_max_time")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setRecoveryMaxTime(refVal); + } + } + return ok; +} + + +std::string ShowRecoveryTimeWindowResponse::getRecoveryMinTime() const +{ + return recoveryMinTime_; +} + +void ShowRecoveryTimeWindowResponse::setRecoveryMinTime(const std::string& value) +{ + recoveryMinTime_ = value; + recoveryMinTimeIsSet_ = true; +} + +bool ShowRecoveryTimeWindowResponse::recoveryMinTimeIsSet() const +{ + return recoveryMinTimeIsSet_; +} + +void ShowRecoveryTimeWindowResponse::unsetrecoveryMinTime() +{ + recoveryMinTimeIsSet_ = false; +} + +std::string ShowRecoveryTimeWindowResponse::getRecoveryMaxTime() const +{ + return recoveryMaxTime_; +} + +void ShowRecoveryTimeWindowResponse::setRecoveryMaxTime(const std::string& value) +{ + recoveryMaxTime_ = value; + recoveryMaxTimeIsSet_ = true; +} + +bool ShowRecoveryTimeWindowResponse::recoveryMaxTimeIsSet() const +{ + return recoveryMaxTimeIsSet_; +} + +void ShowRecoveryTimeWindowResponse::unsetrecoveryMaxTime() +{ + recoveryMaxTimeIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/rds/src/v3/model/ToPeriodReq.cpp b/rds/src/v3/model/ToPeriodReq.cpp new file mode 100644 index 000000000..ccd8a6735 --- /dev/null +++ b/rds/src/v3/model/ToPeriodReq.cpp @@ -0,0 +1,184 @@ + + +#include "huaweicloud/rds/v3/model/ToPeriodReq.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +ToPeriodReq::ToPeriodReq() +{ + periodType_ = ""; + periodTypeIsSet_ = false; + periodNum_ = 0; + periodNumIsSet_ = false; + autoPayPolicy_ = ""; + autoPayPolicyIsSet_ = false; + autoRenewPolicy_ = ""; + autoRenewPolicyIsSet_ = false; +} + +ToPeriodReq::~ToPeriodReq() = default; + +void ToPeriodReq::validate() +{ +} + +web::json::value ToPeriodReq::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(periodTypeIsSet_) { + val[utility::conversions::to_string_t("period_type")] = ModelBase::toJson(periodType_); + } + if(periodNumIsSet_) { + val[utility::conversions::to_string_t("period_num")] = ModelBase::toJson(periodNum_); + } + if(autoPayPolicyIsSet_) { + val[utility::conversions::to_string_t("auto_pay_policy")] = ModelBase::toJson(autoPayPolicy_); + } + if(autoRenewPolicyIsSet_) { + val[utility::conversions::to_string_t("auto_renew_policy")] = ModelBase::toJson(autoRenewPolicy_); + } + + return val; +} +bool ToPeriodReq::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("period_type"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("period_type")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPeriodType(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("period_num"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("period_num")); + if(!fieldValue.is_null()) + { + int32_t refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setPeriodNum(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("auto_pay_policy"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("auto_pay_policy")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAutoPayPolicy(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("auto_renew_policy"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("auto_renew_policy")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setAutoRenewPolicy(refVal); + } + } + return ok; +} + + +std::string ToPeriodReq::getPeriodType() const +{ + return periodType_; +} + +void ToPeriodReq::setPeriodType(const std::string& value) +{ + periodType_ = value; + periodTypeIsSet_ = true; +} + +bool ToPeriodReq::periodTypeIsSet() const +{ + return periodTypeIsSet_; +} + +void ToPeriodReq::unsetperiodType() +{ + periodTypeIsSet_ = false; +} + +int32_t ToPeriodReq::getPeriodNum() const +{ + return periodNum_; +} + +void ToPeriodReq::setPeriodNum(int32_t value) +{ + periodNum_ = value; + periodNumIsSet_ = true; +} + +bool ToPeriodReq::periodNumIsSet() const +{ + return periodNumIsSet_; +} + +void ToPeriodReq::unsetperiodNum() +{ + periodNumIsSet_ = false; +} + +std::string ToPeriodReq::getAutoPayPolicy() const +{ + return autoPayPolicy_; +} + +void ToPeriodReq::setAutoPayPolicy(const std::string& value) +{ + autoPayPolicy_ = value; + autoPayPolicyIsSet_ = true; +} + +bool ToPeriodReq::autoPayPolicyIsSet() const +{ + return autoPayPolicyIsSet_; +} + +void ToPeriodReq::unsetautoPayPolicy() +{ + autoPayPolicyIsSet_ = false; +} + +std::string ToPeriodReq::getAutoRenewPolicy() const +{ + return autoRenewPolicy_; +} + +void ToPeriodReq::setAutoRenewPolicy(const std::string& value) +{ + autoRenewPolicy_ = value; + autoRenewPolicyIsSet_ = true; +} + +bool ToPeriodReq::autoRenewPolicyIsSet() const +{ + return autoRenewPolicyIsSet_; +} + +void ToPeriodReq::unsetautoRenewPolicy() +{ + autoRenewPolicyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/rds/src/v3/model/UpdateToPeriodRequest.cpp b/rds/src/v3/model/UpdateToPeriodRequest.cpp new file mode 100644 index 000000000..5f045e0c4 --- /dev/null +++ b/rds/src/v3/model/UpdateToPeriodRequest.cpp @@ -0,0 +1,148 @@ + + +#include "huaweicloud/rds/v3/model/UpdateToPeriodRequest.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +UpdateToPeriodRequest::UpdateToPeriodRequest() +{ + instanceId_ = ""; + instanceIdIsSet_ = false; + xLanguage_ = ""; + xLanguageIsSet_ = false; + bodyIsSet_ = false; +} + +UpdateToPeriodRequest::~UpdateToPeriodRequest() = default; + +void UpdateToPeriodRequest::validate() +{ +} + +web::json::value UpdateToPeriodRequest::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(instanceIdIsSet_) { + val[utility::conversions::to_string_t("instance_id")] = ModelBase::toJson(instanceId_); + } + if(xLanguageIsSet_) { + val[utility::conversions::to_string_t("X-Language")] = ModelBase::toJson(xLanguage_); + } + if(bodyIsSet_) { + val[utility::conversions::to_string_t("body")] = ModelBase::toJson(body_); + } + + return val; +} +bool UpdateToPeriodRequest::fromJson(const web::json::value& val) +{ + bool ok = true; + + if(val.has_field(utility::conversions::to_string_t("instance_id"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("instance_id")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setInstanceId(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("X-Language"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("X-Language")); + if(!fieldValue.is_null()) + { + std::string refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setXLanguage(refVal); + } + } + if(val.has_field(utility::conversions::to_string_t("body"))) { + const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("body")); + if(!fieldValue.is_null()) + { + ToPeriodReq refVal; + ok &= ModelBase::fromJson(fieldValue, refVal); + setBody(refVal); + } + } + return ok; +} + + +std::string UpdateToPeriodRequest::getInstanceId() const +{ + return instanceId_; +} + +void UpdateToPeriodRequest::setInstanceId(const std::string& value) +{ + instanceId_ = value; + instanceIdIsSet_ = true; +} + +bool UpdateToPeriodRequest::instanceIdIsSet() const +{ + return instanceIdIsSet_; +} + +void UpdateToPeriodRequest::unsetinstanceId() +{ + instanceIdIsSet_ = false; +} + +std::string UpdateToPeriodRequest::getXLanguage() const +{ + return xLanguage_; +} + +void UpdateToPeriodRequest::setXLanguage(const std::string& value) +{ + xLanguage_ = value; + xLanguageIsSet_ = true; +} + +bool UpdateToPeriodRequest::xLanguageIsSet() const +{ + return xLanguageIsSet_; +} + +void UpdateToPeriodRequest::unsetxLanguage() +{ + xLanguageIsSet_ = false; +} + +ToPeriodReq UpdateToPeriodRequest::getBody() const +{ + return body_; +} + +void UpdateToPeriodRequest::setBody(const ToPeriodReq& value) +{ + body_ = value; + bodyIsSet_ = true; +} + +bool UpdateToPeriodRequest::bodyIsSet() const +{ + return bodyIsSet_; +} + +void UpdateToPeriodRequest::unsetbody() +{ + bodyIsSet_ = false; +} + +} +} +} +} +} + + diff --git a/rds/src/v3/model/UpdateToPeriodResponse.cpp b/rds/src/v3/model/UpdateToPeriodResponse.cpp new file mode 100644 index 000000000..0e645fa67 --- /dev/null +++ b/rds/src/v3/model/UpdateToPeriodResponse.cpp @@ -0,0 +1,79 @@ + + +#include "huaweicloud/rds/v3/model/UpdateToPeriodResponse.h" +namespace HuaweiCloud { +namespace Sdk { +namespace Rds { +namespace V3 { +namespace Model { + + + + +UpdateToPeriodResponse::UpdateToPeriodResponse() +{ + orderId_ = ""; + orderIdIsSet_ = false; +} + +UpdateToPeriodResponse::~UpdateToPeriodResponse() = default; + +void UpdateToPeriodResponse::validate() +{ +} + +web::json::value UpdateToPeriodResponse::toJson() const +{ + web::json::value val = web::json::value::object(); + + if(orderIdIsSet_) { + val[utility::conversions::to_string_t("order_id")] = ModelBase::toJson(orderId_); + } + + return val; +} +bool UpdateToPeriodResponse::fromJson(const web::json::value& val) +{ + bool ok = true; + + 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); + } + } + return ok; +} + + +std::string UpdateToPeriodResponse::getOrderId() const +{ + return orderId_; +} + +void UpdateToPeriodResponse::setOrderId(const std::string& value) +{ + orderId_ = value; + orderIdIsSet_ = true; +} + +bool UpdateToPeriodResponse::orderIdIsSet() const +{ + return orderIdIsSet_; +} + +void UpdateToPeriodResponse::unsetorderId() +{ + orderIdIsSet_ = false; +} + +} +} +} +} +} + +