regenerate code
This commit is contained in:
@@ -483,6 +483,42 @@ AlidnsClient::ChangeDomainOfDnsProductOutcomeCallable AlidnsClient::changeDomain
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlidnsClient::CopyGtmConfigOutcome AlidnsClient::copyGtmConfig(const CopyGtmConfigRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CopyGtmConfigOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CopyGtmConfigOutcome(CopyGtmConfigResult(outcome.result()));
|
||||
else
|
||||
return CopyGtmConfigOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AlidnsClient::copyGtmConfigAsync(const CopyGtmConfigRequest& request, const CopyGtmConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, copyGtmConfig(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AlidnsClient::CopyGtmConfigOutcomeCallable AlidnsClient::copyGtmConfigCallable(const CopyGtmConfigRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CopyGtmConfigOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->copyGtmConfig(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AlidnsClient::DeleteCustomLinesOutcome AlidnsClient::deleteCustomLines(const DeleteCustomLinesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
84
alidns/src/model/CopyGtmConfigRequest.cc
Normal file
84
alidns/src/model/CopyGtmConfigRequest.cc
Normal 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/CopyGtmConfigRequest.h>
|
||||
|
||||
using AlibabaCloud::Alidns::Model::CopyGtmConfigRequest;
|
||||
|
||||
CopyGtmConfigRequest::CopyGtmConfigRequest() :
|
||||
RpcServiceRequest("alidns", "2015-01-09", "CopyGtmConfig")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CopyGtmConfigRequest::~CopyGtmConfigRequest()
|
||||
{}
|
||||
|
||||
std::string CopyGtmConfigRequest::getSourceId()const
|
||||
{
|
||||
return sourceId_;
|
||||
}
|
||||
|
||||
void CopyGtmConfigRequest::setSourceId(const std::string& sourceId)
|
||||
{
|
||||
sourceId_ = sourceId;
|
||||
setParameter("SourceId", sourceId);
|
||||
}
|
||||
|
||||
std::string CopyGtmConfigRequest::getTargetId()const
|
||||
{
|
||||
return targetId_;
|
||||
}
|
||||
|
||||
void CopyGtmConfigRequest::setTargetId(const std::string& targetId)
|
||||
{
|
||||
targetId_ = targetId;
|
||||
setParameter("TargetId", targetId);
|
||||
}
|
||||
|
||||
std::string CopyGtmConfigRequest::getCopyType()const
|
||||
{
|
||||
return copyType_;
|
||||
}
|
||||
|
||||
void CopyGtmConfigRequest::setCopyType(const std::string& copyType)
|
||||
{
|
||||
copyType_ = copyType;
|
||||
setParameter("CopyType", copyType);
|
||||
}
|
||||
|
||||
std::string CopyGtmConfigRequest::getUserClientIp()const
|
||||
{
|
||||
return userClientIp_;
|
||||
}
|
||||
|
||||
void CopyGtmConfigRequest::setUserClientIp(const std::string& userClientIp)
|
||||
{
|
||||
userClientIp_ = userClientIp;
|
||||
setParameter("UserClientIp", userClientIp);
|
||||
}
|
||||
|
||||
std::string CopyGtmConfigRequest::getLang()const
|
||||
{
|
||||
return lang_;
|
||||
}
|
||||
|
||||
void CopyGtmConfigRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
}
|
||||
|
||||
44
alidns/src/model/CopyGtmConfigResult.cc
Normal file
44
alidns/src/model/CopyGtmConfigResult.cc
Normal 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/CopyGtmConfigResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Alidns;
|
||||
using namespace AlibabaCloud::Alidns::Model;
|
||||
|
||||
CopyGtmConfigResult::CopyGtmConfigResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CopyGtmConfigResult::CopyGtmConfigResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CopyGtmConfigResult::~CopyGtmConfigResult()
|
||||
{}
|
||||
|
||||
void CopyGtmConfigResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -47,9 +47,18 @@ void DescribeGtmInstanceStatusResult::parse(const std::string &payload)
|
||||
switchToFailoverStrategyNum_ = std::stoi(value["SwitchToFailoverStrategyNum"].asString());
|
||||
if(!value["StrategyNotAvailableNum"].isNull())
|
||||
strategyNotAvailableNum_ = std::stoi(value["StrategyNotAvailableNum"].asString());
|
||||
if(!value["Status"].isNull())
|
||||
status_ = value["Status"].asString();
|
||||
if(!value["StatusReason"].isNull())
|
||||
statusReason_ = value["StatusReason"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeGtmInstanceStatusResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
int DescribeGtmInstanceStatusResult::getStrategyNotAvailableNum()const
|
||||
{
|
||||
return strategyNotAvailableNum_;
|
||||
@@ -60,6 +69,11 @@ int DescribeGtmInstanceStatusResult::getSwitchToFailoverStrategyNum()const
|
||||
return switchToFailoverStrategyNum_;
|
||||
}
|
||||
|
||||
std::string DescribeGtmInstanceStatusResult::getStatusReason()const
|
||||
{
|
||||
return statusReason_;
|
||||
}
|
||||
|
||||
int DescribeGtmInstanceStatusResult::getAddrNotAvailableNum()const
|
||||
{
|
||||
return addrNotAvailableNum_;
|
||||
|
||||
Reference in New Issue
Block a user