Fixed SDK update delay.

This commit is contained in:
sdk-team
2021-11-02 03:20:53 +00:00
parent 754add8798
commit a6fdb87ef4
13 changed files with 583 additions and 1 deletions

View File

@@ -1059,6 +1059,42 @@ CdnClient::DescribeActiveVersionOfConfigGroupOutcomeCallable CdnClient::describe
return task->get_future();
}
CdnClient::DescribeBlockedRegionsOutcome CdnClient::describeBlockedRegions(const DescribeBlockedRegionsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeBlockedRegionsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeBlockedRegionsOutcome(DescribeBlockedRegionsResult(outcome.result()));
else
return DescribeBlockedRegionsOutcome(outcome.error());
}
void CdnClient::describeBlockedRegionsAsync(const DescribeBlockedRegionsRequest& request, const DescribeBlockedRegionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeBlockedRegions(request), context);
};
asyncExecute(new Runnable(fn));
}
CdnClient::DescribeBlockedRegionsOutcomeCallable CdnClient::describeBlockedRegionsCallable(const DescribeBlockedRegionsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeBlockedRegionsOutcome()>>(
[this, request]()
{
return this->describeBlockedRegions(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeCdnCertificateDetailOutcome CdnClient::describeCdnCertificateDetail(const DescribeCdnCertificateDetailRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1995,6 +2031,42 @@ CdnClient::DescribeCertificateInfoByIDOutcomeCallable CdnClient::describeCertifi
return task->get_future();
}
CdnClient::DescribeConfigGroupDetailOutcome CdnClient::describeConfigGroupDetail(const DescribeConfigGroupDetailRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeConfigGroupDetailOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeConfigGroupDetailOutcome(DescribeConfigGroupDetailResult(outcome.result()));
else
return DescribeConfigGroupDetailOutcome(outcome.error());
}
void CdnClient::describeConfigGroupDetailAsync(const DescribeConfigGroupDetailRequest& request, const DescribeConfigGroupDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeConfigGroupDetail(request), context);
};
asyncExecute(new Runnable(fn));
}
CdnClient::DescribeConfigGroupDetailOutcomeCallable CdnClient::describeConfigGroupDetailCallable(const DescribeConfigGroupDetailRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeConfigGroupDetailOutcome()>>(
[this, request]()
{
return this->describeConfigGroupDetail(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeConfigOfVersionOutcome CdnClient::describeConfigOfVersion(const DescribeConfigOfVersionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,51 @@
/*
* 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/cdn/model/DescribeBlockedRegionsRequest.h>
using AlibabaCloud::Cdn::Model::DescribeBlockedRegionsRequest;
DescribeBlockedRegionsRequest::DescribeBlockedRegionsRequest() :
RpcServiceRequest("cdn", "2018-05-10", "DescribeBlockedRegions")
{
setMethod(HttpRequest::Method::Get);
}
DescribeBlockedRegionsRequest::~DescribeBlockedRegionsRequest()
{}
std::string DescribeBlockedRegionsRequest::getLanguage()const
{
return language_;
}
void DescribeBlockedRegionsRequest::setLanguage(const std::string& language)
{
language_ = language;
setParameter("Language", language);
}
long DescribeBlockedRegionsRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeBlockedRegionsRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

View File

@@ -0,0 +1,61 @@
/*
* 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/cdn/model/DescribeBlockedRegionsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cdn;
using namespace AlibabaCloud::Cdn::Model;
DescribeBlockedRegionsResult::DescribeBlockedRegionsResult() :
ServiceResult()
{}
DescribeBlockedRegionsResult::DescribeBlockedRegionsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeBlockedRegionsResult::~DescribeBlockedRegionsResult()
{}
void DescribeBlockedRegionsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allInfoListNode = value["InfoList"]["InfoItem"];
for (auto valueInfoListInfoItem : allInfoListNode)
{
InfoItem infoListObject;
if(!valueInfoListInfoItem["CountriesAndRegions"].isNull())
infoListObject.countriesAndRegions = valueInfoListInfoItem["CountriesAndRegions"].asString();
if(!valueInfoListInfoItem["CountriesAndRegionsName"].isNull())
infoListObject.countriesAndRegionsName = valueInfoListInfoItem["CountriesAndRegionsName"].asString();
if(!valueInfoListInfoItem["Continent"].isNull())
infoListObject.continent = valueInfoListInfoItem["Continent"].asString();
infoList_.push_back(infoListObject);
}
}
std::vector<DescribeBlockedRegionsResult::InfoItem> DescribeBlockedRegionsResult::getInfoList()const
{
return infoList_;
}

View 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/cdn/model/DescribeConfigGroupDetailRequest.h>
using AlibabaCloud::Cdn::Model::DescribeConfigGroupDetailRequest;
DescribeConfigGroupDetailRequest::DescribeConfigGroupDetailRequest() :
RpcServiceRequest("cdn", "2018-05-10", "DescribeConfigGroupDetail")
{
setMethod(HttpRequest::Method::Post);
}
DescribeConfigGroupDetailRequest::~DescribeConfigGroupDetailRequest()
{}
std::string DescribeConfigGroupDetailRequest::getConfigGroupName()const
{
return configGroupName_;
}
void DescribeConfigGroupDetailRequest::setConfigGroupName(const std::string& configGroupName)
{
configGroupName_ = configGroupName;
setParameter("ConfigGroupName", configGroupName);
}
long DescribeConfigGroupDetailRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeConfigGroupDetailRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string DescribeConfigGroupDetailRequest::getConfigGroupId()const
{
return configGroupId_;
}
void DescribeConfigGroupDetailRequest::setConfigGroupId(const std::string& configGroupId)
{
configGroupId_ = configGroupId;
setParameter("ConfigGroupId", configGroupId);
}

View File

@@ -0,0 +1,86 @@
/*
* 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/cdn/model/DescribeConfigGroupDetailResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cdn;
using namespace AlibabaCloud::Cdn::Model;
DescribeConfigGroupDetailResult::DescribeConfigGroupDetailResult() :
ServiceResult()
{}
DescribeConfigGroupDetailResult::DescribeConfigGroupDetailResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeConfigGroupDetailResult::~DescribeConfigGroupDetailResult()
{}
void DescribeConfigGroupDetailResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["ConfigGroupId"].isNull())
configGroupId_ = value["ConfigGroupId"].asString();
if(!value["ConfigGroupName"].isNull())
configGroupName_ = value["ConfigGroupName"].asString();
if(!value["Description"].isNull())
description_ = value["Description"].asString();
if(!value["BizName"].isNull())
bizName_ = value["BizName"].asString();
if(!value["CreateTime"].isNull())
createTime_ = value["CreateTime"].asString();
if(!value["UpdateTime"].isNull())
updateTime_ = value["UpdateTime"].asString();
}
std::string DescribeConfigGroupDetailResult::getConfigGroupId()const
{
return configGroupId_;
}
std::string DescribeConfigGroupDetailResult::getDescription()const
{
return description_;
}
std::string DescribeConfigGroupDetailResult::getCreateTime()const
{
return createTime_;
}
std::string DescribeConfigGroupDetailResult::getConfigGroupName()const
{
return configGroupName_;
}
std::string DescribeConfigGroupDetailResult::getUpdateTime()const
{
return updateTime_;
}
std::string DescribeConfigGroupDetailResult::getBizName()const
{
return bizName_;
}