diff --git a/CHANGELOG b/CHANGELOG index e64277020..cbe5e6369 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2022-01-28 Version: 1.36.1047 +- Update by SDK platform. + 2022-01-28 Version: 1.36.1046 - Support SIP phone management. diff --git a/VERSION b/VERSION index 449133be1..2f93e4dbd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1046 \ No newline at end of file +1.36.1047 \ No newline at end of file diff --git a/dds/CMakeLists.txt b/dds/CMakeLists.txt index 3a7ae4060..d938c70ae 100644 --- a/dds/CMakeLists.txt +++ b/dds/CMakeLists.txt @@ -87,6 +87,8 @@ set(dds_public_header_model include/alibabacloud/dds/model/DescribeDBInstanceTDEInfoResult.h include/alibabacloud/dds/model/DescribeDBInstancesRequest.h include/alibabacloud/dds/model/DescribeDBInstancesResult.h + include/alibabacloud/dds/model/DescribeDBInstancesOverviewRequest.h + include/alibabacloud/dds/model/DescribeDBInstancesOverviewResult.h include/alibabacloud/dds/model/DescribeDedicatedClusterInstanceListRequest.h include/alibabacloud/dds/model/DescribeDedicatedClusterInstanceListResult.h include/alibabacloud/dds/model/DescribeErrorLogRecordsRequest.h @@ -272,6 +274,8 @@ set(dds_src src/model/DescribeDBInstanceTDEInfoResult.cc src/model/DescribeDBInstancesRequest.cc src/model/DescribeDBInstancesResult.cc + src/model/DescribeDBInstancesOverviewRequest.cc + src/model/DescribeDBInstancesOverviewResult.cc src/model/DescribeDedicatedClusterInstanceListRequest.cc src/model/DescribeDedicatedClusterInstanceListResult.cc src/model/DescribeErrorLogRecordsRequest.cc diff --git a/dds/include/alibabacloud/dds/DdsClient.h b/dds/include/alibabacloud/dds/DdsClient.h index 01493018a..f78c56290 100644 --- a/dds/include/alibabacloud/dds/DdsClient.h +++ b/dds/include/alibabacloud/dds/DdsClient.h @@ -88,6 +88,8 @@ #include "model/DescribeDBInstanceTDEInfoResult.h" #include "model/DescribeDBInstancesRequest.h" #include "model/DescribeDBInstancesResult.h" +#include "model/DescribeDBInstancesOverviewRequest.h" +#include "model/DescribeDBInstancesOverviewResult.h" #include "model/DescribeDedicatedClusterInstanceListRequest.h" #include "model/DescribeDedicatedClusterInstanceListResult.h" #include "model/DescribeErrorLogRecordsRequest.h" @@ -312,6 +314,9 @@ namespace AlibabaCloud typedef Outcome DescribeDBInstancesOutcome; typedef std::future DescribeDBInstancesOutcomeCallable; typedef std::function&)> DescribeDBInstancesAsyncHandler; + typedef Outcome DescribeDBInstancesOverviewOutcome; + typedef std::future DescribeDBInstancesOverviewOutcomeCallable; + typedef std::function&)> DescribeDBInstancesOverviewAsyncHandler; typedef Outcome DescribeDedicatedClusterInstanceListOutcome; typedef std::future DescribeDedicatedClusterInstanceListOutcomeCallable; typedef std::function&)> DescribeDedicatedClusterInstanceListAsyncHandler; @@ -590,6 +595,9 @@ namespace AlibabaCloud DescribeDBInstancesOutcome describeDBInstances(const Model::DescribeDBInstancesRequest &request)const; void describeDBInstancesAsync(const Model::DescribeDBInstancesRequest& request, const DescribeDBInstancesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeDBInstancesOutcomeCallable describeDBInstancesCallable(const Model::DescribeDBInstancesRequest& request) const; + DescribeDBInstancesOverviewOutcome describeDBInstancesOverview(const Model::DescribeDBInstancesOverviewRequest &request)const; + void describeDBInstancesOverviewAsync(const Model::DescribeDBInstancesOverviewRequest& request, const DescribeDBInstancesOverviewAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeDBInstancesOverviewOutcomeCallable describeDBInstancesOverviewCallable(const Model::DescribeDBInstancesOverviewRequest& request) const; DescribeDedicatedClusterInstanceListOutcome describeDedicatedClusterInstanceList(const Model::DescribeDedicatedClusterInstanceListRequest &request)const; void describeDedicatedClusterInstanceListAsync(const Model::DescribeDedicatedClusterInstanceListRequest& request, const DescribeDedicatedClusterInstanceListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeDedicatedClusterInstanceListOutcomeCallable describeDedicatedClusterInstanceListCallable(const Model::DescribeDedicatedClusterInstanceListRequest& request) const; diff --git a/dds/include/alibabacloud/dds/model/DescribeBackupsResult.h b/dds/include/alibabacloud/dds/model/DescribeBackupsResult.h index aa38ace3c..4d40c803a 100644 --- a/dds/include/alibabacloud/dds/model/DescribeBackupsResult.h +++ b/dds/include/alibabacloud/dds/model/DescribeBackupsResult.h @@ -37,12 +37,12 @@ namespace AlibabaCloud std::string backupMethod; std::string backupDownloadURL; std::string backupIntranetDownloadURL; - std::string backupEndTime; - std::string backupMode; long backupSize; + std::string backupMode; + std::string backupEndTime; std::string backupStartTime; - int backupId; std::string backupType; + int backupId; std::string backupDBNames; std::string backupStatus; }; diff --git a/dds/include/alibabacloud/dds/model/DescribeDBInstancesOverviewRequest.h b/dds/include/alibabacloud/dds/model/DescribeDBInstancesOverviewRequest.h new file mode 100644 index 000000000..c0bc68290 --- /dev/null +++ b/dds/include/alibabacloud/dds/model/DescribeDBInstancesOverviewRequest.h @@ -0,0 +1,99 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_DDS_MODEL_DESCRIBEDBINSTANCESOVERVIEWREQUEST_H_ +#define ALIBABACLOUD_DDS_MODEL_DESCRIBEDBINSTANCESOVERVIEWREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dds + { + namespace Model + { + class ALIBABACLOUD_DDS_EXPORT DescribeDBInstancesOverviewRequest : public RpcServiceRequest + { + + public: + DescribeDBInstancesOverviewRequest(); + ~DescribeDBInstancesOverviewRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getNetworkType()const; + void setNetworkType(const std::string& networkType); + std::string getEngineVersion()const; + void setEngineVersion(const std::string& engineVersion); + std::string getInstanceClass()const; + void setInstanceClass(const std::string& instanceClass); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + std::string getResourceGroupId()const; + void setResourceGroupId(const std::string& resourceGroupId); + std::string getSecurityToken()const; + void setSecurityToken(const std::string& securityToken); + std::string getRegionId()const; + void setRegionId(const std::string& regionId); + std::string getInstanceType()const; + void setInstanceType(const std::string& instanceType); + std::string getInstanceStatus()const; + void setInstanceStatus(const std::string& instanceStatus); + std::string getResourceOwnerAccount()const; + void setResourceOwnerAccount(const std::string& resourceOwnerAccount); + std::string getOwnerAccount()const; + void setOwnerAccount(const std::string& ownerAccount); + long getOwnerId()const; + void setOwnerId(long ownerId); + std::string getVSwitchId()const; + void setVSwitchId(const std::string& vSwitchId); + std::string getInstanceIds()const; + void setInstanceIds(const std::string& instanceIds); + std::string getVpcId()const; + void setVpcId(const std::string& vpcId); + std::string getZoneId()const; + void setZoneId(const std::string& zoneId); + std::string getChargeType()const; + void setChargeType(const std::string& chargeType); + + private: + long resourceOwnerId_; + std::string networkType_; + std::string engineVersion_; + std::string instanceClass_; + std::string accessKeyId_; + std::string resourceGroupId_; + std::string securityToken_; + std::string regionId_; + std::string instanceType_; + std::string instanceStatus_; + std::string resourceOwnerAccount_; + std::string ownerAccount_; + long ownerId_; + std::string vSwitchId_; + std::string instanceIds_; + std::string vpcId_; + std::string zoneId_; + std::string chargeType_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DDS_MODEL_DESCRIBEDBINSTANCESOVERVIEWREQUEST_H_ \ No newline at end of file diff --git a/dds/include/alibabacloud/dds/model/DescribeDBInstancesOverviewResult.h b/dds/include/alibabacloud/dds/model/DescribeDBInstancesOverviewResult.h new file mode 100644 index 000000000..204423fcb --- /dev/null +++ b/dds/include/alibabacloud/dds/model/DescribeDBInstancesOverviewResult.h @@ -0,0 +1,100 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_DDS_MODEL_DESCRIBEDBINSTANCESOVERVIEWRESULT_H_ +#define ALIBABACLOUD_DDS_MODEL_DESCRIBEDBINSTANCESOVERVIEWRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dds + { + namespace Model + { + class ALIBABACLOUD_DDS_EXPORT DescribeDBInstancesOverviewResult : public ServiceResult + { + public: + struct DBInstance + { + struct Tag + { + std::string value; + std::string key; + }; + struct ShardAttribute + { + std::string nodeClass; + std::string nodeDescription; + int readonlyReplicas; + int nodeStorage; + std::string nodeId; + }; + struct MongosAttribute + { + std::string nodeClass; + std::string nodeDescription; + std::string nodeId; + }; + std::string resourceGroupId; + std::string capacityUnit; + std::string destroyTime; + std::string dBInstanceType; + std::vector mongosList; + std::string dBInstanceId; + std::string networkType; + std::string lastDowngradeTime; + int dBInstanceStorage; + std::vector tags; + std::string engine; + std::string dBInstanceDescription; + std::string engineVersion; + std::string dBInstanceStatus; + std::string zoneId; + std::string replicationFactor; + std::string dBInstanceClass; + std::vector shardList; + std::string lockMode; + std::string chargeType; + std::string vpcAuthMode; + std::string creationTime; + std::string regionId; + std::string expireTime; + std::string kindCode; + }; + + + DescribeDBInstancesOverviewResult(); + explicit DescribeDBInstancesOverviewResult(const std::string &payload); + ~DescribeDBInstancesOverviewResult(); + std::string getTotalCount()const; + std::vector getDBInstances()const; + + protected: + void parse(const std::string &payload); + private: + std::string totalCount_; + std::vector dBInstances_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DDS_MODEL_DESCRIBEDBINSTANCESOVERVIEWRESULT_H_ \ No newline at end of file diff --git a/dds/include/alibabacloud/dds/model/DescribeMongoDBLogConfigResult.h b/dds/include/alibabacloud/dds/model/DescribeMongoDBLogConfigResult.h index 8c03b0dc4..f567f8831 100644 --- a/dds/include/alibabacloud/dds/model/DescribeMongoDBLogConfigResult.h +++ b/dds/include/alibabacloud/dds/model/DescribeMongoDBLogConfigResult.h @@ -37,16 +37,32 @@ namespace AlibabaCloud DescribeMongoDBLogConfigResult(); explicit DescribeMongoDBLogConfigResult(const std::string &payload); ~DescribeMongoDBLogConfigResult(); + bool getEnableAudit()const; + long getTtlForStandard()const; + long getPreserveStorageForStandard()const; std::string getUserProjectName()const; + std::string getServiceType()const; int getIsUserProjectLogstoreExist()const; + long getUsedStorageForTrail()const; + long getPreserveStorageForTrail()const; int getIsEtlMetaExist()const; + long getTtlForTrail()const; + long getUsedStorageForStandard()const; protected: void parse(const std::string &payload); private: + bool enableAudit_; + long ttlForStandard_; + long preserveStorageForStandard_; std::string userProjectName_; + std::string serviceType_; int isUserProjectLogstoreExist_; + long usedStorageForTrail_; + long preserveStorageForTrail_; int isEtlMetaExist_; + long ttlForTrail_; + long usedStorageForStandard_; }; } diff --git a/dds/include/alibabacloud/dds/model/DescribeRenewalPriceResult.h b/dds/include/alibabacloud/dds/model/DescribeRenewalPriceResult.h index 3e89cade5..a56261e36 100644 --- a/dds/include/alibabacloud/dds/model/DescribeRenewalPriceResult.h +++ b/dds/include/alibabacloud/dds/model/DescribeRenewalPriceResult.h @@ -48,12 +48,6 @@ namespace AlibabaCloud float originalAmount; float discountAmount; }; - struct Rule - { - long ruleDescId; - std::string title; - std::string name; - }; struct SubOrder { std::string instanceId; @@ -62,6 +56,12 @@ namespace AlibabaCloud float originalAmount; float discountAmount; }; + struct Rule + { + long ruleDescId; + std::string title; + std::string name; + }; DescribeRenewalPriceResult(); diff --git a/dds/include/alibabacloud/dds/model/DescribeShardingNetworkAddressResult.h b/dds/include/alibabacloud/dds/model/DescribeShardingNetworkAddressResult.h index d553f19c1..2fabef5b5 100644 --- a/dds/include/alibabacloud/dds/model/DescribeShardingNetworkAddressResult.h +++ b/dds/include/alibabacloud/dds/model/DescribeShardingNetworkAddressResult.h @@ -32,26 +32,26 @@ namespace AlibabaCloud class ALIBABACLOUD_DDS_EXPORT DescribeShardingNetworkAddressResult : public ServiceResult { public: + struct CompatibleConnection + { + std::string networkAddress; + std::string vPCId; + std::string networkType; + std::string expiredTime; + std::string port; + std::string iPAddress; + std::string vswitchId; + }; struct NetworkAddress { std::string role; std::string networkAddress; std::string vPCId; std::string networkType; - std::string port; - std::string expiredTime; std::string nodeType; - std::string nodeId; - std::string iPAddress; - std::string vswitchId; - }; - struct CompatibleConnection - { - std::string networkAddress; - std::string vPCId; - std::string networkType; - std::string port; std::string expiredTime; + std::string port; + std::string nodeId; std::string iPAddress; std::string vswitchId; }; diff --git a/dds/include/alibabacloud/dds/model/ModifyAuditPolicyRequest.h b/dds/include/alibabacloud/dds/model/ModifyAuditPolicyRequest.h index c44aff7fa..c6ec9353d 100644 --- a/dds/include/alibabacloud/dds/model/ModifyAuditPolicyRequest.h +++ b/dds/include/alibabacloud/dds/model/ModifyAuditPolicyRequest.h @@ -43,6 +43,8 @@ namespace AlibabaCloud void setAccessKeyId(const std::string& accessKeyId); std::string getSecurityToken()const; void setSecurityToken(const std::string& securityToken); + std::string getAuditLogSwitchSource()const; + void setAuditLogSwitchSource(const std::string& auditLogSwitchSource); std::string getDBInstanceId()const; void setDBInstanceId(const std::string& dBInstanceId); std::string getAuditStatus()const; @@ -53,17 +55,21 @@ namespace AlibabaCloud void setOwnerAccount(const std::string& ownerAccount); long getOwnerId()const; void setOwnerId(long ownerId); + std::string getServiceType()const; + void setServiceType(const std::string& serviceType); private: long resourceOwnerId_; int storagePeriod_; std::string accessKeyId_; std::string securityToken_; + std::string auditLogSwitchSource_; std::string dBInstanceId_; std::string auditStatus_; std::string resourceOwnerAccount_; std::string ownerAccount_; long ownerId_; + std::string serviceType_; }; } diff --git a/dds/src/DdsClient.cc b/dds/src/DdsClient.cc index de959c73a..30cf64917 100644 --- a/dds/src/DdsClient.cc +++ b/dds/src/DdsClient.cc @@ -1239,6 +1239,42 @@ DdsClient::DescribeDBInstancesOutcomeCallable DdsClient::describeDBInstancesCall return task->get_future(); } +DdsClient::DescribeDBInstancesOverviewOutcome DdsClient::describeDBInstancesOverview(const DescribeDBInstancesOverviewRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeDBInstancesOverviewOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeDBInstancesOverviewOutcome(DescribeDBInstancesOverviewResult(outcome.result())); + else + return DescribeDBInstancesOverviewOutcome(outcome.error()); +} + +void DdsClient::describeDBInstancesOverviewAsync(const DescribeDBInstancesOverviewRequest& request, const DescribeDBInstancesOverviewAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeDBInstancesOverview(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +DdsClient::DescribeDBInstancesOverviewOutcomeCallable DdsClient::describeDBInstancesOverviewCallable(const DescribeDBInstancesOverviewRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeDBInstancesOverview(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + DdsClient::DescribeDedicatedClusterInstanceListOutcome DdsClient::describeDedicatedClusterInstanceList(const DescribeDedicatedClusterInstanceListRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/dds/src/model/DescribeBackupsResult.cc b/dds/src/model/DescribeBackupsResult.cc index a6024f533..17570986b 100644 --- a/dds/src/model/DescribeBackupsResult.cc +++ b/dds/src/model/DescribeBackupsResult.cc @@ -43,36 +43,36 @@ void DescribeBackupsResult::parse(const std::string &payload) for (auto valueBackupsBackup : allBackupsNode) { Backup backupsObject; - if(!valueBackupsBackup["BackupDBNames"].isNull()) - backupsObject.backupDBNames = valueBackupsBackup["BackupDBNames"].asString(); - if(!valueBackupsBackup["BackupId"].isNull()) - backupsObject.backupId = std::stoi(valueBackupsBackup["BackupId"].asString()); if(!valueBackupsBackup["BackupStatus"].isNull()) backupsObject.backupStatus = valueBackupsBackup["BackupStatus"].asString(); - if(!valueBackupsBackup["BackupStartTime"].isNull()) - backupsObject.backupStartTime = valueBackupsBackup["BackupStartTime"].asString(); - if(!valueBackupsBackup["BackupEndTime"].isNull()) - backupsObject.backupEndTime = valueBackupsBackup["BackupEndTime"].asString(); if(!valueBackupsBackup["BackupType"].isNull()) backupsObject.backupType = valueBackupsBackup["BackupType"].asString(); - if(!valueBackupsBackup["BackupMode"].isNull()) - backupsObject.backupMode = valueBackupsBackup["BackupMode"].asString(); - if(!valueBackupsBackup["BackupMethod"].isNull()) - backupsObject.backupMethod = valueBackupsBackup["BackupMethod"].asString(); - if(!valueBackupsBackup["BackupDownloadURL"].isNull()) - backupsObject.backupDownloadURL = valueBackupsBackup["BackupDownloadURL"].asString(); + if(!valueBackupsBackup["BackupStartTime"].isNull()) + backupsObject.backupStartTime = valueBackupsBackup["BackupStartTime"].asString(); if(!valueBackupsBackup["BackupIntranetDownloadURL"].isNull()) backupsObject.backupIntranetDownloadURL = valueBackupsBackup["BackupIntranetDownloadURL"].asString(); if(!valueBackupsBackup["BackupSize"].isNull()) backupsObject.backupSize = std::stol(valueBackupsBackup["BackupSize"].asString()); + if(!valueBackupsBackup["BackupDownloadURL"].isNull()) + backupsObject.backupDownloadURL = valueBackupsBackup["BackupDownloadURL"].asString(); + if(!valueBackupsBackup["BackupMode"].isNull()) + backupsObject.backupMode = valueBackupsBackup["BackupMode"].asString(); + if(!valueBackupsBackup["BackupEndTime"].isNull()) + backupsObject.backupEndTime = valueBackupsBackup["BackupEndTime"].asString(); + if(!valueBackupsBackup["BackupId"].isNull()) + backupsObject.backupId = std::stoi(valueBackupsBackup["BackupId"].asString()); + if(!valueBackupsBackup["BackupDBNames"].isNull()) + backupsObject.backupDBNames = valueBackupsBackup["BackupDBNames"].asString(); + if(!valueBackupsBackup["BackupMethod"].isNull()) + backupsObject.backupMethod = valueBackupsBackup["BackupMethod"].asString(); backups_.push_back(backupsObject); } - if(!value["PageNumber"].isNull()) - pageNumber_ = std::stoi(value["PageNumber"].asString()); - if(!value["PageSize"].isNull()) - pageSize_ = std::stoi(value["PageSize"].asString()); if(!value["TotalCount"].isNull()) totalCount_ = std::stoi(value["TotalCount"].asString()); + if(!value["PageSize"].isNull()) + pageSize_ = std::stoi(value["PageSize"].asString()); + if(!value["PageNumber"].isNull()) + pageNumber_ = std::stoi(value["PageNumber"].asString()); } diff --git a/dds/src/model/DescribeDBInstancesOverviewRequest.cc b/dds/src/model/DescribeDBInstancesOverviewRequest.cc new file mode 100644 index 000000000..0feec24be --- /dev/null +++ b/dds/src/model/DescribeDBInstancesOverviewRequest.cc @@ -0,0 +1,227 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Dds::Model::DescribeDBInstancesOverviewRequest; + +DescribeDBInstancesOverviewRequest::DescribeDBInstancesOverviewRequest() : + RpcServiceRequest("dds", "2015-12-01", "DescribeDBInstancesOverview") +{ + setMethod(HttpRequest::Method::Post); +} + +DescribeDBInstancesOverviewRequest::~DescribeDBInstancesOverviewRequest() +{} + +long DescribeDBInstancesOverviewRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void DescribeDBInstancesOverviewRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string DescribeDBInstancesOverviewRequest::getNetworkType()const +{ + return networkType_; +} + +void DescribeDBInstancesOverviewRequest::setNetworkType(const std::string& networkType) +{ + networkType_ = networkType; + setParameter("NetworkType", networkType); +} + +std::string DescribeDBInstancesOverviewRequest::getEngineVersion()const +{ + return engineVersion_; +} + +void DescribeDBInstancesOverviewRequest::setEngineVersion(const std::string& engineVersion) +{ + engineVersion_ = engineVersion; + setParameter("EngineVersion", engineVersion); +} + +std::string DescribeDBInstancesOverviewRequest::getInstanceClass()const +{ + return instanceClass_; +} + +void DescribeDBInstancesOverviewRequest::setInstanceClass(const std::string& instanceClass) +{ + instanceClass_ = instanceClass; + setParameter("InstanceClass", instanceClass); +} + +std::string DescribeDBInstancesOverviewRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void DescribeDBInstancesOverviewRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string DescribeDBInstancesOverviewRequest::getResourceGroupId()const +{ + return resourceGroupId_; +} + +void DescribeDBInstancesOverviewRequest::setResourceGroupId(const std::string& resourceGroupId) +{ + resourceGroupId_ = resourceGroupId; + setParameter("ResourceGroupId", resourceGroupId); +} + +std::string DescribeDBInstancesOverviewRequest::getSecurityToken()const +{ + return securityToken_; +} + +void DescribeDBInstancesOverviewRequest::setSecurityToken(const std::string& securityToken) +{ + securityToken_ = securityToken; + setParameter("SecurityToken", securityToken); +} + +std::string DescribeDBInstancesOverviewRequest::getRegionId()const +{ + return regionId_; +} + +void DescribeDBInstancesOverviewRequest::setRegionId(const std::string& regionId) +{ + regionId_ = regionId; + setParameter("RegionId", regionId); +} + +std::string DescribeDBInstancesOverviewRequest::getInstanceType()const +{ + return instanceType_; +} + +void DescribeDBInstancesOverviewRequest::setInstanceType(const std::string& instanceType) +{ + instanceType_ = instanceType; + setParameter("InstanceType", instanceType); +} + +std::string DescribeDBInstancesOverviewRequest::getInstanceStatus()const +{ + return instanceStatus_; +} + +void DescribeDBInstancesOverviewRequest::setInstanceStatus(const std::string& instanceStatus) +{ + instanceStatus_ = instanceStatus; + setParameter("InstanceStatus", instanceStatus); +} + +std::string DescribeDBInstancesOverviewRequest::getResourceOwnerAccount()const +{ + return resourceOwnerAccount_; +} + +void DescribeDBInstancesOverviewRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount) +{ + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter("ResourceOwnerAccount", resourceOwnerAccount); +} + +std::string DescribeDBInstancesOverviewRequest::getOwnerAccount()const +{ + return ownerAccount_; +} + +void DescribeDBInstancesOverviewRequest::setOwnerAccount(const std::string& ownerAccount) +{ + ownerAccount_ = ownerAccount; + setParameter("OwnerAccount", ownerAccount); +} + +long DescribeDBInstancesOverviewRequest::getOwnerId()const +{ + return ownerId_; +} + +void DescribeDBInstancesOverviewRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + +std::string DescribeDBInstancesOverviewRequest::getVSwitchId()const +{ + return vSwitchId_; +} + +void DescribeDBInstancesOverviewRequest::setVSwitchId(const std::string& vSwitchId) +{ + vSwitchId_ = vSwitchId; + setParameter("VSwitchId", vSwitchId); +} + +std::string DescribeDBInstancesOverviewRequest::getInstanceIds()const +{ + return instanceIds_; +} + +void DescribeDBInstancesOverviewRequest::setInstanceIds(const std::string& instanceIds) +{ + instanceIds_ = instanceIds; + setParameter("InstanceIds", instanceIds); +} + +std::string DescribeDBInstancesOverviewRequest::getVpcId()const +{ + return vpcId_; +} + +void DescribeDBInstancesOverviewRequest::setVpcId(const std::string& vpcId) +{ + vpcId_ = vpcId; + setParameter("VpcId", vpcId); +} + +std::string DescribeDBInstancesOverviewRequest::getZoneId()const +{ + return zoneId_; +} + +void DescribeDBInstancesOverviewRequest::setZoneId(const std::string& zoneId) +{ + zoneId_ = zoneId; + setParameter("ZoneId", zoneId); +} + +std::string DescribeDBInstancesOverviewRequest::getChargeType()const +{ + return chargeType_; +} + +void DescribeDBInstancesOverviewRequest::setChargeType(const std::string& chargeType) +{ + chargeType_ = chargeType; + setParameter("ChargeType", chargeType); +} + diff --git a/dds/src/model/DescribeDBInstancesOverviewResult.cc b/dds/src/model/DescribeDBInstancesOverviewResult.cc new file mode 100644 index 000000000..bea05c679 --- /dev/null +++ b/dds/src/model/DescribeDBInstancesOverviewResult.cc @@ -0,0 +1,144 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Dds; +using namespace AlibabaCloud::Dds::Model; + +DescribeDBInstancesOverviewResult::DescribeDBInstancesOverviewResult() : + ServiceResult() +{} + +DescribeDBInstancesOverviewResult::DescribeDBInstancesOverviewResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeDBInstancesOverviewResult::~DescribeDBInstancesOverviewResult() +{} + +void DescribeDBInstancesOverviewResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allDBInstancesNode = value["DBInstances"]["DBInstance"]; + for (auto valueDBInstancesDBInstance : allDBInstancesNode) + { + DBInstance dBInstancesObject; + if(!valueDBInstancesDBInstance["CreationTime"].isNull()) + dBInstancesObject.creationTime = valueDBInstancesDBInstance["CreationTime"].asString(); + if(!valueDBInstancesDBInstance["ExpireTime"].isNull()) + dBInstancesObject.expireTime = valueDBInstancesDBInstance["ExpireTime"].asString(); + if(!valueDBInstancesDBInstance["LastDowngradeTime"].isNull()) + dBInstancesObject.lastDowngradeTime = valueDBInstancesDBInstance["LastDowngradeTime"].asString(); + if(!valueDBInstancesDBInstance["DBInstanceType"].isNull()) + dBInstancesObject.dBInstanceType = valueDBInstancesDBInstance["DBInstanceType"].asString(); + if(!valueDBInstancesDBInstance["DestroyTime"].isNull()) + dBInstancesObject.destroyTime = valueDBInstancesDBInstance["DestroyTime"].asString(); + if(!valueDBInstancesDBInstance["ChargeType"].isNull()) + dBInstancesObject.chargeType = valueDBInstancesDBInstance["ChargeType"].asString(); + if(!valueDBInstancesDBInstance["CapacityUnit"].isNull()) + dBInstancesObject.capacityUnit = valueDBInstancesDBInstance["CapacityUnit"].asString(); + if(!valueDBInstancesDBInstance["VpcAuthMode"].isNull()) + dBInstancesObject.vpcAuthMode = valueDBInstancesDBInstance["VpcAuthMode"].asString(); + if(!valueDBInstancesDBInstance["DBInstanceStatus"].isNull()) + dBInstancesObject.dBInstanceStatus = valueDBInstancesDBInstance["DBInstanceStatus"].asString(); + if(!valueDBInstancesDBInstance["NetworkType"].isNull()) + dBInstancesObject.networkType = valueDBInstancesDBInstance["NetworkType"].asString(); + if(!valueDBInstancesDBInstance["LockMode"].isNull()) + dBInstancesObject.lockMode = valueDBInstancesDBInstance["LockMode"].asString(); + if(!valueDBInstancesDBInstance["EngineVersion"].isNull()) + dBInstancesObject.engineVersion = valueDBInstancesDBInstance["EngineVersion"].asString(); + if(!valueDBInstancesDBInstance["RegionId"].isNull()) + dBInstancesObject.regionId = valueDBInstancesDBInstance["RegionId"].asString(); + if(!valueDBInstancesDBInstance["DBInstanceStorage"].isNull()) + dBInstancesObject.dBInstanceStorage = std::stoi(valueDBInstancesDBInstance["DBInstanceStorage"].asString()); + if(!valueDBInstancesDBInstance["ResourceGroupId"].isNull()) + dBInstancesObject.resourceGroupId = valueDBInstancesDBInstance["ResourceGroupId"].asString(); + if(!valueDBInstancesDBInstance["ZoneId"].isNull()) + dBInstancesObject.zoneId = valueDBInstancesDBInstance["ZoneId"].asString(); + if(!valueDBInstancesDBInstance["DBInstanceId"].isNull()) + dBInstancesObject.dBInstanceId = valueDBInstancesDBInstance["DBInstanceId"].asString(); + if(!valueDBInstancesDBInstance["DBInstanceClass"].isNull()) + dBInstancesObject.dBInstanceClass = valueDBInstancesDBInstance["DBInstanceClass"].asString(); + if(!valueDBInstancesDBInstance["Engine"].isNull()) + dBInstancesObject.engine = valueDBInstancesDBInstance["Engine"].asString(); + if(!valueDBInstancesDBInstance["ReplicationFactor"].isNull()) + dBInstancesObject.replicationFactor = valueDBInstancesDBInstance["ReplicationFactor"].asString(); + if(!valueDBInstancesDBInstance["DBInstanceDescription"].isNull()) + dBInstancesObject.dBInstanceDescription = valueDBInstancesDBInstance["DBInstanceDescription"].asString(); + if(!valueDBInstancesDBInstance["KindCode"].isNull()) + dBInstancesObject.kindCode = valueDBInstancesDBInstance["KindCode"].asString(); + auto allTagsNode = valueDBInstancesDBInstance["Tags"]["Tag"]; + for (auto valueDBInstancesDBInstanceTagsTag : allTagsNode) + { + DBInstance::Tag tagsObject; + if(!valueDBInstancesDBInstanceTagsTag["Key"].isNull()) + tagsObject.key = valueDBInstancesDBInstanceTagsTag["Key"].asString(); + if(!valueDBInstancesDBInstanceTagsTag["Value"].isNull()) + tagsObject.value = valueDBInstancesDBInstanceTagsTag["Value"].asString(); + dBInstancesObject.tags.push_back(tagsObject); + } + auto allShardListNode = valueDBInstancesDBInstance["ShardList"]["ShardAttribute"]; + for (auto valueDBInstancesDBInstanceShardListShardAttribute : allShardListNode) + { + DBInstance::ShardAttribute shardListObject; + if(!valueDBInstancesDBInstanceShardListShardAttribute["NodeClass"].isNull()) + shardListObject.nodeClass = valueDBInstancesDBInstanceShardListShardAttribute["NodeClass"].asString(); + if(!valueDBInstancesDBInstanceShardListShardAttribute["NodeDescription"].isNull()) + shardListObject.nodeDescription = valueDBInstancesDBInstanceShardListShardAttribute["NodeDescription"].asString(); + if(!valueDBInstancesDBInstanceShardListShardAttribute["NodeStorage"].isNull()) + shardListObject.nodeStorage = std::stoi(valueDBInstancesDBInstanceShardListShardAttribute["NodeStorage"].asString()); + if(!valueDBInstancesDBInstanceShardListShardAttribute["NodeId"].isNull()) + shardListObject.nodeId = valueDBInstancesDBInstanceShardListShardAttribute["NodeId"].asString(); + if(!valueDBInstancesDBInstanceShardListShardAttribute["ReadonlyReplicas"].isNull()) + shardListObject.readonlyReplicas = std::stoi(valueDBInstancesDBInstanceShardListShardAttribute["ReadonlyReplicas"].asString()); + dBInstancesObject.shardList.push_back(shardListObject); + } + auto allMongosListNode = valueDBInstancesDBInstance["MongosList"]["MongosAttribute"]; + for (auto valueDBInstancesDBInstanceMongosListMongosAttribute : allMongosListNode) + { + DBInstance::MongosAttribute mongosListObject; + if(!valueDBInstancesDBInstanceMongosListMongosAttribute["NodeClass"].isNull()) + mongosListObject.nodeClass = valueDBInstancesDBInstanceMongosListMongosAttribute["NodeClass"].asString(); + if(!valueDBInstancesDBInstanceMongosListMongosAttribute["NodeDescription"].isNull()) + mongosListObject.nodeDescription = valueDBInstancesDBInstanceMongosListMongosAttribute["NodeDescription"].asString(); + if(!valueDBInstancesDBInstanceMongosListMongosAttribute["NodeId"].isNull()) + mongosListObject.nodeId = valueDBInstancesDBInstanceMongosListMongosAttribute["NodeId"].asString(); + dBInstancesObject.mongosList.push_back(mongosListObject); + } + dBInstances_.push_back(dBInstancesObject); + } + if(!value["TotalCount"].isNull()) + totalCount_ = value["TotalCount"].asString(); + +} + +std::string DescribeDBInstancesOverviewResult::getTotalCount()const +{ + return totalCount_; +} + +std::vector DescribeDBInstancesOverviewResult::getDBInstances()const +{ + return dBInstances_; +} + diff --git a/dds/src/model/DescribeMongoDBLogConfigResult.cc b/dds/src/model/DescribeMongoDBLogConfigResult.cc index a28346d1f..d23707259 100644 --- a/dds/src/model/DescribeMongoDBLogConfigResult.cc +++ b/dds/src/model/DescribeMongoDBLogConfigResult.cc @@ -45,21 +45,77 @@ void DescribeMongoDBLogConfigResult::parse(const std::string &payload) isUserProjectLogstoreExist_ = std::stoi(value["IsUserProjectLogstoreExist"].asString()); if(!value["IsEtlMetaExist"].isNull()) isEtlMetaExist_ = std::stoi(value["IsEtlMetaExist"].asString()); + if(!value["ServiceType"].isNull()) + serviceType_ = value["ServiceType"].asString(); + if(!value["EnableAudit"].isNull()) + enableAudit_ = value["EnableAudit"].asString() == "true"; + if(!value["TtlForTrail"].isNull()) + ttlForTrail_ = std::stol(value["TtlForTrail"].asString()); + if(!value["UsedStorageForTrail"].isNull()) + usedStorageForTrail_ = std::stol(value["UsedStorageForTrail"].asString()); + if(!value["PreserveStorageForTrail"].isNull()) + preserveStorageForTrail_ = std::stol(value["PreserveStorageForTrail"].asString()); + if(!value["TtlForStandard"].isNull()) + ttlForStandard_ = std::stol(value["TtlForStandard"].asString()); + if(!value["UsedStorageForStandard"].isNull()) + usedStorageForStandard_ = std::stol(value["UsedStorageForStandard"].asString()); + if(!value["PreserveStorageForStandard"].isNull()) + preserveStorageForStandard_ = std::stol(value["PreserveStorageForStandard"].asString()); } +bool DescribeMongoDBLogConfigResult::getEnableAudit()const +{ + return enableAudit_; +} + +long DescribeMongoDBLogConfigResult::getTtlForStandard()const +{ + return ttlForStandard_; +} + +long DescribeMongoDBLogConfigResult::getPreserveStorageForStandard()const +{ + return preserveStorageForStandard_; +} + std::string DescribeMongoDBLogConfigResult::getUserProjectName()const { return userProjectName_; } +std::string DescribeMongoDBLogConfigResult::getServiceType()const +{ + return serviceType_; +} + int DescribeMongoDBLogConfigResult::getIsUserProjectLogstoreExist()const { return isUserProjectLogstoreExist_; } +long DescribeMongoDBLogConfigResult::getUsedStorageForTrail()const +{ + return usedStorageForTrail_; +} + +long DescribeMongoDBLogConfigResult::getPreserveStorageForTrail()const +{ + return preserveStorageForTrail_; +} + int DescribeMongoDBLogConfigResult::getIsEtlMetaExist()const { return isEtlMetaExist_; } +long DescribeMongoDBLogConfigResult::getTtlForTrail()const +{ + return ttlForTrail_; +} + +long DescribeMongoDBLogConfigResult::getUsedStorageForStandard()const +{ + return usedStorageForStandard_; +} + diff --git a/dds/src/model/DescribeRenewalPriceResult.cc b/dds/src/model/DescribeRenewalPriceResult.cc index 06a0383f0..4b3a46e52 100644 --- a/dds/src/model/DescribeRenewalPriceResult.cc +++ b/dds/src/model/DescribeRenewalPriceResult.cc @@ -39,28 +39,16 @@ void DescribeRenewalPriceResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - auto allRulesNode = value["Rules"]["Rule"]; - for (auto valueRulesRule : allRulesNode) - { - Rule rulesObject; - if(!valueRulesRule["RuleDescId"].isNull()) - rulesObject.ruleDescId = std::stol(valueRulesRule["RuleDescId"].asString()); - if(!valueRulesRule["Name"].isNull()) - rulesObject.name = valueRulesRule["Name"].asString(); - if(!valueRulesRule["Title"].isNull()) - rulesObject.title = valueRulesRule["Title"].asString(); - rules_.push_back(rulesObject); - } auto allSubOrdersNode = value["SubOrders"]["SubOrder"]; for (auto valueSubOrdersSubOrder : allSubOrdersNode) { SubOrder subOrdersObject; if(!valueSubOrdersSubOrder["OriginalAmount"].isNull()) subOrdersObject.originalAmount = std::stof(valueSubOrdersSubOrder["OriginalAmount"].asString()); - if(!valueSubOrdersSubOrder["TradeAmount"].isNull()) - subOrdersObject.tradeAmount = std::stof(valueSubOrdersSubOrder["TradeAmount"].asString()); if(!valueSubOrdersSubOrder["DiscountAmount"].isNull()) subOrdersObject.discountAmount = std::stof(valueSubOrdersSubOrder["DiscountAmount"].asString()); + if(!valueSubOrdersSubOrder["TradeAmount"].isNull()) + subOrdersObject.tradeAmount = std::stof(valueSubOrdersSubOrder["TradeAmount"].asString()); if(!valueSubOrdersSubOrder["InstanceId"].isNull()) subOrdersObject.instanceId = valueSubOrdersSubOrder["InstanceId"].asString(); auto allRuleIds = value["RuleIds"]["RuleId"]; @@ -68,27 +56,39 @@ void DescribeRenewalPriceResult::parse(const std::string &payload) subOrdersObject.ruleIds.push_back(value.asString()); subOrders_.push_back(subOrdersObject); } + auto allRulesNode = value["Rules"]["Rule"]; + for (auto valueRulesRule : allRulesNode) + { + Rule rulesObject; + if(!valueRulesRule["RuleDescId"].isNull()) + rulesObject.ruleDescId = std::stol(valueRulesRule["RuleDescId"].asString()); + if(!valueRulesRule["Title"].isNull()) + rulesObject.title = valueRulesRule["Title"].asString(); + if(!valueRulesRule["Name"].isNull()) + rulesObject.name = valueRulesRule["Name"].asString(); + rules_.push_back(rulesObject); + } auto orderNode = value["Order"]; if(!orderNode["OriginalAmount"].isNull()) order_.originalAmount = std::stof(orderNode["OriginalAmount"].asString()); - if(!orderNode["TradeAmount"].isNull()) - order_.tradeAmount = std::stof(orderNode["TradeAmount"].asString()); if(!orderNode["DiscountAmount"].isNull()) order_.discountAmount = std::stof(orderNode["DiscountAmount"].asString()); + if(!orderNode["TradeAmount"].isNull()) + order_.tradeAmount = std::stof(orderNode["TradeAmount"].asString()); if(!orderNode["Currency"].isNull()) order_.currency = orderNode["Currency"].asString(); auto allCouponsNode = orderNode["Coupons"]["Coupon"]; for (auto orderNodeCouponsCoupon : allCouponsNode) { Order::Coupon couponObject; - if(!orderNodeCouponsCoupon["CouponNo"].isNull()) - couponObject.couponNo = orderNodeCouponsCoupon["CouponNo"].asString(); - if(!orderNodeCouponsCoupon["Name"].isNull()) - couponObject.name = orderNodeCouponsCoupon["Name"].asString(); if(!orderNodeCouponsCoupon["Description"].isNull()) couponObject.description = orderNodeCouponsCoupon["Description"].asString(); if(!orderNodeCouponsCoupon["IsSelected"].isNull()) couponObject.isSelected = orderNodeCouponsCoupon["IsSelected"].asString(); + if(!orderNodeCouponsCoupon["CouponNo"].isNull()) + couponObject.couponNo = orderNodeCouponsCoupon["CouponNo"].asString(); + if(!orderNodeCouponsCoupon["Name"].isNull()) + couponObject.name = orderNodeCouponsCoupon["Name"].asString(); order_.coupons.push_back(couponObject); } auto allRuleIds1 = orderNode["RuleIds"]["RuleId"]; diff --git a/dds/src/model/DescribeShardingNetworkAddressResult.cc b/dds/src/model/DescribeShardingNetworkAddressResult.cc index 4b54dc4af..e7dc59461 100644 --- a/dds/src/model/DescribeShardingNetworkAddressResult.cc +++ b/dds/src/model/DescribeShardingNetworkAddressResult.cc @@ -39,52 +39,52 @@ void DescribeShardingNetworkAddressResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); - auto allNetworkAddressesNode = value["NetworkAddresses"]["NetworkAddress"]; - for (auto valueNetworkAddressesNetworkAddress : allNetworkAddressesNode) - { - NetworkAddress networkAddressesObject; - if(!valueNetworkAddressesNetworkAddress["NetworkAddress"].isNull()) - networkAddressesObject.networkAddress = valueNetworkAddressesNetworkAddress["NetworkAddress"].asString(); - if(!valueNetworkAddressesNetworkAddress["IPAddress"].isNull()) - networkAddressesObject.iPAddress = valueNetworkAddressesNetworkAddress["IPAddress"].asString(); - if(!valueNetworkAddressesNetworkAddress["NetworkType"].isNull()) - networkAddressesObject.networkType = valueNetworkAddressesNetworkAddress["NetworkType"].asString(); - if(!valueNetworkAddressesNetworkAddress["Port"].isNull()) - networkAddressesObject.port = valueNetworkAddressesNetworkAddress["Port"].asString(); - if(!valueNetworkAddressesNetworkAddress["VPCId"].isNull()) - networkAddressesObject.vPCId = valueNetworkAddressesNetworkAddress["VPCId"].asString(); - if(!valueNetworkAddressesNetworkAddress["VswitchId"].isNull()) - networkAddressesObject.vswitchId = valueNetworkAddressesNetworkAddress["VswitchId"].asString(); - if(!valueNetworkAddressesNetworkAddress["NodeId"].isNull()) - networkAddressesObject.nodeId = valueNetworkAddressesNetworkAddress["NodeId"].asString(); - if(!valueNetworkAddressesNetworkAddress["ExpiredTime"].isNull()) - networkAddressesObject.expiredTime = valueNetworkAddressesNetworkAddress["ExpiredTime"].asString(); - if(!valueNetworkAddressesNetworkAddress["NodeType"].isNull()) - networkAddressesObject.nodeType = valueNetworkAddressesNetworkAddress["NodeType"].asString(); - if(!valueNetworkAddressesNetworkAddress["Role"].isNull()) - networkAddressesObject.role = valueNetworkAddressesNetworkAddress["Role"].asString(); - networkAddresses_.push_back(networkAddressesObject); - } auto allCompatibleConnectionsNode = value["CompatibleConnections"]["CompatibleConnection"]; for (auto valueCompatibleConnectionsCompatibleConnection : allCompatibleConnectionsNode) { CompatibleConnection compatibleConnectionsObject; - if(!valueCompatibleConnectionsCompatibleConnection["NetworkAddress"].isNull()) - compatibleConnectionsObject.networkAddress = valueCompatibleConnectionsCompatibleConnection["NetworkAddress"].asString(); - if(!valueCompatibleConnectionsCompatibleConnection["IPAddress"].isNull()) - compatibleConnectionsObject.iPAddress = valueCompatibleConnectionsCompatibleConnection["IPAddress"].asString(); - if(!valueCompatibleConnectionsCompatibleConnection["NetworkType"].isNull()) - compatibleConnectionsObject.networkType = valueCompatibleConnectionsCompatibleConnection["NetworkType"].asString(); - if(!valueCompatibleConnectionsCompatibleConnection["Port"].isNull()) - compatibleConnectionsObject.port = valueCompatibleConnectionsCompatibleConnection["Port"].asString(); - if(!valueCompatibleConnectionsCompatibleConnection["VPCId"].isNull()) - compatibleConnectionsObject.vPCId = valueCompatibleConnectionsCompatibleConnection["VPCId"].asString(); if(!valueCompatibleConnectionsCompatibleConnection["VswitchId"].isNull()) compatibleConnectionsObject.vswitchId = valueCompatibleConnectionsCompatibleConnection["VswitchId"].asString(); if(!valueCompatibleConnectionsCompatibleConnection["ExpiredTime"].isNull()) compatibleConnectionsObject.expiredTime = valueCompatibleConnectionsCompatibleConnection["ExpiredTime"].asString(); + if(!valueCompatibleConnectionsCompatibleConnection["NetworkType"].isNull()) + compatibleConnectionsObject.networkType = valueCompatibleConnectionsCompatibleConnection["NetworkType"].asString(); + if(!valueCompatibleConnectionsCompatibleConnection["Port"].isNull()) + compatibleConnectionsObject.port = valueCompatibleConnectionsCompatibleConnection["Port"].asString(); + if(!valueCompatibleConnectionsCompatibleConnection["NetworkAddress"].isNull()) + compatibleConnectionsObject.networkAddress = valueCompatibleConnectionsCompatibleConnection["NetworkAddress"].asString(); + if(!valueCompatibleConnectionsCompatibleConnection["VPCId"].isNull()) + compatibleConnectionsObject.vPCId = valueCompatibleConnectionsCompatibleConnection["VPCId"].asString(); + if(!valueCompatibleConnectionsCompatibleConnection["IPAddress"].isNull()) + compatibleConnectionsObject.iPAddress = valueCompatibleConnectionsCompatibleConnection["IPAddress"].asString(); compatibleConnections_.push_back(compatibleConnectionsObject); } + auto allNetworkAddressesNode = value["NetworkAddresses"]["NetworkAddress"]; + for (auto valueNetworkAddressesNetworkAddress : allNetworkAddressesNode) + { + NetworkAddress networkAddressesObject; + if(!valueNetworkAddressesNetworkAddress["NodeType"].isNull()) + networkAddressesObject.nodeType = valueNetworkAddressesNetworkAddress["NodeType"].asString(); + if(!valueNetworkAddressesNetworkAddress["VswitchId"].isNull()) + networkAddressesObject.vswitchId = valueNetworkAddressesNetworkAddress["VswitchId"].asString(); + if(!valueNetworkAddressesNetworkAddress["ExpiredTime"].isNull()) + networkAddressesObject.expiredTime = valueNetworkAddressesNetworkAddress["ExpiredTime"].asString(); + if(!valueNetworkAddressesNetworkAddress["NetworkType"].isNull()) + networkAddressesObject.networkType = valueNetworkAddressesNetworkAddress["NetworkType"].asString(); + if(!valueNetworkAddressesNetworkAddress["Role"].isNull()) + networkAddressesObject.role = valueNetworkAddressesNetworkAddress["Role"].asString(); + if(!valueNetworkAddressesNetworkAddress["Port"].isNull()) + networkAddressesObject.port = valueNetworkAddressesNetworkAddress["Port"].asString(); + if(!valueNetworkAddressesNetworkAddress["VPCId"].isNull()) + networkAddressesObject.vPCId = valueNetworkAddressesNetworkAddress["VPCId"].asString(); + if(!valueNetworkAddressesNetworkAddress["NetworkAddress"].isNull()) + networkAddressesObject.networkAddress = valueNetworkAddressesNetworkAddress["NetworkAddress"].asString(); + if(!valueNetworkAddressesNetworkAddress["NodeId"].isNull()) + networkAddressesObject.nodeId = valueNetworkAddressesNetworkAddress["NodeId"].asString(); + if(!valueNetworkAddressesNetworkAddress["IPAddress"].isNull()) + networkAddressesObject.iPAddress = valueNetworkAddressesNetworkAddress["IPAddress"].asString(); + networkAddresses_.push_back(networkAddressesObject); + } } diff --git a/dds/src/model/ModifyAuditPolicyRequest.cc b/dds/src/model/ModifyAuditPolicyRequest.cc index 2557d8541..84e85b0a4 100644 --- a/dds/src/model/ModifyAuditPolicyRequest.cc +++ b/dds/src/model/ModifyAuditPolicyRequest.cc @@ -71,6 +71,17 @@ void ModifyAuditPolicyRequest::setSecurityToken(const std::string& securityToken setParameter("SecurityToken", securityToken); } +std::string ModifyAuditPolicyRequest::getAuditLogSwitchSource()const +{ + return auditLogSwitchSource_; +} + +void ModifyAuditPolicyRequest::setAuditLogSwitchSource(const std::string& auditLogSwitchSource) +{ + auditLogSwitchSource_ = auditLogSwitchSource; + setParameter("AuditLogSwitchSource", auditLogSwitchSource); +} + std::string ModifyAuditPolicyRequest::getDBInstanceId()const { return dBInstanceId_; @@ -126,3 +137,14 @@ void ModifyAuditPolicyRequest::setOwnerId(long ownerId) setParameter("OwnerId", std::to_string(ownerId)); } +std::string ModifyAuditPolicyRequest::getServiceType()const +{ + return serviceType_; +} + +void ModifyAuditPolicyRequest::setServiceType(const std::string& serviceType) +{ + serviceType_ = serviceType; + setParameter("ServiceType", serviceType); +} +