Fetch the repository succeeded.
/*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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 <tencentcloud/live/v20180801/LiveClient.h>
#include <tencentcloud/core/Executor.h>
#include <tencentcloud/core/Runnable.h>
using namespace TencentCloud;
using namespace TencentCloud::Live::V20180801;
using namespace TencentCloud::Live::V20180801::Model;
using namespace std;
namespace
{
const string VERSION = "2018-08-01";
const string ENDPOINT = "live.tencentcloudapi.com";
}
LiveClient::LiveClient(const Credential &credential, const string ®ion) :
LiveClient(credential, region, ClientProfile())
{
}
LiveClient::LiveClient(const Credential &credential, const string ®ion, const ClientProfile &profile) :
AbstractClient(ENDPOINT, VERSION, credential, region, profile)
{
}
LiveClient::AddDelayLiveStreamOutcome LiveClient::AddDelayLiveStream(const AddDelayLiveStreamRequest &request)
{
auto outcome = MakeRequest(request, "AddDelayLiveStream");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
AddDelayLiveStreamResponse rsp = AddDelayLiveStreamResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return AddDelayLiveStreamOutcome(rsp);
else
return AddDelayLiveStreamOutcome(o.GetError());
}
else
{
return AddDelayLiveStreamOutcome(outcome.GetError());
}
}
void LiveClient::AddDelayLiveStreamAsync(const AddDelayLiveStreamRequest& request, const AddDelayLiveStreamAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->AddDelayLiveStream(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::AddDelayLiveStreamOutcomeCallable LiveClient::AddDelayLiveStreamCallable(const AddDelayLiveStreamRequest &request)
{
auto task = std::make_shared<std::packaged_task<AddDelayLiveStreamOutcome()>>(
[this, request]()
{
return this->AddDelayLiveStream(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::AddLiveDomainOutcome LiveClient::AddLiveDomain(const AddLiveDomainRequest &request)
{
auto outcome = MakeRequest(request, "AddLiveDomain");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
AddLiveDomainResponse rsp = AddLiveDomainResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return AddLiveDomainOutcome(rsp);
else
return AddLiveDomainOutcome(o.GetError());
}
else
{
return AddLiveDomainOutcome(outcome.GetError());
}
}
void LiveClient::AddLiveDomainAsync(const AddLiveDomainRequest& request, const AddLiveDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->AddLiveDomain(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::AddLiveDomainOutcomeCallable LiveClient::AddLiveDomainCallable(const AddLiveDomainRequest &request)
{
auto task = std::make_shared<std::packaged_task<AddLiveDomainOutcome()>>(
[this, request]()
{
return this->AddLiveDomain(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::AddLiveWatermarkOutcome LiveClient::AddLiveWatermark(const AddLiveWatermarkRequest &request)
{
auto outcome = MakeRequest(request, "AddLiveWatermark");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
AddLiveWatermarkResponse rsp = AddLiveWatermarkResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return AddLiveWatermarkOutcome(rsp);
else
return AddLiveWatermarkOutcome(o.GetError());
}
else
{
return AddLiveWatermarkOutcome(outcome.GetError());
}
}
void LiveClient::AddLiveWatermarkAsync(const AddLiveWatermarkRequest& request, const AddLiveWatermarkAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->AddLiveWatermark(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::AddLiveWatermarkOutcomeCallable LiveClient::AddLiveWatermarkCallable(const AddLiveWatermarkRequest &request)
{
auto task = std::make_shared<std::packaged_task<AddLiveWatermarkOutcome()>>(
[this, request]()
{
return this->AddLiveWatermark(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::AuthenticateDomainOwnerOutcome LiveClient::AuthenticateDomainOwner(const AuthenticateDomainOwnerRequest &request)
{
auto outcome = MakeRequest(request, "AuthenticateDomainOwner");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
AuthenticateDomainOwnerResponse rsp = AuthenticateDomainOwnerResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return AuthenticateDomainOwnerOutcome(rsp);
else
return AuthenticateDomainOwnerOutcome(o.GetError());
}
else
{
return AuthenticateDomainOwnerOutcome(outcome.GetError());
}
}
void LiveClient::AuthenticateDomainOwnerAsync(const AuthenticateDomainOwnerRequest& request, const AuthenticateDomainOwnerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->AuthenticateDomainOwner(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::AuthenticateDomainOwnerOutcomeCallable LiveClient::AuthenticateDomainOwnerCallable(const AuthenticateDomainOwnerRequest &request)
{
auto task = std::make_shared<std::packaged_task<AuthenticateDomainOwnerOutcome()>>(
[this, request]()
{
return this->AuthenticateDomainOwner(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CancelCommonMixStreamOutcome LiveClient::CancelCommonMixStream(const CancelCommonMixStreamRequest &request)
{
auto outcome = MakeRequest(request, "CancelCommonMixStream");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CancelCommonMixStreamResponse rsp = CancelCommonMixStreamResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CancelCommonMixStreamOutcome(rsp);
else
return CancelCommonMixStreamOutcome(o.GetError());
}
else
{
return CancelCommonMixStreamOutcome(outcome.GetError());
}
}
void LiveClient::CancelCommonMixStreamAsync(const CancelCommonMixStreamRequest& request, const CancelCommonMixStreamAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CancelCommonMixStream(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CancelCommonMixStreamOutcomeCallable LiveClient::CancelCommonMixStreamCallable(const CancelCommonMixStreamRequest &request)
{
auto task = std::make_shared<std::packaged_task<CancelCommonMixStreamOutcome()>>(
[this, request]()
{
return this->CancelCommonMixStream(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateCommonMixStreamOutcome LiveClient::CreateCommonMixStream(const CreateCommonMixStreamRequest &request)
{
auto outcome = MakeRequest(request, "CreateCommonMixStream");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateCommonMixStreamResponse rsp = CreateCommonMixStreamResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateCommonMixStreamOutcome(rsp);
else
return CreateCommonMixStreamOutcome(o.GetError());
}
else
{
return CreateCommonMixStreamOutcome(outcome.GetError());
}
}
void LiveClient::CreateCommonMixStreamAsync(const CreateCommonMixStreamRequest& request, const CreateCommonMixStreamAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateCommonMixStream(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateCommonMixStreamOutcomeCallable LiveClient::CreateCommonMixStreamCallable(const CreateCommonMixStreamRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateCommonMixStreamOutcome()>>(
[this, request]()
{
return this->CreateCommonMixStream(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateLiveCallbackRuleOutcome LiveClient::CreateLiveCallbackRule(const CreateLiveCallbackRuleRequest &request)
{
auto outcome = MakeRequest(request, "CreateLiveCallbackRule");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateLiveCallbackRuleResponse rsp = CreateLiveCallbackRuleResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateLiveCallbackRuleOutcome(rsp);
else
return CreateLiveCallbackRuleOutcome(o.GetError());
}
else
{
return CreateLiveCallbackRuleOutcome(outcome.GetError());
}
}
void LiveClient::CreateLiveCallbackRuleAsync(const CreateLiveCallbackRuleRequest& request, const CreateLiveCallbackRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateLiveCallbackRule(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateLiveCallbackRuleOutcomeCallable LiveClient::CreateLiveCallbackRuleCallable(const CreateLiveCallbackRuleRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateLiveCallbackRuleOutcome()>>(
[this, request]()
{
return this->CreateLiveCallbackRule(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateLiveCallbackTemplateOutcome LiveClient::CreateLiveCallbackTemplate(const CreateLiveCallbackTemplateRequest &request)
{
auto outcome = MakeRequest(request, "CreateLiveCallbackTemplate");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateLiveCallbackTemplateResponse rsp = CreateLiveCallbackTemplateResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateLiveCallbackTemplateOutcome(rsp);
else
return CreateLiveCallbackTemplateOutcome(o.GetError());
}
else
{
return CreateLiveCallbackTemplateOutcome(outcome.GetError());
}
}
void LiveClient::CreateLiveCallbackTemplateAsync(const CreateLiveCallbackTemplateRequest& request, const CreateLiveCallbackTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateLiveCallbackTemplate(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateLiveCallbackTemplateOutcomeCallable LiveClient::CreateLiveCallbackTemplateCallable(const CreateLiveCallbackTemplateRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateLiveCallbackTemplateOutcome()>>(
[this, request]()
{
return this->CreateLiveCallbackTemplate(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateLivePadRuleOutcome LiveClient::CreateLivePadRule(const CreateLivePadRuleRequest &request)
{
auto outcome = MakeRequest(request, "CreateLivePadRule");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateLivePadRuleResponse rsp = CreateLivePadRuleResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateLivePadRuleOutcome(rsp);
else
return CreateLivePadRuleOutcome(o.GetError());
}
else
{
return CreateLivePadRuleOutcome(outcome.GetError());
}
}
void LiveClient::CreateLivePadRuleAsync(const CreateLivePadRuleRequest& request, const CreateLivePadRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateLivePadRule(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateLivePadRuleOutcomeCallable LiveClient::CreateLivePadRuleCallable(const CreateLivePadRuleRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateLivePadRuleOutcome()>>(
[this, request]()
{
return this->CreateLivePadRule(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateLivePadTemplateOutcome LiveClient::CreateLivePadTemplate(const CreateLivePadTemplateRequest &request)
{
auto outcome = MakeRequest(request, "CreateLivePadTemplate");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateLivePadTemplateResponse rsp = CreateLivePadTemplateResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateLivePadTemplateOutcome(rsp);
else
return CreateLivePadTemplateOutcome(o.GetError());
}
else
{
return CreateLivePadTemplateOutcome(outcome.GetError());
}
}
void LiveClient::CreateLivePadTemplateAsync(const CreateLivePadTemplateRequest& request, const CreateLivePadTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateLivePadTemplate(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateLivePadTemplateOutcomeCallable LiveClient::CreateLivePadTemplateCallable(const CreateLivePadTemplateRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateLivePadTemplateOutcome()>>(
[this, request]()
{
return this->CreateLivePadTemplate(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateLivePullStreamTaskOutcome LiveClient::CreateLivePullStreamTask(const CreateLivePullStreamTaskRequest &request)
{
auto outcome = MakeRequest(request, "CreateLivePullStreamTask");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateLivePullStreamTaskResponse rsp = CreateLivePullStreamTaskResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateLivePullStreamTaskOutcome(rsp);
else
return CreateLivePullStreamTaskOutcome(o.GetError());
}
else
{
return CreateLivePullStreamTaskOutcome(outcome.GetError());
}
}
void LiveClient::CreateLivePullStreamTaskAsync(const CreateLivePullStreamTaskRequest& request, const CreateLivePullStreamTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateLivePullStreamTask(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateLivePullStreamTaskOutcomeCallable LiveClient::CreateLivePullStreamTaskCallable(const CreateLivePullStreamTaskRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateLivePullStreamTaskOutcome()>>(
[this, request]()
{
return this->CreateLivePullStreamTask(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateLiveRecordOutcome LiveClient::CreateLiveRecord(const CreateLiveRecordRequest &request)
{
auto outcome = MakeRequest(request, "CreateLiveRecord");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateLiveRecordResponse rsp = CreateLiveRecordResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateLiveRecordOutcome(rsp);
else
return CreateLiveRecordOutcome(o.GetError());
}
else
{
return CreateLiveRecordOutcome(outcome.GetError());
}
}
void LiveClient::CreateLiveRecordAsync(const CreateLiveRecordRequest& request, const CreateLiveRecordAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateLiveRecord(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateLiveRecordOutcomeCallable LiveClient::CreateLiveRecordCallable(const CreateLiveRecordRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateLiveRecordOutcome()>>(
[this, request]()
{
return this->CreateLiveRecord(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateLiveRecordRuleOutcome LiveClient::CreateLiveRecordRule(const CreateLiveRecordRuleRequest &request)
{
auto outcome = MakeRequest(request, "CreateLiveRecordRule");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateLiveRecordRuleResponse rsp = CreateLiveRecordRuleResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateLiveRecordRuleOutcome(rsp);
else
return CreateLiveRecordRuleOutcome(o.GetError());
}
else
{
return CreateLiveRecordRuleOutcome(outcome.GetError());
}
}
void LiveClient::CreateLiveRecordRuleAsync(const CreateLiveRecordRuleRequest& request, const CreateLiveRecordRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateLiveRecordRule(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateLiveRecordRuleOutcomeCallable LiveClient::CreateLiveRecordRuleCallable(const CreateLiveRecordRuleRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateLiveRecordRuleOutcome()>>(
[this, request]()
{
return this->CreateLiveRecordRule(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateLiveRecordTemplateOutcome LiveClient::CreateLiveRecordTemplate(const CreateLiveRecordTemplateRequest &request)
{
auto outcome = MakeRequest(request, "CreateLiveRecordTemplate");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateLiveRecordTemplateResponse rsp = CreateLiveRecordTemplateResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateLiveRecordTemplateOutcome(rsp);
else
return CreateLiveRecordTemplateOutcome(o.GetError());
}
else
{
return CreateLiveRecordTemplateOutcome(outcome.GetError());
}
}
void LiveClient::CreateLiveRecordTemplateAsync(const CreateLiveRecordTemplateRequest& request, const CreateLiveRecordTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateLiveRecordTemplate(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateLiveRecordTemplateOutcomeCallable LiveClient::CreateLiveRecordTemplateCallable(const CreateLiveRecordTemplateRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateLiveRecordTemplateOutcome()>>(
[this, request]()
{
return this->CreateLiveRecordTemplate(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateLiveSnapshotRuleOutcome LiveClient::CreateLiveSnapshotRule(const CreateLiveSnapshotRuleRequest &request)
{
auto outcome = MakeRequest(request, "CreateLiveSnapshotRule");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateLiveSnapshotRuleResponse rsp = CreateLiveSnapshotRuleResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateLiveSnapshotRuleOutcome(rsp);
else
return CreateLiveSnapshotRuleOutcome(o.GetError());
}
else
{
return CreateLiveSnapshotRuleOutcome(outcome.GetError());
}
}
void LiveClient::CreateLiveSnapshotRuleAsync(const CreateLiveSnapshotRuleRequest& request, const CreateLiveSnapshotRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateLiveSnapshotRule(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateLiveSnapshotRuleOutcomeCallable LiveClient::CreateLiveSnapshotRuleCallable(const CreateLiveSnapshotRuleRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateLiveSnapshotRuleOutcome()>>(
[this, request]()
{
return this->CreateLiveSnapshotRule(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateLiveSnapshotTemplateOutcome LiveClient::CreateLiveSnapshotTemplate(const CreateLiveSnapshotTemplateRequest &request)
{
auto outcome = MakeRequest(request, "CreateLiveSnapshotTemplate");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateLiveSnapshotTemplateResponse rsp = CreateLiveSnapshotTemplateResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateLiveSnapshotTemplateOutcome(rsp);
else
return CreateLiveSnapshotTemplateOutcome(o.GetError());
}
else
{
return CreateLiveSnapshotTemplateOutcome(outcome.GetError());
}
}
void LiveClient::CreateLiveSnapshotTemplateAsync(const CreateLiveSnapshotTemplateRequest& request, const CreateLiveSnapshotTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateLiveSnapshotTemplate(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateLiveSnapshotTemplateOutcomeCallable LiveClient::CreateLiveSnapshotTemplateCallable(const CreateLiveSnapshotTemplateRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateLiveSnapshotTemplateOutcome()>>(
[this, request]()
{
return this->CreateLiveSnapshotTemplate(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateLiveStreamMonitorOutcome LiveClient::CreateLiveStreamMonitor(const CreateLiveStreamMonitorRequest &request)
{
auto outcome = MakeRequest(request, "CreateLiveStreamMonitor");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateLiveStreamMonitorResponse rsp = CreateLiveStreamMonitorResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateLiveStreamMonitorOutcome(rsp);
else
return CreateLiveStreamMonitorOutcome(o.GetError());
}
else
{
return CreateLiveStreamMonitorOutcome(outcome.GetError());
}
}
void LiveClient::CreateLiveStreamMonitorAsync(const CreateLiveStreamMonitorRequest& request, const CreateLiveStreamMonitorAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateLiveStreamMonitor(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateLiveStreamMonitorOutcomeCallable LiveClient::CreateLiveStreamMonitorCallable(const CreateLiveStreamMonitorRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateLiveStreamMonitorOutcome()>>(
[this, request]()
{
return this->CreateLiveStreamMonitor(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateLiveTimeShiftRuleOutcome LiveClient::CreateLiveTimeShiftRule(const CreateLiveTimeShiftRuleRequest &request)
{
auto outcome = MakeRequest(request, "CreateLiveTimeShiftRule");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateLiveTimeShiftRuleResponse rsp = CreateLiveTimeShiftRuleResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateLiveTimeShiftRuleOutcome(rsp);
else
return CreateLiveTimeShiftRuleOutcome(o.GetError());
}
else
{
return CreateLiveTimeShiftRuleOutcome(outcome.GetError());
}
}
void LiveClient::CreateLiveTimeShiftRuleAsync(const CreateLiveTimeShiftRuleRequest& request, const CreateLiveTimeShiftRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateLiveTimeShiftRule(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateLiveTimeShiftRuleOutcomeCallable LiveClient::CreateLiveTimeShiftRuleCallable(const CreateLiveTimeShiftRuleRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateLiveTimeShiftRuleOutcome()>>(
[this, request]()
{
return this->CreateLiveTimeShiftRule(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateLiveTimeShiftTemplateOutcome LiveClient::CreateLiveTimeShiftTemplate(const CreateLiveTimeShiftTemplateRequest &request)
{
auto outcome = MakeRequest(request, "CreateLiveTimeShiftTemplate");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateLiveTimeShiftTemplateResponse rsp = CreateLiveTimeShiftTemplateResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateLiveTimeShiftTemplateOutcome(rsp);
else
return CreateLiveTimeShiftTemplateOutcome(o.GetError());
}
else
{
return CreateLiveTimeShiftTemplateOutcome(outcome.GetError());
}
}
void LiveClient::CreateLiveTimeShiftTemplateAsync(const CreateLiveTimeShiftTemplateRequest& request, const CreateLiveTimeShiftTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateLiveTimeShiftTemplate(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateLiveTimeShiftTemplateOutcomeCallable LiveClient::CreateLiveTimeShiftTemplateCallable(const CreateLiveTimeShiftTemplateRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateLiveTimeShiftTemplateOutcome()>>(
[this, request]()
{
return this->CreateLiveTimeShiftTemplate(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateLiveTranscodeRuleOutcome LiveClient::CreateLiveTranscodeRule(const CreateLiveTranscodeRuleRequest &request)
{
auto outcome = MakeRequest(request, "CreateLiveTranscodeRule");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateLiveTranscodeRuleResponse rsp = CreateLiveTranscodeRuleResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateLiveTranscodeRuleOutcome(rsp);
else
return CreateLiveTranscodeRuleOutcome(o.GetError());
}
else
{
return CreateLiveTranscodeRuleOutcome(outcome.GetError());
}
}
void LiveClient::CreateLiveTranscodeRuleAsync(const CreateLiveTranscodeRuleRequest& request, const CreateLiveTranscodeRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateLiveTranscodeRule(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateLiveTranscodeRuleOutcomeCallable LiveClient::CreateLiveTranscodeRuleCallable(const CreateLiveTranscodeRuleRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateLiveTranscodeRuleOutcome()>>(
[this, request]()
{
return this->CreateLiveTranscodeRule(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateLiveTranscodeTemplateOutcome LiveClient::CreateLiveTranscodeTemplate(const CreateLiveTranscodeTemplateRequest &request)
{
auto outcome = MakeRequest(request, "CreateLiveTranscodeTemplate");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateLiveTranscodeTemplateResponse rsp = CreateLiveTranscodeTemplateResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateLiveTranscodeTemplateOutcome(rsp);
else
return CreateLiveTranscodeTemplateOutcome(o.GetError());
}
else
{
return CreateLiveTranscodeTemplateOutcome(outcome.GetError());
}
}
void LiveClient::CreateLiveTranscodeTemplateAsync(const CreateLiveTranscodeTemplateRequest& request, const CreateLiveTranscodeTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateLiveTranscodeTemplate(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateLiveTranscodeTemplateOutcomeCallable LiveClient::CreateLiveTranscodeTemplateCallable(const CreateLiveTranscodeTemplateRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateLiveTranscodeTemplateOutcome()>>(
[this, request]()
{
return this->CreateLiveTranscodeTemplate(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateLiveWatermarkRuleOutcome LiveClient::CreateLiveWatermarkRule(const CreateLiveWatermarkRuleRequest &request)
{
auto outcome = MakeRequest(request, "CreateLiveWatermarkRule");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateLiveWatermarkRuleResponse rsp = CreateLiveWatermarkRuleResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateLiveWatermarkRuleOutcome(rsp);
else
return CreateLiveWatermarkRuleOutcome(o.GetError());
}
else
{
return CreateLiveWatermarkRuleOutcome(outcome.GetError());
}
}
void LiveClient::CreateLiveWatermarkRuleAsync(const CreateLiveWatermarkRuleRequest& request, const CreateLiveWatermarkRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateLiveWatermarkRule(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateLiveWatermarkRuleOutcomeCallable LiveClient::CreateLiveWatermarkRuleCallable(const CreateLiveWatermarkRuleRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateLiveWatermarkRuleOutcome()>>(
[this, request]()
{
return this->CreateLiveWatermarkRule(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreatePullStreamConfigOutcome LiveClient::CreatePullStreamConfig(const CreatePullStreamConfigRequest &request)
{
auto outcome = MakeRequest(request, "CreatePullStreamConfig");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreatePullStreamConfigResponse rsp = CreatePullStreamConfigResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreatePullStreamConfigOutcome(rsp);
else
return CreatePullStreamConfigOutcome(o.GetError());
}
else
{
return CreatePullStreamConfigOutcome(outcome.GetError());
}
}
void LiveClient::CreatePullStreamConfigAsync(const CreatePullStreamConfigRequest& request, const CreatePullStreamConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreatePullStreamConfig(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreatePullStreamConfigOutcomeCallable LiveClient::CreatePullStreamConfigCallable(const CreatePullStreamConfigRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreatePullStreamConfigOutcome()>>(
[this, request]()
{
return this->CreatePullStreamConfig(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateRecordTaskOutcome LiveClient::CreateRecordTask(const CreateRecordTaskRequest &request)
{
auto outcome = MakeRequest(request, "CreateRecordTask");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateRecordTaskResponse rsp = CreateRecordTaskResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateRecordTaskOutcome(rsp);
else
return CreateRecordTaskOutcome(o.GetError());
}
else
{
return CreateRecordTaskOutcome(outcome.GetError());
}
}
void LiveClient::CreateRecordTaskAsync(const CreateRecordTaskRequest& request, const CreateRecordTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateRecordTask(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateRecordTaskOutcomeCallable LiveClient::CreateRecordTaskCallable(const CreateRecordTaskRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateRecordTaskOutcome()>>(
[this, request]()
{
return this->CreateRecordTask(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::CreateScreenshotTaskOutcome LiveClient::CreateScreenshotTask(const CreateScreenshotTaskRequest &request)
{
auto outcome = MakeRequest(request, "CreateScreenshotTask");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateScreenshotTaskResponse rsp = CreateScreenshotTaskResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateScreenshotTaskOutcome(rsp);
else
return CreateScreenshotTaskOutcome(o.GetError());
}
else
{
return CreateScreenshotTaskOutcome(outcome.GetError());
}
}
void LiveClient::CreateScreenshotTaskAsync(const CreateScreenshotTaskRequest& request, const CreateScreenshotTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateScreenshotTask(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::CreateScreenshotTaskOutcomeCallable LiveClient::CreateScreenshotTaskCallable(const CreateScreenshotTaskRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateScreenshotTaskOutcome()>>(
[this, request]()
{
return this->CreateScreenshotTask(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLiveCallbackRuleOutcome LiveClient::DeleteLiveCallbackRule(const DeleteLiveCallbackRuleRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLiveCallbackRule");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLiveCallbackRuleResponse rsp = DeleteLiveCallbackRuleResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLiveCallbackRuleOutcome(rsp);
else
return DeleteLiveCallbackRuleOutcome(o.GetError());
}
else
{
return DeleteLiveCallbackRuleOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLiveCallbackRuleAsync(const DeleteLiveCallbackRuleRequest& request, const DeleteLiveCallbackRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLiveCallbackRule(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLiveCallbackRuleOutcomeCallable LiveClient::DeleteLiveCallbackRuleCallable(const DeleteLiveCallbackRuleRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLiveCallbackRuleOutcome()>>(
[this, request]()
{
return this->DeleteLiveCallbackRule(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLiveCallbackTemplateOutcome LiveClient::DeleteLiveCallbackTemplate(const DeleteLiveCallbackTemplateRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLiveCallbackTemplate");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLiveCallbackTemplateResponse rsp = DeleteLiveCallbackTemplateResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLiveCallbackTemplateOutcome(rsp);
else
return DeleteLiveCallbackTemplateOutcome(o.GetError());
}
else
{
return DeleteLiveCallbackTemplateOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLiveCallbackTemplateAsync(const DeleteLiveCallbackTemplateRequest& request, const DeleteLiveCallbackTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLiveCallbackTemplate(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLiveCallbackTemplateOutcomeCallable LiveClient::DeleteLiveCallbackTemplateCallable(const DeleteLiveCallbackTemplateRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLiveCallbackTemplateOutcome()>>(
[this, request]()
{
return this->DeleteLiveCallbackTemplate(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLiveDomainOutcome LiveClient::DeleteLiveDomain(const DeleteLiveDomainRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLiveDomain");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLiveDomainResponse rsp = DeleteLiveDomainResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLiveDomainOutcome(rsp);
else
return DeleteLiveDomainOutcome(o.GetError());
}
else
{
return DeleteLiveDomainOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLiveDomainAsync(const DeleteLiveDomainRequest& request, const DeleteLiveDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLiveDomain(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLiveDomainOutcomeCallable LiveClient::DeleteLiveDomainCallable(const DeleteLiveDomainRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLiveDomainOutcome()>>(
[this, request]()
{
return this->DeleteLiveDomain(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLivePadRuleOutcome LiveClient::DeleteLivePadRule(const DeleteLivePadRuleRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLivePadRule");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLivePadRuleResponse rsp = DeleteLivePadRuleResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLivePadRuleOutcome(rsp);
else
return DeleteLivePadRuleOutcome(o.GetError());
}
else
{
return DeleteLivePadRuleOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLivePadRuleAsync(const DeleteLivePadRuleRequest& request, const DeleteLivePadRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLivePadRule(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLivePadRuleOutcomeCallable LiveClient::DeleteLivePadRuleCallable(const DeleteLivePadRuleRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLivePadRuleOutcome()>>(
[this, request]()
{
return this->DeleteLivePadRule(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLivePadTemplateOutcome LiveClient::DeleteLivePadTemplate(const DeleteLivePadTemplateRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLivePadTemplate");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLivePadTemplateResponse rsp = DeleteLivePadTemplateResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLivePadTemplateOutcome(rsp);
else
return DeleteLivePadTemplateOutcome(o.GetError());
}
else
{
return DeleteLivePadTemplateOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLivePadTemplateAsync(const DeleteLivePadTemplateRequest& request, const DeleteLivePadTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLivePadTemplate(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLivePadTemplateOutcomeCallable LiveClient::DeleteLivePadTemplateCallable(const DeleteLivePadTemplateRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLivePadTemplateOutcome()>>(
[this, request]()
{
return this->DeleteLivePadTemplate(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLivePullStreamTaskOutcome LiveClient::DeleteLivePullStreamTask(const DeleteLivePullStreamTaskRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLivePullStreamTask");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLivePullStreamTaskResponse rsp = DeleteLivePullStreamTaskResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLivePullStreamTaskOutcome(rsp);
else
return DeleteLivePullStreamTaskOutcome(o.GetError());
}
else
{
return DeleteLivePullStreamTaskOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLivePullStreamTaskAsync(const DeleteLivePullStreamTaskRequest& request, const DeleteLivePullStreamTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLivePullStreamTask(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLivePullStreamTaskOutcomeCallable LiveClient::DeleteLivePullStreamTaskCallable(const DeleteLivePullStreamTaskRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLivePullStreamTaskOutcome()>>(
[this, request]()
{
return this->DeleteLivePullStreamTask(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLiveRecordOutcome LiveClient::DeleteLiveRecord(const DeleteLiveRecordRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLiveRecord");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLiveRecordResponse rsp = DeleteLiveRecordResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLiveRecordOutcome(rsp);
else
return DeleteLiveRecordOutcome(o.GetError());
}
else
{
return DeleteLiveRecordOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLiveRecordAsync(const DeleteLiveRecordRequest& request, const DeleteLiveRecordAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLiveRecord(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLiveRecordOutcomeCallable LiveClient::DeleteLiveRecordCallable(const DeleteLiveRecordRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLiveRecordOutcome()>>(
[this, request]()
{
return this->DeleteLiveRecord(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLiveRecordRuleOutcome LiveClient::DeleteLiveRecordRule(const DeleteLiveRecordRuleRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLiveRecordRule");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLiveRecordRuleResponse rsp = DeleteLiveRecordRuleResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLiveRecordRuleOutcome(rsp);
else
return DeleteLiveRecordRuleOutcome(o.GetError());
}
else
{
return DeleteLiveRecordRuleOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLiveRecordRuleAsync(const DeleteLiveRecordRuleRequest& request, const DeleteLiveRecordRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLiveRecordRule(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLiveRecordRuleOutcomeCallable LiveClient::DeleteLiveRecordRuleCallable(const DeleteLiveRecordRuleRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLiveRecordRuleOutcome()>>(
[this, request]()
{
return this->DeleteLiveRecordRule(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLiveRecordTemplateOutcome LiveClient::DeleteLiveRecordTemplate(const DeleteLiveRecordTemplateRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLiveRecordTemplate");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLiveRecordTemplateResponse rsp = DeleteLiveRecordTemplateResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLiveRecordTemplateOutcome(rsp);
else
return DeleteLiveRecordTemplateOutcome(o.GetError());
}
else
{
return DeleteLiveRecordTemplateOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLiveRecordTemplateAsync(const DeleteLiveRecordTemplateRequest& request, const DeleteLiveRecordTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLiveRecordTemplate(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLiveRecordTemplateOutcomeCallable LiveClient::DeleteLiveRecordTemplateCallable(const DeleteLiveRecordTemplateRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLiveRecordTemplateOutcome()>>(
[this, request]()
{
return this->DeleteLiveRecordTemplate(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLiveSnapshotRuleOutcome LiveClient::DeleteLiveSnapshotRule(const DeleteLiveSnapshotRuleRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLiveSnapshotRule");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLiveSnapshotRuleResponse rsp = DeleteLiveSnapshotRuleResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLiveSnapshotRuleOutcome(rsp);
else
return DeleteLiveSnapshotRuleOutcome(o.GetError());
}
else
{
return DeleteLiveSnapshotRuleOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLiveSnapshotRuleAsync(const DeleteLiveSnapshotRuleRequest& request, const DeleteLiveSnapshotRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLiveSnapshotRule(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLiveSnapshotRuleOutcomeCallable LiveClient::DeleteLiveSnapshotRuleCallable(const DeleteLiveSnapshotRuleRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLiveSnapshotRuleOutcome()>>(
[this, request]()
{
return this->DeleteLiveSnapshotRule(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLiveSnapshotTemplateOutcome LiveClient::DeleteLiveSnapshotTemplate(const DeleteLiveSnapshotTemplateRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLiveSnapshotTemplate");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLiveSnapshotTemplateResponse rsp = DeleteLiveSnapshotTemplateResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLiveSnapshotTemplateOutcome(rsp);
else
return DeleteLiveSnapshotTemplateOutcome(o.GetError());
}
else
{
return DeleteLiveSnapshotTemplateOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLiveSnapshotTemplateAsync(const DeleteLiveSnapshotTemplateRequest& request, const DeleteLiveSnapshotTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLiveSnapshotTemplate(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLiveSnapshotTemplateOutcomeCallable LiveClient::DeleteLiveSnapshotTemplateCallable(const DeleteLiveSnapshotTemplateRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLiveSnapshotTemplateOutcome()>>(
[this, request]()
{
return this->DeleteLiveSnapshotTemplate(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLiveStreamMonitorOutcome LiveClient::DeleteLiveStreamMonitor(const DeleteLiveStreamMonitorRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLiveStreamMonitor");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLiveStreamMonitorResponse rsp = DeleteLiveStreamMonitorResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLiveStreamMonitorOutcome(rsp);
else
return DeleteLiveStreamMonitorOutcome(o.GetError());
}
else
{
return DeleteLiveStreamMonitorOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLiveStreamMonitorAsync(const DeleteLiveStreamMonitorRequest& request, const DeleteLiveStreamMonitorAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLiveStreamMonitor(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLiveStreamMonitorOutcomeCallable LiveClient::DeleteLiveStreamMonitorCallable(const DeleteLiveStreamMonitorRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLiveStreamMonitorOutcome()>>(
[this, request]()
{
return this->DeleteLiveStreamMonitor(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLiveTimeShiftRuleOutcome LiveClient::DeleteLiveTimeShiftRule(const DeleteLiveTimeShiftRuleRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLiveTimeShiftRule");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLiveTimeShiftRuleResponse rsp = DeleteLiveTimeShiftRuleResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLiveTimeShiftRuleOutcome(rsp);
else
return DeleteLiveTimeShiftRuleOutcome(o.GetError());
}
else
{
return DeleteLiveTimeShiftRuleOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLiveTimeShiftRuleAsync(const DeleteLiveTimeShiftRuleRequest& request, const DeleteLiveTimeShiftRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLiveTimeShiftRule(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLiveTimeShiftRuleOutcomeCallable LiveClient::DeleteLiveTimeShiftRuleCallable(const DeleteLiveTimeShiftRuleRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLiveTimeShiftRuleOutcome()>>(
[this, request]()
{
return this->DeleteLiveTimeShiftRule(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLiveTimeShiftTemplateOutcome LiveClient::DeleteLiveTimeShiftTemplate(const DeleteLiveTimeShiftTemplateRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLiveTimeShiftTemplate");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLiveTimeShiftTemplateResponse rsp = DeleteLiveTimeShiftTemplateResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLiveTimeShiftTemplateOutcome(rsp);
else
return DeleteLiveTimeShiftTemplateOutcome(o.GetError());
}
else
{
return DeleteLiveTimeShiftTemplateOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLiveTimeShiftTemplateAsync(const DeleteLiveTimeShiftTemplateRequest& request, const DeleteLiveTimeShiftTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLiveTimeShiftTemplate(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLiveTimeShiftTemplateOutcomeCallable LiveClient::DeleteLiveTimeShiftTemplateCallable(const DeleteLiveTimeShiftTemplateRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLiveTimeShiftTemplateOutcome()>>(
[this, request]()
{
return this->DeleteLiveTimeShiftTemplate(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLiveTranscodeRuleOutcome LiveClient::DeleteLiveTranscodeRule(const DeleteLiveTranscodeRuleRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLiveTranscodeRule");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLiveTranscodeRuleResponse rsp = DeleteLiveTranscodeRuleResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLiveTranscodeRuleOutcome(rsp);
else
return DeleteLiveTranscodeRuleOutcome(o.GetError());
}
else
{
return DeleteLiveTranscodeRuleOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLiveTranscodeRuleAsync(const DeleteLiveTranscodeRuleRequest& request, const DeleteLiveTranscodeRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLiveTranscodeRule(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLiveTranscodeRuleOutcomeCallable LiveClient::DeleteLiveTranscodeRuleCallable(const DeleteLiveTranscodeRuleRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLiveTranscodeRuleOutcome()>>(
[this, request]()
{
return this->DeleteLiveTranscodeRule(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLiveTranscodeTemplateOutcome LiveClient::DeleteLiveTranscodeTemplate(const DeleteLiveTranscodeTemplateRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLiveTranscodeTemplate");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLiveTranscodeTemplateResponse rsp = DeleteLiveTranscodeTemplateResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLiveTranscodeTemplateOutcome(rsp);
else
return DeleteLiveTranscodeTemplateOutcome(o.GetError());
}
else
{
return DeleteLiveTranscodeTemplateOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLiveTranscodeTemplateAsync(const DeleteLiveTranscodeTemplateRequest& request, const DeleteLiveTranscodeTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLiveTranscodeTemplate(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLiveTranscodeTemplateOutcomeCallable LiveClient::DeleteLiveTranscodeTemplateCallable(const DeleteLiveTranscodeTemplateRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLiveTranscodeTemplateOutcome()>>(
[this, request]()
{
return this->DeleteLiveTranscodeTemplate(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLiveWatermarkOutcome LiveClient::DeleteLiveWatermark(const DeleteLiveWatermarkRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLiveWatermark");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLiveWatermarkResponse rsp = DeleteLiveWatermarkResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLiveWatermarkOutcome(rsp);
else
return DeleteLiveWatermarkOutcome(o.GetError());
}
else
{
return DeleteLiveWatermarkOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLiveWatermarkAsync(const DeleteLiveWatermarkRequest& request, const DeleteLiveWatermarkAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLiveWatermark(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLiveWatermarkOutcomeCallable LiveClient::DeleteLiveWatermarkCallable(const DeleteLiveWatermarkRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLiveWatermarkOutcome()>>(
[this, request]()
{
return this->DeleteLiveWatermark(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteLiveWatermarkRuleOutcome LiveClient::DeleteLiveWatermarkRule(const DeleteLiveWatermarkRuleRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLiveWatermarkRule");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLiveWatermarkRuleResponse rsp = DeleteLiveWatermarkRuleResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLiveWatermarkRuleOutcome(rsp);
else
return DeleteLiveWatermarkRuleOutcome(o.GetError());
}
else
{
return DeleteLiveWatermarkRuleOutcome(outcome.GetError());
}
}
void LiveClient::DeleteLiveWatermarkRuleAsync(const DeleteLiveWatermarkRuleRequest& request, const DeleteLiveWatermarkRuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLiveWatermarkRule(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteLiveWatermarkRuleOutcomeCallable LiveClient::DeleteLiveWatermarkRuleCallable(const DeleteLiveWatermarkRuleRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLiveWatermarkRuleOutcome()>>(
[this, request]()
{
return this->DeleteLiveWatermarkRule(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeletePullStreamConfigOutcome LiveClient::DeletePullStreamConfig(const DeletePullStreamConfigRequest &request)
{
auto outcome = MakeRequest(request, "DeletePullStreamConfig");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeletePullStreamConfigResponse rsp = DeletePullStreamConfigResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeletePullStreamConfigOutcome(rsp);
else
return DeletePullStreamConfigOutcome(o.GetError());
}
else
{
return DeletePullStreamConfigOutcome(outcome.GetError());
}
}
void LiveClient::DeletePullStreamConfigAsync(const DeletePullStreamConfigRequest& request, const DeletePullStreamConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeletePullStreamConfig(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeletePullStreamConfigOutcomeCallable LiveClient::DeletePullStreamConfigCallable(const DeletePullStreamConfigRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeletePullStreamConfigOutcome()>>(
[this, request]()
{
return this->DeletePullStreamConfig(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteRecordTaskOutcome LiveClient::DeleteRecordTask(const DeleteRecordTaskRequest &request)
{
auto outcome = MakeRequest(request, "DeleteRecordTask");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteRecordTaskResponse rsp = DeleteRecordTaskResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteRecordTaskOutcome(rsp);
else
return DeleteRecordTaskOutcome(o.GetError());
}
else
{
return DeleteRecordTaskOutcome(outcome.GetError());
}
}
void LiveClient::DeleteRecordTaskAsync(const DeleteRecordTaskRequest& request, const DeleteRecordTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteRecordTask(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteRecordTaskOutcomeCallable LiveClient::DeleteRecordTaskCallable(const DeleteRecordTaskRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteRecordTaskOutcome()>>(
[this, request]()
{
return this->DeleteRecordTask(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DeleteScreenshotTaskOutcome LiveClient::DeleteScreenshotTask(const DeleteScreenshotTaskRequest &request)
{
auto outcome = MakeRequest(request, "DeleteScreenshotTask");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteScreenshotTaskResponse rsp = DeleteScreenshotTaskResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteScreenshotTaskOutcome(rsp);
else
return DeleteScreenshotTaskOutcome(o.GetError());
}
else
{
return DeleteScreenshotTaskOutcome(outcome.GetError());
}
}
void LiveClient::DeleteScreenshotTaskAsync(const DeleteScreenshotTaskRequest& request, const DeleteScreenshotTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteScreenshotTask(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DeleteScreenshotTaskOutcomeCallable LiveClient::DeleteScreenshotTaskCallable(const DeleteScreenshotTaskRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteScreenshotTaskOutcome()>>(
[this, request]()
{
return this->DeleteScreenshotTask(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DescribeAllStreamPlayInfoListOutcome LiveClient::DescribeAllStreamPlayInfoList(const DescribeAllStreamPlayInfoListRequest &request)
{
auto outcome = MakeRequest(request, "DescribeAllStreamPlayInfoList");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeAllStreamPlayInfoListResponse rsp = DescribeAllStreamPlayInfoListResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeAllStreamPlayInfoListOutcome(rsp);
else
return DescribeAllStreamPlayInfoListOutcome(o.GetError());
}
else
{
return DescribeAllStreamPlayInfoListOutcome(outcome.GetError());
}
}
void LiveClient::DescribeAllStreamPlayInfoListAsync(const DescribeAllStreamPlayInfoListRequest& request, const DescribeAllStreamPlayInfoListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeAllStreamPlayInfoList(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DescribeAllStreamPlayInfoListOutcomeCallable LiveClient::DescribeAllStreamPlayInfoListCallable(const DescribeAllStreamPlayInfoListRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeAllStreamPlayInfoListOutcome()>>(
[this, request]()
{
return this->DescribeAllStreamPlayInfoList(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DescribeAreaBillBandwidthAndFluxListOutcome LiveClient::DescribeAreaBillBandwidthAndFluxList(const DescribeAreaBillBandwidthAndFluxListRequest &request)
{
auto outcome = MakeRequest(request, "DescribeAreaBillBandwidthAndFluxList");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeAreaBillBandwidthAndFluxListResponse rsp = DescribeAreaBillBandwidthAndFluxListResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeAreaBillBandwidthAndFluxListOutcome(rsp);
else
return DescribeAreaBillBandwidthAndFluxListOutcome(o.GetError());
}
else
{
return DescribeAreaBillBandwidthAndFluxListOutcome(outcome.GetError());
}
}
void LiveClient::DescribeAreaBillBandwidthAndFluxListAsync(const DescribeAreaBillBandwidthAndFluxListRequest& request, const DescribeAreaBillBandwidthAndFluxListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeAreaBillBandwidthAndFluxList(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DescribeAreaBillBandwidthAndFluxListOutcomeCallable LiveClient::DescribeAreaBillBandwidthAndFluxListCallable(const DescribeAreaBillBandwidthAndFluxListRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeAreaBillBandwidthAndFluxListOutcome()>>(
[this, request]()
{
return this->DescribeAreaBillBandwidthAndFluxList(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DescribeBackupStreamListOutcome LiveClient::DescribeBackupStreamList(const DescribeBackupStreamListRequest &request)
{
auto outcome = MakeRequest(request, "DescribeBackupStreamList");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeBackupStreamListResponse rsp = DescribeBackupStreamListResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeBackupStreamListOutcome(rsp);
else
return DescribeBackupStreamListOutcome(o.GetError());
}
else
{
return DescribeBackupStreamListOutcome(outcome.GetError());
}
}
void LiveClient::DescribeBackupStreamListAsync(const DescribeBackupStreamListRequest& request, const DescribeBackupStreamListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeBackupStreamList(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
LiveClient::DescribeBackupStreamListOutcomeCallable LiveClient::DescribeBackupStreamListCallable(const DescribeBackupStreamListRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeBackupStreamListOutcome()>>(
[this, request]()
{
return this->DescribeBackupStreamList(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
LiveClient::DescribeBillBandwidthAndFluxListOutcome LiveClient::DescribeBillBandwidthAndFluxList(const DescribeBillBandwidthAndFluxListRequest &request)
{
auto outcome = MakeRequest(request, "DescribeBillBandwidthAndFluxList");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeBillBandwidthAndFluxListResponse rsp = DescribeBillBandwidthAndFluxListResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeBillBandwidthAndFluxListOutcome(rsp