Generate SDK for service instance APIs.
This commit is contained in:
305
computenest/src/ComputeNestClient.cc
Normal file
305
computenest/src/ComputeNestClient.cc
Normal file
@@ -0,0 +1,305 @@
|
||||
/*
|
||||
* 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/computenest/ComputeNestClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::ComputeNest;
|
||||
using namespace AlibabaCloud::ComputeNest::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "ComputeNest";
|
||||
}
|
||||
|
||||
ComputeNestClient::ComputeNestClient(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, "computenest");
|
||||
}
|
||||
|
||||
ComputeNestClient::ComputeNestClient(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, "computenest");
|
||||
}
|
||||
|
||||
ComputeNestClient::ComputeNestClient(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, "computenest");
|
||||
}
|
||||
|
||||
ComputeNestClient::~ComputeNestClient()
|
||||
{}
|
||||
|
||||
ComputeNestClient::ContinueDeployServiceInstanceOutcome ComputeNestClient::continueDeployServiceInstance(const ContinueDeployServiceInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ContinueDeployServiceInstanceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ContinueDeployServiceInstanceOutcome(ContinueDeployServiceInstanceResult(outcome.result()));
|
||||
else
|
||||
return ContinueDeployServiceInstanceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ComputeNestClient::continueDeployServiceInstanceAsync(const ContinueDeployServiceInstanceRequest& request, const ContinueDeployServiceInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, continueDeployServiceInstance(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ComputeNestClient::ContinueDeployServiceInstanceOutcomeCallable ComputeNestClient::continueDeployServiceInstanceCallable(const ContinueDeployServiceInstanceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ContinueDeployServiceInstanceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->continueDeployServiceInstance(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ComputeNestClient::CreateServiceInstanceOutcome ComputeNestClient::createServiceInstance(const CreateServiceInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateServiceInstanceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateServiceInstanceOutcome(CreateServiceInstanceResult(outcome.result()));
|
||||
else
|
||||
return CreateServiceInstanceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ComputeNestClient::createServiceInstanceAsync(const CreateServiceInstanceRequest& request, const CreateServiceInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createServiceInstance(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ComputeNestClient::CreateServiceInstanceOutcomeCallable ComputeNestClient::createServiceInstanceCallable(const CreateServiceInstanceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateServiceInstanceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createServiceInstance(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ComputeNestClient::DeleteServiceInstancesOutcome ComputeNestClient::deleteServiceInstances(const DeleteServiceInstancesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteServiceInstancesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteServiceInstancesOutcome(DeleteServiceInstancesResult(outcome.result()));
|
||||
else
|
||||
return DeleteServiceInstancesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ComputeNestClient::deleteServiceInstancesAsync(const DeleteServiceInstancesRequest& request, const DeleteServiceInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteServiceInstances(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ComputeNestClient::DeleteServiceInstancesOutcomeCallable ComputeNestClient::deleteServiceInstancesCallable(const DeleteServiceInstancesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteServiceInstancesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteServiceInstances(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ComputeNestClient::GetServiceInstanceOutcome ComputeNestClient::getServiceInstance(const GetServiceInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetServiceInstanceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetServiceInstanceOutcome(GetServiceInstanceResult(outcome.result()));
|
||||
else
|
||||
return GetServiceInstanceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ComputeNestClient::getServiceInstanceAsync(const GetServiceInstanceRequest& request, const GetServiceInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getServiceInstance(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ComputeNestClient::GetServiceInstanceOutcomeCallable ComputeNestClient::getServiceInstanceCallable(const GetServiceInstanceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetServiceInstanceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getServiceInstance(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ComputeNestClient::ListServiceInstanceLogsOutcome ComputeNestClient::listServiceInstanceLogs(const ListServiceInstanceLogsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListServiceInstanceLogsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListServiceInstanceLogsOutcome(ListServiceInstanceLogsResult(outcome.result()));
|
||||
else
|
||||
return ListServiceInstanceLogsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ComputeNestClient::listServiceInstanceLogsAsync(const ListServiceInstanceLogsRequest& request, const ListServiceInstanceLogsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listServiceInstanceLogs(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ComputeNestClient::ListServiceInstanceLogsOutcomeCallable ComputeNestClient::listServiceInstanceLogsCallable(const ListServiceInstanceLogsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListServiceInstanceLogsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listServiceInstanceLogs(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ComputeNestClient::ListServiceInstanceResourcesOutcome ComputeNestClient::listServiceInstanceResources(const ListServiceInstanceResourcesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListServiceInstanceResourcesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListServiceInstanceResourcesOutcome(ListServiceInstanceResourcesResult(outcome.result()));
|
||||
else
|
||||
return ListServiceInstanceResourcesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ComputeNestClient::listServiceInstanceResourcesAsync(const ListServiceInstanceResourcesRequest& request, const ListServiceInstanceResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listServiceInstanceResources(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ComputeNestClient::ListServiceInstanceResourcesOutcomeCallable ComputeNestClient::listServiceInstanceResourcesCallable(const ListServiceInstanceResourcesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListServiceInstanceResourcesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listServiceInstanceResources(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ComputeNestClient::ListServiceInstancesOutcome ComputeNestClient::listServiceInstances(const ListServiceInstancesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListServiceInstancesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListServiceInstancesOutcome(ListServiceInstancesResult(outcome.result()));
|
||||
else
|
||||
return ListServiceInstancesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ComputeNestClient::listServiceInstancesAsync(const ListServiceInstancesRequest& request, const ListServiceInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listServiceInstances(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ComputeNestClient::ListServiceInstancesOutcomeCallable ComputeNestClient::listServiceInstancesCallable(const ListServiceInstancesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListServiceInstancesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listServiceInstances(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* 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/computenest/model/ContinueDeployServiceInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::ComputeNest::Model::ContinueDeployServiceInstanceRequest;
|
||||
|
||||
ContinueDeployServiceInstanceRequest::ContinueDeployServiceInstanceRequest()
|
||||
: RpcServiceRequest("computenest", "2021-06-01", "ContinueDeployServiceInstance") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ContinueDeployServiceInstanceRequest::~ContinueDeployServiceInstanceRequest() {}
|
||||
|
||||
std::string ContinueDeployServiceInstanceRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void ContinueDeployServiceInstanceRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string ContinueDeployServiceInstanceRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void ContinueDeployServiceInstanceRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string ContinueDeployServiceInstanceRequest::getServiceInstanceId() const {
|
||||
return serviceInstanceId_;
|
||||
}
|
||||
|
||||
void ContinueDeployServiceInstanceRequest::setServiceInstanceId(const std::string &serviceInstanceId) {
|
||||
serviceInstanceId_ = serviceInstanceId;
|
||||
setParameter(std::string("ServiceInstanceId"), serviceInstanceId);
|
||||
}
|
||||
|
||||
bool ContinueDeployServiceInstanceRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void ContinueDeployServiceInstanceRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string ContinueDeployServiceInstanceRequest::getParameters() const {
|
||||
return parameters_;
|
||||
}
|
||||
|
||||
void ContinueDeployServiceInstanceRequest::setParameters(const std::string ¶meters) {
|
||||
parameters_ = parameters;
|
||||
setParameter(std::string("Parameters"), parameters);
|
||||
}
|
||||
|
||||
std::vector<std::string> ContinueDeployServiceInstanceRequest::getOption() const {
|
||||
return option_;
|
||||
}
|
||||
|
||||
void ContinueDeployServiceInstanceRequest::setOption(const std::vector<std::string> &option) {
|
||||
option_ = option;
|
||||
}
|
||||
|
||||
66
computenest/src/model/ContinueDeployServiceInstanceResult.cc
Normal file
66
computenest/src/model/ContinueDeployServiceInstanceResult.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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/computenest/model/ContinueDeployServiceInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ComputeNest;
|
||||
using namespace AlibabaCloud::ComputeNest::Model;
|
||||
|
||||
ContinueDeployServiceInstanceResult::ContinueDeployServiceInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ContinueDeployServiceInstanceResult::ContinueDeployServiceInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ContinueDeployServiceInstanceResult::~ContinueDeployServiceInstanceResult()
|
||||
{}
|
||||
|
||||
void ContinueDeployServiceInstanceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dryRunResultNode = value["DryRunResult"];
|
||||
auto allParametersNotAllowedToBeModified = dryRunResultNode["ParametersNotAllowedToBeModified"]["parameterNotAllowedToBeModified"];
|
||||
for (auto value : allParametersNotAllowedToBeModified)
|
||||
dryRunResult_.parametersNotAllowedToBeModified.push_back(value.asString());
|
||||
auto allParametersConditionallyAllowedToBeModified = dryRunResultNode["ParametersConditionallyAllowedToBeModified"]["parameterConditionallyAllowedToBeModified"];
|
||||
for (auto value : allParametersConditionallyAllowedToBeModified)
|
||||
dryRunResult_.parametersConditionallyAllowedToBeModified.push_back(value.asString());
|
||||
auto allParametersAllowedToBeModified = dryRunResultNode["ParametersAllowedToBeModified"]["parameterAllowedToBeModified"];
|
||||
for (auto value : allParametersAllowedToBeModified)
|
||||
dryRunResult_.parametersAllowedToBeModified.push_back(value.asString());
|
||||
if(!value["ServiceInstanceId"].isNull())
|
||||
serviceInstanceId_ = value["ServiceInstanceId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ContinueDeployServiceInstanceResult::getServiceInstanceId()const
|
||||
{
|
||||
return serviceInstanceId_;
|
||||
}
|
||||
|
||||
ContinueDeployServiceInstanceResult::DryRunResult ContinueDeployServiceInstanceResult::getDryRunResult()const
|
||||
{
|
||||
return dryRunResult_;
|
||||
}
|
||||
|
||||
208
computenest/src/model/CreateServiceInstanceRequest.cc
Normal file
208
computenest/src/model/CreateServiceInstanceRequest.cc
Normal file
@@ -0,0 +1,208 @@
|
||||
/*
|
||||
* 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/computenest/model/CreateServiceInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::ComputeNest::Model::CreateServiceInstanceRequest;
|
||||
|
||||
CreateServiceInstanceRequest::CreateServiceInstanceRequest()
|
||||
: RpcServiceRequest("computenest", "2021-06-01", "CreateServiceInstance") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateServiceInstanceRequest::~CreateServiceInstanceRequest() {}
|
||||
|
||||
CreateServiceInstanceRequest::Commodity CreateServiceInstanceRequest::getCommodity() const {
|
||||
return commodity_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setCommodity(const CreateServiceInstanceRequest::Commodity &commodity) {
|
||||
commodity_ = commodity;
|
||||
setParameter(std::string("Commodity") + ".PayPeriod", std::to_string(commodity.payPeriod));
|
||||
setParameter(std::string("Commodity") + ".PayPeriodUnit", commodity.payPeriodUnit);
|
||||
}
|
||||
|
||||
std::string CreateServiceInstanceRequest::getContactGroup() const {
|
||||
return contactGroup_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setContactGroup(const std::string &contactGroup) {
|
||||
contactGroup_ = contactGroup;
|
||||
setParameter(std::string("ContactGroup"), contactGroup);
|
||||
}
|
||||
|
||||
std::string CreateServiceInstanceRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string CreateServiceInstanceRequest::getSpecificationCode() const {
|
||||
return specificationCode_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setSpecificationCode(const std::string &specificationCode) {
|
||||
specificationCode_ = specificationCode;
|
||||
setParameter(std::string("SpecificationCode"), specificationCode);
|
||||
}
|
||||
|
||||
std::string CreateServiceInstanceRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::string CreateServiceInstanceRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
bool CreateServiceInstanceRequest::getEnableInstanceOps() const {
|
||||
return enableInstanceOps_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setEnableInstanceOps(bool enableInstanceOps) {
|
||||
enableInstanceOps_ = enableInstanceOps;
|
||||
setParameter(std::string("EnableInstanceOps"), enableInstanceOps ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateServiceInstanceRequest::getTemplateName() const {
|
||||
return templateName_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setTemplateName(const std::string &templateName) {
|
||||
templateName_ = templateName;
|
||||
setParameter(std::string("TemplateName"), templateName);
|
||||
}
|
||||
|
||||
std::vector<CreateServiceInstanceRequest::Tag> CreateServiceInstanceRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setTag(const std::vector<CreateServiceInstanceRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
auto tagObj = tag.at(dep1);
|
||||
std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
}
|
||||
}
|
||||
|
||||
bool CreateServiceInstanceRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
bool CreateServiceInstanceRequest::getEnableUserPrometheus() const {
|
||||
return enableUserPrometheus_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setEnableUserPrometheus(bool enableUserPrometheus) {
|
||||
enableUserPrometheus_ = enableUserPrometheus;
|
||||
setParameter(std::string("EnableUserPrometheus"), enableUserPrometheus ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateServiceInstanceRequest::getSpecificationName() const {
|
||||
return specificationName_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setSpecificationName(const std::string &specificationName) {
|
||||
specificationName_ = specificationName;
|
||||
setParameter(std::string("SpecificationName"), specificationName);
|
||||
}
|
||||
|
||||
std::string CreateServiceInstanceRequest::getTrialType() const {
|
||||
return trialType_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setTrialType(const std::string &trialType) {
|
||||
trialType_ = trialType;
|
||||
setParameter(std::string("TrialType"), trialType);
|
||||
}
|
||||
|
||||
std::string CreateServiceInstanceRequest::getName() const {
|
||||
return name_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setName(const std::string &name) {
|
||||
name_ = name;
|
||||
setParameter(std::string("Name"), name);
|
||||
}
|
||||
|
||||
std::string CreateServiceInstanceRequest::getServiceVersion() const {
|
||||
return serviceVersion_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setServiceVersion(const std::string &serviceVersion) {
|
||||
serviceVersion_ = serviceVersion;
|
||||
setParameter(std::string("ServiceVersion"), serviceVersion);
|
||||
}
|
||||
|
||||
std::string CreateServiceInstanceRequest::getServiceId() const {
|
||||
return serviceId_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setServiceId(const std::string &serviceId) {
|
||||
serviceId_ = serviceId;
|
||||
setParameter(std::string("ServiceId"), serviceId);
|
||||
}
|
||||
|
||||
std::string CreateServiceInstanceRequest::getParameters() const {
|
||||
return parameters_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setParameters(const std::string ¶meters) {
|
||||
parameters_ = parameters;
|
||||
setParameter(std::string("Parameters"), parameters);
|
||||
}
|
||||
|
||||
long CreateServiceInstanceRequest::getPayType() const {
|
||||
return payType_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setPayType(long payType) {
|
||||
payType_ = payType;
|
||||
setParameter(std::string("PayType"), std::to_string(payType));
|
||||
}
|
||||
|
||||
CreateServiceInstanceRequest::OperationMetadata CreateServiceInstanceRequest::getOperationMetadata() const {
|
||||
return operationMetadata_;
|
||||
}
|
||||
|
||||
void CreateServiceInstanceRequest::setOperationMetadata(const CreateServiceInstanceRequest::OperationMetadata &operationMetadata) {
|
||||
operationMetadata_ = operationMetadata;
|
||||
setParameter(std::string("OperationMetadata") + ".EndTime", operationMetadata.endTime);
|
||||
setParameter(std::string("OperationMetadata") + ".Resources", operationMetadata.resources);
|
||||
setParameter(std::string("OperationMetadata") + ".StartTime", operationMetadata.startTime);
|
||||
setParameter(std::string("OperationMetadata") + ".ExtraInfo", operationMetadata.extraInfo);
|
||||
setParameter(std::string("OperationMetadata") + ".ServiceInstanceId", operationMetadata.serviceInstanceId);
|
||||
}
|
||||
|
||||
65
computenest/src/model/CreateServiceInstanceResult.cc
Normal file
65
computenest/src/model/CreateServiceInstanceResult.cc
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* 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/computenest/model/CreateServiceInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ComputeNest;
|
||||
using namespace AlibabaCloud::ComputeNest::Model;
|
||||
|
||||
CreateServiceInstanceResult::CreateServiceInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateServiceInstanceResult::CreateServiceInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateServiceInstanceResult::~CreateServiceInstanceResult()
|
||||
{}
|
||||
|
||||
void CreateServiceInstanceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Status"].isNull())
|
||||
status_ = value["Status"].asString();
|
||||
if(!value["ServiceInstanceId"].isNull())
|
||||
serviceInstanceId_ = value["ServiceInstanceId"].asString();
|
||||
if(!value["MarketInstanceId"].isNull())
|
||||
marketInstanceId_ = value["MarketInstanceId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateServiceInstanceResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
std::string CreateServiceInstanceResult::getServiceInstanceId()const
|
||||
{
|
||||
return serviceInstanceId_;
|
||||
}
|
||||
|
||||
std::string CreateServiceInstanceResult::getMarketInstanceId()const
|
||||
{
|
||||
return marketInstanceId_;
|
||||
}
|
||||
|
||||
53
computenest/src/model/DeleteServiceInstancesRequest.cc
Normal file
53
computenest/src/model/DeleteServiceInstancesRequest.cc
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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/computenest/model/DeleteServiceInstancesRequest.h>
|
||||
|
||||
using AlibabaCloud::ComputeNest::Model::DeleteServiceInstancesRequest;
|
||||
|
||||
DeleteServiceInstancesRequest::DeleteServiceInstancesRequest()
|
||||
: RpcServiceRequest("computenest", "2021-06-01", "DeleteServiceInstances") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteServiceInstancesRequest::~DeleteServiceInstancesRequest() {}
|
||||
|
||||
std::string DeleteServiceInstancesRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void DeleteServiceInstancesRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string DeleteServiceInstancesRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DeleteServiceInstancesRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::vector<std::string> DeleteServiceInstancesRequest::getServiceInstanceId() const {
|
||||
return serviceInstanceId_;
|
||||
}
|
||||
|
||||
void DeleteServiceInstancesRequest::setServiceInstanceId(const std::vector<std::string> &serviceInstanceId) {
|
||||
serviceInstanceId_ = serviceInstanceId;
|
||||
}
|
||||
|
||||
44
computenest/src/model/DeleteServiceInstancesResult.cc
Normal file
44
computenest/src/model/DeleteServiceInstancesResult.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/computenest/model/DeleteServiceInstancesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ComputeNest;
|
||||
using namespace AlibabaCloud::ComputeNest::Model;
|
||||
|
||||
DeleteServiceInstancesResult::DeleteServiceInstancesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteServiceInstancesResult::DeleteServiceInstancesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteServiceInstancesResult::~DeleteServiceInstancesResult()
|
||||
{}
|
||||
|
||||
void DeleteServiceInstancesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
54
computenest/src/model/GetServiceInstanceRequest.cc
Normal file
54
computenest/src/model/GetServiceInstanceRequest.cc
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 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/computenest/model/GetServiceInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::ComputeNest::Model::GetServiceInstanceRequest;
|
||||
|
||||
GetServiceInstanceRequest::GetServiceInstanceRequest()
|
||||
: RpcServiceRequest("computenest", "2021-06-01", "GetServiceInstance") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetServiceInstanceRequest::~GetServiceInstanceRequest() {}
|
||||
|
||||
std::string GetServiceInstanceRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void GetServiceInstanceRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceRequest::getServiceInstanceId() const {
|
||||
return serviceInstanceId_;
|
||||
}
|
||||
|
||||
void GetServiceInstanceRequest::setServiceInstanceId(const std::string &serviceInstanceId) {
|
||||
serviceInstanceId_ = serviceInstanceId;
|
||||
setParameter(std::string("ServiceInstanceId"), serviceInstanceId);
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceRequest::getMarketInstanceId() const {
|
||||
return marketInstanceId_;
|
||||
}
|
||||
|
||||
void GetServiceInstanceRequest::setMarketInstanceId(const std::string &marketInstanceId) {
|
||||
marketInstanceId_ = marketInstanceId;
|
||||
setParameter(std::string("MarketInstanceId"), marketInstanceId);
|
||||
}
|
||||
|
||||
363
computenest/src/model/GetServiceInstanceResult.cc
Normal file
363
computenest/src/model/GetServiceInstanceResult.cc
Normal file
@@ -0,0 +1,363 @@
|
||||
/*
|
||||
* 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/computenest/model/GetServiceInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ComputeNest;
|
||||
using namespace AlibabaCloud::ComputeNest::Model;
|
||||
|
||||
GetServiceInstanceResult::GetServiceInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetServiceInstanceResult::GetServiceInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetServiceInstanceResult::~GetServiceInstanceResult()
|
||||
{}
|
||||
|
||||
void GetServiceInstanceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allTagsNode = value["Tags"]["Tag"];
|
||||
for (auto valueTagsTag : allTagsNode)
|
||||
{
|
||||
Tag tagsObject;
|
||||
if(!valueTagsTag["Key"].isNull())
|
||||
tagsObject.key = valueTagsTag["Key"].asString();
|
||||
if(!valueTagsTag["Value"].isNull())
|
||||
tagsObject.value = valueTagsTag["Value"].asString();
|
||||
tags_.push_back(tagsObject);
|
||||
}
|
||||
auto serviceNode = value["Service"];
|
||||
if(!serviceNode["Status"].isNull())
|
||||
service_.status = serviceNode["Status"].asString();
|
||||
if(!serviceNode["PublishTime"].isNull())
|
||||
service_.publishTime = serviceNode["PublishTime"].asString();
|
||||
if(!serviceNode["Version"].isNull())
|
||||
service_.version = serviceNode["Version"].asString();
|
||||
if(!serviceNode["DeployMetadata"].isNull())
|
||||
service_.deployMetadata = serviceNode["DeployMetadata"].asString();
|
||||
if(!serviceNode["DeployType"].isNull())
|
||||
service_.deployType = serviceNode["DeployType"].asString();
|
||||
if(!serviceNode["ServiceId"].isNull())
|
||||
service_.serviceId = serviceNode["ServiceId"].asString();
|
||||
if(!serviceNode["SupplierUrl"].isNull())
|
||||
service_.supplierUrl = serviceNode["SupplierUrl"].asString();
|
||||
if(!serviceNode["ServiceType"].isNull())
|
||||
service_.serviceType = serviceNode["ServiceType"].asString();
|
||||
if(!serviceNode["SupplierName"].isNull())
|
||||
service_.supplierName = serviceNode["SupplierName"].asString();
|
||||
if(!serviceNode["VersionName"].isNull())
|
||||
service_.versionName = serviceNode["VersionName"].asString();
|
||||
if(!serviceNode["UpgradeMetadata"].isNull())
|
||||
service_.upgradeMetadata = serviceNode["UpgradeMetadata"].asString();
|
||||
if(!serviceNode["ServiceProductUrl"].isNull())
|
||||
service_.serviceProductUrl = serviceNode["ServiceProductUrl"].asString();
|
||||
if(!serviceNode["ServiceDocUrl"].isNull())
|
||||
service_.serviceDocUrl = serviceNode["ServiceDocUrl"].asString();
|
||||
auto allServiceInfosNode = serviceNode["ServiceInfos"]["ServiceInfo"];
|
||||
for (auto serviceNodeServiceInfosServiceInfo : allServiceInfosNode)
|
||||
{
|
||||
Service::ServiceInfo serviceInfoObject;
|
||||
if(!serviceNodeServiceInfosServiceInfo["Locale"].isNull())
|
||||
serviceInfoObject.locale = serviceNodeServiceInfosServiceInfo["Locale"].asString();
|
||||
if(!serviceNodeServiceInfosServiceInfo["Image"].isNull())
|
||||
serviceInfoObject.image = serviceNodeServiceInfosServiceInfo["Image"].asString();
|
||||
if(!serviceNodeServiceInfosServiceInfo["Name"].isNull())
|
||||
serviceInfoObject.name = serviceNodeServiceInfosServiceInfo["Name"].asString();
|
||||
if(!serviceNodeServiceInfosServiceInfo["ShortDescription"].isNull())
|
||||
serviceInfoObject.shortDescription = serviceNodeServiceInfosServiceInfo["ShortDescription"].asString();
|
||||
service_.serviceInfos.push_back(serviceInfoObject);
|
||||
}
|
||||
auto allUpgradableServiceVersions = serviceNode["UpgradableServiceVersions"]["UpgradableServiceVersion"];
|
||||
for (auto value : allUpgradableServiceVersions)
|
||||
service_.upgradableServiceVersions.push_back(value.asString());
|
||||
auto networkConfigNode = value["NetworkConfig"];
|
||||
if(!networkConfigNode["EndpointId"].isNull())
|
||||
networkConfig_.endpointId = networkConfigNode["EndpointId"].asString();
|
||||
if(!networkConfigNode["PrivateZoneId"].isNull())
|
||||
networkConfig_.privateZoneId = networkConfigNode["PrivateZoneId"].asString();
|
||||
auto allPrivateVpcConnectionsNode = networkConfigNode["PrivateVpcConnections"]["PrivateVpcConnection"];
|
||||
for (auto networkConfigNodePrivateVpcConnectionsPrivateVpcConnection : allPrivateVpcConnectionsNode)
|
||||
{
|
||||
NetworkConfig::PrivateVpcConnection privateVpcConnectionObject;
|
||||
if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["EndpointId"].isNull())
|
||||
privateVpcConnectionObject.endpointId = networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["EndpointId"].asString();
|
||||
if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["PrivateZoneId"].isNull())
|
||||
privateVpcConnectionObject.privateZoneId = networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["PrivateZoneId"].asString();
|
||||
if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["PrivateZoneName"].isNull())
|
||||
privateVpcConnectionObject.privateZoneName = networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["PrivateZoneName"].asString();
|
||||
if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["RegionId"].isNull())
|
||||
privateVpcConnectionObject.regionId = networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["RegionId"].asString();
|
||||
auto allConnectionConfigsNode = networkConfigNodePrivateVpcConnectionsPrivateVpcConnection["ConnectionConfigs"]["ConnectionConfig"];
|
||||
for (auto networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig : allConnectionConfigsNode)
|
||||
{
|
||||
NetworkConfig::PrivateVpcConnection::ConnectionConfig connectionConfigsObject;
|
||||
if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["VpcId"].isNull())
|
||||
connectionConfigsObject.vpcId = networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["VpcId"].asString();
|
||||
if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["IngressEndpointStatus"].isNull())
|
||||
connectionConfigsObject.ingressEndpointStatus = networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["IngressEndpointStatus"].asString();
|
||||
if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["NetworkServiceStatus"].isNull())
|
||||
connectionConfigsObject.networkServiceStatus = networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["NetworkServiceStatus"].asString();
|
||||
if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["DomainName"].isNull())
|
||||
connectionConfigsObject.domainName = networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["DomainName"].asString();
|
||||
if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["RegionId"].isNull())
|
||||
connectionConfigsObject.regionId = networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["RegionId"].asString();
|
||||
if(!networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["ConnectBandwidth"].isNull())
|
||||
connectionConfigsObject.connectBandwidth = std::stoi(networkConfigNodePrivateVpcConnectionsPrivateVpcConnectionConnectionConfigsConnectionConfig["ConnectBandwidth"].asString());
|
||||
auto allSecurityGroups = value["SecurityGroups"]["SecurityGroup"];
|
||||
for (auto value : allSecurityGroups)
|
||||
connectionConfigsObject.securityGroups.push_back(value.asString());
|
||||
auto allVSwitches = value["VSwitches"]["VSwitch"];
|
||||
for (auto value : allVSwitches)
|
||||
connectionConfigsObject.vSwitches.push_back(value.asString());
|
||||
auto allEndpointIps = value["EndpointIps"]["EndpointIp"];
|
||||
for (auto value : allEndpointIps)
|
||||
connectionConfigsObject.endpointIps.push_back(value.asString());
|
||||
privateVpcConnectionObject.connectionConfigs.push_back(connectionConfigsObject);
|
||||
}
|
||||
networkConfig_.privateVpcConnections.push_back(privateVpcConnectionObject);
|
||||
}
|
||||
auto allReversePrivateVpcConnectionsNode = networkConfigNode["ReversePrivateVpcConnections"]["ReversePrivateVpcConnection"];
|
||||
for (auto networkConfigNodeReversePrivateVpcConnectionsReversePrivateVpcConnection : allReversePrivateVpcConnectionsNode)
|
||||
{
|
||||
NetworkConfig::ReversePrivateVpcConnection reversePrivateVpcConnectionObject;
|
||||
if(!networkConfigNodeReversePrivateVpcConnectionsReversePrivateVpcConnection["EndpointId"].isNull())
|
||||
reversePrivateVpcConnectionObject.endpointId = networkConfigNodeReversePrivateVpcConnectionsReversePrivateVpcConnection["EndpointId"].asString();
|
||||
networkConfig_.reversePrivateVpcConnections.push_back(reversePrivateVpcConnectionObject);
|
||||
}
|
||||
if(!value["Outputs"].isNull())
|
||||
outputs_ = value["Outputs"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
status_ = value["Status"].asString();
|
||||
if(!value["TemplateName"].isNull())
|
||||
templateName_ = value["TemplateName"].asString();
|
||||
if(!value["UpdateTime"].isNull())
|
||||
updateTime_ = value["UpdateTime"].asString();
|
||||
if(!value["Progress"].isNull())
|
||||
progress_ = std::stol(value["Progress"].asString());
|
||||
if(!value["Parameters"].isNull())
|
||||
parameters_ = value["Parameters"].asString();
|
||||
if(!value["ServiceInstanceId"].isNull())
|
||||
serviceInstanceId_ = value["ServiceInstanceId"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["StatusDetail"].isNull())
|
||||
statusDetail_ = value["StatusDetail"].asString();
|
||||
if(!value["Resources"].isNull())
|
||||
resources_ = value["Resources"].asString();
|
||||
if(!value["OperationStartTime"].isNull())
|
||||
operationStartTime_ = value["OperationStartTime"].asString();
|
||||
if(!value["OperationEndTime"].isNull())
|
||||
operationEndTime_ = value["OperationEndTime"].asString();
|
||||
if(!value["OperatedServiceInstanceId"].isNull())
|
||||
operatedServiceInstanceId_ = value["OperatedServiceInstanceId"].asString();
|
||||
if(!value["EnableInstanceOps"].isNull())
|
||||
enableInstanceOps_ = value["EnableInstanceOps"].asString() == "true";
|
||||
if(!value["IsOperated"].isNull())
|
||||
isOperated_ = value["IsOperated"].asString() == "true";
|
||||
if(!value["LicenseEndTime"].isNull())
|
||||
licenseEndTime_ = value["LicenseEndTime"].asString();
|
||||
if(!value["UserId"].isNull())
|
||||
userId_ = std::stol(value["UserId"].asString());
|
||||
if(!value["SupplierUid"].isNull())
|
||||
supplierUid_ = std::stol(value["SupplierUid"].asString());
|
||||
if(!value["EndTime"].isNull())
|
||||
endTime_ = value["EndTime"].asString();
|
||||
if(!value["Source"].isNull())
|
||||
source_ = value["Source"].asString();
|
||||
if(!value["ServiceType"].isNull())
|
||||
serviceType_ = value["ServiceType"].asString();
|
||||
if(!value["PayType"].isNull())
|
||||
payType_ = value["PayType"].asString();
|
||||
if(!value["Name"].isNull())
|
||||
name_ = value["Name"].asString();
|
||||
if(!value["EnableUserPrometheus"].isNull())
|
||||
enableUserPrometheus_ = value["EnableUserPrometheus"].asString() == "true";
|
||||
if(!value["Components"].isNull())
|
||||
components_ = value["Components"].asString();
|
||||
if(!value["PredefinedParameterName"].isNull())
|
||||
predefinedParameterName_ = value["PredefinedParameterName"].asString();
|
||||
if(!value["MarketInstanceId"].isNull())
|
||||
marketInstanceId_ = value["MarketInstanceId"].asString();
|
||||
if(!value["ResourceGroupId"].isNull())
|
||||
resourceGroupId_ = value["ResourceGroupId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getOperatedServiceInstanceId()const
|
||||
{
|
||||
return operatedServiceInstanceId_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getResourceGroupId()const
|
||||
{
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getOperationEndTime()const
|
||||
{
|
||||
return operationEndTime_;
|
||||
}
|
||||
|
||||
bool GetServiceInstanceResult::getEnableInstanceOps()const
|
||||
{
|
||||
return enableInstanceOps_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getPredefinedParameterName()const
|
||||
{
|
||||
return predefinedParameterName_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getSource()const
|
||||
{
|
||||
return source_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getComponents()const
|
||||
{
|
||||
return components_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getOperationStartTime()const
|
||||
{
|
||||
return operationStartTime_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getServiceInstanceId()const
|
||||
{
|
||||
return serviceInstanceId_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getServiceType()const
|
||||
{
|
||||
return serviceType_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getTemplateName()const
|
||||
{
|
||||
return templateName_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getMarketInstanceId()const
|
||||
{
|
||||
return marketInstanceId_;
|
||||
}
|
||||
|
||||
std::vector<GetServiceInstanceResult::Tag> GetServiceInstanceResult::getTags()const
|
||||
{
|
||||
return tags_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
long GetServiceInstanceResult::getProgress()const
|
||||
{
|
||||
return progress_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getParameters()const
|
||||
{
|
||||
return parameters_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
GetServiceInstanceResult::NetworkConfig GetServiceInstanceResult::getNetworkConfig()const
|
||||
{
|
||||
return networkConfig_;
|
||||
}
|
||||
|
||||
GetServiceInstanceResult::Service GetServiceInstanceResult::getService()const
|
||||
{
|
||||
return service_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getPayType()const
|
||||
{
|
||||
return payType_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getLicenseEndTime()const
|
||||
{
|
||||
return licenseEndTime_;
|
||||
}
|
||||
|
||||
long GetServiceInstanceResult::getUserId()const
|
||||
{
|
||||
return userId_;
|
||||
}
|
||||
|
||||
bool GetServiceInstanceResult::getEnableUserPrometheus()const
|
||||
{
|
||||
return enableUserPrometheus_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getStatusDetail()const
|
||||
{
|
||||
return statusDetail_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getOutputs()const
|
||||
{
|
||||
return outputs_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getUpdateTime()const
|
||||
{
|
||||
return updateTime_;
|
||||
}
|
||||
|
||||
bool GetServiceInstanceResult::getIsOperated()const
|
||||
{
|
||||
return isOperated_;
|
||||
}
|
||||
|
||||
long GetServiceInstanceResult::getSupplierUid()const
|
||||
{
|
||||
return supplierUid_;
|
||||
}
|
||||
|
||||
std::string GetServiceInstanceResult::getResources()const
|
||||
{
|
||||
return resources_;
|
||||
}
|
||||
|
||||
63
computenest/src/model/ListServiceInstanceLogsRequest.cc
Normal file
63
computenest/src/model/ListServiceInstanceLogsRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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/computenest/model/ListServiceInstanceLogsRequest.h>
|
||||
|
||||
using AlibabaCloud::ComputeNest::Model::ListServiceInstanceLogsRequest;
|
||||
|
||||
ListServiceInstanceLogsRequest::ListServiceInstanceLogsRequest()
|
||||
: RpcServiceRequest("computenest", "2021-06-01", "ListServiceInstanceLogs") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListServiceInstanceLogsRequest::~ListServiceInstanceLogsRequest() {}
|
||||
|
||||
std::string ListServiceInstanceLogsRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void ListServiceInstanceLogsRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string ListServiceInstanceLogsRequest::getNextToken() const {
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void ListServiceInstanceLogsRequest::setNextToken(const std::string &nextToken) {
|
||||
nextToken_ = nextToken;
|
||||
setParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
std::string ListServiceInstanceLogsRequest::getServiceInstanceId() const {
|
||||
return serviceInstanceId_;
|
||||
}
|
||||
|
||||
void ListServiceInstanceLogsRequest::setServiceInstanceId(const std::string &serviceInstanceId) {
|
||||
serviceInstanceId_ = serviceInstanceId;
|
||||
setParameter(std::string("ServiceInstanceId"), serviceInstanceId);
|
||||
}
|
||||
|
||||
std::string ListServiceInstanceLogsRequest::getMaxResults() const {
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
void ListServiceInstanceLogsRequest::setMaxResults(const std::string &maxResults) {
|
||||
maxResults_ = maxResults;
|
||||
setParameter(std::string("MaxResults"), maxResults);
|
||||
}
|
||||
|
||||
85
computenest/src/model/ListServiceInstanceLogsResult.cc
Normal file
85
computenest/src/model/ListServiceInstanceLogsResult.cc
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 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/computenest/model/ListServiceInstanceLogsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ComputeNest;
|
||||
using namespace AlibabaCloud::ComputeNest::Model;
|
||||
|
||||
ListServiceInstanceLogsResult::ListServiceInstanceLogsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListServiceInstanceLogsResult::ListServiceInstanceLogsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListServiceInstanceLogsResult::~ListServiceInstanceLogsResult()
|
||||
{}
|
||||
|
||||
void ListServiceInstanceLogsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allServiceInstancesLogsNode = value["ServiceInstancesLogs"]["ServiceInstanceLogs"];
|
||||
for (auto valueServiceInstancesLogsServiceInstanceLogs : allServiceInstancesLogsNode)
|
||||
{
|
||||
ServiceInstanceLogs serviceInstancesLogsObject;
|
||||
if(!valueServiceInstancesLogsServiceInstanceLogs["Timestamp"].isNull())
|
||||
serviceInstancesLogsObject.timestamp = valueServiceInstancesLogsServiceInstanceLogs["Timestamp"].asString();
|
||||
if(!valueServiceInstancesLogsServiceInstanceLogs["ServiceInstanceId"].isNull())
|
||||
serviceInstancesLogsObject.serviceInstanceId = valueServiceInstancesLogsServiceInstanceLogs["ServiceInstanceId"].asString();
|
||||
if(!valueServiceInstancesLogsServiceInstanceLogs["Source"].isNull())
|
||||
serviceInstancesLogsObject.source = valueServiceInstancesLogsServiceInstanceLogs["Source"].asString();
|
||||
if(!valueServiceInstancesLogsServiceInstanceLogs["Content"].isNull())
|
||||
serviceInstancesLogsObject.content = valueServiceInstancesLogsServiceInstanceLogs["Content"].asString();
|
||||
if(!valueServiceInstancesLogsServiceInstanceLogs["LogType"].isNull())
|
||||
serviceInstancesLogsObject.logType = valueServiceInstancesLogsServiceInstanceLogs["LogType"].asString();
|
||||
if(!valueServiceInstancesLogsServiceInstanceLogs["ResourceType"].isNull())
|
||||
serviceInstancesLogsObject.resourceType = valueServiceInstancesLogsServiceInstanceLogs["ResourceType"].asString();
|
||||
if(!valueServiceInstancesLogsServiceInstanceLogs["ResourceId"].isNull())
|
||||
serviceInstancesLogsObject.resourceId = valueServiceInstancesLogsServiceInstanceLogs["ResourceId"].asString();
|
||||
if(!valueServiceInstancesLogsServiceInstanceLogs["Status"].isNull())
|
||||
serviceInstancesLogsObject.status = valueServiceInstancesLogsServiceInstanceLogs["Status"].asString();
|
||||
serviceInstancesLogs_.push_back(serviceInstancesLogsObject);
|
||||
}
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = value["MaxResults"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListServiceInstanceLogsResult::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
std::string ListServiceInstanceLogsResult::getMaxResults()const
|
||||
{
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
std::vector<ListServiceInstanceLogsResult::ServiceInstanceLogs> ListServiceInstanceLogsResult::getServiceInstancesLogs()const
|
||||
{
|
||||
return serviceInstancesLogs_;
|
||||
}
|
||||
|
||||
112
computenest/src/model/ListServiceInstanceResourcesRequest.cc
Normal file
112
computenest/src/model/ListServiceInstanceResourcesRequest.cc
Normal file
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
* 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/computenest/model/ListServiceInstanceResourcesRequest.h>
|
||||
|
||||
using AlibabaCloud::ComputeNest::Model::ListServiceInstanceResourcesRequest;
|
||||
|
||||
ListServiceInstanceResourcesRequest::ListServiceInstanceResourcesRequest()
|
||||
: RpcServiceRequest("computenest", "2021-06-01", "ListServiceInstanceResources") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListServiceInstanceResourcesRequest::~ListServiceInstanceResourcesRequest() {}
|
||||
|
||||
std::string ListServiceInstanceResourcesRequest::getExpireTimeEnd() const {
|
||||
return expireTimeEnd_;
|
||||
}
|
||||
|
||||
void ListServiceInstanceResourcesRequest::setExpireTimeEnd(const std::string &expireTimeEnd) {
|
||||
expireTimeEnd_ = expireTimeEnd;
|
||||
setParameter(std::string("ExpireTimeEnd"), expireTimeEnd);
|
||||
}
|
||||
|
||||
std::string ListServiceInstanceResourcesRequest::getNextToken() const {
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void ListServiceInstanceResourcesRequest::setNextToken(const std::string &nextToken) {
|
||||
nextToken_ = nextToken;
|
||||
setParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
std::string ListServiceInstanceResourcesRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void ListServiceInstanceResourcesRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::vector<std::string> ListServiceInstanceResourcesRequest::getResourceARN() const {
|
||||
return resourceARN_;
|
||||
}
|
||||
|
||||
void ListServiceInstanceResourcesRequest::setResourceARN(const std::vector<std::string> &resourceARN) {
|
||||
resourceARN_ = resourceARN;
|
||||
}
|
||||
|
||||
std::vector<ListServiceInstanceResourcesRequest::Tag> ListServiceInstanceResourcesRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void ListServiceInstanceResourcesRequest::setTag(const std::vector<ListServiceInstanceResourcesRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
auto tagObj = tag.at(dep1);
|
||||
std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ListServiceInstanceResourcesRequest::getServiceInstanceId() const {
|
||||
return serviceInstanceId_;
|
||||
}
|
||||
|
||||
void ListServiceInstanceResourcesRequest::setServiceInstanceId(const std::string &serviceInstanceId) {
|
||||
serviceInstanceId_ = serviceInstanceId;
|
||||
setParameter(std::string("ServiceInstanceId"), serviceInstanceId);
|
||||
}
|
||||
|
||||
std::string ListServiceInstanceResourcesRequest::getExpireTimeStart() const {
|
||||
return expireTimeStart_;
|
||||
}
|
||||
|
||||
void ListServiceInstanceResourcesRequest::setExpireTimeStart(const std::string &expireTimeStart) {
|
||||
expireTimeStart_ = expireTimeStart;
|
||||
setParameter(std::string("ExpireTimeStart"), expireTimeStart);
|
||||
}
|
||||
|
||||
std::string ListServiceInstanceResourcesRequest::getMaxResults() const {
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
void ListServiceInstanceResourcesRequest::setMaxResults(const std::string &maxResults) {
|
||||
maxResults_ = maxResults;
|
||||
setParameter(std::string("MaxResults"), maxResults);
|
||||
}
|
||||
|
||||
std::string ListServiceInstanceResourcesRequest::getPayType() const {
|
||||
return payType_;
|
||||
}
|
||||
|
||||
void ListServiceInstanceResourcesRequest::setPayType(const std::string &payType) {
|
||||
payType_ = payType;
|
||||
setParameter(std::string("PayType"), payType);
|
||||
}
|
||||
|
||||
87
computenest/src/model/ListServiceInstanceResourcesResult.cc
Normal file
87
computenest/src/model/ListServiceInstanceResourcesResult.cc
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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/computenest/model/ListServiceInstanceResourcesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ComputeNest;
|
||||
using namespace AlibabaCloud::ComputeNest::Model;
|
||||
|
||||
ListServiceInstanceResourcesResult::ListServiceInstanceResourcesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListServiceInstanceResourcesResult::ListServiceInstanceResourcesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListServiceInstanceResourcesResult::~ListServiceInstanceResourcesResult()
|
||||
{}
|
||||
|
||||
void ListServiceInstanceResourcesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResourcesNode = value["Resources"]["ResourcesItem"];
|
||||
for (auto valueResourcesResourcesItem : allResourcesNode)
|
||||
{
|
||||
ResourcesItem resourcesObject;
|
||||
if(!valueResourcesResourcesItem["ResourceARN"].isNull())
|
||||
resourcesObject.resourceARN = valueResourcesResourcesItem["ResourceARN"].asString();
|
||||
if(!valueResourcesResourcesItem["PayType"].isNull())
|
||||
resourcesObject.payType = valueResourcesResourcesItem["PayType"].asString();
|
||||
if(!valueResourcesResourcesItem["RenewStatus"].isNull())
|
||||
resourcesObject.renewStatus = valueResourcesResourcesItem["RenewStatus"].asString();
|
||||
if(!valueResourcesResourcesItem["CreateTime"].isNull())
|
||||
resourcesObject.createTime = valueResourcesResourcesItem["CreateTime"].asString();
|
||||
if(!valueResourcesResourcesItem["ExpireTime"].isNull())
|
||||
resourcesObject.expireTime = valueResourcesResourcesItem["ExpireTime"].asString();
|
||||
if(!valueResourcesResourcesItem["RenewalPeriod"].isNull())
|
||||
resourcesObject.renewalPeriod = std::stoi(valueResourcesResourcesItem["RenewalPeriod"].asString());
|
||||
if(!valueResourcesResourcesItem["RenewalPeriodUnit"].isNull())
|
||||
resourcesObject.renewalPeriodUnit = valueResourcesResourcesItem["RenewalPeriodUnit"].asString();
|
||||
if(!valueResourcesResourcesItem["ProductType"].isNull())
|
||||
resourcesObject.productType = valueResourcesResourcesItem["ProductType"].asString();
|
||||
if(!valueResourcesResourcesItem["ProductCode"].isNull())
|
||||
resourcesObject.productCode = valueResourcesResourcesItem["ProductCode"].asString();
|
||||
resources_.push_back(resourcesObject);
|
||||
}
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = value["MaxResults"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListServiceInstanceResourcesResult::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
std::string ListServiceInstanceResourcesResult::getMaxResults()const
|
||||
{
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
std::vector<ListServiceInstanceResourcesResult::ResourcesItem> ListServiceInstanceResourcesResult::getResources()const
|
||||
{
|
||||
return resources_;
|
||||
}
|
||||
|
||||
90
computenest/src/model/ListServiceInstancesRequest.cc
Normal file
90
computenest/src/model/ListServiceInstancesRequest.cc
Normal file
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* 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/computenest/model/ListServiceInstancesRequest.h>
|
||||
|
||||
using AlibabaCloud::ComputeNest::Model::ListServiceInstancesRequest;
|
||||
|
||||
ListServiceInstancesRequest::ListServiceInstancesRequest()
|
||||
: RpcServiceRequest("computenest", "2021-06-01", "ListServiceInstances") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListServiceInstancesRequest::~ListServiceInstancesRequest() {}
|
||||
|
||||
std::string ListServiceInstancesRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void ListServiceInstancesRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::string ListServiceInstancesRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void ListServiceInstancesRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string ListServiceInstancesRequest::getNextToken() const {
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void ListServiceInstancesRequest::setNextToken(const std::string &nextToken) {
|
||||
nextToken_ = nextToken;
|
||||
setParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
std::vector<ListServiceInstancesRequest::Tag> ListServiceInstancesRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void ListServiceInstancesRequest::setTag(const std::vector<ListServiceInstancesRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
auto tagObj = tag.at(dep1);
|
||||
std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<ListServiceInstancesRequest::Filter> ListServiceInstancesRequest::getFilter() const {
|
||||
return filter_;
|
||||
}
|
||||
|
||||
void ListServiceInstancesRequest::setFilter(const std::vector<ListServiceInstancesRequest::Filter> &filter) {
|
||||
filter_ = filter;
|
||||
for(int dep1 = 0; dep1 != filter.size(); dep1++) {
|
||||
auto filterObj = filter.at(dep1);
|
||||
std::string filterObjStr = std::string("Filter") + "." + std::to_string(dep1 + 1);
|
||||
setParameter(filterObjStr + ".Name", filterObj.name);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ListServiceInstancesRequest::getMaxResults() const {
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
void ListServiceInstancesRequest::setMaxResults(const std::string &maxResults) {
|
||||
maxResults_ = maxResults;
|
||||
setParameter(std::string("MaxResults"), maxResults);
|
||||
}
|
||||
|
||||
161
computenest/src/model/ListServiceInstancesResult.cc
Normal file
161
computenest/src/model/ListServiceInstancesResult.cc
Normal file
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* 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/computenest/model/ListServiceInstancesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ComputeNest;
|
||||
using namespace AlibabaCloud::ComputeNest::Model;
|
||||
|
||||
ListServiceInstancesResult::ListServiceInstancesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListServiceInstancesResult::ListServiceInstancesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListServiceInstancesResult::~ListServiceInstancesResult()
|
||||
{}
|
||||
|
||||
void ListServiceInstancesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allServiceInstancesNode = value["ServiceInstances"]["ServiceInstance"];
|
||||
for (auto valueServiceInstancesServiceInstance : allServiceInstancesNode)
|
||||
{
|
||||
ServiceInstance serviceInstancesObject;
|
||||
if(!valueServiceInstancesServiceInstance["Name"].isNull())
|
||||
serviceInstancesObject.name = valueServiceInstancesServiceInstance["Name"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["Status"].isNull())
|
||||
serviceInstancesObject.status = valueServiceInstancesServiceInstance["Status"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["Outputs"].isNull())
|
||||
serviceInstancesObject.outputs = valueServiceInstancesServiceInstance["Outputs"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["UpdateTime"].isNull())
|
||||
serviceInstancesObject.updateTime = valueServiceInstancesServiceInstance["UpdateTime"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["Parameters"].isNull())
|
||||
serviceInstancesObject.parameters = valueServiceInstancesServiceInstance["Parameters"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["ServiceInstanceId"].isNull())
|
||||
serviceInstancesObject.serviceInstanceId = valueServiceInstancesServiceInstance["ServiceInstanceId"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["CreateTime"].isNull())
|
||||
serviceInstancesObject.createTime = valueServiceInstancesServiceInstance["CreateTime"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["StatusDetail"].isNull())
|
||||
serviceInstancesObject.statusDetail = valueServiceInstancesServiceInstance["StatusDetail"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["Progress"].isNull())
|
||||
serviceInstancesObject.progress = std::stol(valueServiceInstancesServiceInstance["Progress"].asString());
|
||||
if(!valueServiceInstancesServiceInstance["Resources"].isNull())
|
||||
serviceInstancesObject.resources = valueServiceInstancesServiceInstance["Resources"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["TemplateName"].isNull())
|
||||
serviceInstancesObject.templateName = valueServiceInstancesServiceInstance["TemplateName"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["OperatedServiceInstanceId"].isNull())
|
||||
serviceInstancesObject.operatedServiceInstanceId = valueServiceInstancesServiceInstance["OperatedServiceInstanceId"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["OperationStartTime"].isNull())
|
||||
serviceInstancesObject.operationStartTime = valueServiceInstancesServiceInstance["OperationStartTime"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["OperationEndTime"].isNull())
|
||||
serviceInstancesObject.operationEndTime = valueServiceInstancesServiceInstance["OperationEndTime"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["EnableInstanceOps"].isNull())
|
||||
serviceInstancesObject.enableInstanceOps = valueServiceInstancesServiceInstance["EnableInstanceOps"].asString() == "true";
|
||||
if(!valueServiceInstancesServiceInstance["Source"].isNull())
|
||||
serviceInstancesObject.source = valueServiceInstancesServiceInstance["Source"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["EndTime"].isNull())
|
||||
serviceInstancesObject.endTime = valueServiceInstancesServiceInstance["EndTime"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["ServiceType"].isNull())
|
||||
serviceInstancesObject.serviceType = valueServiceInstancesServiceInstance["ServiceType"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["PayType"].isNull())
|
||||
serviceInstancesObject.payType = valueServiceInstancesServiceInstance["PayType"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["MarketInstanceId"].isNull())
|
||||
serviceInstancesObject.marketInstanceId = valueServiceInstancesServiceInstance["MarketInstanceId"].asString();
|
||||
if(!valueServiceInstancesServiceInstance["ResourceGroupId"].isNull())
|
||||
serviceInstancesObject.resourceGroupId = valueServiceInstancesServiceInstance["ResourceGroupId"].asString();
|
||||
auto allTagsNode = valueServiceInstancesServiceInstance["Tags"]["Tag"];
|
||||
for (auto valueServiceInstancesServiceInstanceTagsTag : allTagsNode)
|
||||
{
|
||||
ServiceInstance::Tag tagsObject;
|
||||
if(!valueServiceInstancesServiceInstanceTagsTag["Key"].isNull())
|
||||
tagsObject.key = valueServiceInstancesServiceInstanceTagsTag["Key"].asString();
|
||||
if(!valueServiceInstancesServiceInstanceTagsTag["Value"].isNull())
|
||||
tagsObject.value = valueServiceInstancesServiceInstanceTagsTag["Value"].asString();
|
||||
serviceInstancesObject.tags.push_back(tagsObject);
|
||||
}
|
||||
auto serviceNode = value["Service"];
|
||||
if(!serviceNode["Status"].isNull())
|
||||
serviceInstancesObject.service.status = serviceNode["Status"].asString();
|
||||
if(!serviceNode["PublishTime"].isNull())
|
||||
serviceInstancesObject.service.publishTime = serviceNode["PublishTime"].asString();
|
||||
if(!serviceNode["Version"].isNull())
|
||||
serviceInstancesObject.service.version = serviceNode["Version"].asString();
|
||||
if(!serviceNode["DeployType"].isNull())
|
||||
serviceInstancesObject.service.deployType = serviceNode["DeployType"].asString();
|
||||
if(!serviceNode["ServiceId"].isNull())
|
||||
serviceInstancesObject.service.serviceId = serviceNode["ServiceId"].asString();
|
||||
if(!serviceNode["SupplierUrl"].isNull())
|
||||
serviceInstancesObject.service.supplierUrl = serviceNode["SupplierUrl"].asString();
|
||||
if(!serviceNode["ServiceType"].isNull())
|
||||
serviceInstancesObject.service.serviceType = serviceNode["ServiceType"].asString();
|
||||
if(!serviceNode["SupplierName"].isNull())
|
||||
serviceInstancesObject.service.supplierName = serviceNode["SupplierName"].asString();
|
||||
if(!serviceNode["VersionName"].isNull())
|
||||
serviceInstancesObject.service.versionName = serviceNode["VersionName"].asString();
|
||||
auto allServiceInfosNode = serviceNode["ServiceInfos"]["ServiceInfo"];
|
||||
for (auto serviceNodeServiceInfosServiceInfo : allServiceInfosNode)
|
||||
{
|
||||
ServiceInstance::Service::ServiceInfo serviceInfoObject;
|
||||
if(!serviceNodeServiceInfosServiceInfo["Locale"].isNull())
|
||||
serviceInfoObject.locale = serviceNodeServiceInfosServiceInfo["Locale"].asString();
|
||||
if(!serviceNodeServiceInfosServiceInfo["Image"].isNull())
|
||||
serviceInfoObject.image = serviceNodeServiceInfosServiceInfo["Image"].asString();
|
||||
if(!serviceNodeServiceInfosServiceInfo["Name"].isNull())
|
||||
serviceInfoObject.name = serviceNodeServiceInfosServiceInfo["Name"].asString();
|
||||
if(!serviceNodeServiceInfosServiceInfo["ShortDescription"].isNull())
|
||||
serviceInfoObject.shortDescription = serviceNodeServiceInfosServiceInfo["ShortDescription"].asString();
|
||||
serviceInstancesObject.service.serviceInfos.push_back(serviceInfoObject);
|
||||
}
|
||||
serviceInstances_.push_back(serviceInstancesObject);
|
||||
}
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stol(value["TotalCount"].asString());
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = value["MaxResults"].asString();
|
||||
|
||||
}
|
||||
|
||||
long ListServiceInstancesResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::vector<ListServiceInstancesResult::ServiceInstance> ListServiceInstancesResult::getServiceInstances()const
|
||||
{
|
||||
return serviceInstances_;
|
||||
}
|
||||
|
||||
std::string ListServiceInstancesResult::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
std::string ListServiceInstancesResult::getMaxResults()const
|
||||
{
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user