Supported API for dnsCache.

This commit is contained in:
sdk-team
2021-03-02 10:57:02 +00:00
parent b22b8d5846
commit d838ddc386
26 changed files with 1782 additions and 71 deletions

View File

@@ -87,6 +87,42 @@ AlidnsClient::AddCustomLineOutcomeCallable AlidnsClient::addCustomLineCallable(c
return task->get_future();
}
AlidnsClient::AddDnsCacheDomainOutcome AlidnsClient::addDnsCacheDomain(const AddDnsCacheDomainRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AddDnsCacheDomainOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AddDnsCacheDomainOutcome(AddDnsCacheDomainResult(outcome.result()));
else
return AddDnsCacheDomainOutcome(outcome.error());
}
void AlidnsClient::addDnsCacheDomainAsync(const AddDnsCacheDomainRequest& request, const AddDnsCacheDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, addDnsCacheDomain(request), context);
};
asyncExecute(new Runnable(fn));
}
AlidnsClient::AddDnsCacheDomainOutcomeCallable AlidnsClient::addDnsCacheDomainCallable(const AddDnsCacheDomainRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AddDnsCacheDomainOutcome()>>(
[this, request]()
{
return this->addDnsCacheDomain(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AlidnsClient::AddDnsGtmAccessStrategyOutcome AlidnsClient::addDnsGtmAccessStrategy(const AddDnsGtmAccessStrategyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -663,6 +699,42 @@ AlidnsClient::DeleteCustomLinesOutcomeCallable AlidnsClient::deleteCustomLinesCa
return task->get_future();
}
AlidnsClient::DeleteDnsCacheDomainOutcome AlidnsClient::deleteDnsCacheDomain(const DeleteDnsCacheDomainRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteDnsCacheDomainOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteDnsCacheDomainOutcome(DeleteDnsCacheDomainResult(outcome.result()));
else
return DeleteDnsCacheDomainOutcome(outcome.error());
}
void AlidnsClient::deleteDnsCacheDomainAsync(const DeleteDnsCacheDomainRequest& request, const DeleteDnsCacheDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteDnsCacheDomain(request), context);
};
asyncExecute(new Runnable(fn));
}
AlidnsClient::DeleteDnsCacheDomainOutcomeCallable AlidnsClient::deleteDnsCacheDomainCallable(const DeleteDnsCacheDomainRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteDnsCacheDomainOutcome()>>(
[this, request]()
{
return this->deleteDnsCacheDomain(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AlidnsClient::DeleteDnsGtmAccessStrategyOutcome AlidnsClient::deleteDnsGtmAccessStrategy(const DeleteDnsGtmAccessStrategyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1167,6 +1239,42 @@ AlidnsClient::DescribeDNSSLBSubDomainsOutcomeCallable AlidnsClient::describeDNSS
return task->get_future();
}
AlidnsClient::DescribeDnsCacheDomainsOutcome AlidnsClient::describeDnsCacheDomains(const DescribeDnsCacheDomainsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeDnsCacheDomainsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeDnsCacheDomainsOutcome(DescribeDnsCacheDomainsResult(outcome.result()));
else
return DescribeDnsCacheDomainsOutcome(outcome.error());
}
void AlidnsClient::describeDnsCacheDomainsAsync(const DescribeDnsCacheDomainsRequest& request, const DescribeDnsCacheDomainsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeDnsCacheDomains(request), context);
};
asyncExecute(new Runnable(fn));
}
AlidnsClient::DescribeDnsCacheDomainsOutcomeCallable AlidnsClient::describeDnsCacheDomainsCallable(const DescribeDnsCacheDomainsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeDnsCacheDomainsOutcome()>>(
[this, request]()
{
return this->describeDnsCacheDomains(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AlidnsClient::DescribeDnsGtmAccessStrategiesOutcome AlidnsClient::describeDnsGtmAccessStrategies(const DescribeDnsGtmAccessStrategiesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -4119,6 +4227,78 @@ AlidnsClient::UpdateDNSSLBWeightOutcomeCallable AlidnsClient::updateDNSSLBWeight
return task->get_future();
}
AlidnsClient::UpdateDnsCacheDomainOutcome AlidnsClient::updateDnsCacheDomain(const UpdateDnsCacheDomainRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateDnsCacheDomainOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateDnsCacheDomainOutcome(UpdateDnsCacheDomainResult(outcome.result()));
else
return UpdateDnsCacheDomainOutcome(outcome.error());
}
void AlidnsClient::updateDnsCacheDomainAsync(const UpdateDnsCacheDomainRequest& request, const UpdateDnsCacheDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateDnsCacheDomain(request), context);
};
asyncExecute(new Runnable(fn));
}
AlidnsClient::UpdateDnsCacheDomainOutcomeCallable AlidnsClient::updateDnsCacheDomainCallable(const UpdateDnsCacheDomainRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateDnsCacheDomainOutcome()>>(
[this, request]()
{
return this->updateDnsCacheDomain(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AlidnsClient::UpdateDnsCacheDomainRemarkOutcome AlidnsClient::updateDnsCacheDomainRemark(const UpdateDnsCacheDomainRemarkRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateDnsCacheDomainRemarkOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateDnsCacheDomainRemarkOutcome(UpdateDnsCacheDomainRemarkResult(outcome.result()));
else
return UpdateDnsCacheDomainRemarkOutcome(outcome.error());
}
void AlidnsClient::updateDnsCacheDomainRemarkAsync(const UpdateDnsCacheDomainRemarkRequest& request, const UpdateDnsCacheDomainRemarkAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateDnsCacheDomainRemark(request), context);
};
asyncExecute(new Runnable(fn));
}
AlidnsClient::UpdateDnsCacheDomainRemarkOutcomeCallable AlidnsClient::updateDnsCacheDomainRemarkCallable(const UpdateDnsCacheDomainRemarkRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateDnsCacheDomainRemarkOutcome()>>(
[this, request]()
{
return this->updateDnsCacheDomainRemark(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AlidnsClient::UpdateDnsGtmAccessStrategyOutcome AlidnsClient::updateDnsGtmAccessStrategy(const UpdateDnsGtmAccessStrategyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,155 @@
/*
* 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 <alibabacloud/alidns/model/AddDnsCacheDomainRequest.h>
using AlibabaCloud::Alidns::Model::AddDnsCacheDomainRequest;
AddDnsCacheDomainRequest::AddDnsCacheDomainRequest() :
RpcServiceRequest("alidns", "2015-01-09", "AddDnsCacheDomain")
{
setMethod(HttpRequest::Method::Post);
}
AddDnsCacheDomainRequest::~AddDnsCacheDomainRequest()
{}
std::string AddDnsCacheDomainRequest::getRemark()const
{
return remark_;
}
void AddDnsCacheDomainRequest::setRemark(const std::string& remark)
{
remark_ = remark;
setParameter("Remark", remark);
}
std::string AddDnsCacheDomainRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void AddDnsCacheDomainRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string AddDnsCacheDomainRequest::getSourceProtocol()const
{
return sourceProtocol_;
}
void AddDnsCacheDomainRequest::setSourceProtocol(const std::string& sourceProtocol)
{
sourceProtocol_ = sourceProtocol;
setParameter("SourceProtocol", sourceProtocol);
}
std::string AddDnsCacheDomainRequest::getLang()const
{
return lang_;
}
void AddDnsCacheDomainRequest::setLang(const std::string& lang)
{
lang_ = lang;
setParameter("Lang", lang);
}
std::string AddDnsCacheDomainRequest::getDomainName()const
{
return domainName_;
}
void AddDnsCacheDomainRequest::setDomainName(const std::string& domainName)
{
domainName_ = domainName;
setParameter("DomainName", domainName);
}
int AddDnsCacheDomainRequest::getCacheTtlMax()const
{
return cacheTtlMax_;
}
void AddDnsCacheDomainRequest::setCacheTtlMax(int cacheTtlMax)
{
cacheTtlMax_ = cacheTtlMax;
setParameter("CacheTtlMax", std::to_string(cacheTtlMax));
}
std::string AddDnsCacheDomainRequest::getInstanceId()const
{
return instanceId_;
}
void AddDnsCacheDomainRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string AddDnsCacheDomainRequest::getSourceEdns()const
{
return sourceEdns_;
}
void AddDnsCacheDomainRequest::setSourceEdns(const std::string& sourceEdns)
{
sourceEdns_ = sourceEdns;
setParameter("SourceEdns", sourceEdns);
}
std::string AddDnsCacheDomainRequest::getUserClientIp()const
{
return userClientIp_;
}
void AddDnsCacheDomainRequest::setUserClientIp(const std::string& userClientIp)
{
userClientIp_ = userClientIp;
setParameter("UserClientIp", userClientIp);
}
int AddDnsCacheDomainRequest::getCacheTtlMin()const
{
return cacheTtlMin_;
}
void AddDnsCacheDomainRequest::setCacheTtlMin(int cacheTtlMin)
{
cacheTtlMin_ = cacheTtlMin;
setParameter("CacheTtlMin", std::to_string(cacheTtlMin));
}
std::vector<AddDnsCacheDomainRequest::SourceDnsServer> AddDnsCacheDomainRequest::getSourceDnsServer()const
{
return sourceDnsServer_;
}
void AddDnsCacheDomainRequest::setSourceDnsServer(const std::vector<SourceDnsServer>& sourceDnsServer)
{
sourceDnsServer_ = sourceDnsServer;
for(int dep1 = 0; dep1!= sourceDnsServer.size(); dep1++) {
auto sourceDnsServerObj = sourceDnsServer.at(dep1);
std::string sourceDnsServerObjStr = "SourceDnsServer." + std::to_string(dep1 + 1);
setParameter(sourceDnsServerObjStr + ".Port", sourceDnsServerObj.port);
setParameter(sourceDnsServerObjStr + ".Host", sourceDnsServerObj.host);
}
}

View File

@@ -0,0 +1,44 @@
/*
* 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 <alibabacloud/alidns/model/AddDnsCacheDomainResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Alidns;
using namespace AlibabaCloud::Alidns::Model;
AddDnsCacheDomainResult::AddDnsCacheDomainResult() :
ServiceResult()
{}
AddDnsCacheDomainResult::AddDnsCacheDomainResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AddDnsCacheDomainResult::~AddDnsCacheDomainResult()
{}
void AddDnsCacheDomainResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,73 @@
/*
* 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 <alibabacloud/alidns/model/DeleteDnsCacheDomainRequest.h>
using AlibabaCloud::Alidns::Model::DeleteDnsCacheDomainRequest;
DeleteDnsCacheDomainRequest::DeleteDnsCacheDomainRequest() :
RpcServiceRequest("alidns", "2015-01-09", "DeleteDnsCacheDomain")
{
setMethod(HttpRequest::Method::Post);
}
DeleteDnsCacheDomainRequest::~DeleteDnsCacheDomainRequest()
{}
std::string DeleteDnsCacheDomainRequest::getDomainName()const
{
return domainName_;
}
void DeleteDnsCacheDomainRequest::setDomainName(const std::string& domainName)
{
domainName_ = domainName;
setParameter("DomainName", domainName);
}
std::string DeleteDnsCacheDomainRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DeleteDnsCacheDomainRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string DeleteDnsCacheDomainRequest::getUserClientIp()const
{
return userClientIp_;
}
void DeleteDnsCacheDomainRequest::setUserClientIp(const std::string& userClientIp)
{
userClientIp_ = userClientIp;
setParameter("UserClientIp", userClientIp);
}
std::string DeleteDnsCacheDomainRequest::getLang()const
{
return lang_;
}
void DeleteDnsCacheDomainRequest::setLang(const std::string& lang)
{
lang_ = lang;
setParameter("Lang", lang);
}

View File

@@ -0,0 +1,44 @@
/*
* 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 <alibabacloud/alidns/model/DeleteDnsCacheDomainResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Alidns;
using namespace AlibabaCloud::Alidns::Model;
DeleteDnsCacheDomainResult::DeleteDnsCacheDomainResult() :
ServiceResult()
{}
DeleteDnsCacheDomainResult::DeleteDnsCacheDomainResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteDnsCacheDomainResult::~DeleteDnsCacheDomainResult()
{}
void DeleteDnsCacheDomainResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,84 @@
/*
* 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 <alibabacloud/alidns/model/DescribeDnsCacheDomainsRequest.h>
using AlibabaCloud::Alidns::Model::DescribeDnsCacheDomainsRequest;
DescribeDnsCacheDomainsRequest::DescribeDnsCacheDomainsRequest() :
RpcServiceRequest("alidns", "2015-01-09", "DescribeDnsCacheDomains")
{
setMethod(HttpRequest::Method::Post);
}
DescribeDnsCacheDomainsRequest::~DescribeDnsCacheDomainsRequest()
{}
long DescribeDnsCacheDomainsRequest::getPageNumber()const
{
return pageNumber_;
}
void DescribeDnsCacheDomainsRequest::setPageNumber(long pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string DescribeDnsCacheDomainsRequest::getUserClientIp()const
{
return userClientIp_;
}
void DescribeDnsCacheDomainsRequest::setUserClientIp(const std::string& userClientIp)
{
userClientIp_ = userClientIp;
setParameter("UserClientIp", userClientIp);
}
long DescribeDnsCacheDomainsRequest::getPageSize()const
{
return pageSize_;
}
void DescribeDnsCacheDomainsRequest::setPageSize(long pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string DescribeDnsCacheDomainsRequest::getLang()const
{
return lang_;
}
void DescribeDnsCacheDomainsRequest::setLang(const std::string& lang)
{
lang_ = lang;
setParameter("Lang", lang);
}
std::string DescribeDnsCacheDomainsRequest::getKeyword()const
{
return keyword_;
}
void DescribeDnsCacheDomainsRequest::setKeyword(const std::string& keyword)
{
keyword_ = keyword;
setParameter("Keyword", keyword);
}

View File

@@ -0,0 +1,116 @@
/*
* 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 <alibabacloud/alidns/model/DescribeDnsCacheDomainsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Alidns;
using namespace AlibabaCloud::Alidns::Model;
DescribeDnsCacheDomainsResult::DescribeDnsCacheDomainsResult() :
ServiceResult()
{}
DescribeDnsCacheDomainsResult::DescribeDnsCacheDomainsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeDnsCacheDomainsResult::~DescribeDnsCacheDomainsResult()
{}
void DescribeDnsCacheDomainsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDomainsNode = value["Domains"]["Domain"];
for (auto valueDomainsDomain : allDomainsNode)
{
Domain domainsObject;
if(!valueDomainsDomain["DomainId"].isNull())
domainsObject.domainId = valueDomainsDomain["DomainId"].asString();
if(!valueDomainsDomain["DomainName"].isNull())
domainsObject.domainName = valueDomainsDomain["DomainName"].asString();
if(!valueDomainsDomain["InstanceId"].isNull())
domainsObject.instanceId = valueDomainsDomain["InstanceId"].asString();
if(!valueDomainsDomain["VersionCode"].isNull())
domainsObject.versionCode = valueDomainsDomain["VersionCode"].asString();
if(!valueDomainsDomain["Remark"].isNull())
domainsObject.remark = valueDomainsDomain["Remark"].asString();
if(!valueDomainsDomain["UpdateTime"].isNull())
domainsObject.updateTime = valueDomainsDomain["UpdateTime"].asString();
if(!valueDomainsDomain["UpdateTimestamp"].isNull())
domainsObject.updateTimestamp = std::stol(valueDomainsDomain["UpdateTimestamp"].asString());
if(!valueDomainsDomain["CreateTime"].isNull())
domainsObject.createTime = valueDomainsDomain["CreateTime"].asString();
if(!valueDomainsDomain["CreateTimestamp"].isNull())
domainsObject.createTimestamp = std::stol(valueDomainsDomain["CreateTimestamp"].asString());
if(!valueDomainsDomain["CacheTtlMin"].isNull())
domainsObject.cacheTtlMin = std::stoi(valueDomainsDomain["CacheTtlMin"].asString());
if(!valueDomainsDomain["CacheTtlMax"].isNull())
domainsObject.cacheTtlMax = std::stoi(valueDomainsDomain["CacheTtlMax"].asString());
if(!valueDomainsDomain["SourceProtocol"].isNull())
domainsObject.sourceProtocol = valueDomainsDomain["SourceProtocol"].asString();
if(!valueDomainsDomain["SourceEdns"].isNull())
domainsObject.sourceEdns = valueDomainsDomain["SourceEdns"].asString();
if(!valueDomainsDomain["ExpireTime"].isNull())
domainsObject.expireTime = valueDomainsDomain["ExpireTime"].asString();
if(!valueDomainsDomain["ExpireTimestamp"].isNull())
domainsObject.expireTimestamp = std::stol(valueDomainsDomain["ExpireTimestamp"].asString());
auto allSourceDnsServersNode = valueDomainsDomain["SourceDnsServers"]["SourceDnsServer"];
for (auto valueDomainsDomainSourceDnsServersSourceDnsServer : allSourceDnsServersNode)
{
Domain::SourceDnsServer sourceDnsServersObject;
if(!valueDomainsDomainSourceDnsServersSourceDnsServer["Host"].isNull())
sourceDnsServersObject.host = valueDomainsDomainSourceDnsServersSourceDnsServer["Host"].asString();
if(!valueDomainsDomainSourceDnsServersSourceDnsServer["Port"].isNull())
sourceDnsServersObject.port = valueDomainsDomainSourceDnsServersSourceDnsServer["Port"].asString();
domainsObject.sourceDnsServers.push_back(sourceDnsServersObject);
}
domains_.push_back(domainsObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stol(value["TotalCount"].asString());
if(!value["PageNumber"].isNull())
pageNumber_ = std::stol(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stol(value["PageSize"].asString());
}
std::vector<DescribeDnsCacheDomainsResult::Domain> DescribeDnsCacheDomainsResult::getDomains()const
{
return domains_;
}
long DescribeDnsCacheDomainsResult::getTotalCount()const
{
return totalCount_;
}
long DescribeDnsCacheDomainsResult::getPageSize()const
{
return pageSize_;
}
long DescribeDnsCacheDomainsResult::getPageNumber()const
{
return pageNumber_;
}

View File

@@ -43,82 +43,94 @@ void DescribeDnsGtmMonitorAvailableConfigResult::parse(const std::string &payloa
for (auto valueIpv4IspCityNodesIpv4IspCityNode : allIpv4IspCityNodesNode)
{
Ipv4IspCityNode ipv4IspCityNodesObject;
if(!valueIpv4IspCityNodesIpv4IspCityNode["IspName"].isNull())
ipv4IspCityNodesObject.ispName = valueIpv4IspCityNodesIpv4IspCityNode["IspName"].asString();
if(!valueIpv4IspCityNodesIpv4IspCityNode["IspCode"].isNull())
ipv4IspCityNodesObject.ispCode = valueIpv4IspCityNodesIpv4IspCityNode["IspCode"].asString();
if(!valueIpv4IspCityNodesIpv4IspCityNode["CityName"].isNull())
ipv4IspCityNodesObject.cityName = valueIpv4IspCityNodesIpv4IspCityNode["CityName"].asString();
if(!valueIpv4IspCityNodesIpv4IspCityNode["CityCode"].isNull())
ipv4IspCityNodesObject.cityCode = valueIpv4IspCityNodesIpv4IspCityNode["CityCode"].asString();
if(!valueIpv4IspCityNodesIpv4IspCityNode["DefaultSelected"].isNull())
ipv4IspCityNodesObject.defaultSelected = valueIpv4IspCityNodesIpv4IspCityNode["DefaultSelected"].asString() == "true";
if(!valueIpv4IspCityNodesIpv4IspCityNode["GroupType"].isNull())
ipv4IspCityNodesObject.groupType = valueIpv4IspCityNodesIpv4IspCityNode["GroupType"].asString();
if(!valueIpv4IspCityNodesIpv4IspCityNode["GroupName"].isNull())
ipv4IspCityNodesObject.groupName = valueIpv4IspCityNodesIpv4IspCityNode["GroupName"].asString();
if(!valueIpv4IspCityNodesIpv4IspCityNode["CityCode"].isNull())
ipv4IspCityNodesObject.cityCode = valueIpv4IspCityNodesIpv4IspCityNode["CityCode"].asString();
if(!valueIpv4IspCityNodesIpv4IspCityNode["IspName"].isNull())
ipv4IspCityNodesObject.ispName = valueIpv4IspCityNodesIpv4IspCityNode["IspName"].asString();
if(!valueIpv4IspCityNodesIpv4IspCityNode["GroupType"].isNull())
ipv4IspCityNodesObject.groupType = valueIpv4IspCityNodesIpv4IspCityNode["GroupType"].asString();
if(!valueIpv4IspCityNodesIpv4IspCityNode["CityName"].isNull())
ipv4IspCityNodesObject.cityName = valueIpv4IspCityNodesIpv4IspCityNode["CityName"].asString();
if(!valueIpv4IspCityNodesIpv4IspCityNode["DefaultSelected"].isNull())
ipv4IspCityNodesObject.defaultSelected = valueIpv4IspCityNodesIpv4IspCityNode["DefaultSelected"].asString() == "true";
if(!valueIpv4IspCityNodesIpv4IspCityNode["IspCode"].isNull())
ipv4IspCityNodesObject.ispCode = valueIpv4IspCityNodesIpv4IspCityNode["IspCode"].asString();
auto allIps = value["Ips"]["Ip"];
for (auto value : allIps)
ipv4IspCityNodesObject.ips.push_back(value.asString());
ipv4IspCityNodes_.push_back(ipv4IspCityNodesObject);
}
auto allIpv6IspCityNodesNode = value["Ipv6IspCityNodes"]["Ipv6IspCityNode"];
for (auto valueIpv6IspCityNodesIpv6IspCityNode : allIpv6IspCityNodesNode)
{
Ipv6IspCityNode ipv6IspCityNodesObject;
if(!valueIpv6IspCityNodesIpv6IspCityNode["IspName"].isNull())
ipv6IspCityNodesObject.ispName = valueIpv6IspCityNodesIpv6IspCityNode["IspName"].asString();
if(!valueIpv6IspCityNodesIpv6IspCityNode["IspCode"].isNull())
ipv6IspCityNodesObject.ispCode = valueIpv6IspCityNodesIpv6IspCityNode["IspCode"].asString();
if(!valueIpv6IspCityNodesIpv6IspCityNode["CityName"].isNull())
ipv6IspCityNodesObject.cityName = valueIpv6IspCityNodesIpv6IspCityNode["CityName"].asString();
if(!valueIpv6IspCityNodesIpv6IspCityNode["CityCode"].isNull())
ipv6IspCityNodesObject.cityCode = valueIpv6IspCityNodesIpv6IspCityNode["CityCode"].asString();
if(!valueIpv6IspCityNodesIpv6IspCityNode["DefaultSelected"].isNull())
ipv6IspCityNodesObject.defaultSelected = valueIpv6IspCityNodesIpv6IspCityNode["DefaultSelected"].asString() == "true";
if(!valueIpv6IspCityNodesIpv6IspCityNode["GroupType"].isNull())
ipv6IspCityNodesObject.groupType = valueIpv6IspCityNodesIpv6IspCityNode["GroupType"].asString();
if(!valueIpv6IspCityNodesIpv6IspCityNode["GroupName"].isNull())
ipv6IspCityNodesObject.groupName = valueIpv6IspCityNodesIpv6IspCityNode["GroupName"].asString();
ipv6IspCityNodes_.push_back(ipv6IspCityNodesObject);
}
auto allDomainIpv4IspCityNodesNode = value["DomainIpv4IspCityNodes"]["DomainIpv4IspCityNode"];
for (auto valueDomainIpv4IspCityNodesDomainIpv4IspCityNode : allDomainIpv4IspCityNodesNode)
{
DomainIpv4IspCityNode domainIpv4IspCityNodesObject;
if(!valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["IspName"].isNull())
domainIpv4IspCityNodesObject.ispName = valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["IspName"].asString();
if(!valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["IspCode"].isNull())
domainIpv4IspCityNodesObject.ispCode = valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["IspCode"].asString();
if(!valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["CityName"].isNull())
domainIpv4IspCityNodesObject.cityName = valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["CityName"].asString();
if(!valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["CityCode"].isNull())
domainIpv4IspCityNodesObject.cityCode = valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["CityCode"].asString();
if(!valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["DefaultSelected"].isNull())
domainIpv4IspCityNodesObject.defaultSelected = valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["DefaultSelected"].asString() == "true";
if(!valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["GroupType"].isNull())
domainIpv4IspCityNodesObject.groupType = valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["GroupType"].asString();
if(!valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["GroupName"].isNull())
domainIpv4IspCityNodesObject.groupName = valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["GroupName"].asString();
if(!valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["CityCode"].isNull())
domainIpv4IspCityNodesObject.cityCode = valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["CityCode"].asString();
if(!valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["IspName"].isNull())
domainIpv4IspCityNodesObject.ispName = valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["IspName"].asString();
if(!valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["GroupType"].isNull())
domainIpv4IspCityNodesObject.groupType = valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["GroupType"].asString();
if(!valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["CityName"].isNull())
domainIpv4IspCityNodesObject.cityName = valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["CityName"].asString();
if(!valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["DefaultSelected"].isNull())
domainIpv4IspCityNodesObject.defaultSelected = valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["DefaultSelected"].asString() == "true";
if(!valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["IspCode"].isNull())
domainIpv4IspCityNodesObject.ispCode = valueDomainIpv4IspCityNodesDomainIpv4IspCityNode["IspCode"].asString();
auto allIps1 = value["Ips"]["Ip"];
for (auto value : allIps1)
domainIpv4IspCityNodesObject.ips1.push_back(value.asString());
domainIpv4IspCityNodes_.push_back(domainIpv4IspCityNodesObject);
}
auto allDomainIpv6IspCityNodesNode = value["DomainIpv6IspCityNodes"]["DomainIpv6IspCityNode"];
for (auto valueDomainIpv6IspCityNodesDomainIpv6IspCityNode : allDomainIpv6IspCityNodesNode)
{
DomainIpv6IspCityNode domainIpv6IspCityNodesObject;
if(!valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["IspName"].isNull())
domainIpv6IspCityNodesObject.ispName = valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["IspName"].asString();
if(!valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["IspCode"].isNull())
domainIpv6IspCityNodesObject.ispCode = valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["IspCode"].asString();
if(!valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["CityName"].isNull())
domainIpv6IspCityNodesObject.cityName = valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["CityName"].asString();
if(!valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["CityCode"].isNull())
domainIpv6IspCityNodesObject.cityCode = valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["CityCode"].asString();
if(!valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["DefaultSelected"].isNull())
domainIpv6IspCityNodesObject.defaultSelected = valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["DefaultSelected"].asString() == "true";
if(!valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["GroupType"].isNull())
domainIpv6IspCityNodesObject.groupType = valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["GroupType"].asString();
if(!valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["GroupName"].isNull())
domainIpv6IspCityNodesObject.groupName = valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["GroupName"].asString();
if(!valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["CityCode"].isNull())
domainIpv6IspCityNodesObject.cityCode = valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["CityCode"].asString();
if(!valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["IspName"].isNull())
domainIpv6IspCityNodesObject.ispName = valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["IspName"].asString();
if(!valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["GroupType"].isNull())
domainIpv6IspCityNodesObject.groupType = valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["GroupType"].asString();
if(!valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["CityName"].isNull())
domainIpv6IspCityNodesObject.cityName = valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["CityName"].asString();
if(!valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["DefaultSelected"].isNull())
domainIpv6IspCityNodesObject.defaultSelected = valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["DefaultSelected"].asString() == "true";
if(!valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["IspCode"].isNull())
domainIpv6IspCityNodesObject.ispCode = valueDomainIpv6IspCityNodesDomainIpv6IspCityNode["IspCode"].asString();
auto allIps2 = value["Ips"]["Ip"];
for (auto value : allIps2)
domainIpv6IspCityNodesObject.ips2.push_back(value.asString());
domainIpv6IspCityNodes_.push_back(domainIpv6IspCityNodesObject);
}
auto allIpv6IspCityNodesNode = value["Ipv6IspCityNodes"]["Ipv6IspCityNode"];
for (auto valueIpv6IspCityNodesIpv6IspCityNode : allIpv6IspCityNodesNode)
{
Ipv6IspCityNode ipv6IspCityNodesObject;
if(!valueIpv6IspCityNodesIpv6IspCityNode["GroupName"].isNull())
ipv6IspCityNodesObject.groupName = valueIpv6IspCityNodesIpv6IspCityNode["GroupName"].asString();
if(!valueIpv6IspCityNodesIpv6IspCityNode["CityCode"].isNull())
ipv6IspCityNodesObject.cityCode = valueIpv6IspCityNodesIpv6IspCityNode["CityCode"].asString();
if(!valueIpv6IspCityNodesIpv6IspCityNode["IspName"].isNull())
ipv6IspCityNodesObject.ispName = valueIpv6IspCityNodesIpv6IspCityNode["IspName"].asString();
if(!valueIpv6IspCityNodesIpv6IspCityNode["GroupType"].isNull())
ipv6IspCityNodesObject.groupType = valueIpv6IspCityNodesIpv6IspCityNode["GroupType"].asString();
if(!valueIpv6IspCityNodesIpv6IspCityNode["CityName"].isNull())
ipv6IspCityNodesObject.cityName = valueIpv6IspCityNodesIpv6IspCityNode["CityName"].asString();
if(!valueIpv6IspCityNodesIpv6IspCityNode["DefaultSelected"].isNull())
ipv6IspCityNodesObject.defaultSelected = valueIpv6IspCityNodesIpv6IspCityNode["DefaultSelected"].asString() == "true";
if(!valueIpv6IspCityNodesIpv6IspCityNode["IspCode"].isNull())
ipv6IspCityNodesObject.ispCode = valueIpv6IspCityNodesIpv6IspCityNode["IspCode"].asString();
auto allIps3 = value["Ips"]["Ip"];
for (auto value : allIps3)
ipv6IspCityNodesObject.ips3.push_back(value.asString());
ipv6IspCityNodes_.push_back(ipv6IspCityNodesObject);
}
}

View File

@@ -0,0 +1,84 @@
/*
* 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 <alibabacloud/alidns/model/UpdateDnsCacheDomainRemarkRequest.h>
using AlibabaCloud::Alidns::Model::UpdateDnsCacheDomainRemarkRequest;
UpdateDnsCacheDomainRemarkRequest::UpdateDnsCacheDomainRemarkRequest() :
RpcServiceRequest("alidns", "2015-01-09", "UpdateDnsCacheDomainRemark")
{
setMethod(HttpRequest::Method::Post);
}
UpdateDnsCacheDomainRemarkRequest::~UpdateDnsCacheDomainRemarkRequest()
{}
std::string UpdateDnsCacheDomainRemarkRequest::getDomainName()const
{
return domainName_;
}
void UpdateDnsCacheDomainRemarkRequest::setDomainName(const std::string& domainName)
{
domainName_ = domainName;
setParameter("DomainName", domainName);
}
std::string UpdateDnsCacheDomainRemarkRequest::getRemark()const
{
return remark_;
}
void UpdateDnsCacheDomainRemarkRequest::setRemark(const std::string& remark)
{
remark_ = remark;
setParameter("Remark", remark);
}
std::string UpdateDnsCacheDomainRemarkRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void UpdateDnsCacheDomainRemarkRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string UpdateDnsCacheDomainRemarkRequest::getUserClientIp()const
{
return userClientIp_;
}
void UpdateDnsCacheDomainRemarkRequest::setUserClientIp(const std::string& userClientIp)
{
userClientIp_ = userClientIp;
setParameter("UserClientIp", userClientIp);
}
std::string UpdateDnsCacheDomainRemarkRequest::getLang()const
{
return lang_;
}
void UpdateDnsCacheDomainRemarkRequest::setLang(const std::string& lang)
{
lang_ = lang;
setParameter("Lang", lang);
}

View File

@@ -0,0 +1,44 @@
/*
* 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 <alibabacloud/alidns/model/UpdateDnsCacheDomainRemarkResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Alidns;
using namespace AlibabaCloud::Alidns::Model;
UpdateDnsCacheDomainRemarkResult::UpdateDnsCacheDomainRemarkResult() :
ServiceResult()
{}
UpdateDnsCacheDomainRemarkResult::UpdateDnsCacheDomainRemarkResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateDnsCacheDomainRemarkResult::~UpdateDnsCacheDomainRemarkResult()
{}
void UpdateDnsCacheDomainRemarkResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -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 <alibabacloud/alidns/model/UpdateDnsCacheDomainRequest.h>
using AlibabaCloud::Alidns::Model::UpdateDnsCacheDomainRequest;
UpdateDnsCacheDomainRequest::UpdateDnsCacheDomainRequest() :
RpcServiceRequest("alidns", "2015-01-09", "UpdateDnsCacheDomain")
{
setMethod(HttpRequest::Method::Post);
}
UpdateDnsCacheDomainRequest::~UpdateDnsCacheDomainRequest()
{}
std::string UpdateDnsCacheDomainRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void UpdateDnsCacheDomainRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string UpdateDnsCacheDomainRequest::getSourceProtocol()const
{
return sourceProtocol_;
}
void UpdateDnsCacheDomainRequest::setSourceProtocol(const std::string& sourceProtocol)
{
sourceProtocol_ = sourceProtocol;
setParameter("SourceProtocol", sourceProtocol);
}
std::string UpdateDnsCacheDomainRequest::getLang()const
{
return lang_;
}
void UpdateDnsCacheDomainRequest::setLang(const std::string& lang)
{
lang_ = lang;
setParameter("Lang", lang);
}
std::string UpdateDnsCacheDomainRequest::getDomainName()const
{
return domainName_;
}
void UpdateDnsCacheDomainRequest::setDomainName(const std::string& domainName)
{
domainName_ = domainName;
setParameter("DomainName", domainName);
}
int UpdateDnsCacheDomainRequest::getCacheTtlMax()const
{
return cacheTtlMax_;
}
void UpdateDnsCacheDomainRequest::setCacheTtlMax(int cacheTtlMax)
{
cacheTtlMax_ = cacheTtlMax;
setParameter("CacheTtlMax", std::to_string(cacheTtlMax));
}
std::string UpdateDnsCacheDomainRequest::getInstanceId()const
{
return instanceId_;
}
void UpdateDnsCacheDomainRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string UpdateDnsCacheDomainRequest::getSourceEdns()const
{
return sourceEdns_;
}
void UpdateDnsCacheDomainRequest::setSourceEdns(const std::string& sourceEdns)
{
sourceEdns_ = sourceEdns;
setParameter("SourceEdns", sourceEdns);
}
std::string UpdateDnsCacheDomainRequest::getUserClientIp()const
{
return userClientIp_;
}
void UpdateDnsCacheDomainRequest::setUserClientIp(const std::string& userClientIp)
{
userClientIp_ = userClientIp;
setParameter("UserClientIp", userClientIp);
}
int UpdateDnsCacheDomainRequest::getCacheTtlMin()const
{
return cacheTtlMin_;
}
void UpdateDnsCacheDomainRequest::setCacheTtlMin(int cacheTtlMin)
{
cacheTtlMin_ = cacheTtlMin;
setParameter("CacheTtlMin", std::to_string(cacheTtlMin));
}
std::vector<UpdateDnsCacheDomainRequest::SourceDnsServer> UpdateDnsCacheDomainRequest::getSourceDnsServer()const
{
return sourceDnsServer_;
}
void UpdateDnsCacheDomainRequest::setSourceDnsServer(const std::vector<SourceDnsServer>& sourceDnsServer)
{
sourceDnsServer_ = sourceDnsServer;
for(int dep1 = 0; dep1!= sourceDnsServer.size(); dep1++) {
auto sourceDnsServerObj = sourceDnsServer.at(dep1);
std::string sourceDnsServerObjStr = "SourceDnsServer." + std::to_string(dep1 + 1);
setParameter(sourceDnsServerObjStr + ".Port", sourceDnsServerObj.port);
setParameter(sourceDnsServerObjStr + ".Host", sourceDnsServerObj.host);
}
}

View File

@@ -0,0 +1,44 @@
/*
* 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 <alibabacloud/alidns/model/UpdateDnsCacheDomainResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Alidns;
using namespace AlibabaCloud::Alidns::Model;
UpdateDnsCacheDomainResult::UpdateDnsCacheDomainResult() :
ServiceResult()
{}
UpdateDnsCacheDomainResult::UpdateDnsCacheDomainResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateDnsCacheDomainResult::~UpdateDnsCacheDomainResult()
{}
void UpdateDnsCacheDomainResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}