Update DescribeRefreshTask.
This commit is contained in:
@@ -4875,6 +4875,42 @@ CdnClient::DescribeUserVipsByDomainOutcomeCallable CdnClient::describeUserVipsBy
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CdnClient::DescribeVerifyContentOutcome CdnClient::describeVerifyContent(const DescribeVerifyContentRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeVerifyContentOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeVerifyContentOutcome(DescribeVerifyContentResult(outcome.result()));
|
||||
else
|
||||
return DescribeVerifyContentOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CdnClient::describeVerifyContentAsync(const DescribeVerifyContentRequest& request, const DescribeVerifyContentAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeVerifyContent(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CdnClient::DescribeVerifyContentOutcomeCallable CdnClient::describeVerifyContentCallable(const DescribeVerifyContentRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeVerifyContentOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeVerifyContent(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CdnClient::DisableRealtimeLogDeliveryOutcome CdnClient::disableRealtimeLogDelivery(const DisableRealtimeLogDeliveryRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -7071,3 +7107,39 @@ CdnClient::UpdateLiveAppSnapshotConfigOutcomeCallable CdnClient::updateLiveAppSn
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CdnClient::VerifyDomainOwnerOutcome CdnClient::verifyDomainOwner(const VerifyDomainOwnerRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return VerifyDomainOwnerOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return VerifyDomainOwnerOutcome(VerifyDomainOwnerResult(outcome.result()));
|
||||
else
|
||||
return VerifyDomainOwnerOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CdnClient::verifyDomainOwnerAsync(const VerifyDomainOwnerRequest& request, const VerifyDomainOwnerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, verifyDomainOwner(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CdnClient::VerifyDomainOwnerOutcomeCallable CdnClient::verifyDomainOwnerCallable(const VerifyDomainOwnerRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<VerifyDomainOwnerOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->verifyDomainOwner(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
@@ -27,28 +27,6 @@ DescribeRefreshTaskByIdRequest::DescribeRefreshTaskByIdRequest() :
|
||||
DescribeRefreshTaskByIdRequest::~DescribeRefreshTaskByIdRequest()
|
||||
{}
|
||||
|
||||
int DescribeRefreshTaskByIdRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeRefreshTaskByIdRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
int DescribeRefreshTaskByIdRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeRefreshTaskByIdRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeRefreshTaskByIdRequest::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
|
||||
@@ -59,10 +59,6 @@ void DescribeRefreshTaskByIdResult::parse(const std::string &payload)
|
||||
tasksObject.objectType = valueTasksCDNTask["ObjectType"].asString();
|
||||
tasks_.push_back(tasksObject);
|
||||
}
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stol(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stol(value["PageSize"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stol(value["TotalCount"].asString());
|
||||
|
||||
@@ -78,13 +74,3 @@ std::vector<DescribeRefreshTaskByIdResult::CDNTask> DescribeRefreshTaskByIdResul
|
||||
return tasks_;
|
||||
}
|
||||
|
||||
long DescribeRefreshTaskByIdResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
long DescribeRefreshTaskByIdResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
|
||||
51
cdn/src/model/DescribeVerifyContentRequest.cc
Normal file
51
cdn/src/model/DescribeVerifyContentRequest.cc
Normal 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/DescribeVerifyContentRequest.h>
|
||||
|
||||
using AlibabaCloud::Cdn::Model::DescribeVerifyContentRequest;
|
||||
|
||||
DescribeVerifyContentRequest::DescribeVerifyContentRequest() :
|
||||
RpcServiceRequest("cdn", "2018-05-10", "DescribeVerifyContent")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeVerifyContentRequest::~DescribeVerifyContentRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeVerifyContentRequest::getDomainName()const
|
||||
{
|
||||
return domainName_;
|
||||
}
|
||||
|
||||
void DescribeVerifyContentRequest::setDomainName(const std::string& domainName)
|
||||
{
|
||||
domainName_ = domainName;
|
||||
setParameter("DomainName", domainName);
|
||||
}
|
||||
|
||||
long DescribeVerifyContentRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void DescribeVerifyContentRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
51
cdn/src/model/DescribeVerifyContentResult.cc
Normal file
51
cdn/src/model/DescribeVerifyContentResult.cc
Normal 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/DescribeVerifyContentResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cdn;
|
||||
using namespace AlibabaCloud::Cdn::Model;
|
||||
|
||||
DescribeVerifyContentResult::DescribeVerifyContentResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeVerifyContentResult::DescribeVerifyContentResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeVerifyContentResult::~DescribeVerifyContentResult()
|
||||
{}
|
||||
|
||||
void DescribeVerifyContentResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Content"].isNull())
|
||||
content_ = value["Content"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeVerifyContentResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
62
cdn/src/model/VerifyDomainOwnerRequest.cc
Normal file
62
cdn/src/model/VerifyDomainOwnerRequest.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/cdn/model/VerifyDomainOwnerRequest.h>
|
||||
|
||||
using AlibabaCloud::Cdn::Model::VerifyDomainOwnerRequest;
|
||||
|
||||
VerifyDomainOwnerRequest::VerifyDomainOwnerRequest() :
|
||||
RpcServiceRequest("cdn", "2018-05-10", "VerifyDomainOwner")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
VerifyDomainOwnerRequest::~VerifyDomainOwnerRequest()
|
||||
{}
|
||||
|
||||
std::string VerifyDomainOwnerRequest::getVerifyType()const
|
||||
{
|
||||
return verifyType_;
|
||||
}
|
||||
|
||||
void VerifyDomainOwnerRequest::setVerifyType(const std::string& verifyType)
|
||||
{
|
||||
verifyType_ = verifyType;
|
||||
setParameter("VerifyType", verifyType);
|
||||
}
|
||||
|
||||
std::string VerifyDomainOwnerRequest::getDomainName()const
|
||||
{
|
||||
return domainName_;
|
||||
}
|
||||
|
||||
void VerifyDomainOwnerRequest::setDomainName(const std::string& domainName)
|
||||
{
|
||||
domainName_ = domainName;
|
||||
setParameter("DomainName", domainName);
|
||||
}
|
||||
|
||||
long VerifyDomainOwnerRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void VerifyDomainOwnerRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
51
cdn/src/model/VerifyDomainOwnerResult.cc
Normal file
51
cdn/src/model/VerifyDomainOwnerResult.cc
Normal 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/VerifyDomainOwnerResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Cdn;
|
||||
using namespace AlibabaCloud::Cdn::Model;
|
||||
|
||||
VerifyDomainOwnerResult::VerifyDomainOwnerResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
VerifyDomainOwnerResult::VerifyDomainOwnerResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
VerifyDomainOwnerResult::~VerifyDomainOwnerResult()
|
||||
{}
|
||||
|
||||
void VerifyDomainOwnerResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Content"].isNull())
|
||||
content_ = value["Content"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string VerifyDomainOwnerResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user