Fixed SDK update delay.
This commit is contained in:
@@ -159,6 +159,78 @@ ScdnClient::BatchSetScdnDomainConfigsOutcomeCallable ScdnClient::batchSetScdnDom
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ScdnClient::BatchStartScdnDomainOutcome ScdnClient::batchStartScdnDomain(const BatchStartScdnDomainRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return BatchStartScdnDomainOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return BatchStartScdnDomainOutcome(BatchStartScdnDomainResult(outcome.result()));
|
||||
else
|
||||
return BatchStartScdnDomainOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ScdnClient::batchStartScdnDomainAsync(const BatchStartScdnDomainRequest& request, const BatchStartScdnDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, batchStartScdnDomain(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ScdnClient::BatchStartScdnDomainOutcomeCallable ScdnClient::batchStartScdnDomainCallable(const BatchStartScdnDomainRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<BatchStartScdnDomainOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->batchStartScdnDomain(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ScdnClient::BatchStopScdnDomainOutcome ScdnClient::batchStopScdnDomain(const BatchStopScdnDomainRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return BatchStopScdnDomainOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return BatchStopScdnDomainOutcome(BatchStopScdnDomainResult(outcome.result()));
|
||||
else
|
||||
return BatchStopScdnDomainOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ScdnClient::batchStopScdnDomainAsync(const BatchStopScdnDomainRequest& request, const BatchStopScdnDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, batchStopScdnDomain(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ScdnClient::BatchStopScdnDomainOutcomeCallable ScdnClient::batchStopScdnDomainCallable(const BatchStopScdnDomainRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<BatchStopScdnDomainOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->batchStopScdnDomain(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ScdnClient::BatchUpdateScdnDomainOutcome ScdnClient::batchUpdateScdnDomain(const BatchUpdateScdnDomainRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -39,6 +39,23 @@ void BatchSetScdnDomainConfigsResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDomainConfigListNode = value["DomainConfigList"]["DomainConfigModel"];
|
||||
for (auto valueDomainConfigListDomainConfigModel : allDomainConfigListNode)
|
||||
{
|
||||
DomainConfigModel domainConfigListObject;
|
||||
if(!valueDomainConfigListDomainConfigModel["DomainName"].isNull())
|
||||
domainConfigListObject.domainName = valueDomainConfigListDomainConfigModel["DomainName"].asString();
|
||||
if(!valueDomainConfigListDomainConfigModel["ConfigId"].isNull())
|
||||
domainConfigListObject.configId = std::stol(valueDomainConfigListDomainConfigModel["ConfigId"].asString());
|
||||
if(!valueDomainConfigListDomainConfigModel["FunctionName"].isNull())
|
||||
domainConfigListObject.functionName = valueDomainConfigListDomainConfigModel["FunctionName"].asString();
|
||||
domainConfigList_.push_back(domainConfigListObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<BatchSetScdnDomainConfigsResult::DomainConfigModel> BatchSetScdnDomainConfigsResult::getDomainConfigList()const
|
||||
{
|
||||
return domainConfigList_;
|
||||
}
|
||||
|
||||
|
||||
62
scdn/src/model/BatchStartScdnDomainRequest.cc
Normal file
62
scdn/src/model/BatchStartScdnDomainRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/scdn/model/BatchStartScdnDomainRequest.h>
|
||||
|
||||
using AlibabaCloud::Scdn::Model::BatchStartScdnDomainRequest;
|
||||
|
||||
BatchStartScdnDomainRequest::BatchStartScdnDomainRequest() :
|
||||
RpcServiceRequest("scdn", "2017-11-15", "BatchStartScdnDomain")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
BatchStartScdnDomainRequest::~BatchStartScdnDomainRequest()
|
||||
{}
|
||||
|
||||
std::string BatchStartScdnDomainRequest::getDomainNames()const
|
||||
{
|
||||
return domainNames_;
|
||||
}
|
||||
|
||||
void BatchStartScdnDomainRequest::setDomainNames(const std::string& domainNames)
|
||||
{
|
||||
domainNames_ = domainNames;
|
||||
setParameter("DomainNames", domainNames);
|
||||
}
|
||||
|
||||
long BatchStartScdnDomainRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void BatchStartScdnDomainRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string BatchStartScdnDomainRequest::getSecurityToken()const
|
||||
{
|
||||
return securityToken_;
|
||||
}
|
||||
|
||||
void BatchStartScdnDomainRequest::setSecurityToken(const std::string& securityToken)
|
||||
{
|
||||
securityToken_ = securityToken;
|
||||
setParameter("SecurityToken", securityToken);
|
||||
}
|
||||
|
||||
44
scdn/src/model/BatchStartScdnDomainResult.cc
Normal file
44
scdn/src/model/BatchStartScdnDomainResult.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/scdn/model/BatchStartScdnDomainResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Scdn;
|
||||
using namespace AlibabaCloud::Scdn::Model;
|
||||
|
||||
BatchStartScdnDomainResult::BatchStartScdnDomainResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
BatchStartScdnDomainResult::BatchStartScdnDomainResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
BatchStartScdnDomainResult::~BatchStartScdnDomainResult()
|
||||
{}
|
||||
|
||||
void BatchStartScdnDomainResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
62
scdn/src/model/BatchStopScdnDomainRequest.cc
Normal file
62
scdn/src/model/BatchStopScdnDomainRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/scdn/model/BatchStopScdnDomainRequest.h>
|
||||
|
||||
using AlibabaCloud::Scdn::Model::BatchStopScdnDomainRequest;
|
||||
|
||||
BatchStopScdnDomainRequest::BatchStopScdnDomainRequest() :
|
||||
RpcServiceRequest("scdn", "2017-11-15", "BatchStopScdnDomain")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
BatchStopScdnDomainRequest::~BatchStopScdnDomainRequest()
|
||||
{}
|
||||
|
||||
std::string BatchStopScdnDomainRequest::getDomainNames()const
|
||||
{
|
||||
return domainNames_;
|
||||
}
|
||||
|
||||
void BatchStopScdnDomainRequest::setDomainNames(const std::string& domainNames)
|
||||
{
|
||||
domainNames_ = domainNames;
|
||||
setParameter("DomainNames", domainNames);
|
||||
}
|
||||
|
||||
long BatchStopScdnDomainRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void BatchStopScdnDomainRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string BatchStopScdnDomainRequest::getSecurityToken()const
|
||||
{
|
||||
return securityToken_;
|
||||
}
|
||||
|
||||
void BatchStopScdnDomainRequest::setSecurityToken(const std::string& securityToken)
|
||||
{
|
||||
securityToken_ = securityToken;
|
||||
setParameter("SecurityToken", securityToken);
|
||||
}
|
||||
|
||||
44
scdn/src/model/BatchStopScdnDomainResult.cc
Normal file
44
scdn/src/model/BatchStopScdnDomainResult.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/scdn/model/BatchStopScdnDomainResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Scdn;
|
||||
using namespace AlibabaCloud::Scdn::Model;
|
||||
|
||||
BatchStopScdnDomainResult::BatchStopScdnDomainResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
BatchStopScdnDomainResult::BatchStopScdnDomainResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
BatchStopScdnDomainResult::~BatchStopScdnDomainResult()
|
||||
{}
|
||||
|
||||
void BatchStopScdnDomainResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -71,3 +71,14 @@ void DescribeScdnDomainConfigsRequest::setSecurityToken(const std::string& secur
|
||||
setParameter("SecurityToken", securityToken);
|
||||
}
|
||||
|
||||
std::string DescribeScdnDomainConfigsRequest::getConfigId()const
|
||||
{
|
||||
return configId_;
|
||||
}
|
||||
|
||||
void DescribeScdnDomainConfigsRequest::setConfigId(const std::string& configId)
|
||||
{
|
||||
configId_ = configId;
|
||||
setParameter("ConfigId", configId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user