2 Star 6 Fork 0

tencentcloud/tencentcloud-sdk-cpp

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
CdnClient.cpp 116.84 KB
Copy Edit Raw Blame History
tencentcloud authored 2023-06-26 08:39 . release 3.0.767
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525
/*
* 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/cdn/v20180606/CdnClient.h>
#include <tencentcloud/core/Executor.h>
#include <tencentcloud/core/Runnable.h>
using namespace TencentCloud;
using namespace TencentCloud::Cdn::V20180606;
using namespace TencentCloud::Cdn::V20180606::Model;
using namespace std;
namespace
{
const string VERSION = "2018-06-06";
const string ENDPOINT = "cdn.tencentcloudapi.com";
}
CdnClient::CdnClient(const Credential &credential, const string &region) :
CdnClient(credential, region, ClientProfile())
{
}
CdnClient::CdnClient(const Credential &credential, const string &region, const ClientProfile &profile) :
AbstractClient(ENDPOINT, VERSION, credential, region, profile)
{
}
CdnClient::AddCLSTopicDomainsOutcome CdnClient::AddCLSTopicDomains(const AddCLSTopicDomainsRequest &request)
{
auto outcome = MakeRequest(request, "AddCLSTopicDomains");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
AddCLSTopicDomainsResponse rsp = AddCLSTopicDomainsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return AddCLSTopicDomainsOutcome(rsp);
else
return AddCLSTopicDomainsOutcome(o.GetError());
}
else
{
return AddCLSTopicDomainsOutcome(outcome.GetError());
}
}
void CdnClient::AddCLSTopicDomainsAsync(const AddCLSTopicDomainsRequest& request, const AddCLSTopicDomainsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->AddCLSTopicDomains(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::AddCLSTopicDomainsOutcomeCallable CdnClient::AddCLSTopicDomainsCallable(const AddCLSTopicDomainsRequest &request)
{
auto task = std::make_shared<std::packaged_task<AddCLSTopicDomainsOutcome()>>(
[this, request]()
{
return this->AddCLSTopicDomains(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::AddCdnDomainOutcome CdnClient::AddCdnDomain(const AddCdnDomainRequest &request)
{
auto outcome = MakeRequest(request, "AddCdnDomain");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
AddCdnDomainResponse rsp = AddCdnDomainResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return AddCdnDomainOutcome(rsp);
else
return AddCdnDomainOutcome(o.GetError());
}
else
{
return AddCdnDomainOutcome(outcome.GetError());
}
}
void CdnClient::AddCdnDomainAsync(const AddCdnDomainRequest& request, const AddCdnDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->AddCdnDomain(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::AddCdnDomainOutcomeCallable CdnClient::AddCdnDomainCallable(const AddCdnDomainRequest &request)
{
auto task = std::make_shared<std::packaged_task<AddCdnDomainOutcome()>>(
[this, request]()
{
return this->AddCdnDomain(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::CreateClsLogTopicOutcome CdnClient::CreateClsLogTopic(const CreateClsLogTopicRequest &request)
{
auto outcome = MakeRequest(request, "CreateClsLogTopic");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateClsLogTopicResponse rsp = CreateClsLogTopicResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateClsLogTopicOutcome(rsp);
else
return CreateClsLogTopicOutcome(o.GetError());
}
else
{
return CreateClsLogTopicOutcome(outcome.GetError());
}
}
void CdnClient::CreateClsLogTopicAsync(const CreateClsLogTopicRequest& request, const CreateClsLogTopicAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateClsLogTopic(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::CreateClsLogTopicOutcomeCallable CdnClient::CreateClsLogTopicCallable(const CreateClsLogTopicRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateClsLogTopicOutcome()>>(
[this, request]()
{
return this->CreateClsLogTopic(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::CreateDiagnoseUrlOutcome CdnClient::CreateDiagnoseUrl(const CreateDiagnoseUrlRequest &request)
{
auto outcome = MakeRequest(request, "CreateDiagnoseUrl");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateDiagnoseUrlResponse rsp = CreateDiagnoseUrlResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateDiagnoseUrlOutcome(rsp);
else
return CreateDiagnoseUrlOutcome(o.GetError());
}
else
{
return CreateDiagnoseUrlOutcome(outcome.GetError());
}
}
void CdnClient::CreateDiagnoseUrlAsync(const CreateDiagnoseUrlRequest& request, const CreateDiagnoseUrlAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateDiagnoseUrl(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::CreateDiagnoseUrlOutcomeCallable CdnClient::CreateDiagnoseUrlCallable(const CreateDiagnoseUrlRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateDiagnoseUrlOutcome()>>(
[this, request]()
{
return this->CreateDiagnoseUrl(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::CreateEdgePackTaskOutcome CdnClient::CreateEdgePackTask(const CreateEdgePackTaskRequest &request)
{
auto outcome = MakeRequest(request, "CreateEdgePackTask");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateEdgePackTaskResponse rsp = CreateEdgePackTaskResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateEdgePackTaskOutcome(rsp);
else
return CreateEdgePackTaskOutcome(o.GetError());
}
else
{
return CreateEdgePackTaskOutcome(outcome.GetError());
}
}
void CdnClient::CreateEdgePackTaskAsync(const CreateEdgePackTaskRequest& request, const CreateEdgePackTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateEdgePackTask(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::CreateEdgePackTaskOutcomeCallable CdnClient::CreateEdgePackTaskCallable(const CreateEdgePackTaskRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateEdgePackTaskOutcome()>>(
[this, request]()
{
return this->CreateEdgePackTask(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::CreateScdnDomainOutcome CdnClient::CreateScdnDomain(const CreateScdnDomainRequest &request)
{
auto outcome = MakeRequest(request, "CreateScdnDomain");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateScdnDomainResponse rsp = CreateScdnDomainResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateScdnDomainOutcome(rsp);
else
return CreateScdnDomainOutcome(o.GetError());
}
else
{
return CreateScdnDomainOutcome(outcome.GetError());
}
}
void CdnClient::CreateScdnDomainAsync(const CreateScdnDomainRequest& request, const CreateScdnDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateScdnDomain(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::CreateScdnDomainOutcomeCallable CdnClient::CreateScdnDomainCallable(const CreateScdnDomainRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateScdnDomainOutcome()>>(
[this, request]()
{
return this->CreateScdnDomain(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::CreateScdnFailedLogTaskOutcome CdnClient::CreateScdnFailedLogTask(const CreateScdnFailedLogTaskRequest &request)
{
auto outcome = MakeRequest(request, "CreateScdnFailedLogTask");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateScdnFailedLogTaskResponse rsp = CreateScdnFailedLogTaskResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateScdnFailedLogTaskOutcome(rsp);
else
return CreateScdnFailedLogTaskOutcome(o.GetError());
}
else
{
return CreateScdnFailedLogTaskOutcome(outcome.GetError());
}
}
void CdnClient::CreateScdnFailedLogTaskAsync(const CreateScdnFailedLogTaskRequest& request, const CreateScdnFailedLogTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateScdnFailedLogTask(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::CreateScdnFailedLogTaskOutcomeCallable CdnClient::CreateScdnFailedLogTaskCallable(const CreateScdnFailedLogTaskRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateScdnFailedLogTaskOutcome()>>(
[this, request]()
{
return this->CreateScdnFailedLogTask(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::CreateScdnLogTaskOutcome CdnClient::CreateScdnLogTask(const CreateScdnLogTaskRequest &request)
{
auto outcome = MakeRequest(request, "CreateScdnLogTask");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateScdnLogTaskResponse rsp = CreateScdnLogTaskResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateScdnLogTaskOutcome(rsp);
else
return CreateScdnLogTaskOutcome(o.GetError());
}
else
{
return CreateScdnLogTaskOutcome(outcome.GetError());
}
}
void CdnClient::CreateScdnLogTaskAsync(const CreateScdnLogTaskRequest& request, const CreateScdnLogTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateScdnLogTask(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::CreateScdnLogTaskOutcomeCallable CdnClient::CreateScdnLogTaskCallable(const CreateScdnLogTaskRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateScdnLogTaskOutcome()>>(
[this, request]()
{
return this->CreateScdnLogTask(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::CreateVerifyRecordOutcome CdnClient::CreateVerifyRecord(const CreateVerifyRecordRequest &request)
{
auto outcome = MakeRequest(request, "CreateVerifyRecord");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateVerifyRecordResponse rsp = CreateVerifyRecordResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateVerifyRecordOutcome(rsp);
else
return CreateVerifyRecordOutcome(o.GetError());
}
else
{
return CreateVerifyRecordOutcome(outcome.GetError());
}
}
void CdnClient::CreateVerifyRecordAsync(const CreateVerifyRecordRequest& request, const CreateVerifyRecordAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateVerifyRecord(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::CreateVerifyRecordOutcomeCallable CdnClient::CreateVerifyRecordCallable(const CreateVerifyRecordRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateVerifyRecordOutcome()>>(
[this, request]()
{
return this->CreateVerifyRecord(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DeleteCdnDomainOutcome CdnClient::DeleteCdnDomain(const DeleteCdnDomainRequest &request)
{
auto outcome = MakeRequest(request, "DeleteCdnDomain");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteCdnDomainResponse rsp = DeleteCdnDomainResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteCdnDomainOutcome(rsp);
else
return DeleteCdnDomainOutcome(o.GetError());
}
else
{
return DeleteCdnDomainOutcome(outcome.GetError());
}
}
void CdnClient::DeleteCdnDomainAsync(const DeleteCdnDomainRequest& request, const DeleteCdnDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteCdnDomain(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DeleteCdnDomainOutcomeCallable CdnClient::DeleteCdnDomainCallable(const DeleteCdnDomainRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteCdnDomainOutcome()>>(
[this, request]()
{
return this->DeleteCdnDomain(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DeleteClsLogTopicOutcome CdnClient::DeleteClsLogTopic(const DeleteClsLogTopicRequest &request)
{
auto outcome = MakeRequest(request, "DeleteClsLogTopic");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteClsLogTopicResponse rsp = DeleteClsLogTopicResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteClsLogTopicOutcome(rsp);
else
return DeleteClsLogTopicOutcome(o.GetError());
}
else
{
return DeleteClsLogTopicOutcome(outcome.GetError());
}
}
void CdnClient::DeleteClsLogTopicAsync(const DeleteClsLogTopicRequest& request, const DeleteClsLogTopicAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteClsLogTopic(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DeleteClsLogTopicOutcomeCallable CdnClient::DeleteClsLogTopicCallable(const DeleteClsLogTopicRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteClsLogTopicOutcome()>>(
[this, request]()
{
return this->DeleteClsLogTopic(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DeleteScdnDomainOutcome CdnClient::DeleteScdnDomain(const DeleteScdnDomainRequest &request)
{
auto outcome = MakeRequest(request, "DeleteScdnDomain");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteScdnDomainResponse rsp = DeleteScdnDomainResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteScdnDomainOutcome(rsp);
else
return DeleteScdnDomainOutcome(o.GetError());
}
else
{
return DeleteScdnDomainOutcome(outcome.GetError());
}
}
void CdnClient::DeleteScdnDomainAsync(const DeleteScdnDomainRequest& request, const DeleteScdnDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteScdnDomain(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DeleteScdnDomainOutcomeCallable CdnClient::DeleteScdnDomainCallable(const DeleteScdnDomainRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteScdnDomainOutcome()>>(
[this, request]()
{
return this->DeleteScdnDomain(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeBillingDataOutcome CdnClient::DescribeBillingData(const DescribeBillingDataRequest &request)
{
auto outcome = MakeRequest(request, "DescribeBillingData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeBillingDataResponse rsp = DescribeBillingDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeBillingDataOutcome(rsp);
else
return DescribeBillingDataOutcome(o.GetError());
}
else
{
return DescribeBillingDataOutcome(outcome.GetError());
}
}
void CdnClient::DescribeBillingDataAsync(const DescribeBillingDataRequest& request, const DescribeBillingDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeBillingData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeBillingDataOutcomeCallable CdnClient::DescribeBillingDataCallable(const DescribeBillingDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeBillingDataOutcome()>>(
[this, request]()
{
return this->DescribeBillingData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeCcDataOutcome CdnClient::DescribeCcData(const DescribeCcDataRequest &request)
{
auto outcome = MakeRequest(request, "DescribeCcData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeCcDataResponse rsp = DescribeCcDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeCcDataOutcome(rsp);
else
return DescribeCcDataOutcome(o.GetError());
}
else
{
return DescribeCcDataOutcome(outcome.GetError());
}
}
void CdnClient::DescribeCcDataAsync(const DescribeCcDataRequest& request, const DescribeCcDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeCcData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeCcDataOutcomeCallable CdnClient::DescribeCcDataCallable(const DescribeCcDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeCcDataOutcome()>>(
[this, request]()
{
return this->DescribeCcData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeCdnDataOutcome CdnClient::DescribeCdnData(const DescribeCdnDataRequest &request)
{
auto outcome = MakeRequest(request, "DescribeCdnData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeCdnDataResponse rsp = DescribeCdnDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeCdnDataOutcome(rsp);
else
return DescribeCdnDataOutcome(o.GetError());
}
else
{
return DescribeCdnDataOutcome(outcome.GetError());
}
}
void CdnClient::DescribeCdnDataAsync(const DescribeCdnDataRequest& request, const DescribeCdnDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeCdnData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeCdnDataOutcomeCallable CdnClient::DescribeCdnDataCallable(const DescribeCdnDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeCdnDataOutcome()>>(
[this, request]()
{
return this->DescribeCdnData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeCdnDomainLogsOutcome CdnClient::DescribeCdnDomainLogs(const DescribeCdnDomainLogsRequest &request)
{
auto outcome = MakeRequest(request, "DescribeCdnDomainLogs");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeCdnDomainLogsResponse rsp = DescribeCdnDomainLogsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeCdnDomainLogsOutcome(rsp);
else
return DescribeCdnDomainLogsOutcome(o.GetError());
}
else
{
return DescribeCdnDomainLogsOutcome(outcome.GetError());
}
}
void CdnClient::DescribeCdnDomainLogsAsync(const DescribeCdnDomainLogsRequest& request, const DescribeCdnDomainLogsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeCdnDomainLogs(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeCdnDomainLogsOutcomeCallable CdnClient::DescribeCdnDomainLogsCallable(const DescribeCdnDomainLogsRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeCdnDomainLogsOutcome()>>(
[this, request]()
{
return this->DescribeCdnDomainLogs(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeCdnIpOutcome CdnClient::DescribeCdnIp(const DescribeCdnIpRequest &request)
{
auto outcome = MakeRequest(request, "DescribeCdnIp");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeCdnIpResponse rsp = DescribeCdnIpResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeCdnIpOutcome(rsp);
else
return DescribeCdnIpOutcome(o.GetError());
}
else
{
return DescribeCdnIpOutcome(outcome.GetError());
}
}
void CdnClient::DescribeCdnIpAsync(const DescribeCdnIpRequest& request, const DescribeCdnIpAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeCdnIp(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeCdnIpOutcomeCallable CdnClient::DescribeCdnIpCallable(const DescribeCdnIpRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeCdnIpOutcome()>>(
[this, request]()
{
return this->DescribeCdnIp(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeCdnOriginIpOutcome CdnClient::DescribeCdnOriginIp(const DescribeCdnOriginIpRequest &request)
{
auto outcome = MakeRequest(request, "DescribeCdnOriginIp");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeCdnOriginIpResponse rsp = DescribeCdnOriginIpResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeCdnOriginIpOutcome(rsp);
else
return DescribeCdnOriginIpOutcome(o.GetError());
}
else
{
return DescribeCdnOriginIpOutcome(outcome.GetError());
}
}
void CdnClient::DescribeCdnOriginIpAsync(const DescribeCdnOriginIpRequest& request, const DescribeCdnOriginIpAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeCdnOriginIp(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeCdnOriginIpOutcomeCallable CdnClient::DescribeCdnOriginIpCallable(const DescribeCdnOriginIpRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeCdnOriginIpOutcome()>>(
[this, request]()
{
return this->DescribeCdnOriginIp(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeCertDomainsOutcome CdnClient::DescribeCertDomains(const DescribeCertDomainsRequest &request)
{
auto outcome = MakeRequest(request, "DescribeCertDomains");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeCertDomainsResponse rsp = DescribeCertDomainsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeCertDomainsOutcome(rsp);
else
return DescribeCertDomainsOutcome(o.GetError());
}
else
{
return DescribeCertDomainsOutcome(outcome.GetError());
}
}
void CdnClient::DescribeCertDomainsAsync(const DescribeCertDomainsRequest& request, const DescribeCertDomainsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeCertDomains(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeCertDomainsOutcomeCallable CdnClient::DescribeCertDomainsCallable(const DescribeCertDomainsRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeCertDomainsOutcome()>>(
[this, request]()
{
return this->DescribeCertDomains(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeDDoSDataOutcome CdnClient::DescribeDDoSData(const DescribeDDoSDataRequest &request)
{
auto outcome = MakeRequest(request, "DescribeDDoSData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeDDoSDataResponse rsp = DescribeDDoSDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeDDoSDataOutcome(rsp);
else
return DescribeDDoSDataOutcome(o.GetError());
}
else
{
return DescribeDDoSDataOutcome(outcome.GetError());
}
}
void CdnClient::DescribeDDoSDataAsync(const DescribeDDoSDataRequest& request, const DescribeDDoSDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeDDoSData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeDDoSDataOutcomeCallable CdnClient::DescribeDDoSDataCallable(const DescribeDDoSDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeDDoSDataOutcome()>>(
[this, request]()
{
return this->DescribeDDoSData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeDiagnoseReportOutcome CdnClient::DescribeDiagnoseReport(const DescribeDiagnoseReportRequest &request)
{
auto outcome = MakeRequest(request, "DescribeDiagnoseReport");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeDiagnoseReportResponse rsp = DescribeDiagnoseReportResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeDiagnoseReportOutcome(rsp);
else
return DescribeDiagnoseReportOutcome(o.GetError());
}
else
{
return DescribeDiagnoseReportOutcome(outcome.GetError());
}
}
void CdnClient::DescribeDiagnoseReportAsync(const DescribeDiagnoseReportRequest& request, const DescribeDiagnoseReportAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeDiagnoseReport(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeDiagnoseReportOutcomeCallable CdnClient::DescribeDiagnoseReportCallable(const DescribeDiagnoseReportRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeDiagnoseReportOutcome()>>(
[this, request]()
{
return this->DescribeDiagnoseReport(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeDistrictIspDataOutcome CdnClient::DescribeDistrictIspData(const DescribeDistrictIspDataRequest &request)
{
auto outcome = MakeRequest(request, "DescribeDistrictIspData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeDistrictIspDataResponse rsp = DescribeDistrictIspDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeDistrictIspDataOutcome(rsp);
else
return DescribeDistrictIspDataOutcome(o.GetError());
}
else
{
return DescribeDistrictIspDataOutcome(outcome.GetError());
}
}
void CdnClient::DescribeDistrictIspDataAsync(const DescribeDistrictIspDataRequest& request, const DescribeDistrictIspDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeDistrictIspData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeDistrictIspDataOutcomeCallable CdnClient::DescribeDistrictIspDataCallable(const DescribeDistrictIspDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeDistrictIspDataOutcome()>>(
[this, request]()
{
return this->DescribeDistrictIspData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeDomainsOutcome CdnClient::DescribeDomains(const DescribeDomainsRequest &request)
{
auto outcome = MakeRequest(request, "DescribeDomains");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeDomainsResponse rsp = DescribeDomainsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeDomainsOutcome(rsp);
else
return DescribeDomainsOutcome(o.GetError());
}
else
{
return DescribeDomainsOutcome(outcome.GetError());
}
}
void CdnClient::DescribeDomainsAsync(const DescribeDomainsRequest& request, const DescribeDomainsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeDomains(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeDomainsOutcomeCallable CdnClient::DescribeDomainsCallable(const DescribeDomainsRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeDomainsOutcome()>>(
[this, request]()
{
return this->DescribeDomains(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeDomainsConfigOutcome CdnClient::DescribeDomainsConfig(const DescribeDomainsConfigRequest &request)
{
auto outcome = MakeRequest(request, "DescribeDomainsConfig");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeDomainsConfigResponse rsp = DescribeDomainsConfigResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeDomainsConfigOutcome(rsp);
else
return DescribeDomainsConfigOutcome(o.GetError());
}
else
{
return DescribeDomainsConfigOutcome(outcome.GetError());
}
}
void CdnClient::DescribeDomainsConfigAsync(const DescribeDomainsConfigRequest& request, const DescribeDomainsConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeDomainsConfig(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeDomainsConfigOutcomeCallable CdnClient::DescribeDomainsConfigCallable(const DescribeDomainsConfigRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeDomainsConfigOutcome()>>(
[this, request]()
{
return this->DescribeDomainsConfig(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeEdgePackTaskStatusOutcome CdnClient::DescribeEdgePackTaskStatus(const DescribeEdgePackTaskStatusRequest &request)
{
auto outcome = MakeRequest(request, "DescribeEdgePackTaskStatus");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeEdgePackTaskStatusResponse rsp = DescribeEdgePackTaskStatusResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeEdgePackTaskStatusOutcome(rsp);
else
return DescribeEdgePackTaskStatusOutcome(o.GetError());
}
else
{
return DescribeEdgePackTaskStatusOutcome(outcome.GetError());
}
}
void CdnClient::DescribeEdgePackTaskStatusAsync(const DescribeEdgePackTaskStatusRequest& request, const DescribeEdgePackTaskStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeEdgePackTaskStatus(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeEdgePackTaskStatusOutcomeCallable CdnClient::DescribeEdgePackTaskStatusCallable(const DescribeEdgePackTaskStatusRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeEdgePackTaskStatusOutcome()>>(
[this, request]()
{
return this->DescribeEdgePackTaskStatus(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeEventLogDataOutcome CdnClient::DescribeEventLogData(const DescribeEventLogDataRequest &request)
{
auto outcome = MakeRequest(request, "DescribeEventLogData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeEventLogDataResponse rsp = DescribeEventLogDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeEventLogDataOutcome(rsp);
else
return DescribeEventLogDataOutcome(o.GetError());
}
else
{
return DescribeEventLogDataOutcome(outcome.GetError());
}
}
void CdnClient::DescribeEventLogDataAsync(const DescribeEventLogDataRequest& request, const DescribeEventLogDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeEventLogData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeEventLogDataOutcomeCallable CdnClient::DescribeEventLogDataCallable(const DescribeEventLogDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeEventLogDataOutcome()>>(
[this, request]()
{
return this->DescribeEventLogData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeHttpsPackagesOutcome CdnClient::DescribeHttpsPackages(const DescribeHttpsPackagesRequest &request)
{
auto outcome = MakeRequest(request, "DescribeHttpsPackages");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeHttpsPackagesResponse rsp = DescribeHttpsPackagesResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeHttpsPackagesOutcome(rsp);
else
return DescribeHttpsPackagesOutcome(o.GetError());
}
else
{
return DescribeHttpsPackagesOutcome(outcome.GetError());
}
}
void CdnClient::DescribeHttpsPackagesAsync(const DescribeHttpsPackagesRequest& request, const DescribeHttpsPackagesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeHttpsPackages(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeHttpsPackagesOutcomeCallable CdnClient::DescribeHttpsPackagesCallable(const DescribeHttpsPackagesRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeHttpsPackagesOutcome()>>(
[this, request]()
{
return this->DescribeHttpsPackages(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeImageConfigOutcome CdnClient::DescribeImageConfig(const DescribeImageConfigRequest &request)
{
auto outcome = MakeRequest(request, "DescribeImageConfig");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeImageConfigResponse rsp = DescribeImageConfigResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeImageConfigOutcome(rsp);
else
return DescribeImageConfigOutcome(o.GetError());
}
else
{
return DescribeImageConfigOutcome(outcome.GetError());
}
}
void CdnClient::DescribeImageConfigAsync(const DescribeImageConfigRequest& request, const DescribeImageConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeImageConfig(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeImageConfigOutcomeCallable CdnClient::DescribeImageConfigCallable(const DescribeImageConfigRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeImageConfigOutcome()>>(
[this, request]()
{
return this->DescribeImageConfig(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeIpStatusOutcome CdnClient::DescribeIpStatus(const DescribeIpStatusRequest &request)
{
auto outcome = MakeRequest(request, "DescribeIpStatus");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeIpStatusResponse rsp = DescribeIpStatusResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeIpStatusOutcome(rsp);
else
return DescribeIpStatusOutcome(o.GetError());
}
else
{
return DescribeIpStatusOutcome(outcome.GetError());
}
}
void CdnClient::DescribeIpStatusAsync(const DescribeIpStatusRequest& request, const DescribeIpStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeIpStatus(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeIpStatusOutcomeCallable CdnClient::DescribeIpStatusCallable(const DescribeIpStatusRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeIpStatusOutcome()>>(
[this, request]()
{
return this->DescribeIpStatus(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeIpVisitOutcome CdnClient::DescribeIpVisit(const DescribeIpVisitRequest &request)
{
auto outcome = MakeRequest(request, "DescribeIpVisit");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeIpVisitResponse rsp = DescribeIpVisitResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeIpVisitOutcome(rsp);
else
return DescribeIpVisitOutcome(o.GetError());
}
else
{
return DescribeIpVisitOutcome(outcome.GetError());
}
}
void CdnClient::DescribeIpVisitAsync(const DescribeIpVisitRequest& request, const DescribeIpVisitAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeIpVisit(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeIpVisitOutcomeCallable CdnClient::DescribeIpVisitCallable(const DescribeIpVisitRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeIpVisitOutcome()>>(
[this, request]()
{
return this->DescribeIpVisit(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeMapInfoOutcome CdnClient::DescribeMapInfo(const DescribeMapInfoRequest &request)
{
auto outcome = MakeRequest(request, "DescribeMapInfo");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeMapInfoResponse rsp = DescribeMapInfoResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeMapInfoOutcome(rsp);
else
return DescribeMapInfoOutcome(o.GetError());
}
else
{
return DescribeMapInfoOutcome(outcome.GetError());
}
}
void CdnClient::DescribeMapInfoAsync(const DescribeMapInfoRequest& request, const DescribeMapInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeMapInfo(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeMapInfoOutcomeCallable CdnClient::DescribeMapInfoCallable(const DescribeMapInfoRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeMapInfoOutcome()>>(
[this, request]()
{
return this->DescribeMapInfo(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeOriginDataOutcome CdnClient::DescribeOriginData(const DescribeOriginDataRequest &request)
{
auto outcome = MakeRequest(request, "DescribeOriginData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeOriginDataResponse rsp = DescribeOriginDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeOriginDataOutcome(rsp);
else
return DescribeOriginDataOutcome(o.GetError());
}
else
{
return DescribeOriginDataOutcome(outcome.GetError());
}
}
void CdnClient::DescribeOriginDataAsync(const DescribeOriginDataRequest& request, const DescribeOriginDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeOriginData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeOriginDataOutcomeCallable CdnClient::DescribeOriginDataCallable(const DescribeOriginDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeOriginDataOutcome()>>(
[this, request]()
{
return this->DescribeOriginData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribePayTypeOutcome CdnClient::DescribePayType(const DescribePayTypeRequest &request)
{
auto outcome = MakeRequest(request, "DescribePayType");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribePayTypeResponse rsp = DescribePayTypeResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribePayTypeOutcome(rsp);
else
return DescribePayTypeOutcome(o.GetError());
}
else
{
return DescribePayTypeOutcome(outcome.GetError());
}
}
void CdnClient::DescribePayTypeAsync(const DescribePayTypeRequest& request, const DescribePayTypeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribePayType(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribePayTypeOutcomeCallable CdnClient::DescribePayTypeCallable(const DescribePayTypeRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribePayTypeOutcome()>>(
[this, request]()
{
return this->DescribePayType(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribePurgeQuotaOutcome CdnClient::DescribePurgeQuota(const DescribePurgeQuotaRequest &request)
{
auto outcome = MakeRequest(request, "DescribePurgeQuota");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribePurgeQuotaResponse rsp = DescribePurgeQuotaResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribePurgeQuotaOutcome(rsp);
else
return DescribePurgeQuotaOutcome(o.GetError());
}
else
{
return DescribePurgeQuotaOutcome(outcome.GetError());
}
}
void CdnClient::DescribePurgeQuotaAsync(const DescribePurgeQuotaRequest& request, const DescribePurgeQuotaAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribePurgeQuota(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribePurgeQuotaOutcomeCallable CdnClient::DescribePurgeQuotaCallable(const DescribePurgeQuotaRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribePurgeQuotaOutcome()>>(
[this, request]()
{
return this->DescribePurgeQuota(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribePurgeTasksOutcome CdnClient::DescribePurgeTasks(const DescribePurgeTasksRequest &request)
{
auto outcome = MakeRequest(request, "DescribePurgeTasks");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribePurgeTasksResponse rsp = DescribePurgeTasksResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribePurgeTasksOutcome(rsp);
else
return DescribePurgeTasksOutcome(o.GetError());
}
else
{
return DescribePurgeTasksOutcome(outcome.GetError());
}
}
void CdnClient::DescribePurgeTasksAsync(const DescribePurgeTasksRequest& request, const DescribePurgeTasksAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribePurgeTasks(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribePurgeTasksOutcomeCallable CdnClient::DescribePurgeTasksCallable(const DescribePurgeTasksRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribePurgeTasksOutcome()>>(
[this, request]()
{
return this->DescribePurgeTasks(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribePushQuotaOutcome CdnClient::DescribePushQuota(const DescribePushQuotaRequest &request)
{
auto outcome = MakeRequest(request, "DescribePushQuota");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribePushQuotaResponse rsp = DescribePushQuotaResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribePushQuotaOutcome(rsp);
else
return DescribePushQuotaOutcome(o.GetError());
}
else
{
return DescribePushQuotaOutcome(outcome.GetError());
}
}
void CdnClient::DescribePushQuotaAsync(const DescribePushQuotaRequest& request, const DescribePushQuotaAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribePushQuota(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribePushQuotaOutcomeCallable CdnClient::DescribePushQuotaCallable(const DescribePushQuotaRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribePushQuotaOutcome()>>(
[this, request]()
{
return this->DescribePushQuota(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribePushTasksOutcome CdnClient::DescribePushTasks(const DescribePushTasksRequest &request)
{
auto outcome = MakeRequest(request, "DescribePushTasks");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribePushTasksResponse rsp = DescribePushTasksResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribePushTasksOutcome(rsp);
else
return DescribePushTasksOutcome(o.GetError());
}
else
{
return DescribePushTasksOutcome(outcome.GetError());
}
}
void CdnClient::DescribePushTasksAsync(const DescribePushTasksRequest& request, const DescribePushTasksAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribePushTasks(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribePushTasksOutcomeCallable CdnClient::DescribePushTasksCallable(const DescribePushTasksRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribePushTasksOutcome()>>(
[this, request]()
{
return this->DescribePushTasks(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeReportDataOutcome CdnClient::DescribeReportData(const DescribeReportDataRequest &request)
{
auto outcome = MakeRequest(request, "DescribeReportData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeReportDataResponse rsp = DescribeReportDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeReportDataOutcome(rsp);
else
return DescribeReportDataOutcome(o.GetError());
}
else
{
return DescribeReportDataOutcome(outcome.GetError());
}
}
void CdnClient::DescribeReportDataAsync(const DescribeReportDataRequest& request, const DescribeReportDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeReportData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeReportDataOutcomeCallable CdnClient::DescribeReportDataCallable(const DescribeReportDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeReportDataOutcome()>>(
[this, request]()
{
return this->DescribeReportData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeScdnBotDataOutcome CdnClient::DescribeScdnBotData(const DescribeScdnBotDataRequest &request)
{
auto outcome = MakeRequest(request, "DescribeScdnBotData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeScdnBotDataResponse rsp = DescribeScdnBotDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeScdnBotDataOutcome(rsp);
else
return DescribeScdnBotDataOutcome(o.GetError());
}
else
{
return DescribeScdnBotDataOutcome(outcome.GetError());
}
}
void CdnClient::DescribeScdnBotDataAsync(const DescribeScdnBotDataRequest& request, const DescribeScdnBotDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeScdnBotData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeScdnBotDataOutcomeCallable CdnClient::DescribeScdnBotDataCallable(const DescribeScdnBotDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeScdnBotDataOutcome()>>(
[this, request]()
{
return this->DescribeScdnBotData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeScdnBotRecordsOutcome CdnClient::DescribeScdnBotRecords(const DescribeScdnBotRecordsRequest &request)
{
auto outcome = MakeRequest(request, "DescribeScdnBotRecords");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeScdnBotRecordsResponse rsp = DescribeScdnBotRecordsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeScdnBotRecordsOutcome(rsp);
else
return DescribeScdnBotRecordsOutcome(o.GetError());
}
else
{
return DescribeScdnBotRecordsOutcome(outcome.GetError());
}
}
void CdnClient::DescribeScdnBotRecordsAsync(const DescribeScdnBotRecordsRequest& request, const DescribeScdnBotRecordsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeScdnBotRecords(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeScdnBotRecordsOutcomeCallable CdnClient::DescribeScdnBotRecordsCallable(const DescribeScdnBotRecordsRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeScdnBotRecordsOutcome()>>(
[this, request]()
{
return this->DescribeScdnBotRecords(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeScdnConfigOutcome CdnClient::DescribeScdnConfig(const DescribeScdnConfigRequest &request)
{
auto outcome = MakeRequest(request, "DescribeScdnConfig");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeScdnConfigResponse rsp = DescribeScdnConfigResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeScdnConfigOutcome(rsp);
else
return DescribeScdnConfigOutcome(o.GetError());
}
else
{
return DescribeScdnConfigOutcome(outcome.GetError());
}
}
void CdnClient::DescribeScdnConfigAsync(const DescribeScdnConfigRequest& request, const DescribeScdnConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeScdnConfig(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeScdnConfigOutcomeCallable CdnClient::DescribeScdnConfigCallable(const DescribeScdnConfigRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeScdnConfigOutcome()>>(
[this, request]()
{
return this->DescribeScdnConfig(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeScdnIpStrategyOutcome CdnClient::DescribeScdnIpStrategy(const DescribeScdnIpStrategyRequest &request)
{
auto outcome = MakeRequest(request, "DescribeScdnIpStrategy");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeScdnIpStrategyResponse rsp = DescribeScdnIpStrategyResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeScdnIpStrategyOutcome(rsp);
else
return DescribeScdnIpStrategyOutcome(o.GetError());
}
else
{
return DescribeScdnIpStrategyOutcome(outcome.GetError());
}
}
void CdnClient::DescribeScdnIpStrategyAsync(const DescribeScdnIpStrategyRequest& request, const DescribeScdnIpStrategyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeScdnIpStrategy(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeScdnIpStrategyOutcomeCallable CdnClient::DescribeScdnIpStrategyCallable(const DescribeScdnIpStrategyRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeScdnIpStrategyOutcome()>>(
[this, request]()
{
return this->DescribeScdnIpStrategy(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeScdnTopDataOutcome CdnClient::DescribeScdnTopData(const DescribeScdnTopDataRequest &request)
{
auto outcome = MakeRequest(request, "DescribeScdnTopData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeScdnTopDataResponse rsp = DescribeScdnTopDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeScdnTopDataOutcome(rsp);
else
return DescribeScdnTopDataOutcome(o.GetError());
}
else
{
return DescribeScdnTopDataOutcome(outcome.GetError());
}
}
void CdnClient::DescribeScdnTopDataAsync(const DescribeScdnTopDataRequest& request, const DescribeScdnTopDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeScdnTopData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeScdnTopDataOutcomeCallable CdnClient::DescribeScdnTopDataCallable(const DescribeScdnTopDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeScdnTopDataOutcome()>>(
[this, request]()
{
return this->DescribeScdnTopData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeTopDataOutcome CdnClient::DescribeTopData(const DescribeTopDataRequest &request)
{
auto outcome = MakeRequest(request, "DescribeTopData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeTopDataResponse rsp = DescribeTopDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeTopDataOutcome(rsp);
else
return DescribeTopDataOutcome(o.GetError());
}
else
{
return DescribeTopDataOutcome(outcome.GetError());
}
}
void CdnClient::DescribeTopDataAsync(const DescribeTopDataRequest& request, const DescribeTopDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeTopData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeTopDataOutcomeCallable CdnClient::DescribeTopDataCallable(const DescribeTopDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeTopDataOutcome()>>(
[this, request]()
{
return this->DescribeTopData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeTrafficPackagesOutcome CdnClient::DescribeTrafficPackages(const DescribeTrafficPackagesRequest &request)
{
auto outcome = MakeRequest(request, "DescribeTrafficPackages");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeTrafficPackagesResponse rsp = DescribeTrafficPackagesResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeTrafficPackagesOutcome(rsp);
else
return DescribeTrafficPackagesOutcome(o.GetError());
}
else
{
return DescribeTrafficPackagesOutcome(outcome.GetError());
}
}
void CdnClient::DescribeTrafficPackagesAsync(const DescribeTrafficPackagesRequest& request, const DescribeTrafficPackagesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeTrafficPackages(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeTrafficPackagesOutcomeCallable CdnClient::DescribeTrafficPackagesCallable(const DescribeTrafficPackagesRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeTrafficPackagesOutcome()>>(
[this, request]()
{
return this->DescribeTrafficPackages(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeUrlViolationsOutcome CdnClient::DescribeUrlViolations(const DescribeUrlViolationsRequest &request)
{
auto outcome = MakeRequest(request, "DescribeUrlViolations");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeUrlViolationsResponse rsp = DescribeUrlViolationsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeUrlViolationsOutcome(rsp);
else
return DescribeUrlViolationsOutcome(o.GetError());
}
else
{
return DescribeUrlViolationsOutcome(outcome.GetError());
}
}
void CdnClient::DescribeUrlViolationsAsync(const DescribeUrlViolationsRequest& request, const DescribeUrlViolationsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeUrlViolations(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeUrlViolationsOutcomeCallable CdnClient::DescribeUrlViolationsCallable(const DescribeUrlViolationsRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeUrlViolationsOutcome()>>(
[this, request]()
{
return this->DescribeUrlViolations(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DescribeWafDataOutcome CdnClient::DescribeWafData(const DescribeWafDataRequest &request)
{
auto outcome = MakeRequest(request, "DescribeWafData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeWafDataResponse rsp = DescribeWafDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeWafDataOutcome(rsp);
else
return DescribeWafDataOutcome(o.GetError());
}
else
{
return DescribeWafDataOutcome(outcome.GetError());
}
}
void CdnClient::DescribeWafDataAsync(const DescribeWafDataRequest& request, const DescribeWafDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeWafData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DescribeWafDataOutcomeCallable CdnClient::DescribeWafDataCallable(const DescribeWafDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeWafDataOutcome()>>(
[this, request]()
{
return this->DescribeWafData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DisableCachesOutcome CdnClient::DisableCaches(const DisableCachesRequest &request)
{
auto outcome = MakeRequest(request, "DisableCaches");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DisableCachesResponse rsp = DisableCachesResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DisableCachesOutcome(rsp);
else
return DisableCachesOutcome(o.GetError());
}
else
{
return DisableCachesOutcome(outcome.GetError());
}
}
void CdnClient::DisableCachesAsync(const DisableCachesRequest& request, const DisableCachesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DisableCaches(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DisableCachesOutcomeCallable CdnClient::DisableCachesCallable(const DisableCachesRequest &request)
{
auto task = std::make_shared<std::packaged_task<DisableCachesOutcome()>>(
[this, request]()
{
return this->DisableCaches(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DisableClsLogTopicOutcome CdnClient::DisableClsLogTopic(const DisableClsLogTopicRequest &request)
{
auto outcome = MakeRequest(request, "DisableClsLogTopic");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DisableClsLogTopicResponse rsp = DisableClsLogTopicResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DisableClsLogTopicOutcome(rsp);
else
return DisableClsLogTopicOutcome(o.GetError());
}
else
{
return DisableClsLogTopicOutcome(outcome.GetError());
}
}
void CdnClient::DisableClsLogTopicAsync(const DisableClsLogTopicRequest& request, const DisableClsLogTopicAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DisableClsLogTopic(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DisableClsLogTopicOutcomeCallable CdnClient::DisableClsLogTopicCallable(const DisableClsLogTopicRequest &request)
{
auto task = std::make_shared<std::packaged_task<DisableClsLogTopicOutcome()>>(
[this, request]()
{
return this->DisableClsLogTopic(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::DuplicateDomainConfigOutcome CdnClient::DuplicateDomainConfig(const DuplicateDomainConfigRequest &request)
{
auto outcome = MakeRequest(request, "DuplicateDomainConfig");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DuplicateDomainConfigResponse rsp = DuplicateDomainConfigResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DuplicateDomainConfigOutcome(rsp);
else
return DuplicateDomainConfigOutcome(o.GetError());
}
else
{
return DuplicateDomainConfigOutcome(outcome.GetError());
}
}
void CdnClient::DuplicateDomainConfigAsync(const DuplicateDomainConfigRequest& request, const DuplicateDomainConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DuplicateDomainConfig(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::DuplicateDomainConfigOutcomeCallable CdnClient::DuplicateDomainConfigCallable(const DuplicateDomainConfigRequest &request)
{
auto task = std::make_shared<std::packaged_task<DuplicateDomainConfigOutcome()>>(
[this, request]()
{
return this->DuplicateDomainConfig(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::EnableCachesOutcome CdnClient::EnableCaches(const EnableCachesRequest &request)
{
auto outcome = MakeRequest(request, "EnableCaches");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
EnableCachesResponse rsp = EnableCachesResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return EnableCachesOutcome(rsp);
else
return EnableCachesOutcome(o.GetError());
}
else
{
return EnableCachesOutcome(outcome.GetError());
}
}
void CdnClient::EnableCachesAsync(const EnableCachesRequest& request, const EnableCachesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->EnableCaches(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::EnableCachesOutcomeCallable CdnClient::EnableCachesCallable(const EnableCachesRequest &request)
{
auto task = std::make_shared<std::packaged_task<EnableCachesOutcome()>>(
[this, request]()
{
return this->EnableCaches(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::EnableClsLogTopicOutcome CdnClient::EnableClsLogTopic(const EnableClsLogTopicRequest &request)
{
auto outcome = MakeRequest(request, "EnableClsLogTopic");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
EnableClsLogTopicResponse rsp = EnableClsLogTopicResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return EnableClsLogTopicOutcome(rsp);
else
return EnableClsLogTopicOutcome(o.GetError());
}
else
{
return EnableClsLogTopicOutcome(outcome.GetError());
}
}
void CdnClient::EnableClsLogTopicAsync(const EnableClsLogTopicRequest& request, const EnableClsLogTopicAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->EnableClsLogTopic(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::EnableClsLogTopicOutcomeCallable CdnClient::EnableClsLogTopicCallable(const EnableClsLogTopicRequest &request)
{
auto task = std::make_shared<std::packaged_task<EnableClsLogTopicOutcome()>>(
[this, request]()
{
return this->EnableClsLogTopic(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::GetDisableRecordsOutcome CdnClient::GetDisableRecords(const GetDisableRecordsRequest &request)
{
auto outcome = MakeRequest(request, "GetDisableRecords");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
GetDisableRecordsResponse rsp = GetDisableRecordsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return GetDisableRecordsOutcome(rsp);
else
return GetDisableRecordsOutcome(o.GetError());
}
else
{
return GetDisableRecordsOutcome(outcome.GetError());
}
}
void CdnClient::GetDisableRecordsAsync(const GetDisableRecordsRequest& request, const GetDisableRecordsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->GetDisableRecords(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::GetDisableRecordsOutcomeCallable CdnClient::GetDisableRecordsCallable(const GetDisableRecordsRequest &request)
{
auto task = std::make_shared<std::packaged_task<GetDisableRecordsOutcome()>>(
[this, request]()
{
return this->GetDisableRecords(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::ListClsLogTopicsOutcome CdnClient::ListClsLogTopics(const ListClsLogTopicsRequest &request)
{
auto outcome = MakeRequest(request, "ListClsLogTopics");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
ListClsLogTopicsResponse rsp = ListClsLogTopicsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return ListClsLogTopicsOutcome(rsp);
else
return ListClsLogTopicsOutcome(o.GetError());
}
else
{
return ListClsLogTopicsOutcome(outcome.GetError());
}
}
void CdnClient::ListClsLogTopicsAsync(const ListClsLogTopicsRequest& request, const ListClsLogTopicsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->ListClsLogTopics(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::ListClsLogTopicsOutcomeCallable CdnClient::ListClsLogTopicsCallable(const ListClsLogTopicsRequest &request)
{
auto task = std::make_shared<std::packaged_task<ListClsLogTopicsOutcome()>>(
[this, request]()
{
return this->ListClsLogTopics(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::ListClsTopicDomainsOutcome CdnClient::ListClsTopicDomains(const ListClsTopicDomainsRequest &request)
{
auto outcome = MakeRequest(request, "ListClsTopicDomains");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
ListClsTopicDomainsResponse rsp = ListClsTopicDomainsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return ListClsTopicDomainsOutcome(rsp);
else
return ListClsTopicDomainsOutcome(o.GetError());
}
else
{
return ListClsTopicDomainsOutcome(outcome.GetError());
}
}
void CdnClient::ListClsTopicDomainsAsync(const ListClsTopicDomainsRequest& request, const ListClsTopicDomainsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->ListClsTopicDomains(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::ListClsTopicDomainsOutcomeCallable CdnClient::ListClsTopicDomainsCallable(const ListClsTopicDomainsRequest &request)
{
auto task = std::make_shared<std::packaged_task<ListClsTopicDomainsOutcome()>>(
[this, request]()
{
return this->ListClsTopicDomains(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::ListDiagnoseReportOutcome CdnClient::ListDiagnoseReport(const ListDiagnoseReportRequest &request)
{
auto outcome = MakeRequest(request, "ListDiagnoseReport");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
ListDiagnoseReportResponse rsp = ListDiagnoseReportResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return ListDiagnoseReportOutcome(rsp);
else
return ListDiagnoseReportOutcome(o.GetError());
}
else
{
return ListDiagnoseReportOutcome(outcome.GetError());
}
}
void CdnClient::ListDiagnoseReportAsync(const ListDiagnoseReportRequest& request, const ListDiagnoseReportAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->ListDiagnoseReport(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::ListDiagnoseReportOutcomeCallable CdnClient::ListDiagnoseReportCallable(const ListDiagnoseReportRequest &request)
{
auto task = std::make_shared<std::packaged_task<ListDiagnoseReportOutcome()>>(
[this, request]()
{
return this->ListDiagnoseReport(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::ListScdnDomainsOutcome CdnClient::ListScdnDomains(const ListScdnDomainsRequest &request)
{
auto outcome = MakeRequest(request, "ListScdnDomains");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
ListScdnDomainsResponse rsp = ListScdnDomainsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return ListScdnDomainsOutcome(rsp);
else
return ListScdnDomainsOutcome(o.GetError());
}
else
{
return ListScdnDomainsOutcome(outcome.GetError());
}
}
void CdnClient::ListScdnDomainsAsync(const ListScdnDomainsRequest& request, const ListScdnDomainsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->ListScdnDomains(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::ListScdnDomainsOutcomeCallable CdnClient::ListScdnDomainsCallable(const ListScdnDomainsRequest &request)
{
auto task = std::make_shared<std::packaged_task<ListScdnDomainsOutcome()>>(
[this, request]()
{
return this->ListScdnDomains(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::ListScdnLogTasksOutcome CdnClient::ListScdnLogTasks(const ListScdnLogTasksRequest &request)
{
auto outcome = MakeRequest(request, "ListScdnLogTasks");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
ListScdnLogTasksResponse rsp = ListScdnLogTasksResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return ListScdnLogTasksOutcome(rsp);
else
return ListScdnLogTasksOutcome(o.GetError());
}
else
{
return ListScdnLogTasksOutcome(outcome.GetError());
}
}
void CdnClient::ListScdnLogTasksAsync(const ListScdnLogTasksRequest& request, const ListScdnLogTasksAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->ListScdnLogTasks(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::ListScdnLogTasksOutcomeCallable CdnClient::ListScdnLogTasksCallable(const ListScdnLogTasksRequest &request)
{
auto task = std::make_shared<std::packaged_task<ListScdnLogTasksOutcome()>>(
[this, request]()
{
return this->ListScdnLogTasks(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::ListScdnTopBotDataOutcome CdnClient::ListScdnTopBotData(const ListScdnTopBotDataRequest &request)
{
auto outcome = MakeRequest(request, "ListScdnTopBotData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
ListScdnTopBotDataResponse rsp = ListScdnTopBotDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return ListScdnTopBotDataOutcome(rsp);
else
return ListScdnTopBotDataOutcome(o.GetError());
}
else
{
return ListScdnTopBotDataOutcome(outcome.GetError());
}
}
void CdnClient::ListScdnTopBotDataAsync(const ListScdnTopBotDataRequest& request, const ListScdnTopBotDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->ListScdnTopBotData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::ListScdnTopBotDataOutcomeCallable CdnClient::ListScdnTopBotDataCallable(const ListScdnTopBotDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<ListScdnTopBotDataOutcome()>>(
[this, request]()
{
return this->ListScdnTopBotData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::ListTopBotDataOutcome CdnClient::ListTopBotData(const ListTopBotDataRequest &request)
{
auto outcome = MakeRequest(request, "ListTopBotData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
ListTopBotDataResponse rsp = ListTopBotDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return ListTopBotDataOutcome(rsp);
else
return ListTopBotDataOutcome(o.GetError());
}
else
{
return ListTopBotDataOutcome(outcome.GetError());
}
}
void CdnClient::ListTopBotDataAsync(const ListTopBotDataRequest& request, const ListTopBotDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->ListTopBotData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::ListTopBotDataOutcomeCallable CdnClient::ListTopBotDataCallable(const ListTopBotDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<ListTopBotDataOutcome()>>(
[this, request]()
{
return this->ListTopBotData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::ListTopCcDataOutcome CdnClient::ListTopCcData(const ListTopCcDataRequest &request)
{
auto outcome = MakeRequest(request, "ListTopCcData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
ListTopCcDataResponse rsp = ListTopCcDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return ListTopCcDataOutcome(rsp);
else
return ListTopCcDataOutcome(o.GetError());
}
else
{
return ListTopCcDataOutcome(outcome.GetError());
}
}
void CdnClient::ListTopCcDataAsync(const ListTopCcDataRequest& request, const ListTopCcDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->ListTopCcData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::ListTopCcDataOutcomeCallable CdnClient::ListTopCcDataCallable(const ListTopCcDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<ListTopCcDataOutcome()>>(
[this, request]()
{
return this->ListTopCcData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::ListTopClsLogDataOutcome CdnClient::ListTopClsLogData(const ListTopClsLogDataRequest &request)
{
auto outcome = MakeRequest(request, "ListTopClsLogData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
ListTopClsLogDataResponse rsp = ListTopClsLogDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return ListTopClsLogDataOutcome(rsp);
else
return ListTopClsLogDataOutcome(o.GetError());
}
else
{
return ListTopClsLogDataOutcome(outcome.GetError());
}
}
void CdnClient::ListTopClsLogDataAsync(const ListTopClsLogDataRequest& request, const ListTopClsLogDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->ListTopClsLogData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::ListTopClsLogDataOutcomeCallable CdnClient::ListTopClsLogDataCallable(const ListTopClsLogDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<ListTopClsLogDataOutcome()>>(
[this, request]()
{
return this->ListTopClsLogData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::ListTopDDoSDataOutcome CdnClient::ListTopDDoSData(const ListTopDDoSDataRequest &request)
{
auto outcome = MakeRequest(request, "ListTopDDoSData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
ListTopDDoSDataResponse rsp = ListTopDDoSDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return ListTopDDoSDataOutcome(rsp);
else
return ListTopDDoSDataOutcome(o.GetError());
}
else
{
return ListTopDDoSDataOutcome(outcome.GetError());
}
}
void CdnClient::ListTopDDoSDataAsync(const ListTopDDoSDataRequest& request, const ListTopDDoSDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->ListTopDDoSData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::ListTopDDoSDataOutcomeCallable CdnClient::ListTopDDoSDataCallable(const ListTopDDoSDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<ListTopDDoSDataOutcome()>>(
[this, request]()
{
return this->ListTopDDoSData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::ListTopDataOutcome CdnClient::ListTopData(const ListTopDataRequest &request)
{
auto outcome = MakeRequest(request, "ListTopData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
ListTopDataResponse rsp = ListTopDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return ListTopDataOutcome(rsp);
else
return ListTopDataOutcome(o.GetError());
}
else
{
return ListTopDataOutcome(outcome.GetError());
}
}
void CdnClient::ListTopDataAsync(const ListTopDataRequest& request, const ListTopDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->ListTopData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::ListTopDataOutcomeCallable CdnClient::ListTopDataCallable(const ListTopDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<ListTopDataOutcome()>>(
[this, request]()
{
return this->ListTopData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::ListTopWafDataOutcome CdnClient::ListTopWafData(const ListTopWafDataRequest &request)
{
auto outcome = MakeRequest(request, "ListTopWafData");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
ListTopWafDataResponse rsp = ListTopWafDataResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return ListTopWafDataOutcome(rsp);
else
return ListTopWafDataOutcome(o.GetError());
}
else
{
return ListTopWafDataOutcome(outcome.GetError());
}
}
void CdnClient::ListTopWafDataAsync(const ListTopWafDataRequest& request, const ListTopWafDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->ListTopWafData(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::ListTopWafDataOutcomeCallable CdnClient::ListTopWafDataCallable(const ListTopWafDataRequest &request)
{
auto task = std::make_shared<std::packaged_task<ListTopWafDataOutcome()>>(
[this, request]()
{
return this->ListTopWafData(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::ManageClsTopicDomainsOutcome CdnClient::ManageClsTopicDomains(const ManageClsTopicDomainsRequest &request)
{
auto outcome = MakeRequest(request, "ManageClsTopicDomains");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
ManageClsTopicDomainsResponse rsp = ManageClsTopicDomainsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return ManageClsTopicDomainsOutcome(rsp);
else
return ManageClsTopicDomainsOutcome(o.GetError());
}
else
{
return ManageClsTopicDomainsOutcome(outcome.GetError());
}
}
void CdnClient::ManageClsTopicDomainsAsync(const ManageClsTopicDomainsRequest& request, const ManageClsTopicDomainsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->ManageClsTopicDomains(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::ManageClsTopicDomainsOutcomeCallable CdnClient::ManageClsTopicDomainsCallable(const ManageClsTopicDomainsRequest &request)
{
auto task = std::make_shared<std::packaged_task<ManageClsTopicDomainsOutcome()>>(
[this, request]()
{
return this->ManageClsTopicDomains(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::ModifyDomainConfigOutcome CdnClient::ModifyDomainConfig(const ModifyDomainConfigRequest &request)
{
auto outcome = MakeRequest(request, "ModifyDomainConfig");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
ModifyDomainConfigResponse rsp = ModifyDomainConfigResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return ModifyDomainConfigOutcome(rsp);
else
return ModifyDomainConfigOutcome(o.GetError());
}
else
{
return ModifyDomainConfigOutcome(outcome.GetError());
}
}
void CdnClient::ModifyDomainConfigAsync(const ModifyDomainConfigRequest& request, const ModifyDomainConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->ModifyDomainConfig(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::ModifyDomainConfigOutcomeCallable CdnClient::ModifyDomainConfigCallable(const ModifyDomainConfigRequest &request)
{
auto task = std::make_shared<std::packaged_task<ModifyDomainConfigOutcome()>>(
[this, request]()
{
return this->ModifyDomainConfig(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::ModifyPurgeFetchTaskStatusOutcome CdnClient::ModifyPurgeFetchTaskStatus(const ModifyPurgeFetchTaskStatusRequest &request)
{
auto outcome = MakeRequest(request, "ModifyPurgeFetchTaskStatus");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
ModifyPurgeFetchTaskStatusResponse rsp = ModifyPurgeFetchTaskStatusResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return ModifyPurgeFetchTaskStatusOutcome(rsp);
else
return ModifyPurgeFetchTaskStatusOutcome(o.GetError());
}
else
{
return ModifyPurgeFetchTaskStatusOutcome(outcome.GetError());
}
}
void CdnClient::ModifyPurgeFetchTaskStatusAsync(const ModifyPurgeFetchTaskStatusRequest& request, const ModifyPurgeFetchTaskStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->ModifyPurgeFetchTaskStatus(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::ModifyPurgeFetchTaskStatusOutcomeCallable CdnClient::ModifyPurgeFetchTaskStatusCallable(const ModifyPurgeFetchTaskStatusRequest &request)
{
auto task = std::make_shared<std::packaged_task<ModifyPurgeFetchTaskStatusOutcome()>>(
[this, request]()
{
return this->ModifyPurgeFetchTaskStatus(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::PurgePathCacheOutcome CdnClient::PurgePathCache(const PurgePathCacheRequest &request)
{
auto outcome = MakeRequest(request, "PurgePathCache");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
PurgePathCacheResponse rsp = PurgePathCacheResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return PurgePathCacheOutcome(rsp);
else
return PurgePathCacheOutcome(o.GetError());
}
else
{
return PurgePathCacheOutcome(outcome.GetError());
}
}
void CdnClient::PurgePathCacheAsync(const PurgePathCacheRequest& request, const PurgePathCacheAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->PurgePathCache(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::PurgePathCacheOutcomeCallable CdnClient::PurgePathCacheCallable(const PurgePathCacheRequest &request)
{
auto task = std::make_shared<std::packaged_task<PurgePathCacheOutcome()>>(
[this, request]()
{
return this->PurgePathCache(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::PurgeUrlsCacheOutcome CdnClient::PurgeUrlsCache(const PurgeUrlsCacheRequest &request)
{
auto outcome = MakeRequest(request, "PurgeUrlsCache");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
PurgeUrlsCacheResponse rsp = PurgeUrlsCacheResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return PurgeUrlsCacheOutcome(rsp);
else
return PurgeUrlsCacheOutcome(o.GetError());
}
else
{
return PurgeUrlsCacheOutcome(outcome.GetError());
}
}
void CdnClient::PurgeUrlsCacheAsync(const PurgeUrlsCacheRequest& request, const PurgeUrlsCacheAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->PurgeUrlsCache(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::PurgeUrlsCacheOutcomeCallable CdnClient::PurgeUrlsCacheCallable(const PurgeUrlsCacheRequest &request)
{
auto task = std::make_shared<std::packaged_task<PurgeUrlsCacheOutcome()>>(
[this, request]()
{
return this->PurgeUrlsCache(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::PushUrlsCacheOutcome CdnClient::PushUrlsCache(const PushUrlsCacheRequest &request)
{
auto outcome = MakeRequest(request, "PushUrlsCache");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
PushUrlsCacheResponse rsp = PushUrlsCacheResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return PushUrlsCacheOutcome(rsp);
else
return PushUrlsCacheOutcome(o.GetError());
}
else
{
return PushUrlsCacheOutcome(outcome.GetError());
}
}
void CdnClient::PushUrlsCacheAsync(const PushUrlsCacheRequest& request, const PushUrlsCacheAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->PushUrlsCache(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::PushUrlsCacheOutcomeCallable CdnClient::PushUrlsCacheCallable(const PushUrlsCacheRequest &request)
{
auto task = std::make_shared<std::packaged_task<PushUrlsCacheOutcome()>>(
[this, request]()
{
return this->PushUrlsCache(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::SearchClsLogOutcome CdnClient::SearchClsLog(const SearchClsLogRequest &request)
{
auto outcome = MakeRequest(request, "SearchClsLog");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
SearchClsLogResponse rsp = SearchClsLogResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return SearchClsLogOutcome(rsp);
else
return SearchClsLogOutcome(o.GetError());
}
else
{
return SearchClsLogOutcome(outcome.GetError());
}
}
void CdnClient::SearchClsLogAsync(const SearchClsLogRequest& request, const SearchClsLogAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->SearchClsLog(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::SearchClsLogOutcomeCallable CdnClient::SearchClsLogCallable(const SearchClsLogRequest &request)
{
auto task = std::make_shared<std::packaged_task<SearchClsLogOutcome()>>(
[this, request]()
{
return this->SearchClsLog(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::StartCdnDomainOutcome CdnClient::StartCdnDomain(const StartCdnDomainRequest &request)
{
auto outcome = MakeRequest(request, "StartCdnDomain");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
StartCdnDomainResponse rsp = StartCdnDomainResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return StartCdnDomainOutcome(rsp);
else
return StartCdnDomainOutcome(o.GetError());
}
else
{
return StartCdnDomainOutcome(outcome.GetError());
}
}
void CdnClient::StartCdnDomainAsync(const StartCdnDomainRequest& request, const StartCdnDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->StartCdnDomain(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::StartCdnDomainOutcomeCallable CdnClient::StartCdnDomainCallable(const StartCdnDomainRequest &request)
{
auto task = std::make_shared<std::packaged_task<StartCdnDomainOutcome()>>(
[this, request]()
{
return this->StartCdnDomain(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::StartScdnDomainOutcome CdnClient::StartScdnDomain(const StartScdnDomainRequest &request)
{
auto outcome = MakeRequest(request, "StartScdnDomain");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
StartScdnDomainResponse rsp = StartScdnDomainResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return StartScdnDomainOutcome(rsp);
else
return StartScdnDomainOutcome(o.GetError());
}
else
{
return StartScdnDomainOutcome(outcome.GetError());
}
}
void CdnClient::StartScdnDomainAsync(const StartScdnDomainRequest& request, const StartScdnDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->StartScdnDomain(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::StartScdnDomainOutcomeCallable CdnClient::StartScdnDomainCallable(const StartScdnDomainRequest &request)
{
auto task = std::make_shared<std::packaged_task<StartScdnDomainOutcome()>>(
[this, request]()
{
return this->StartScdnDomain(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::StopCdnDomainOutcome CdnClient::StopCdnDomain(const StopCdnDomainRequest &request)
{
auto outcome = MakeRequest(request, "StopCdnDomain");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
StopCdnDomainResponse rsp = StopCdnDomainResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return StopCdnDomainOutcome(rsp);
else
return StopCdnDomainOutcome(o.GetError());
}
else
{
return StopCdnDomainOutcome(outcome.GetError());
}
}
void CdnClient::StopCdnDomainAsync(const StopCdnDomainRequest& request, const StopCdnDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->StopCdnDomain(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::StopCdnDomainOutcomeCallable CdnClient::StopCdnDomainCallable(const StopCdnDomainRequest &request)
{
auto task = std::make_shared<std::packaged_task<StopCdnDomainOutcome()>>(
[this, request]()
{
return this->StopCdnDomain(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::StopScdnDomainOutcome CdnClient::StopScdnDomain(const StopScdnDomainRequest &request)
{
auto outcome = MakeRequest(request, "StopScdnDomain");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
StopScdnDomainResponse rsp = StopScdnDomainResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return StopScdnDomainOutcome(rsp);
else
return StopScdnDomainOutcome(o.GetError());
}
else
{
return StopScdnDomainOutcome(outcome.GetError());
}
}
void CdnClient::StopScdnDomainAsync(const StopScdnDomainRequest& request, const StopScdnDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->StopScdnDomain(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::StopScdnDomainOutcomeCallable CdnClient::StopScdnDomainCallable(const StopScdnDomainRequest &request)
{
auto task = std::make_shared<std::packaged_task<StopScdnDomainOutcome()>>(
[this, request]()
{
return this->StopScdnDomain(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::UpdateDomainConfigOutcome CdnClient::UpdateDomainConfig(const UpdateDomainConfigRequest &request)
{
auto outcome = MakeRequest(request, "UpdateDomainConfig");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
UpdateDomainConfigResponse rsp = UpdateDomainConfigResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return UpdateDomainConfigOutcome(rsp);
else
return UpdateDomainConfigOutcome(o.GetError());
}
else
{
return UpdateDomainConfigOutcome(outcome.GetError());
}
}
void CdnClient::UpdateDomainConfigAsync(const UpdateDomainConfigRequest& request, const UpdateDomainConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->UpdateDomainConfig(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::UpdateDomainConfigOutcomeCallable CdnClient::UpdateDomainConfigCallable(const UpdateDomainConfigRequest &request)
{
auto task = std::make_shared<std::packaged_task<UpdateDomainConfigOutcome()>>(
[this, request]()
{
return this->UpdateDomainConfig(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::UpdateImageConfigOutcome CdnClient::UpdateImageConfig(const UpdateImageConfigRequest &request)
{
auto outcome = MakeRequest(request, "UpdateImageConfig");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
UpdateImageConfigResponse rsp = UpdateImageConfigResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return UpdateImageConfigOutcome(rsp);
else
return UpdateImageConfigOutcome(o.GetError());
}
else
{
return UpdateImageConfigOutcome(outcome.GetError());
}
}
void CdnClient::UpdateImageConfigAsync(const UpdateImageConfigRequest& request, const UpdateImageConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->UpdateImageConfig(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::UpdateImageConfigOutcomeCallable CdnClient::UpdateImageConfigCallable(const UpdateImageConfigRequest &request)
{
auto task = std::make_shared<std::packaged_task<UpdateImageConfigOutcome()>>(
[this, request]()
{
return this->UpdateImageConfig(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::UpdatePayTypeOutcome CdnClient::UpdatePayType(const UpdatePayTypeRequest &request)
{
auto outcome = MakeRequest(request, "UpdatePayType");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
UpdatePayTypeResponse rsp = UpdatePayTypeResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return UpdatePayTypeOutcome(rsp);
else
return UpdatePayTypeOutcome(o.GetError());
}
else
{
return UpdatePayTypeOutcome(outcome.GetError());
}
}
void CdnClient::UpdatePayTypeAsync(const UpdatePayTypeRequest& request, const UpdatePayTypeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->UpdatePayType(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::UpdatePayTypeOutcomeCallable CdnClient::UpdatePayTypeCallable(const UpdatePayTypeRequest &request)
{
auto task = std::make_shared<std::packaged_task<UpdatePayTypeOutcome()>>(
[this, request]()
{
return this->UpdatePayType(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::UpdateScdnDomainOutcome CdnClient::UpdateScdnDomain(const UpdateScdnDomainRequest &request)
{
auto outcome = MakeRequest(request, "UpdateScdnDomain");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
UpdateScdnDomainResponse rsp = UpdateScdnDomainResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return UpdateScdnDomainOutcome(rsp);
else
return UpdateScdnDomainOutcome(o.GetError());
}
else
{
return UpdateScdnDomainOutcome(outcome.GetError());
}
}
void CdnClient::UpdateScdnDomainAsync(const UpdateScdnDomainRequest& request, const UpdateScdnDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->UpdateScdnDomain(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::UpdateScdnDomainOutcomeCallable CdnClient::UpdateScdnDomainCallable(const UpdateScdnDomainRequest &request)
{
auto task = std::make_shared<std::packaged_task<UpdateScdnDomainOutcome()>>(
[this, request]()
{
return this->UpdateScdnDomain(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CdnClient::VerifyDomainRecordOutcome CdnClient::VerifyDomainRecord(const VerifyDomainRecordRequest &request)
{
auto outcome = MakeRequest(request, "VerifyDomainRecord");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
VerifyDomainRecordResponse rsp = VerifyDomainRecordResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return VerifyDomainRecordOutcome(rsp);
else
return VerifyDomainRecordOutcome(o.GetError());
}
else
{
return VerifyDomainRecordOutcome(outcome.GetError());
}
}
void CdnClient::VerifyDomainRecordAsync(const VerifyDomainRecordRequest& request, const VerifyDomainRecordAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->VerifyDomainRecord(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
CdnClient::VerifyDomainRecordOutcomeCallable CdnClient::VerifyDomainRecordCallable(const VerifyDomainRecordRequest &request)
{
auto task = std::make_shared<std::packaged_task<VerifyDomainRecordOutcome()>>(
[this, request]()
{
return this->VerifyDomainRecord(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}