Create a new sdk.
This commit is contained in:
341
eais/src/EaisClient.cc
Normal file
341
eais/src/EaisClient.cc
Normal file
@@ -0,0 +1,341 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/EaisClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::Eais;
|
||||
using namespace AlibabaCloud::Eais::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "eais";
|
||||
}
|
||||
|
||||
EaisClient::EaisClient(const Credentials &credentials, const ClientConfiguration &configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "eais");
|
||||
}
|
||||
|
||||
EaisClient::EaisClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "eais");
|
||||
}
|
||||
|
||||
EaisClient::EaisClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "eais");
|
||||
}
|
||||
|
||||
EaisClient::~EaisClient()
|
||||
{}
|
||||
|
||||
EaisClient::AttachEaiOutcome EaisClient::attachEai(const AttachEaiRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return AttachEaiOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return AttachEaiOutcome(AttachEaiResult(outcome.result()));
|
||||
else
|
||||
return AttachEaiOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EaisClient::attachEaiAsync(const AttachEaiRequest& request, const AttachEaiAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, attachEai(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EaisClient::AttachEaiOutcomeCallable EaisClient::attachEaiCallable(const AttachEaiRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<AttachEaiOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->attachEai(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EaisClient::CreateEaiOutcome EaisClient::createEai(const CreateEaiRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateEaiOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateEaiOutcome(CreateEaiResult(outcome.result()));
|
||||
else
|
||||
return CreateEaiOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EaisClient::createEaiAsync(const CreateEaiRequest& request, const CreateEaiAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createEai(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EaisClient::CreateEaiOutcomeCallable EaisClient::createEaiCallable(const CreateEaiRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateEaiOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createEai(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EaisClient::CreateEaiAllOutcome EaisClient::createEaiAll(const CreateEaiAllRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateEaiAllOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateEaiAllOutcome(CreateEaiAllResult(outcome.result()));
|
||||
else
|
||||
return CreateEaiAllOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EaisClient::createEaiAllAsync(const CreateEaiAllRequest& request, const CreateEaiAllAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createEaiAll(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EaisClient::CreateEaiAllOutcomeCallable EaisClient::createEaiAllCallable(const CreateEaiAllRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateEaiAllOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createEaiAll(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EaisClient::DeleteEaiOutcome EaisClient::deleteEai(const DeleteEaiRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteEaiOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteEaiOutcome(DeleteEaiResult(outcome.result()));
|
||||
else
|
||||
return DeleteEaiOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EaisClient::deleteEaiAsync(const DeleteEaiRequest& request, const DeleteEaiAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteEai(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EaisClient::DeleteEaiOutcomeCallable EaisClient::deleteEaiCallable(const DeleteEaiRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteEaiOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteEai(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EaisClient::DeleteEaiAllOutcome EaisClient::deleteEaiAll(const DeleteEaiAllRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteEaiAllOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteEaiAllOutcome(DeleteEaiAllResult(outcome.result()));
|
||||
else
|
||||
return DeleteEaiAllOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EaisClient::deleteEaiAllAsync(const DeleteEaiAllRequest& request, const DeleteEaiAllAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteEaiAll(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EaisClient::DeleteEaiAllOutcomeCallable EaisClient::deleteEaiAllCallable(const DeleteEaiAllRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteEaiAllOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteEaiAll(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EaisClient::DescribeEaisOutcome EaisClient::describeEais(const DescribeEaisRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeEaisOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeEaisOutcome(DescribeEaisResult(outcome.result()));
|
||||
else
|
||||
return DescribeEaisOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EaisClient::describeEaisAsync(const DescribeEaisRequest& request, const DescribeEaisAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeEais(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EaisClient::DescribeEaisOutcomeCallable EaisClient::describeEaisCallable(const DescribeEaisRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeEaisOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeEais(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EaisClient::DescribeRegionsOutcome EaisClient::describeRegions(const DescribeRegionsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeRegionsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeRegionsOutcome(DescribeRegionsResult(outcome.result()));
|
||||
else
|
||||
return DescribeRegionsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EaisClient::describeRegionsAsync(const DescribeRegionsRequest& request, const DescribeRegionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeRegions(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EaisClient::DescribeRegionsOutcomeCallable EaisClient::describeRegionsCallable(const DescribeRegionsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeRegionsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeRegions(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EaisClient::DetachEaiOutcome EaisClient::detachEai(const DetachEaiRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DetachEaiOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DetachEaiOutcome(DetachEaiResult(outcome.result()));
|
||||
else
|
||||
return DetachEaiOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EaisClient::detachEaiAsync(const DetachEaiRequest& request, const DetachEaiAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, detachEai(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EaisClient::DetachEaiOutcomeCallable EaisClient::detachEaiCallable(const DetachEaiRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DetachEaiOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->detachEai(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
62
eais/src/model/AttachEaiRequest.cc
Normal file
62
eais/src/model/AttachEaiRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/AttachEaiRequest.h>
|
||||
|
||||
using AlibabaCloud::Eais::Model::AttachEaiRequest;
|
||||
|
||||
AttachEaiRequest::AttachEaiRequest() :
|
||||
RpcServiceRequest("eais", "2019-06-24", "AttachEai")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
AttachEaiRequest::~AttachEaiRequest()
|
||||
{}
|
||||
|
||||
std::string AttachEaiRequest::getClientInstanceId()const
|
||||
{
|
||||
return clientInstanceId_;
|
||||
}
|
||||
|
||||
void AttachEaiRequest::setClientInstanceId(const std::string& clientInstanceId)
|
||||
{
|
||||
clientInstanceId_ = clientInstanceId;
|
||||
setParameter("ClientInstanceId", clientInstanceId);
|
||||
}
|
||||
|
||||
std::string AttachEaiRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void AttachEaiRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string AttachEaiRequest::getElasticAcceleratedInstanceId()const
|
||||
{
|
||||
return elasticAcceleratedInstanceId_;
|
||||
}
|
||||
|
||||
void AttachEaiRequest::setElasticAcceleratedInstanceId(const std::string& elasticAcceleratedInstanceId)
|
||||
{
|
||||
elasticAcceleratedInstanceId_ = elasticAcceleratedInstanceId;
|
||||
setParameter("ElasticAcceleratedInstanceId", elasticAcceleratedInstanceId);
|
||||
}
|
||||
|
||||
58
eais/src/model/AttachEaiResult.cc
Normal file
58
eais/src/model/AttachEaiResult.cc
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/AttachEaiResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eais;
|
||||
using namespace AlibabaCloud::Eais::Model;
|
||||
|
||||
AttachEaiResult::AttachEaiResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AttachEaiResult::AttachEaiResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AttachEaiResult::~AttachEaiResult()
|
||||
{}
|
||||
|
||||
void AttachEaiResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ElasticAcceleratedInstanceId"].isNull())
|
||||
elasticAcceleratedInstanceId_ = value["ElasticAcceleratedInstanceId"].asString();
|
||||
if(!value["ClientInstanceId"].isNull())
|
||||
clientInstanceId_ = value["ClientInstanceId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string AttachEaiResult::getClientInstanceId()const
|
||||
{
|
||||
return clientInstanceId_;
|
||||
}
|
||||
|
||||
std::string AttachEaiResult::getElasticAcceleratedInstanceId()const
|
||||
{
|
||||
return elasticAcceleratedInstanceId_;
|
||||
}
|
||||
|
||||
194
eais/src/model/CreateEaiAllRequest.cc
Normal file
194
eais/src/model/CreateEaiAllRequest.cc
Normal file
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/CreateEaiAllRequest.h>
|
||||
|
||||
using AlibabaCloud::Eais::Model::CreateEaiAllRequest;
|
||||
|
||||
CreateEaiAllRequest::CreateEaiAllRequest() :
|
||||
RpcServiceRequest("eais", "2019-06-24", "CreateEaiAll")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateEaiAllRequest::~CreateEaiAllRequest()
|
||||
{}
|
||||
|
||||
std::string CreateEaiAllRequest::getClientImageId()const
|
||||
{
|
||||
return clientImageId_;
|
||||
}
|
||||
|
||||
void CreateEaiAllRequest::setClientImageId(const std::string& clientImageId)
|
||||
{
|
||||
clientImageId_ = clientImageId;
|
||||
setParameter("ClientImageId", clientImageId);
|
||||
}
|
||||
|
||||
std::string CreateEaiAllRequest::getClientSystemDiskCategory()const
|
||||
{
|
||||
return clientSystemDiskCategory_;
|
||||
}
|
||||
|
||||
void CreateEaiAllRequest::setClientSystemDiskCategory(const std::string& clientSystemDiskCategory)
|
||||
{
|
||||
clientSystemDiskCategory_ = clientSystemDiskCategory;
|
||||
setParameter("ClientSystemDiskCategory", clientSystemDiskCategory);
|
||||
}
|
||||
|
||||
int CreateEaiAllRequest::getClientInternetMaxBandwidthOut()const
|
||||
{
|
||||
return clientInternetMaxBandwidthOut_;
|
||||
}
|
||||
|
||||
void CreateEaiAllRequest::setClientInternetMaxBandwidthOut(int clientInternetMaxBandwidthOut)
|
||||
{
|
||||
clientInternetMaxBandwidthOut_ = clientInternetMaxBandwidthOut;
|
||||
setParameter("ClientInternetMaxBandwidthOut", std::to_string(clientInternetMaxBandwidthOut));
|
||||
}
|
||||
|
||||
std::string CreateEaiAllRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateEaiAllRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string CreateEaiAllRequest::getClientInstanceName()const
|
||||
{
|
||||
return clientInstanceName_;
|
||||
}
|
||||
|
||||
void CreateEaiAllRequest::setClientInstanceName(const std::string& clientInstanceName)
|
||||
{
|
||||
clientInstanceName_ = clientInstanceName;
|
||||
setParameter("ClientInstanceName", clientInstanceName);
|
||||
}
|
||||
|
||||
int CreateEaiAllRequest::getClientInternetMaxBandwidthIn()const
|
||||
{
|
||||
return clientInternetMaxBandwidthIn_;
|
||||
}
|
||||
|
||||
void CreateEaiAllRequest::setClientInternetMaxBandwidthIn(int clientInternetMaxBandwidthIn)
|
||||
{
|
||||
clientInternetMaxBandwidthIn_ = clientInternetMaxBandwidthIn;
|
||||
setParameter("ClientInternetMaxBandwidthIn", std::to_string(clientInternetMaxBandwidthIn));
|
||||
}
|
||||
|
||||
std::string CreateEaiAllRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void CreateEaiAllRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
int CreateEaiAllRequest::getClientSystemDiskSize()const
|
||||
{
|
||||
return clientSystemDiskSize_;
|
||||
}
|
||||
|
||||
void CreateEaiAllRequest::setClientSystemDiskSize(int clientSystemDiskSize)
|
||||
{
|
||||
clientSystemDiskSize_ = clientSystemDiskSize;
|
||||
setParameter("ClientSystemDiskSize", std::to_string(clientSystemDiskSize));
|
||||
}
|
||||
|
||||
std::string CreateEaiAllRequest::getClientVSwitchId()const
|
||||
{
|
||||
return clientVSwitchId_;
|
||||
}
|
||||
|
||||
void CreateEaiAllRequest::setClientVSwitchId(const std::string& clientVSwitchId)
|
||||
{
|
||||
clientVSwitchId_ = clientVSwitchId;
|
||||
setParameter("ClientVSwitchId", clientVSwitchId);
|
||||
}
|
||||
|
||||
std::string CreateEaiAllRequest::getClientPassword()const
|
||||
{
|
||||
return clientPassword_;
|
||||
}
|
||||
|
||||
void CreateEaiAllRequest::setClientPassword(const std::string& clientPassword)
|
||||
{
|
||||
clientPassword_ = clientPassword;
|
||||
setParameter("ClientPassword", clientPassword);
|
||||
}
|
||||
|
||||
std::string CreateEaiAllRequest::getClientInstanceType()const
|
||||
{
|
||||
return clientInstanceType_;
|
||||
}
|
||||
|
||||
void CreateEaiAllRequest::setClientInstanceType(const std::string& clientInstanceType)
|
||||
{
|
||||
clientInstanceType_ = clientInstanceType;
|
||||
setParameter("ClientInstanceType", clientInstanceType);
|
||||
}
|
||||
|
||||
std::string CreateEaiAllRequest::getClientSecurityGroupId()const
|
||||
{
|
||||
return clientSecurityGroupId_;
|
||||
}
|
||||
|
||||
void CreateEaiAllRequest::setClientSecurityGroupId(const std::string& clientSecurityGroupId)
|
||||
{
|
||||
clientSecurityGroupId_ = clientSecurityGroupId;
|
||||
setParameter("ClientSecurityGroupId", clientSecurityGroupId);
|
||||
}
|
||||
|
||||
std::string CreateEaiAllRequest::getEaiInstanceType()const
|
||||
{
|
||||
return eaiInstanceType_;
|
||||
}
|
||||
|
||||
void CreateEaiAllRequest::setEaiInstanceType(const std::string& eaiInstanceType)
|
||||
{
|
||||
eaiInstanceType_ = eaiInstanceType;
|
||||
setParameter("EaiInstanceType", eaiInstanceType);
|
||||
}
|
||||
|
||||
std::string CreateEaiAllRequest::getClientZoneId()const
|
||||
{
|
||||
return clientZoneId_;
|
||||
}
|
||||
|
||||
void CreateEaiAllRequest::setClientZoneId(const std::string& clientZoneId)
|
||||
{
|
||||
clientZoneId_ = clientZoneId;
|
||||
setParameter("ClientZoneId", clientZoneId);
|
||||
}
|
||||
|
||||
std::string CreateEaiAllRequest::getInstanceName()const
|
||||
{
|
||||
return instanceName_;
|
||||
}
|
||||
|
||||
void CreateEaiAllRequest::setInstanceName(const std::string& instanceName)
|
||||
{
|
||||
instanceName_ = instanceName;
|
||||
setParameter("InstanceName", instanceName);
|
||||
}
|
||||
|
||||
58
eais/src/model/CreateEaiAllResult.cc
Normal file
58
eais/src/model/CreateEaiAllResult.cc
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/CreateEaiAllResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eais;
|
||||
using namespace AlibabaCloud::Eais::Model;
|
||||
|
||||
CreateEaiAllResult::CreateEaiAllResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateEaiAllResult::CreateEaiAllResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateEaiAllResult::~CreateEaiAllResult()
|
||||
{}
|
||||
|
||||
void CreateEaiAllResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ElasticAcceleratedInstanceId"].isNull())
|
||||
elasticAcceleratedInstanceId_ = value["ElasticAcceleratedInstanceId"].asString();
|
||||
if(!value["ClientInstanceId"].isNull())
|
||||
clientInstanceId_ = value["ClientInstanceId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateEaiAllResult::getClientInstanceId()const
|
||||
{
|
||||
return clientInstanceId_;
|
||||
}
|
||||
|
||||
std::string CreateEaiAllResult::getElasticAcceleratedInstanceId()const
|
||||
{
|
||||
return elasticAcceleratedInstanceId_;
|
||||
}
|
||||
|
||||
73
eais/src/model/CreateEaiRequest.cc
Normal file
73
eais/src/model/CreateEaiRequest.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/CreateEaiRequest.h>
|
||||
|
||||
using AlibabaCloud::Eais::Model::CreateEaiRequest;
|
||||
|
||||
CreateEaiRequest::CreateEaiRequest() :
|
||||
RpcServiceRequest("eais", "2019-06-24", "CreateEai")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateEaiRequest::~CreateEaiRequest()
|
||||
{}
|
||||
|
||||
std::string CreateEaiRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateEaiRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string CreateEaiRequest::getInstanceName()const
|
||||
{
|
||||
return instanceName_;
|
||||
}
|
||||
|
||||
void CreateEaiRequest::setInstanceName(const std::string& instanceName)
|
||||
{
|
||||
instanceName_ = instanceName;
|
||||
setParameter("InstanceName", instanceName);
|
||||
}
|
||||
|
||||
std::string CreateEaiRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void CreateEaiRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string CreateEaiRequest::getInstanceType()const
|
||||
{
|
||||
return instanceType_;
|
||||
}
|
||||
|
||||
void CreateEaiRequest::setInstanceType(const std::string& instanceType)
|
||||
{
|
||||
instanceType_ = instanceType;
|
||||
setParameter("InstanceType", instanceType);
|
||||
}
|
||||
|
||||
51
eais/src/model/CreateEaiResult.cc
Normal file
51
eais/src/model/CreateEaiResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/CreateEaiResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eais;
|
||||
using namespace AlibabaCloud::Eais::Model;
|
||||
|
||||
CreateEaiResult::CreateEaiResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateEaiResult::CreateEaiResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateEaiResult::~CreateEaiResult()
|
||||
{}
|
||||
|
||||
void CreateEaiResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ElasticAcceleratedInstanceId"].isNull())
|
||||
elasticAcceleratedInstanceId_ = value["ElasticAcceleratedInstanceId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateEaiResult::getElasticAcceleratedInstanceId()const
|
||||
{
|
||||
return elasticAcceleratedInstanceId_;
|
||||
}
|
||||
|
||||
62
eais/src/model/DeleteEaiAllRequest.cc
Normal file
62
eais/src/model/DeleteEaiAllRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/DeleteEaiAllRequest.h>
|
||||
|
||||
using AlibabaCloud::Eais::Model::DeleteEaiAllRequest;
|
||||
|
||||
DeleteEaiAllRequest::DeleteEaiAllRequest() :
|
||||
RpcServiceRequest("eais", "2019-06-24", "DeleteEaiAll")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteEaiAllRequest::~DeleteEaiAllRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteEaiAllRequest::getClientInstanceId()const
|
||||
{
|
||||
return clientInstanceId_;
|
||||
}
|
||||
|
||||
void DeleteEaiAllRequest::setClientInstanceId(const std::string& clientInstanceId)
|
||||
{
|
||||
clientInstanceId_ = clientInstanceId;
|
||||
setParameter("ClientInstanceId", clientInstanceId);
|
||||
}
|
||||
|
||||
std::string DeleteEaiAllRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DeleteEaiAllRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string DeleteEaiAllRequest::getElasticAcceleratedInstanceId()const
|
||||
{
|
||||
return elasticAcceleratedInstanceId_;
|
||||
}
|
||||
|
||||
void DeleteEaiAllRequest::setElasticAcceleratedInstanceId(const std::string& elasticAcceleratedInstanceId)
|
||||
{
|
||||
elasticAcceleratedInstanceId_ = elasticAcceleratedInstanceId;
|
||||
setParameter("ElasticAcceleratedInstanceId", elasticAcceleratedInstanceId);
|
||||
}
|
||||
|
||||
44
eais/src/model/DeleteEaiAllResult.cc
Normal file
44
eais/src/model/DeleteEaiAllResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/DeleteEaiAllResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eais;
|
||||
using namespace AlibabaCloud::Eais::Model;
|
||||
|
||||
DeleteEaiAllResult::DeleteEaiAllResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteEaiAllResult::DeleteEaiAllResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteEaiAllResult::~DeleteEaiAllResult()
|
||||
{}
|
||||
|
||||
void DeleteEaiAllResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
62
eais/src/model/DeleteEaiRequest.cc
Normal file
62
eais/src/model/DeleteEaiRequest.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/DeleteEaiRequest.h>
|
||||
|
||||
using AlibabaCloud::Eais::Model::DeleteEaiRequest;
|
||||
|
||||
DeleteEaiRequest::DeleteEaiRequest() :
|
||||
RpcServiceRequest("eais", "2019-06-24", "DeleteEai")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteEaiRequest::~DeleteEaiRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteEaiRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DeleteEaiRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string DeleteEaiRequest::getElasticAcceleratedInstanceId()const
|
||||
{
|
||||
return elasticAcceleratedInstanceId_;
|
||||
}
|
||||
|
||||
void DeleteEaiRequest::setElasticAcceleratedInstanceId(const std::string& elasticAcceleratedInstanceId)
|
||||
{
|
||||
elasticAcceleratedInstanceId_ = elasticAcceleratedInstanceId;
|
||||
setParameter("ElasticAcceleratedInstanceId", elasticAcceleratedInstanceId);
|
||||
}
|
||||
|
||||
bool DeleteEaiRequest::getForce()const
|
||||
{
|
||||
return force_;
|
||||
}
|
||||
|
||||
void DeleteEaiRequest::setForce(bool force)
|
||||
{
|
||||
force_ = force;
|
||||
setParameter("Force", force ? "true" : "false");
|
||||
}
|
||||
|
||||
44
eais/src/model/DeleteEaiResult.cc
Normal file
44
eais/src/model/DeleteEaiResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/DeleteEaiResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eais;
|
||||
using namespace AlibabaCloud::Eais::Model;
|
||||
|
||||
DeleteEaiResult::DeleteEaiResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteEaiResult::DeleteEaiResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteEaiResult::~DeleteEaiResult()
|
||||
{}
|
||||
|
||||
void DeleteEaiResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
84
eais/src/model/DescribeEaisRequest.cc
Normal file
84
eais/src/model/DescribeEaisRequest.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/DescribeEaisRequest.h>
|
||||
|
||||
using AlibabaCloud::Eais::Model::DescribeEaisRequest;
|
||||
|
||||
DescribeEaisRequest::DescribeEaisRequest() :
|
||||
RpcServiceRequest("eais", "2019-06-24", "DescribeEais")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeEaisRequest::~DescribeEaisRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeEaisRequest::getElasticAcceleratedInstanceIds()const
|
||||
{
|
||||
return elasticAcceleratedInstanceIds_;
|
||||
}
|
||||
|
||||
void DescribeEaisRequest::setElasticAcceleratedInstanceIds(const std::string& elasticAcceleratedInstanceIds)
|
||||
{
|
||||
elasticAcceleratedInstanceIds_ = elasticAcceleratedInstanceIds;
|
||||
setParameter("ElasticAcceleratedInstanceIds", elasticAcceleratedInstanceIds);
|
||||
}
|
||||
|
||||
std::string DescribeEaisRequest::getInstanceName()const
|
||||
{
|
||||
return instanceName_;
|
||||
}
|
||||
|
||||
void DescribeEaisRequest::setInstanceName(const std::string& instanceName)
|
||||
{
|
||||
instanceName_ = instanceName;
|
||||
setParameter("InstanceName", instanceName);
|
||||
}
|
||||
|
||||
std::string DescribeEaisRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DescribeEaisRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string DescribeEaisRequest::getInstanceType()const
|
||||
{
|
||||
return instanceType_;
|
||||
}
|
||||
|
||||
void DescribeEaisRequest::setInstanceType(const std::string& instanceType)
|
||||
{
|
||||
instanceType_ = instanceType;
|
||||
setParameter("InstanceType", instanceType);
|
||||
}
|
||||
|
||||
std::string DescribeEaisRequest::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
void DescribeEaisRequest::setStatus(const std::string& status)
|
||||
{
|
||||
status_ = status;
|
||||
setParameter("Status", status);
|
||||
}
|
||||
|
||||
108
eais/src/model/DescribeEaisResult.cc
Normal file
108
eais/src/model/DescribeEaisResult.cc
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/DescribeEaisResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eais;
|
||||
using namespace AlibabaCloud::Eais::Model;
|
||||
|
||||
DescribeEaisResult::DescribeEaisResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeEaisResult::DescribeEaisResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeEaisResult::~DescribeEaisResult()
|
||||
{}
|
||||
|
||||
void DescribeEaisResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allInstancesNode = value["Instances"]["Instance"];
|
||||
for (auto valueInstancesInstance : allInstancesNode)
|
||||
{
|
||||
Instance instancesObject;
|
||||
if(!valueInstancesInstance["RegionId"].isNull())
|
||||
instancesObject.regionId = valueInstancesInstance["RegionId"].asString();
|
||||
if(!valueInstancesInstance["ZoneId"].isNull())
|
||||
instancesObject.zoneId = valueInstancesInstance["ZoneId"].asString();
|
||||
if(!valueInstancesInstance["CreationTime"].isNull())
|
||||
instancesObject.creationTime = valueInstancesInstance["CreationTime"].asString();
|
||||
if(!valueInstancesInstance["InstanceName"].isNull())
|
||||
instancesObject.instanceName = valueInstancesInstance["InstanceName"].asString();
|
||||
if(!valueInstancesInstance["Description"].isNull())
|
||||
instancesObject.description = valueInstancesInstance["Description"].asString();
|
||||
if(!valueInstancesInstance["Status"].isNull())
|
||||
instancesObject.status = valueInstancesInstance["Status"].asString();
|
||||
if(!valueInstancesInstance["ElasticAcceleratedInstanceId"].isNull())
|
||||
instancesObject.elasticAcceleratedInstanceId = valueInstancesInstance["ElasticAcceleratedInstanceId"].asString();
|
||||
if(!valueInstancesInstance["ClientInstanceId"].isNull())
|
||||
instancesObject.clientInstanceId = valueInstancesInstance["ClientInstanceId"].asString();
|
||||
if(!valueInstancesInstance["InstanceType"].isNull())
|
||||
instancesObject.instanceType = valueInstancesInstance["InstanceType"].asString();
|
||||
if(!valueInstancesInstance["ClientInstanceType"].isNull())
|
||||
instancesObject.clientInstanceType = valueInstancesInstance["ClientInstanceType"].asString();
|
||||
if(!valueInstancesInstance["ClientInstanceName"].isNull())
|
||||
instancesObject.clientInstanceName = valueInstancesInstance["ClientInstanceName"].asString();
|
||||
auto allTagsNode = valueInstancesInstance["Tags"]["Tag"];
|
||||
for (auto valueInstancesInstanceTagsTag : allTagsNode)
|
||||
{
|
||||
Instance::Tag tagsObject;
|
||||
if(!valueInstancesInstanceTagsTag["TagValue"].isNull())
|
||||
tagsObject.tagValue = valueInstancesInstanceTagsTag["TagValue"].asString();
|
||||
if(!valueInstancesInstanceTagsTag["TagKey"].isNull())
|
||||
tagsObject.tagKey = valueInstancesInstanceTagsTag["TagKey"].asString();
|
||||
instancesObject.tags.push_back(tagsObject);
|
||||
}
|
||||
instances_.push_back(instancesObject);
|
||||
}
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeEaisResult::Instance> DescribeEaisResult::getInstances()const
|
||||
{
|
||||
return instances_;
|
||||
}
|
||||
|
||||
int DescribeEaisResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int DescribeEaisResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeEaisResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
29
eais/src/model/DescribeRegionsRequest.cc
Normal file
29
eais/src/model/DescribeRegionsRequest.cc
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/DescribeRegionsRequest.h>
|
||||
|
||||
using AlibabaCloud::Eais::Model::DescribeRegionsRequest;
|
||||
|
||||
DescribeRegionsRequest::DescribeRegionsRequest() :
|
||||
RpcServiceRequest("eais", "2019-06-24", "DescribeRegions")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeRegionsRequest::~DescribeRegionsRequest()
|
||||
{}
|
||||
|
||||
61
eais/src/model/DescribeRegionsResult.cc
Normal file
61
eais/src/model/DescribeRegionsResult.cc
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/DescribeRegionsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eais;
|
||||
using namespace AlibabaCloud::Eais::Model;
|
||||
|
||||
DescribeRegionsResult::DescribeRegionsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeRegionsResult::DescribeRegionsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeRegionsResult::~DescribeRegionsResult()
|
||||
{}
|
||||
|
||||
void DescribeRegionsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allRegionsNode = value["Regions"]["Region"];
|
||||
for (auto valueRegionsRegion : allRegionsNode)
|
||||
{
|
||||
Region regionsObject;
|
||||
if(!valueRegionsRegion["RegionId"].isNull())
|
||||
regionsObject.regionId = valueRegionsRegion["RegionId"].asString();
|
||||
if(!valueRegionsRegion["RegionEndpoint"].isNull())
|
||||
regionsObject.regionEndpoint = valueRegionsRegion["RegionEndpoint"].asString();
|
||||
if(!valueRegionsRegion["LocalName"].isNull())
|
||||
regionsObject.localName = valueRegionsRegion["LocalName"].asString();
|
||||
regions_.push_back(regionsObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeRegionsResult::Region> DescribeRegionsResult::getRegions()const
|
||||
{
|
||||
return regions_;
|
||||
}
|
||||
|
||||
51
eais/src/model/DetachEaiRequest.cc
Normal file
51
eais/src/model/DetachEaiRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/DetachEaiRequest.h>
|
||||
|
||||
using AlibabaCloud::Eais::Model::DetachEaiRequest;
|
||||
|
||||
DetachEaiRequest::DetachEaiRequest() :
|
||||
RpcServiceRequest("eais", "2019-06-24", "DetachEai")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DetachEaiRequest::~DetachEaiRequest()
|
||||
{}
|
||||
|
||||
std::string DetachEaiRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DetachEaiRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string DetachEaiRequest::getElasticAcceleratedInstanceId()const
|
||||
{
|
||||
return elasticAcceleratedInstanceId_;
|
||||
}
|
||||
|
||||
void DetachEaiRequest::setElasticAcceleratedInstanceId(const std::string& elasticAcceleratedInstanceId)
|
||||
{
|
||||
elasticAcceleratedInstanceId_ = elasticAcceleratedInstanceId;
|
||||
setParameter("ElasticAcceleratedInstanceId", elasticAcceleratedInstanceId);
|
||||
}
|
||||
|
||||
44
eais/src/model/DetachEaiResult.cc
Normal file
44
eais/src/model/DetachEaiResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eais/model/DetachEaiResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eais;
|
||||
using namespace AlibabaCloud::Eais::Model;
|
||||
|
||||
DetachEaiResult::DetachEaiResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DetachEaiResult::DetachEaiResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DetachEaiResult::~DetachEaiResult()
|
||||
{}
|
||||
|
||||
void DetachEaiResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user