Fetch the repository succeeded.
/*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <tencentcloud/ecm/v20190719/EcmClient.h>
#include <tencentcloud/core/Executor.h>
#include <tencentcloud/core/Runnable.h>
using namespace TencentCloud;
using namespace TencentCloud::Ecm::V20190719;
using namespace TencentCloud::Ecm::V20190719::Model;
using namespace std;
namespace
{
const string VERSION = "2019-07-19";
const string ENDPOINT = "ecm.tencentcloudapi.com";
}
EcmClient::EcmClient(const Credential &credential, const string ®ion) :
EcmClient(credential, region, ClientProfile())
{
}
EcmClient::EcmClient(const Credential &credential, const string ®ion, const ClientProfile &profile) :
AbstractClient(ENDPOINT, VERSION, credential, region, profile)
{
}
EcmClient::AllocateAddressesOutcome EcmClient::AllocateAddresses(const AllocateAddressesRequest &request)
{
auto outcome = MakeRequest(request, "AllocateAddresses");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
AllocateAddressesResponse rsp = AllocateAddressesResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return AllocateAddressesOutcome(rsp);
else
return AllocateAddressesOutcome(o.GetError());
}
else
{
return AllocateAddressesOutcome(outcome.GetError());
}
}
void EcmClient::AllocateAddressesAsync(const AllocateAddressesRequest& request, const AllocateAddressesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->AllocateAddresses(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::AllocateAddressesOutcomeCallable EcmClient::AllocateAddressesCallable(const AllocateAddressesRequest &request)
{
auto task = std::make_shared<std::packaged_task<AllocateAddressesOutcome()>>(
[this, request]()
{
return this->AllocateAddresses(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::AllocateIpv6AddressesBandwidthOutcome EcmClient::AllocateIpv6AddressesBandwidth(const AllocateIpv6AddressesBandwidthRequest &request)
{
auto outcome = MakeRequest(request, "AllocateIpv6AddressesBandwidth");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
AllocateIpv6AddressesBandwidthResponse rsp = AllocateIpv6AddressesBandwidthResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return AllocateIpv6AddressesBandwidthOutcome(rsp);
else
return AllocateIpv6AddressesBandwidthOutcome(o.GetError());
}
else
{
return AllocateIpv6AddressesBandwidthOutcome(outcome.GetError());
}
}
void EcmClient::AllocateIpv6AddressesBandwidthAsync(const AllocateIpv6AddressesBandwidthRequest& request, const AllocateIpv6AddressesBandwidthAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->AllocateIpv6AddressesBandwidth(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::AllocateIpv6AddressesBandwidthOutcomeCallable EcmClient::AllocateIpv6AddressesBandwidthCallable(const AllocateIpv6AddressesBandwidthRequest &request)
{
auto task = std::make_shared<std::packaged_task<AllocateIpv6AddressesBandwidthOutcome()>>(
[this, request]()
{
return this->AllocateIpv6AddressesBandwidth(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::AssignIpv6AddressesOutcome EcmClient::AssignIpv6Addresses(const AssignIpv6AddressesRequest &request)
{
auto outcome = MakeRequest(request, "AssignIpv6Addresses");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
AssignIpv6AddressesResponse rsp = AssignIpv6AddressesResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return AssignIpv6AddressesOutcome(rsp);
else
return AssignIpv6AddressesOutcome(o.GetError());
}
else
{
return AssignIpv6AddressesOutcome(outcome.GetError());
}
}
void EcmClient::AssignIpv6AddressesAsync(const AssignIpv6AddressesRequest& request, const AssignIpv6AddressesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->AssignIpv6Addresses(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::AssignIpv6AddressesOutcomeCallable EcmClient::AssignIpv6AddressesCallable(const AssignIpv6AddressesRequest &request)
{
auto task = std::make_shared<std::packaged_task<AssignIpv6AddressesOutcome()>>(
[this, request]()
{
return this->AssignIpv6Addresses(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::AssignIpv6CidrBlockOutcome EcmClient::AssignIpv6CidrBlock(const AssignIpv6CidrBlockRequest &request)
{
auto outcome = MakeRequest(request, "AssignIpv6CidrBlock");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
AssignIpv6CidrBlockResponse rsp = AssignIpv6CidrBlockResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return AssignIpv6CidrBlockOutcome(rsp);
else
return AssignIpv6CidrBlockOutcome(o.GetError());
}
else
{
return AssignIpv6CidrBlockOutcome(outcome.GetError());
}
}
void EcmClient::AssignIpv6CidrBlockAsync(const AssignIpv6CidrBlockRequest& request, const AssignIpv6CidrBlockAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->AssignIpv6CidrBlock(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::AssignIpv6CidrBlockOutcomeCallable EcmClient::AssignIpv6CidrBlockCallable(const AssignIpv6CidrBlockRequest &request)
{
auto task = std::make_shared<std::packaged_task<AssignIpv6CidrBlockOutcome()>>(
[this, request]()
{
return this->AssignIpv6CidrBlock(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::AssignIpv6CidrBlocksOutcome EcmClient::AssignIpv6CidrBlocks(const AssignIpv6CidrBlocksRequest &request)
{
auto outcome = MakeRequest(request, "AssignIpv6CidrBlocks");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
AssignIpv6CidrBlocksResponse rsp = AssignIpv6CidrBlocksResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return AssignIpv6CidrBlocksOutcome(rsp);
else
return AssignIpv6CidrBlocksOutcome(o.GetError());
}
else
{
return AssignIpv6CidrBlocksOutcome(outcome.GetError());
}
}
void EcmClient::AssignIpv6CidrBlocksAsync(const AssignIpv6CidrBlocksRequest& request, const AssignIpv6CidrBlocksAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->AssignIpv6CidrBlocks(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::AssignIpv6CidrBlocksOutcomeCallable EcmClient::AssignIpv6CidrBlocksCallable(const AssignIpv6CidrBlocksRequest &request)
{
auto task = std::make_shared<std::packaged_task<AssignIpv6CidrBlocksOutcome()>>(
[this, request]()
{
return this->AssignIpv6CidrBlocks(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::AssignIpv6SubnetCidrBlockOutcome EcmClient::AssignIpv6SubnetCidrBlock(const AssignIpv6SubnetCidrBlockRequest &request)
{
auto outcome = MakeRequest(request, "AssignIpv6SubnetCidrBlock");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
AssignIpv6SubnetCidrBlockResponse rsp = AssignIpv6SubnetCidrBlockResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return AssignIpv6SubnetCidrBlockOutcome(rsp);
else
return AssignIpv6SubnetCidrBlockOutcome(o.GetError());
}
else
{
return AssignIpv6SubnetCidrBlockOutcome(outcome.GetError());
}
}
void EcmClient::AssignIpv6SubnetCidrBlockAsync(const AssignIpv6SubnetCidrBlockRequest& request, const AssignIpv6SubnetCidrBlockAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->AssignIpv6SubnetCidrBlock(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::AssignIpv6SubnetCidrBlockOutcomeCallable EcmClient::AssignIpv6SubnetCidrBlockCallable(const AssignIpv6SubnetCidrBlockRequest &request)
{
auto task = std::make_shared<std::packaged_task<AssignIpv6SubnetCidrBlockOutcome()>>(
[this, request]()
{
return this->AssignIpv6SubnetCidrBlock(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::AssignPrivateIpAddressesOutcome EcmClient::AssignPrivateIpAddresses(const AssignPrivateIpAddressesRequest &request)
{
auto outcome = MakeRequest(request, "AssignPrivateIpAddresses");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
AssignPrivateIpAddressesResponse rsp = AssignPrivateIpAddressesResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return AssignPrivateIpAddressesOutcome(rsp);
else
return AssignPrivateIpAddressesOutcome(o.GetError());
}
else
{
return AssignPrivateIpAddressesOutcome(outcome.GetError());
}
}
void EcmClient::AssignPrivateIpAddressesAsync(const AssignPrivateIpAddressesRequest& request, const AssignPrivateIpAddressesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->AssignPrivateIpAddresses(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::AssignPrivateIpAddressesOutcomeCallable EcmClient::AssignPrivateIpAddressesCallable(const AssignPrivateIpAddressesRequest &request)
{
auto task = std::make_shared<std::packaged_task<AssignPrivateIpAddressesOutcome()>>(
[this, request]()
{
return this->AssignPrivateIpAddresses(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::AssociateAddressOutcome EcmClient::AssociateAddress(const AssociateAddressRequest &request)
{
auto outcome = MakeRequest(request, "AssociateAddress");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
AssociateAddressResponse rsp = AssociateAddressResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return AssociateAddressOutcome(rsp);
else
return AssociateAddressOutcome(o.GetError());
}
else
{
return AssociateAddressOutcome(outcome.GetError());
}
}
void EcmClient::AssociateAddressAsync(const AssociateAddressRequest& request, const AssociateAddressAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->AssociateAddress(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::AssociateAddressOutcomeCallable EcmClient::AssociateAddressCallable(const AssociateAddressRequest &request)
{
auto task = std::make_shared<std::packaged_task<AssociateAddressOutcome()>>(
[this, request]()
{
return this->AssociateAddress(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::AssociateSecurityGroupsOutcome EcmClient::AssociateSecurityGroups(const AssociateSecurityGroupsRequest &request)
{
auto outcome = MakeRequest(request, "AssociateSecurityGroups");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
AssociateSecurityGroupsResponse rsp = AssociateSecurityGroupsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return AssociateSecurityGroupsOutcome(rsp);
else
return AssociateSecurityGroupsOutcome(o.GetError());
}
else
{
return AssociateSecurityGroupsOutcome(outcome.GetError());
}
}
void EcmClient::AssociateSecurityGroupsAsync(const AssociateSecurityGroupsRequest& request, const AssociateSecurityGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->AssociateSecurityGroups(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::AssociateSecurityGroupsOutcomeCallable EcmClient::AssociateSecurityGroupsCallable(const AssociateSecurityGroupsRequest &request)
{
auto task = std::make_shared<std::packaged_task<AssociateSecurityGroupsOutcome()>>(
[this, request]()
{
return this->AssociateSecurityGroups(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::AttachDisksOutcome EcmClient::AttachDisks(const AttachDisksRequest &request)
{
auto outcome = MakeRequest(request, "AttachDisks");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
AttachDisksResponse rsp = AttachDisksResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return AttachDisksOutcome(rsp);
else
return AttachDisksOutcome(o.GetError());
}
else
{
return AttachDisksOutcome(outcome.GetError());
}
}
void EcmClient::AttachDisksAsync(const AttachDisksRequest& request, const AttachDisksAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->AttachDisks(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::AttachDisksOutcomeCallable EcmClient::AttachDisksCallable(const AttachDisksRequest &request)
{
auto task = std::make_shared<std::packaged_task<AttachDisksOutcome()>>(
[this, request]()
{
return this->AttachDisks(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::AttachNetworkInterfaceOutcome EcmClient::AttachNetworkInterface(const AttachNetworkInterfaceRequest &request)
{
auto outcome = MakeRequest(request, "AttachNetworkInterface");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
AttachNetworkInterfaceResponse rsp = AttachNetworkInterfaceResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return AttachNetworkInterfaceOutcome(rsp);
else
return AttachNetworkInterfaceOutcome(o.GetError());
}
else
{
return AttachNetworkInterfaceOutcome(outcome.GetError());
}
}
void EcmClient::AttachNetworkInterfaceAsync(const AttachNetworkInterfaceRequest& request, const AttachNetworkInterfaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->AttachNetworkInterface(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::AttachNetworkInterfaceOutcomeCallable EcmClient::AttachNetworkInterfaceCallable(const AttachNetworkInterfaceRequest &request)
{
auto task = std::make_shared<std::packaged_task<AttachNetworkInterfaceOutcome()>>(
[this, request]()
{
return this->AttachNetworkInterface(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::BatchDeregisterTargetsOutcome EcmClient::BatchDeregisterTargets(const BatchDeregisterTargetsRequest &request)
{
auto outcome = MakeRequest(request, "BatchDeregisterTargets");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
BatchDeregisterTargetsResponse rsp = BatchDeregisterTargetsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return BatchDeregisterTargetsOutcome(rsp);
else
return BatchDeregisterTargetsOutcome(o.GetError());
}
else
{
return BatchDeregisterTargetsOutcome(outcome.GetError());
}
}
void EcmClient::BatchDeregisterTargetsAsync(const BatchDeregisterTargetsRequest& request, const BatchDeregisterTargetsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->BatchDeregisterTargets(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::BatchDeregisterTargetsOutcomeCallable EcmClient::BatchDeregisterTargetsCallable(const BatchDeregisterTargetsRequest &request)
{
auto task = std::make_shared<std::packaged_task<BatchDeregisterTargetsOutcome()>>(
[this, request]()
{
return this->BatchDeregisterTargets(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::BatchModifyTargetWeightOutcome EcmClient::BatchModifyTargetWeight(const BatchModifyTargetWeightRequest &request)
{
auto outcome = MakeRequest(request, "BatchModifyTargetWeight");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
BatchModifyTargetWeightResponse rsp = BatchModifyTargetWeightResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return BatchModifyTargetWeightOutcome(rsp);
else
return BatchModifyTargetWeightOutcome(o.GetError());
}
else
{
return BatchModifyTargetWeightOutcome(outcome.GetError());
}
}
void EcmClient::BatchModifyTargetWeightAsync(const BatchModifyTargetWeightRequest& request, const BatchModifyTargetWeightAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->BatchModifyTargetWeight(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::BatchModifyTargetWeightOutcomeCallable EcmClient::BatchModifyTargetWeightCallable(const BatchModifyTargetWeightRequest &request)
{
auto task = std::make_shared<std::packaged_task<BatchModifyTargetWeightOutcome()>>(
[this, request]()
{
return this->BatchModifyTargetWeight(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::BatchRegisterTargetsOutcome EcmClient::BatchRegisterTargets(const BatchRegisterTargetsRequest &request)
{
auto outcome = MakeRequest(request, "BatchRegisterTargets");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
BatchRegisterTargetsResponse rsp = BatchRegisterTargetsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return BatchRegisterTargetsOutcome(rsp);
else
return BatchRegisterTargetsOutcome(o.GetError());
}
else
{
return BatchRegisterTargetsOutcome(outcome.GetError());
}
}
void EcmClient::BatchRegisterTargetsAsync(const BatchRegisterTargetsRequest& request, const BatchRegisterTargetsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->BatchRegisterTargets(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::BatchRegisterTargetsOutcomeCallable EcmClient::BatchRegisterTargetsCallable(const BatchRegisterTargetsRequest &request)
{
auto task = std::make_shared<std::packaged_task<BatchRegisterTargetsOutcome()>>(
[this, request]()
{
return this->BatchRegisterTargets(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::CreateDisksOutcome EcmClient::CreateDisks(const CreateDisksRequest &request)
{
auto outcome = MakeRequest(request, "CreateDisks");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateDisksResponse rsp = CreateDisksResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateDisksOutcome(rsp);
else
return CreateDisksOutcome(o.GetError());
}
else
{
return CreateDisksOutcome(outcome.GetError());
}
}
void EcmClient::CreateDisksAsync(const CreateDisksRequest& request, const CreateDisksAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateDisks(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::CreateDisksOutcomeCallable EcmClient::CreateDisksCallable(const CreateDisksRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateDisksOutcome()>>(
[this, request]()
{
return this->CreateDisks(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::CreateHaVipOutcome EcmClient::CreateHaVip(const CreateHaVipRequest &request)
{
auto outcome = MakeRequest(request, "CreateHaVip");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateHaVipResponse rsp = CreateHaVipResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateHaVipOutcome(rsp);
else
return CreateHaVipOutcome(o.GetError());
}
else
{
return CreateHaVipOutcome(outcome.GetError());
}
}
void EcmClient::CreateHaVipAsync(const CreateHaVipRequest& request, const CreateHaVipAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateHaVip(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::CreateHaVipOutcomeCallable EcmClient::CreateHaVipCallable(const CreateHaVipRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateHaVipOutcome()>>(
[this, request]()
{
return this->CreateHaVip(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::CreateImageOutcome EcmClient::CreateImage(const CreateImageRequest &request)
{
auto outcome = MakeRequest(request, "CreateImage");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateImageResponse rsp = CreateImageResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateImageOutcome(rsp);
else
return CreateImageOutcome(o.GetError());
}
else
{
return CreateImageOutcome(outcome.GetError());
}
}
void EcmClient::CreateImageAsync(const CreateImageRequest& request, const CreateImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateImage(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::CreateImageOutcomeCallable EcmClient::CreateImageCallable(const CreateImageRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateImageOutcome()>>(
[this, request]()
{
return this->CreateImage(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::CreateKeyPairOutcome EcmClient::CreateKeyPair(const CreateKeyPairRequest &request)
{
auto outcome = MakeRequest(request, "CreateKeyPair");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateKeyPairResponse rsp = CreateKeyPairResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateKeyPairOutcome(rsp);
else
return CreateKeyPairOutcome(o.GetError());
}
else
{
return CreateKeyPairOutcome(outcome.GetError());
}
}
void EcmClient::CreateKeyPairAsync(const CreateKeyPairRequest& request, const CreateKeyPairAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateKeyPair(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::CreateKeyPairOutcomeCallable EcmClient::CreateKeyPairCallable(const CreateKeyPairRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateKeyPairOutcome()>>(
[this, request]()
{
return this->CreateKeyPair(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::CreateListenerOutcome EcmClient::CreateListener(const CreateListenerRequest &request)
{
auto outcome = MakeRequest(request, "CreateListener");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateListenerResponse rsp = CreateListenerResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateListenerOutcome(rsp);
else
return CreateListenerOutcome(o.GetError());
}
else
{
return CreateListenerOutcome(outcome.GetError());
}
}
void EcmClient::CreateListenerAsync(const CreateListenerRequest& request, const CreateListenerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateListener(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::CreateListenerOutcomeCallable EcmClient::CreateListenerCallable(const CreateListenerRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateListenerOutcome()>>(
[this, request]()
{
return this->CreateListener(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::CreateLoadBalancerOutcome EcmClient::CreateLoadBalancer(const CreateLoadBalancerRequest &request)
{
auto outcome = MakeRequest(request, "CreateLoadBalancer");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateLoadBalancerResponse rsp = CreateLoadBalancerResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateLoadBalancerOutcome(rsp);
else
return CreateLoadBalancerOutcome(o.GetError());
}
else
{
return CreateLoadBalancerOutcome(outcome.GetError());
}
}
void EcmClient::CreateLoadBalancerAsync(const CreateLoadBalancerRequest& request, const CreateLoadBalancerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateLoadBalancer(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::CreateLoadBalancerOutcomeCallable EcmClient::CreateLoadBalancerCallable(const CreateLoadBalancerRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateLoadBalancerOutcome()>>(
[this, request]()
{
return this->CreateLoadBalancer(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::CreateModuleOutcome EcmClient::CreateModule(const CreateModuleRequest &request)
{
auto outcome = MakeRequest(request, "CreateModule");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateModuleResponse rsp = CreateModuleResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateModuleOutcome(rsp);
else
return CreateModuleOutcome(o.GetError());
}
else
{
return CreateModuleOutcome(outcome.GetError());
}
}
void EcmClient::CreateModuleAsync(const CreateModuleRequest& request, const CreateModuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateModule(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::CreateModuleOutcomeCallable EcmClient::CreateModuleCallable(const CreateModuleRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateModuleOutcome()>>(
[this, request]()
{
return this->CreateModule(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::CreateNetworkInterfaceOutcome EcmClient::CreateNetworkInterface(const CreateNetworkInterfaceRequest &request)
{
auto outcome = MakeRequest(request, "CreateNetworkInterface");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateNetworkInterfaceResponse rsp = CreateNetworkInterfaceResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateNetworkInterfaceOutcome(rsp);
else
return CreateNetworkInterfaceOutcome(o.GetError());
}
else
{
return CreateNetworkInterfaceOutcome(outcome.GetError());
}
}
void EcmClient::CreateNetworkInterfaceAsync(const CreateNetworkInterfaceRequest& request, const CreateNetworkInterfaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateNetworkInterface(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::CreateNetworkInterfaceOutcomeCallable EcmClient::CreateNetworkInterfaceCallable(const CreateNetworkInterfaceRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateNetworkInterfaceOutcome()>>(
[this, request]()
{
return this->CreateNetworkInterface(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::CreateRouteTableOutcome EcmClient::CreateRouteTable(const CreateRouteTableRequest &request)
{
auto outcome = MakeRequest(request, "CreateRouteTable");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateRouteTableResponse rsp = CreateRouteTableResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateRouteTableOutcome(rsp);
else
return CreateRouteTableOutcome(o.GetError());
}
else
{
return CreateRouteTableOutcome(outcome.GetError());
}
}
void EcmClient::CreateRouteTableAsync(const CreateRouteTableRequest& request, const CreateRouteTableAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateRouteTable(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::CreateRouteTableOutcomeCallable EcmClient::CreateRouteTableCallable(const CreateRouteTableRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateRouteTableOutcome()>>(
[this, request]()
{
return this->CreateRouteTable(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::CreateRoutesOutcome EcmClient::CreateRoutes(const CreateRoutesRequest &request)
{
auto outcome = MakeRequest(request, "CreateRoutes");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateRoutesResponse rsp = CreateRoutesResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateRoutesOutcome(rsp);
else
return CreateRoutesOutcome(o.GetError());
}
else
{
return CreateRoutesOutcome(outcome.GetError());
}
}
void EcmClient::CreateRoutesAsync(const CreateRoutesRequest& request, const CreateRoutesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateRoutes(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::CreateRoutesOutcomeCallable EcmClient::CreateRoutesCallable(const CreateRoutesRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateRoutesOutcome()>>(
[this, request]()
{
return this->CreateRoutes(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::CreateSecurityGroupOutcome EcmClient::CreateSecurityGroup(const CreateSecurityGroupRequest &request)
{
auto outcome = MakeRequest(request, "CreateSecurityGroup");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateSecurityGroupResponse rsp = CreateSecurityGroupResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateSecurityGroupOutcome(rsp);
else
return CreateSecurityGroupOutcome(o.GetError());
}
else
{
return CreateSecurityGroupOutcome(outcome.GetError());
}
}
void EcmClient::CreateSecurityGroupAsync(const CreateSecurityGroupRequest& request, const CreateSecurityGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateSecurityGroup(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::CreateSecurityGroupOutcomeCallable EcmClient::CreateSecurityGroupCallable(const CreateSecurityGroupRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateSecurityGroupOutcome()>>(
[this, request]()
{
return this->CreateSecurityGroup(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::CreateSecurityGroupPoliciesOutcome EcmClient::CreateSecurityGroupPolicies(const CreateSecurityGroupPoliciesRequest &request)
{
auto outcome = MakeRequest(request, "CreateSecurityGroupPolicies");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateSecurityGroupPoliciesResponse rsp = CreateSecurityGroupPoliciesResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateSecurityGroupPoliciesOutcome(rsp);
else
return CreateSecurityGroupPoliciesOutcome(o.GetError());
}
else
{
return CreateSecurityGroupPoliciesOutcome(outcome.GetError());
}
}
void EcmClient::CreateSecurityGroupPoliciesAsync(const CreateSecurityGroupPoliciesRequest& request, const CreateSecurityGroupPoliciesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateSecurityGroupPolicies(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::CreateSecurityGroupPoliciesOutcomeCallable EcmClient::CreateSecurityGroupPoliciesCallable(const CreateSecurityGroupPoliciesRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateSecurityGroupPoliciesOutcome()>>(
[this, request]()
{
return this->CreateSecurityGroupPolicies(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::CreateSubnetOutcome EcmClient::CreateSubnet(const CreateSubnetRequest &request)
{
auto outcome = MakeRequest(request, "CreateSubnet");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateSubnetResponse rsp = CreateSubnetResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateSubnetOutcome(rsp);
else
return CreateSubnetOutcome(o.GetError());
}
else
{
return CreateSubnetOutcome(outcome.GetError());
}
}
void EcmClient::CreateSubnetAsync(const CreateSubnetRequest& request, const CreateSubnetAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateSubnet(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::CreateSubnetOutcomeCallable EcmClient::CreateSubnetCallable(const CreateSubnetRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateSubnetOutcome()>>(
[this, request]()
{
return this->CreateSubnet(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::CreateVpcOutcome EcmClient::CreateVpc(const CreateVpcRequest &request)
{
auto outcome = MakeRequest(request, "CreateVpc");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
CreateVpcResponse rsp = CreateVpcResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return CreateVpcOutcome(rsp);
else
return CreateVpcOutcome(o.GetError());
}
else
{
return CreateVpcOutcome(outcome.GetError());
}
}
void EcmClient::CreateVpcAsync(const CreateVpcRequest& request, const CreateVpcAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->CreateVpc(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::CreateVpcOutcomeCallable EcmClient::CreateVpcCallable(const CreateVpcRequest &request)
{
auto task = std::make_shared<std::packaged_task<CreateVpcOutcome()>>(
[this, request]()
{
return this->CreateVpc(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DeleteHaVipOutcome EcmClient::DeleteHaVip(const DeleteHaVipRequest &request)
{
auto outcome = MakeRequest(request, "DeleteHaVip");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteHaVipResponse rsp = DeleteHaVipResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteHaVipOutcome(rsp);
else
return DeleteHaVipOutcome(o.GetError());
}
else
{
return DeleteHaVipOutcome(outcome.GetError());
}
}
void EcmClient::DeleteHaVipAsync(const DeleteHaVipRequest& request, const DeleteHaVipAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteHaVip(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DeleteHaVipOutcomeCallable EcmClient::DeleteHaVipCallable(const DeleteHaVipRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteHaVipOutcome()>>(
[this, request]()
{
return this->DeleteHaVip(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DeleteImageOutcome EcmClient::DeleteImage(const DeleteImageRequest &request)
{
auto outcome = MakeRequest(request, "DeleteImage");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteImageResponse rsp = DeleteImageResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteImageOutcome(rsp);
else
return DeleteImageOutcome(o.GetError());
}
else
{
return DeleteImageOutcome(outcome.GetError());
}
}
void EcmClient::DeleteImageAsync(const DeleteImageRequest& request, const DeleteImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteImage(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DeleteImageOutcomeCallable EcmClient::DeleteImageCallable(const DeleteImageRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteImageOutcome()>>(
[this, request]()
{
return this->DeleteImage(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DeleteListenerOutcome EcmClient::DeleteListener(const DeleteListenerRequest &request)
{
auto outcome = MakeRequest(request, "DeleteListener");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteListenerResponse rsp = DeleteListenerResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteListenerOutcome(rsp);
else
return DeleteListenerOutcome(o.GetError());
}
else
{
return DeleteListenerOutcome(outcome.GetError());
}
}
void EcmClient::DeleteListenerAsync(const DeleteListenerRequest& request, const DeleteListenerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteListener(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DeleteListenerOutcomeCallable EcmClient::DeleteListenerCallable(const DeleteListenerRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteListenerOutcome()>>(
[this, request]()
{
return this->DeleteListener(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DeleteLoadBalancerOutcome EcmClient::DeleteLoadBalancer(const DeleteLoadBalancerRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLoadBalancer");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLoadBalancerResponse rsp = DeleteLoadBalancerResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLoadBalancerOutcome(rsp);
else
return DeleteLoadBalancerOutcome(o.GetError());
}
else
{
return DeleteLoadBalancerOutcome(outcome.GetError());
}
}
void EcmClient::DeleteLoadBalancerAsync(const DeleteLoadBalancerRequest& request, const DeleteLoadBalancerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLoadBalancer(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DeleteLoadBalancerOutcomeCallable EcmClient::DeleteLoadBalancerCallable(const DeleteLoadBalancerRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLoadBalancerOutcome()>>(
[this, request]()
{
return this->DeleteLoadBalancer(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DeleteLoadBalancerListenersOutcome EcmClient::DeleteLoadBalancerListeners(const DeleteLoadBalancerListenersRequest &request)
{
auto outcome = MakeRequest(request, "DeleteLoadBalancerListeners");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteLoadBalancerListenersResponse rsp = DeleteLoadBalancerListenersResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteLoadBalancerListenersOutcome(rsp);
else
return DeleteLoadBalancerListenersOutcome(o.GetError());
}
else
{
return DeleteLoadBalancerListenersOutcome(outcome.GetError());
}
}
void EcmClient::DeleteLoadBalancerListenersAsync(const DeleteLoadBalancerListenersRequest& request, const DeleteLoadBalancerListenersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteLoadBalancerListeners(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DeleteLoadBalancerListenersOutcomeCallable EcmClient::DeleteLoadBalancerListenersCallable(const DeleteLoadBalancerListenersRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteLoadBalancerListenersOutcome()>>(
[this, request]()
{
return this->DeleteLoadBalancerListeners(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DeleteModuleOutcome EcmClient::DeleteModule(const DeleteModuleRequest &request)
{
auto outcome = MakeRequest(request, "DeleteModule");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteModuleResponse rsp = DeleteModuleResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteModuleOutcome(rsp);
else
return DeleteModuleOutcome(o.GetError());
}
else
{
return DeleteModuleOutcome(outcome.GetError());
}
}
void EcmClient::DeleteModuleAsync(const DeleteModuleRequest& request, const DeleteModuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteModule(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DeleteModuleOutcomeCallable EcmClient::DeleteModuleCallable(const DeleteModuleRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteModuleOutcome()>>(
[this, request]()
{
return this->DeleteModule(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DeleteNetworkInterfaceOutcome EcmClient::DeleteNetworkInterface(const DeleteNetworkInterfaceRequest &request)
{
auto outcome = MakeRequest(request, "DeleteNetworkInterface");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteNetworkInterfaceResponse rsp = DeleteNetworkInterfaceResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteNetworkInterfaceOutcome(rsp);
else
return DeleteNetworkInterfaceOutcome(o.GetError());
}
else
{
return DeleteNetworkInterfaceOutcome(outcome.GetError());
}
}
void EcmClient::DeleteNetworkInterfaceAsync(const DeleteNetworkInterfaceRequest& request, const DeleteNetworkInterfaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteNetworkInterface(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DeleteNetworkInterfaceOutcomeCallable EcmClient::DeleteNetworkInterfaceCallable(const DeleteNetworkInterfaceRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteNetworkInterfaceOutcome()>>(
[this, request]()
{
return this->DeleteNetworkInterface(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DeleteRouteTableOutcome EcmClient::DeleteRouteTable(const DeleteRouteTableRequest &request)
{
auto outcome = MakeRequest(request, "DeleteRouteTable");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteRouteTableResponse rsp = DeleteRouteTableResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteRouteTableOutcome(rsp);
else
return DeleteRouteTableOutcome(o.GetError());
}
else
{
return DeleteRouteTableOutcome(outcome.GetError());
}
}
void EcmClient::DeleteRouteTableAsync(const DeleteRouteTableRequest& request, const DeleteRouteTableAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteRouteTable(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DeleteRouteTableOutcomeCallable EcmClient::DeleteRouteTableCallable(const DeleteRouteTableRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteRouteTableOutcome()>>(
[this, request]()
{
return this->DeleteRouteTable(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DeleteRoutesOutcome EcmClient::DeleteRoutes(const DeleteRoutesRequest &request)
{
auto outcome = MakeRequest(request, "DeleteRoutes");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteRoutesResponse rsp = DeleteRoutesResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteRoutesOutcome(rsp);
else
return DeleteRoutesOutcome(o.GetError());
}
else
{
return DeleteRoutesOutcome(outcome.GetError());
}
}
void EcmClient::DeleteRoutesAsync(const DeleteRoutesRequest& request, const DeleteRoutesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteRoutes(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DeleteRoutesOutcomeCallable EcmClient::DeleteRoutesCallable(const DeleteRoutesRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteRoutesOutcome()>>(
[this, request]()
{
return this->DeleteRoutes(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DeleteSecurityGroupOutcome EcmClient::DeleteSecurityGroup(const DeleteSecurityGroupRequest &request)
{
auto outcome = MakeRequest(request, "DeleteSecurityGroup");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteSecurityGroupResponse rsp = DeleteSecurityGroupResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteSecurityGroupOutcome(rsp);
else
return DeleteSecurityGroupOutcome(o.GetError());
}
else
{
return DeleteSecurityGroupOutcome(outcome.GetError());
}
}
void EcmClient::DeleteSecurityGroupAsync(const DeleteSecurityGroupRequest& request, const DeleteSecurityGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteSecurityGroup(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DeleteSecurityGroupOutcomeCallable EcmClient::DeleteSecurityGroupCallable(const DeleteSecurityGroupRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteSecurityGroupOutcome()>>(
[this, request]()
{
return this->DeleteSecurityGroup(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DeleteSecurityGroupPoliciesOutcome EcmClient::DeleteSecurityGroupPolicies(const DeleteSecurityGroupPoliciesRequest &request)
{
auto outcome = MakeRequest(request, "DeleteSecurityGroupPolicies");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteSecurityGroupPoliciesResponse rsp = DeleteSecurityGroupPoliciesResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteSecurityGroupPoliciesOutcome(rsp);
else
return DeleteSecurityGroupPoliciesOutcome(o.GetError());
}
else
{
return DeleteSecurityGroupPoliciesOutcome(outcome.GetError());
}
}
void EcmClient::DeleteSecurityGroupPoliciesAsync(const DeleteSecurityGroupPoliciesRequest& request, const DeleteSecurityGroupPoliciesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteSecurityGroupPolicies(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DeleteSecurityGroupPoliciesOutcomeCallable EcmClient::DeleteSecurityGroupPoliciesCallable(const DeleteSecurityGroupPoliciesRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteSecurityGroupPoliciesOutcome()>>(
[this, request]()
{
return this->DeleteSecurityGroupPolicies(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DeleteSnapshotsOutcome EcmClient::DeleteSnapshots(const DeleteSnapshotsRequest &request)
{
auto outcome = MakeRequest(request, "DeleteSnapshots");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteSnapshotsResponse rsp = DeleteSnapshotsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteSnapshotsOutcome(rsp);
else
return DeleteSnapshotsOutcome(o.GetError());
}
else
{
return DeleteSnapshotsOutcome(outcome.GetError());
}
}
void EcmClient::DeleteSnapshotsAsync(const DeleteSnapshotsRequest& request, const DeleteSnapshotsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteSnapshots(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DeleteSnapshotsOutcomeCallable EcmClient::DeleteSnapshotsCallable(const DeleteSnapshotsRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteSnapshotsOutcome()>>(
[this, request]()
{
return this->DeleteSnapshots(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DeleteSubnetOutcome EcmClient::DeleteSubnet(const DeleteSubnetRequest &request)
{
auto outcome = MakeRequest(request, "DeleteSubnet");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteSubnetResponse rsp = DeleteSubnetResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteSubnetOutcome(rsp);
else
return DeleteSubnetOutcome(o.GetError());
}
else
{
return DeleteSubnetOutcome(outcome.GetError());
}
}
void EcmClient::DeleteSubnetAsync(const DeleteSubnetRequest& request, const DeleteSubnetAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteSubnet(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DeleteSubnetOutcomeCallable EcmClient::DeleteSubnetCallable(const DeleteSubnetRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteSubnetOutcome()>>(
[this, request]()
{
return this->DeleteSubnet(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DeleteVpcOutcome EcmClient::DeleteVpc(const DeleteVpcRequest &request)
{
auto outcome = MakeRequest(request, "DeleteVpc");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DeleteVpcResponse rsp = DeleteVpcResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DeleteVpcOutcome(rsp);
else
return DeleteVpcOutcome(o.GetError());
}
else
{
return DeleteVpcOutcome(outcome.GetError());
}
}
void EcmClient::DeleteVpcAsync(const DeleteVpcRequest& request, const DeleteVpcAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DeleteVpc(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DeleteVpcOutcomeCallable EcmClient::DeleteVpcCallable(const DeleteVpcRequest &request)
{
auto task = std::make_shared<std::packaged_task<DeleteVpcOutcome()>>(
[this, request]()
{
return this->DeleteVpc(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DescribeAddressQuotaOutcome EcmClient::DescribeAddressQuota(const DescribeAddressQuotaRequest &request)
{
auto outcome = MakeRequest(request, "DescribeAddressQuota");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeAddressQuotaResponse rsp = DescribeAddressQuotaResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeAddressQuotaOutcome(rsp);
else
return DescribeAddressQuotaOutcome(o.GetError());
}
else
{
return DescribeAddressQuotaOutcome(outcome.GetError());
}
}
void EcmClient::DescribeAddressQuotaAsync(const DescribeAddressQuotaRequest& request, const DescribeAddressQuotaAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeAddressQuota(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DescribeAddressQuotaOutcomeCallable EcmClient::DescribeAddressQuotaCallable(const DescribeAddressQuotaRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeAddressQuotaOutcome()>>(
[this, request]()
{
return this->DescribeAddressQuota(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DescribeAddressesOutcome EcmClient::DescribeAddresses(const DescribeAddressesRequest &request)
{
auto outcome = MakeRequest(request, "DescribeAddresses");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeAddressesResponse rsp = DescribeAddressesResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeAddressesOutcome(rsp);
else
return DescribeAddressesOutcome(o.GetError());
}
else
{
return DescribeAddressesOutcome(outcome.GetError());
}
}
void EcmClient::DescribeAddressesAsync(const DescribeAddressesRequest& request, const DescribeAddressesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeAddresses(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DescribeAddressesOutcomeCallable EcmClient::DescribeAddressesCallable(const DescribeAddressesRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeAddressesOutcome()>>(
[this, request]()
{
return this->DescribeAddresses(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DescribeBaseOverviewOutcome EcmClient::DescribeBaseOverview(const DescribeBaseOverviewRequest &request)
{
auto outcome = MakeRequest(request, "DescribeBaseOverview");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeBaseOverviewResponse rsp = DescribeBaseOverviewResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeBaseOverviewOutcome(rsp);
else
return DescribeBaseOverviewOutcome(o.GetError());
}
else
{
return DescribeBaseOverviewOutcome(outcome.GetError());
}
}
void EcmClient::DescribeBaseOverviewAsync(const DescribeBaseOverviewRequest& request, const DescribeBaseOverviewAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeBaseOverview(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DescribeBaseOverviewOutcomeCallable EcmClient::DescribeBaseOverviewCallable(const DescribeBaseOverviewRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeBaseOverviewOutcome()>>(
[this, request]()
{
return this->DescribeBaseOverview(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DescribeConfigOutcome EcmClient::DescribeConfig(const DescribeConfigRequest &request)
{
auto outcome = MakeRequest(request, "DescribeConfig");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeConfigResponse rsp = DescribeConfigResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeConfigOutcome(rsp);
else
return DescribeConfigOutcome(o.GetError());
}
else
{
return DescribeConfigOutcome(outcome.GetError());
}
}
void EcmClient::DescribeConfigAsync(const DescribeConfigRequest& request, const DescribeConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeConfig(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DescribeConfigOutcomeCallable EcmClient::DescribeConfigCallable(const DescribeConfigRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeConfigOutcome()>>(
[this, request]()
{
return this->DescribeConfig(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DescribeCustomImageTaskOutcome EcmClient::DescribeCustomImageTask(const DescribeCustomImageTaskRequest &request)
{
auto outcome = MakeRequest(request, "DescribeCustomImageTask");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeCustomImageTaskResponse rsp = DescribeCustomImageTaskResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeCustomImageTaskOutcome(rsp);
else
return DescribeCustomImageTaskOutcome(o.GetError());
}
else
{
return DescribeCustomImageTaskOutcome(outcome.GetError());
}
}
void EcmClient::DescribeCustomImageTaskAsync(const DescribeCustomImageTaskRequest& request, const DescribeCustomImageTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeCustomImageTask(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DescribeCustomImageTaskOutcomeCallable EcmClient::DescribeCustomImageTaskCallable(const DescribeCustomImageTaskRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeCustomImageTaskOutcome()>>(
[this, request]()
{
return this->DescribeCustomImageTask(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DescribeDefaultSubnetOutcome EcmClient::DescribeDefaultSubnet(const DescribeDefaultSubnetRequest &request)
{
auto outcome = MakeRequest(request, "DescribeDefaultSubnet");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeDefaultSubnetResponse rsp = DescribeDefaultSubnetResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeDefaultSubnetOutcome(rsp);
else
return DescribeDefaultSubnetOutcome(o.GetError());
}
else
{
return DescribeDefaultSubnetOutcome(outcome.GetError());
}
}
void EcmClient::DescribeDefaultSubnetAsync(const DescribeDefaultSubnetRequest& request, const DescribeDefaultSubnetAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeDefaultSubnet(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DescribeDefaultSubnetOutcomeCallable EcmClient::DescribeDefaultSubnetCallable(const DescribeDefaultSubnetRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeDefaultSubnetOutcome()>>(
[this, request]()
{
return this->DescribeDefaultSubnet(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DescribeDisksOutcome EcmClient::DescribeDisks(const DescribeDisksRequest &request)
{
auto outcome = MakeRequest(request, "DescribeDisks");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeDisksResponse rsp = DescribeDisksResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeDisksOutcome(rsp);
else
return DescribeDisksOutcome(o.GetError());
}
else
{
return DescribeDisksOutcome(outcome.GetError());
}
}
void EcmClient::DescribeDisksAsync(const DescribeDisksRequest& request, const DescribeDisksAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeDisks(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DescribeDisksOutcomeCallable EcmClient::DescribeDisksCallable(const DescribeDisksRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeDisksOutcome()>>(
[this, request]()
{
return this->DescribeDisks(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DescribeHaVipsOutcome EcmClient::DescribeHaVips(const DescribeHaVipsRequest &request)
{
auto outcome = MakeRequest(request, "DescribeHaVips");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeHaVipsResponse rsp = DescribeHaVipsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeHaVipsOutcome(rsp);
else
return DescribeHaVipsOutcome(o.GetError());
}
else
{
return DescribeHaVipsOutcome(outcome.GetError());
}
}
void EcmClient::DescribeHaVipsAsync(const DescribeHaVipsRequest& request, const DescribeHaVipsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeHaVips(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DescribeHaVipsOutcomeCallable EcmClient::DescribeHaVipsCallable(const DescribeHaVipsRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeHaVipsOutcome()>>(
[this, request]()
{
return this->DescribeHaVips(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DescribeImageOutcome EcmClient::DescribeImage(const DescribeImageRequest &request)
{
auto outcome = MakeRequest(request, "DescribeImage");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeImageResponse rsp = DescribeImageResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeImageOutcome(rsp);
else
return DescribeImageOutcome(o.GetError());
}
else
{
return DescribeImageOutcome(outcome.GetError());
}
}
void EcmClient::DescribeImageAsync(const DescribeImageRequest& request, const DescribeImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeImage(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DescribeImageOutcomeCallable EcmClient::DescribeImageCallable(const DescribeImageRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeImageOutcome()>>(
[this, request]()
{
return this->DescribeImage(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DescribeImportImageOsOutcome EcmClient::DescribeImportImageOs(const DescribeImportImageOsRequest &request)
{
auto outcome = MakeRequest(request, "DescribeImportImageOs");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeImportImageOsResponse rsp = DescribeImportImageOsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeImportImageOsOutcome(rsp);
else
return DescribeImportImageOsOutcome(o.GetError());
}
else
{
return DescribeImportImageOsOutcome(outcome.GetError());
}
}
void EcmClient::DescribeImportImageOsAsync(const DescribeImportImageOsRequest& request, const DescribeImportImageOsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeImportImageOs(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DescribeImportImageOsOutcomeCallable EcmClient::DescribeImportImageOsCallable(const DescribeImportImageOsRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeImportImageOsOutcome()>>(
[this, request]()
{
return this->DescribeImportImageOs(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DescribeInstanceTypeConfigOutcome EcmClient::DescribeInstanceTypeConfig(const DescribeInstanceTypeConfigRequest &request)
{
auto outcome = MakeRequest(request, "DescribeInstanceTypeConfig");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeInstanceTypeConfigResponse rsp = DescribeInstanceTypeConfigResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeInstanceTypeConfigOutcome(rsp);
else
return DescribeInstanceTypeConfigOutcome(o.GetError());
}
else
{
return DescribeInstanceTypeConfigOutcome(outcome.GetError());
}
}
void EcmClient::DescribeInstanceTypeConfigAsync(const DescribeInstanceTypeConfigRequest& request, const DescribeInstanceTypeConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeInstanceTypeConfig(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DescribeInstanceTypeConfigOutcomeCallable EcmClient::DescribeInstanceTypeConfigCallable(const DescribeInstanceTypeConfigRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeInstanceTypeConfigOutcome()>>(
[this, request]()
{
return this->DescribeInstanceTypeConfig(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DescribeInstanceVncUrlOutcome EcmClient::DescribeInstanceVncUrl(const DescribeInstanceVncUrlRequest &request)
{
auto outcome = MakeRequest(request, "DescribeInstanceVncUrl");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeInstanceVncUrlResponse rsp = DescribeInstanceVncUrlResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeInstanceVncUrlOutcome(rsp);
else
return DescribeInstanceVncUrlOutcome(o.GetError());
}
else
{
return DescribeInstanceVncUrlOutcome(outcome.GetError());
}
}
void EcmClient::DescribeInstanceVncUrlAsync(const DescribeInstanceVncUrlRequest& request, const DescribeInstanceVncUrlAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeInstanceVncUrl(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DescribeInstanceVncUrlOutcomeCallable EcmClient::DescribeInstanceVncUrlCallable(const DescribeInstanceVncUrlRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeInstanceVncUrlOutcome()>>(
[this, request]()
{
return this->DescribeInstanceVncUrl(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DescribeInstancesOutcome EcmClient::DescribeInstances(const DescribeInstancesRequest &request)
{
auto outcome = MakeRequest(request, "DescribeInstances");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeInstancesResponse rsp = DescribeInstancesResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeInstancesOutcome(rsp);
else
return DescribeInstancesOutcome(o.GetError());
}
else
{
return DescribeInstancesOutcome(outcome.GetError());
}
}
void EcmClient::DescribeInstancesAsync(const DescribeInstancesRequest& request, const DescribeInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeInstances(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DescribeInstancesOutcomeCallable EcmClient::DescribeInstancesCallable(const DescribeInstancesRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeInstancesOutcome()>>(
[this, request]()
{
return this->DescribeInstances(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DescribeInstancesDeniedActionsOutcome EcmClient::DescribeInstancesDeniedActions(const DescribeInstancesDeniedActionsRequest &request)
{
auto outcome = MakeRequest(request, "DescribeInstancesDeniedActions");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeInstancesDeniedActionsResponse rsp = DescribeInstancesDeniedActionsResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeInstancesDeniedActionsOutcome(rsp);
else
return DescribeInstancesDeniedActionsOutcome(o.GetError());
}
else
{
return DescribeInstancesDeniedActionsOutcome(outcome.GetError());
}
}
void EcmClient::DescribeInstancesDeniedActionsAsync(const DescribeInstancesDeniedActionsRequest& request, const DescribeInstancesDeniedActionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeInstancesDeniedActions(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DescribeInstancesDeniedActionsOutcomeCallable EcmClient::DescribeInstancesDeniedActionsCallable(const DescribeInstancesDeniedActionsRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeInstancesDeniedActionsOutcome()>>(
[this, request]()
{
return this->DescribeInstancesDeniedActions(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DescribeListenersOutcome EcmClient::DescribeListeners(const DescribeListenersRequest &request)
{
auto outcome = MakeRequest(request, "DescribeListeners");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeListenersResponse rsp = DescribeListenersResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeListenersOutcome(rsp);
else
return DescribeListenersOutcome(o.GetError());
}
else
{
return DescribeListenersOutcome(outcome.GetError());
}
}
void EcmClient::DescribeListenersAsync(const DescribeListenersRequest& request, const DescribeListenersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeListeners(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DescribeListenersOutcomeCallable EcmClient::DescribeListenersCallable(const DescribeListenersRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeListenersOutcome()>>(
[this, request]()
{
return this->DescribeListeners(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EcmClient::DescribeLoadBalanceTaskStatusOutcome EcmClient::DescribeLoadBalanceTaskStatus(const DescribeLoadBalanceTaskStatusRequest &request)
{
auto outcome = MakeRequest(request, "DescribeLoadBalanceTaskStatus");
if (outcome.IsSuccess())
{
auto r = outcome.GetResult();
string payload = string(r.Body(), r.BodySize());
DescribeLoadBalanceTaskStatusResponse rsp = DescribeLoadBalanceTaskStatusResponse();
auto o = rsp.Deserialize(payload);
if (o.IsSuccess())
return DescribeLoadBalanceTaskStatusOutcome(rsp);
else
return DescribeLoadBalanceTaskStatusOutcome(o.GetError());
}
else
{
return DescribeLoadBalanceTaskStatusOutcome(outcome.GetError());
}
}
void EcmClient::DescribeLoadBalanceTaskStatusAsync(const DescribeLoadBalanceTaskStatusRequest& request, const DescribeLoadBalanceTaskStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context)
{
auto fn = [this, request, handler, context]()
{
handler(this, request, this->DescribeLoadBalanceTaskStatus(request), context);
};
Executor::GetInstance()->Submit(new Runnable(fn));
}
EcmClient::DescribeLoadBalanceTaskStatusOutcomeCallable EcmClient::DescribeLoadBalanceTaskStatusCallable(const DescribeLoadBalanceTaskStatusRequest &request)
{
auto task = std::make_shared<std::packaged_task<DescribeLoadBalanceTaskStatusOutcome()>>(
[this, request]()
{
return this->DescribeLoadBalanceTaskStatus(request);
}
);
Executor::GetInstance()->Submit(new Runnable([task]() { (*task)(); }));
return task->get_future();