Add ExportTas apis.

This commit is contained in:
sdk-team
2020-03-10 11:33:22 +08:00
parent a3026e6a85
commit c419c6e933
19 changed files with 567 additions and 37 deletions

View File

@@ -555,6 +555,42 @@ CdnClient::CreateCdnCertificateSigningRequestOutcomeCallable CdnClient::createCd
return task->get_future();
}
CdnClient::CreateIllegalUrlExportTaskOutcome CdnClient::createIllegalUrlExportTask(const CreateIllegalUrlExportTaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateIllegalUrlExportTaskOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateIllegalUrlExportTaskOutcome(CreateIllegalUrlExportTaskResult(outcome.result()));
else
return CreateIllegalUrlExportTaskOutcome(outcome.error());
}
void CdnClient::createIllegalUrlExportTaskAsync(const CreateIllegalUrlExportTaskRequest& request, const CreateIllegalUrlExportTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createIllegalUrlExportTask(request), context);
};
asyncExecute(new Runnable(fn));
}
CdnClient::CreateIllegalUrlExportTaskOutcomeCallable CdnClient::createIllegalUrlExportTaskCallable(const CreateIllegalUrlExportTaskRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateIllegalUrlExportTaskOutcome()>>(
[this, request]()
{
return this->createIllegalUrlExportTask(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::CreateLiveStreamRecordIndexFilesOutcome CdnClient::createLiveStreamRecordIndexFiles(const CreateLiveStreamRecordIndexFilesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3471,6 +3507,42 @@ CdnClient::DescribeFCTriggerOutcomeCallable CdnClient::describeFCTriggerCallable
return task->get_future();
}
CdnClient::DescribeIllegalUrlExportTaskOutcome CdnClient::describeIllegalUrlExportTask(const DescribeIllegalUrlExportTaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeIllegalUrlExportTaskOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeIllegalUrlExportTaskOutcome(DescribeIllegalUrlExportTaskResult(outcome.result()));
else
return DescribeIllegalUrlExportTaskOutcome(outcome.error());
}
void CdnClient::describeIllegalUrlExportTaskAsync(const DescribeIllegalUrlExportTaskRequest& request, const DescribeIllegalUrlExportTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeIllegalUrlExportTask(request), context);
};
asyncExecute(new Runnable(fn));
}
CdnClient::DescribeIllegalUrlExportTaskOutcomeCallable CdnClient::describeIllegalUrlExportTaskCallable(const DescribeIllegalUrlExportTaskRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeIllegalUrlExportTaskOutcome()>>(
[this, request]()
{
return this->describeIllegalUrlExportTask(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeIpInfoOutcome CdnClient::describeIpInfo(const DescribeIpInfoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -49,6 +49,17 @@ void BatchSetCdnDomainConfigRequest::setDomainNames(const std::string& domainNam
setParameter("DomainNames", domainNames);
}
std::string BatchSetCdnDomainConfigRequest::getSecurityToken()const
{
return securityToken_;
}
void BatchSetCdnDomainConfigRequest::setSecurityToken(const std::string& securityToken)
{
securityToken_ = securityToken;
setParameter("SecurityToken", securityToken);
}
std::string BatchSetCdnDomainConfigRequest::getOwnerAccount()const
{
return ownerAccount_;
@@ -71,14 +82,3 @@ void BatchSetCdnDomainConfigRequest::setOwnerId(long ownerId)
setParameter("OwnerId", std::to_string(ownerId));
}
std::string BatchSetCdnDomainConfigRequest::getSecurityToken()const
{
return securityToken_;
}
void BatchSetCdnDomainConfigRequest::setSecurityToken(const std::string& securityToken)
{
securityToken_ = securityToken;
setParameter("SecurityToken", securityToken);
}

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/CreateIllegalUrlExportTaskRequest.h>
using AlibabaCloud::Cdn::Model::CreateIllegalUrlExportTaskRequest;
CreateIllegalUrlExportTaskRequest::CreateIllegalUrlExportTaskRequest() :
RpcServiceRequest("cdn", "2018-05-10", "CreateIllegalUrlExportTask")
{
setMethod(HttpRequest::Method::Post);
}
CreateIllegalUrlExportTaskRequest::~CreateIllegalUrlExportTaskRequest()
{}
std::string CreateIllegalUrlExportTaskRequest::getTaskName()const
{
return taskName_;
}
void CreateIllegalUrlExportTaskRequest::setTaskName(const std::string& taskName)
{
taskName_ = taskName;
setParameter("TaskName", taskName);
}
long CreateIllegalUrlExportTaskRequest::getOwnerId()const
{
return ownerId_;
}
void CreateIllegalUrlExportTaskRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string CreateIllegalUrlExportTaskRequest::getTimePoint()const
{
return timePoint_;
}
void CreateIllegalUrlExportTaskRequest::setTimePoint(const std::string& timePoint)
{
timePoint_ = timePoint;
setParameter("TimePoint", timePoint);
}

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/CreateIllegalUrlExportTaskResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cdn;
using namespace AlibabaCloud::Cdn::Model;
CreateIllegalUrlExportTaskResult::CreateIllegalUrlExportTaskResult() :
ServiceResult()
{}
CreateIllegalUrlExportTaskResult::CreateIllegalUrlExportTaskResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateIllegalUrlExportTaskResult::~CreateIllegalUrlExportTaskResult()
{}
void CreateIllegalUrlExportTaskResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["TaskId"].isNull())
taskId_ = value["TaskId"].asString();
}
std::string CreateIllegalUrlExportTaskResult::getTaskId()const
{
return taskId_;
}

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/DescribeIllegalUrlExportTaskRequest.h>
using AlibabaCloud::Cdn::Model::DescribeIllegalUrlExportTaskRequest;
DescribeIllegalUrlExportTaskRequest::DescribeIllegalUrlExportTaskRequest() :
RpcServiceRequest("cdn", "2018-05-10", "DescribeIllegalUrlExportTask")
{
setMethod(HttpRequest::Method::Post);
}
DescribeIllegalUrlExportTaskRequest::~DescribeIllegalUrlExportTaskRequest()
{}
std::string DescribeIllegalUrlExportTaskRequest::getTaskId()const
{
return taskId_;
}
void DescribeIllegalUrlExportTaskRequest::setTaskId(const std::string& taskId)
{
taskId_ = taskId;
setParameter("TaskId", taskId);
}
long DescribeIllegalUrlExportTaskRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeIllegalUrlExportTaskRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

View File

@@ -0,0 +1,58 @@
/*
* 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/DescribeIllegalUrlExportTaskResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Cdn;
using namespace AlibabaCloud::Cdn::Model;
DescribeIllegalUrlExportTaskResult::DescribeIllegalUrlExportTaskResult() :
ServiceResult()
{}
DescribeIllegalUrlExportTaskResult::DescribeIllegalUrlExportTaskResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeIllegalUrlExportTaskResult::~DescribeIllegalUrlExportTaskResult()
{}
void DescribeIllegalUrlExportTaskResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Status"].isNull())
status_ = value["Status"].asString();
if(!value["DownloadUrl"].isNull())
downloadUrl_ = value["DownloadUrl"].asString();
}
std::string DescribeIllegalUrlExportTaskResult::getStatus()const
{
return status_;
}
std::string DescribeIllegalUrlExportTaskResult::getDownloadUrl()const
{
return downloadUrl_;
}

View File

@@ -38,17 +38,6 @@ void RefreshObjectCachesRequest::setObjectPath(const std::string& objectPath)
setParameter("ObjectPath", objectPath);
}
long RefreshObjectCachesRequest::getOwnerId()const
{
return ownerId_;
}
void RefreshObjectCachesRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string RefreshObjectCachesRequest::getSecurityToken()const
{
return securityToken_;
@@ -71,3 +60,14 @@ void RefreshObjectCachesRequest::setObjectType(const std::string& objectType)
setParameter("ObjectType", objectType);
}
long RefreshObjectCachesRequest::getOwnerId()const
{
return ownerId_;
}
void RefreshObjectCachesRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

View File

@@ -27,15 +27,15 @@ SetCdnDomainCSRCertificateRequest::SetCdnDomainCSRCertificateRequest() :
SetCdnDomainCSRCertificateRequest::~SetCdnDomainCSRCertificateRequest()
{}
std::string SetCdnDomainCSRCertificateRequest::getCertificate()const
std::string SetCdnDomainCSRCertificateRequest::getServerCertificate()const
{
return certificate_;
return serverCertificate_;
}
void SetCdnDomainCSRCertificateRequest::setCertificate(const std::string& certificate)
void SetCdnDomainCSRCertificateRequest::setServerCertificate(const std::string& serverCertificate)
{
certificate_ = certificate;
setParameter("Certificate", certificate);
serverCertificate_ = serverCertificate;
setParameter("ServerCertificate", serverCertificate);
}
std::string SetCdnDomainCSRCertificateRequest::getDomainName()const