Support GetParameters, GetParametersByPath, GetSecretParameters, GetSecretParametersByPath.

This commit is contained in:
sdk-team
2020-10-28 09:50:13 +00:00
parent 7fd0c7bf01
commit 5f2a993b52
58 changed files with 3074 additions and 3 deletions

View File

@@ -483,6 +483,42 @@ OosClient::GetExecutionTemplateOutcomeCallable OosClient::getExecutionTemplateCa
return task->get_future();
}
OosClient::GetInventorySchemaOutcome OosClient::getInventorySchema(const GetInventorySchemaRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetInventorySchemaOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetInventorySchemaOutcome(GetInventorySchemaResult(outcome.result()));
else
return GetInventorySchemaOutcome(outcome.error());
}
void OosClient::getInventorySchemaAsync(const GetInventorySchemaRequest& request, const GetInventorySchemaAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getInventorySchema(request), context);
};
asyncExecute(new Runnable(fn));
}
OosClient::GetInventorySchemaOutcomeCallable OosClient::getInventorySchemaCallable(const GetInventorySchemaRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetInventorySchemaOutcome()>>(
[this, request]()
{
return this->getInventorySchema(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OosClient::GetParameterOutcome OosClient::getParameter(const GetParameterRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -519,6 +555,78 @@ OosClient::GetParameterOutcomeCallable OosClient::getParameterCallable(const Get
return task->get_future();
}
OosClient::GetParametersOutcome OosClient::getParameters(const GetParametersRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetParametersOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetParametersOutcome(GetParametersResult(outcome.result()));
else
return GetParametersOutcome(outcome.error());
}
void OosClient::getParametersAsync(const GetParametersRequest& request, const GetParametersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getParameters(request), context);
};
asyncExecute(new Runnable(fn));
}
OosClient::GetParametersOutcomeCallable OosClient::getParametersCallable(const GetParametersRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetParametersOutcome()>>(
[this, request]()
{
return this->getParameters(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OosClient::GetParametersByPathOutcome OosClient::getParametersByPath(const GetParametersByPathRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetParametersByPathOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetParametersByPathOutcome(GetParametersByPathResult(outcome.result()));
else
return GetParametersByPathOutcome(outcome.error());
}
void OosClient::getParametersByPathAsync(const GetParametersByPathRequest& request, const GetParametersByPathAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getParametersByPath(request), context);
};
asyncExecute(new Runnable(fn));
}
OosClient::GetParametersByPathOutcomeCallable OosClient::getParametersByPathCallable(const GetParametersByPathRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetParametersByPathOutcome()>>(
[this, request]()
{
return this->getParametersByPath(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OosClient::GetSecretParameterOutcome OosClient::getSecretParameter(const GetSecretParameterRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -555,6 +663,78 @@ OosClient::GetSecretParameterOutcomeCallable OosClient::getSecretParameterCallab
return task->get_future();
}
OosClient::GetSecretParametersOutcome OosClient::getSecretParameters(const GetSecretParametersRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetSecretParametersOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetSecretParametersOutcome(GetSecretParametersResult(outcome.result()));
else
return GetSecretParametersOutcome(outcome.error());
}
void OosClient::getSecretParametersAsync(const GetSecretParametersRequest& request, const GetSecretParametersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getSecretParameters(request), context);
};
asyncExecute(new Runnable(fn));
}
OosClient::GetSecretParametersOutcomeCallable OosClient::getSecretParametersCallable(const GetSecretParametersRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetSecretParametersOutcome()>>(
[this, request]()
{
return this->getSecretParameters(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OosClient::GetSecretParametersByPathOutcome OosClient::getSecretParametersByPath(const GetSecretParametersByPathRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetSecretParametersByPathOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetSecretParametersByPathOutcome(GetSecretParametersByPathResult(outcome.result()));
else
return GetSecretParametersByPathOutcome(outcome.error());
}
void OosClient::getSecretParametersByPathAsync(const GetSecretParametersByPathRequest& request, const GetSecretParametersByPathAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getSecretParametersByPath(request), context);
};
asyncExecute(new Runnable(fn));
}
OosClient::GetSecretParametersByPathOutcomeCallable OosClient::getSecretParametersByPathCallable(const GetSecretParametersByPathRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetSecretParametersByPathOutcome()>>(
[this, request]()
{
return this->getSecretParametersByPath(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OosClient::GetTemplateOutcome OosClient::getTemplate(const GetTemplateRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -735,6 +915,42 @@ OosClient::ListExecutionsOutcomeCallable OosClient::listExecutionsCallable(const
return task->get_future();
}
OosClient::ListInventoryEntriesOutcome OosClient::listInventoryEntries(const ListInventoryEntriesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListInventoryEntriesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListInventoryEntriesOutcome(ListInventoryEntriesResult(outcome.result()));
else
return ListInventoryEntriesOutcome(outcome.error());
}
void OosClient::listInventoryEntriesAsync(const ListInventoryEntriesRequest& request, const ListInventoryEntriesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listInventoryEntries(request), context);
};
asyncExecute(new Runnable(fn));
}
OosClient::ListInventoryEntriesOutcomeCallable OosClient::listInventoryEntriesCallable(const ListInventoryEntriesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListInventoryEntriesOutcome()>>(
[this, request]()
{
return this->listInventoryEntries(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OosClient::ListParameterVersionsOutcome OosClient::listParameterVersions(const ListParameterVersionsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1167,6 +1383,42 @@ OosClient::NotifyExecutionOutcomeCallable OosClient::notifyExecutionCallable(con
return task->get_future();
}
OosClient::SearchInventoryOutcome OosClient::searchInventory(const SearchInventoryRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SearchInventoryOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SearchInventoryOutcome(SearchInventoryResult(outcome.result()));
else
return SearchInventoryOutcome(outcome.error());
}
void OosClient::searchInventoryAsync(const SearchInventoryRequest& request, const SearchInventoryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, searchInventory(request), context);
};
asyncExecute(new Runnable(fn));
}
OosClient::SearchInventoryOutcomeCallable OosClient::searchInventoryCallable(const SearchInventoryRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SearchInventoryOutcome()>>(
[this, request]()
{
return this->searchInventory(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OosClient::StartExecutionOutcome OosClient::startExecution(const StartExecutionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1311,6 +1563,78 @@ OosClient::UntagResourcesOutcomeCallable OosClient::untagResourcesCallable(const
return task->get_future();
}
OosClient::UpdateExecutionOutcome OosClient::updateExecution(const UpdateExecutionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateExecutionOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateExecutionOutcome(UpdateExecutionResult(outcome.result()));
else
return UpdateExecutionOutcome(outcome.error());
}
void OosClient::updateExecutionAsync(const UpdateExecutionRequest& request, const UpdateExecutionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateExecution(request), context);
};
asyncExecute(new Runnable(fn));
}
OosClient::UpdateExecutionOutcomeCallable OosClient::updateExecutionCallable(const UpdateExecutionRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateExecutionOutcome()>>(
[this, request]()
{
return this->updateExecution(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OosClient::UpdateInstanceInformationOutcome OosClient::updateInstanceInformation(const UpdateInstanceInformationRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateInstanceInformationOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateInstanceInformationOutcome(UpdateInstanceInformationResult(outcome.result()));
else
return UpdateInstanceInformationOutcome(outcome.error());
}
void OosClient::updateInstanceInformationAsync(const UpdateInstanceInformationRequest& request, const UpdateInstanceInformationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateInstanceInformation(request), context);
};
asyncExecute(new Runnable(fn));
}
OosClient::UpdateInstanceInformationOutcomeCallable OosClient::updateInstanceInformationCallable(const UpdateInstanceInformationRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateInstanceInformationOutcome()>>(
[this, request]()
{
return this->updateInstanceInformation(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OosClient::UpdateParameterOutcome OosClient::updateParameter(const UpdateParameterRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -60,6 +60,17 @@ void CreateParameterRequest::setType(const std::string& type)
setParameter("Type", type);
}
std::string CreateParameterRequest::getConstraints()const
{
return constraints_;
}
void CreateParameterRequest::setConstraints(const std::string& constraints)
{
constraints_ = constraints;
setParameter("Constraints", constraints);
}
std::string CreateParameterRequest::getRegionId()const
{
return regionId_;

View File

@@ -60,6 +60,8 @@ void CreateParameterResult::parse(const std::string &payload)
_parameter_.parameterVersion = std::stoi(_parameterNode["ParameterVersion"].asString());
if(!_parameterNode["Type"].isNull())
_parameter_.type = _parameterNode["Type"].asString();
if(!_parameterNode["Constraints"].isNull())
_parameter_.constraints = _parameterNode["Constraints"].asString();
}

View File

@@ -71,6 +71,17 @@ void CreateSecretParameterRequest::setType(const std::string& type)
setParameter("Type", type);
}
std::string CreateSecretParameterRequest::getConstraints()const
{
return constraints_;
}
void CreateSecretParameterRequest::setConstraints(const std::string& constraints)
{
constraints_ = constraints;
setParameter("Constraints", constraints);
}
std::string CreateSecretParameterRequest::getRegionId()const
{
return regionId_;

View File

@@ -60,6 +60,10 @@ void CreateSecretParameterResult::parse(const std::string &payload)
_parameter_.parameterVersion = std::stoi(_parameterNode["ParameterVersion"].asString());
if(!_parameterNode["Type"].isNull())
_parameter_.type = _parameterNode["Type"].asString();
if(!_parameterNode["Constraints"].isNull())
_parameter_.constraints = _parameterNode["Constraints"].asString();
if(!_parameterNode["KeyId"].isNull())
_parameter_.keyId = _parameterNode["KeyId"].asString();
}

View 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/oos/model/GetInventorySchemaRequest.h>
using AlibabaCloud::Oos::Model::GetInventorySchemaRequest;
GetInventorySchemaRequest::GetInventorySchemaRequest() :
RpcServiceRequest("oos", "2019-06-01", "GetInventorySchema")
{
setMethod(HttpRequest::Method::Post);
}
GetInventorySchemaRequest::~GetInventorySchemaRequest()
{}
bool GetInventorySchemaRequest::getAggregator()const
{
return aggregator_;
}
void GetInventorySchemaRequest::setAggregator(bool aggregator)
{
aggregator_ = aggregator;
setParameter("Aggregator", aggregator ? "true" : "false");
}
std::string GetInventorySchemaRequest::getRegionId()const
{
return regionId_;
}
void GetInventorySchemaRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string GetInventorySchemaRequest::getNextToken()const
{
return nextToken_;
}
void GetInventorySchemaRequest::setNextToken(const std::string& nextToken)
{
nextToken_ = nextToken;
setParameter("NextToken", nextToken);
}
int GetInventorySchemaRequest::getMaxResults()const
{
return maxResults_;
}
void GetInventorySchemaRequest::setMaxResults(int maxResults)
{
maxResults_ = maxResults;
setParameter("MaxResults", std::to_string(maxResults));
}
std::string GetInventorySchemaRequest::getTypeName()const
{
return typeName_;
}
void GetInventorySchemaRequest::setTypeName(const std::string& typeName)
{
typeName_ = typeName;
setParameter("TypeName", typeName);
}

View File

@@ -0,0 +1,76 @@
/*
* 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/oos/model/GetInventorySchemaResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Oos;
using namespace AlibabaCloud::Oos::Model;
GetInventorySchemaResult::GetInventorySchemaResult() :
ServiceResult()
{}
GetInventorySchemaResult::GetInventorySchemaResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetInventorySchemaResult::~GetInventorySchemaResult()
{}
void GetInventorySchemaResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allSchemasNode = value["Schemas"]["Schema"];
for (auto valueSchemasSchema : allSchemasNode)
{
Schema schemasObject;
if(!valueSchemasSchema["TypeName"].isNull())
schemasObject.typeName = valueSchemasSchema["TypeName"].asString();
if(!valueSchemasSchema["Version"].isNull())
schemasObject.version = valueSchemasSchema["Version"].asString();
auto allAttributesNode = allSchemasNode["Attributes"]["Attribute"];
for (auto allSchemasNodeAttributesAttribute : allAttributesNode)
{
Schema::Attribute attributesObject;
if(!allSchemasNodeAttributesAttribute["Name"].isNull())
attributesObject.name = allSchemasNodeAttributesAttribute["Name"].asString();
if(!allSchemasNodeAttributesAttribute["DataType"].isNull())
attributesObject.dataType = allSchemasNodeAttributesAttribute["DataType"].asString();
schemasObject.attributes.push_back(attributesObject);
}
schemas_.push_back(schemasObject);
}
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
}
std::string GetInventorySchemaResult::getNextToken()const
{
return nextToken_;
}
std::vector<GetInventorySchemaResult::Schema> GetInventorySchemaResult::getSchemas()const
{
return schemas_;
}

View File

@@ -62,6 +62,8 @@ void GetParameterResult::parse(const std::string &payload)
_parameter_.type = _parameterNode["Type"].asString();
if(!_parameterNode["Value"].isNull())
_parameter_.value = _parameterNode["Value"].asString();
if(!_parameterNode["Constraints"].isNull())
_parameter_.constraints = _parameterNode["Constraints"].asString();
}

View 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/oos/model/GetParametersByPathRequest.h>
using AlibabaCloud::Oos::Model::GetParametersByPathRequest;
GetParametersByPathRequest::GetParametersByPathRequest() :
RpcServiceRequest("oos", "2019-06-01", "GetParametersByPath")
{
setMethod(HttpRequest::Method::Post);
}
GetParametersByPathRequest::~GetParametersByPathRequest()
{}
bool GetParametersByPathRequest::getRecursive()const
{
return recursive_;
}
void GetParametersByPathRequest::setRecursive(bool recursive)
{
recursive_ = recursive;
setParameter("Recursive", recursive ? "true" : "false");
}
std::string GetParametersByPathRequest::getPath()const
{
return path_;
}
void GetParametersByPathRequest::setPath(const std::string& path)
{
path_ = path;
setParameter("Path", path);
}
std::string GetParametersByPathRequest::getRegionId()const
{
return regionId_;
}
void GetParametersByPathRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string GetParametersByPathRequest::getNextToken()const
{
return nextToken_;
}
void GetParametersByPathRequest::setNextToken(const std::string& nextToken)
{
nextToken_ = nextToken;
setParameter("NextToken", nextToken);
}
int GetParametersByPathRequest::getMaxResults()const
{
return maxResults_;
}
void GetParametersByPathRequest::setMaxResults(int maxResults)
{
maxResults_ = maxResults;
setParameter("MaxResults", std::to_string(maxResults));
}

View File

@@ -0,0 +1,100 @@
/*
* 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/oos/model/GetParametersByPathResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Oos;
using namespace AlibabaCloud::Oos::Model;
GetParametersByPathResult::GetParametersByPathResult() :
ServiceResult()
{}
GetParametersByPathResult::GetParametersByPathResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetParametersByPathResult::~GetParametersByPathResult()
{}
void GetParametersByPathResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allParametersNode = value["Parameters"]["Parameter"];
for (auto valueParametersParameter : allParametersNode)
{
_Parameter parametersObject;
if(!valueParametersParameter["Id"].isNull())
parametersObject.id = valueParametersParameter["Id"].asString();
if(!valueParametersParameter["Name"].isNull())
parametersObject.name = valueParametersParameter["Name"].asString();
if(!valueParametersParameter["CreatedDate"].isNull())
parametersObject.createdDate = valueParametersParameter["CreatedDate"].asString();
if(!valueParametersParameter["CreatedBy"].isNull())
parametersObject.createdBy = valueParametersParameter["CreatedBy"].asString();
if(!valueParametersParameter["UpdatedDate"].isNull())
parametersObject.updatedDate = valueParametersParameter["UpdatedDate"].asString();
if(!valueParametersParameter["UpdatedBy"].isNull())
parametersObject.updatedBy = valueParametersParameter["UpdatedBy"].asString();
if(!valueParametersParameter["Description"].isNull())
parametersObject.description = valueParametersParameter["Description"].asString();
if(!valueParametersParameter["ShareType"].isNull())
parametersObject.shareType = valueParametersParameter["ShareType"].asString();
if(!valueParametersParameter["ParameterVersion"].isNull())
parametersObject.parameterVersion = std::stoi(valueParametersParameter["ParameterVersion"].asString());
if(!valueParametersParameter["Type"].isNull())
parametersObject.type = valueParametersParameter["Type"].asString();
if(!valueParametersParameter["Value"].isNull())
parametersObject.value = valueParametersParameter["Value"].asString();
if(!valueParametersParameter["Constraints"].isNull())
parametersObject.constraints = valueParametersParameter["Constraints"].asString();
parameters_.push_back(parametersObject);
}
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
if(!value["MaxResults"].isNull())
maxResults_ = std::stoi(value["MaxResults"].asString());
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
}
int GetParametersByPathResult::getTotalCount()const
{
return totalCount_;
}
std::vector<GetParametersByPathResult::_Parameter> GetParametersByPathResult::getParameters()const
{
return parameters_;
}
std::string GetParametersByPathResult::getNextToken()const
{
return nextToken_;
}
int GetParametersByPathResult::getMaxResults()const
{
return maxResults_;
}

View 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/oos/model/GetParametersRequest.h>
using AlibabaCloud::Oos::Model::GetParametersRequest;
GetParametersRequest::GetParametersRequest() :
RpcServiceRequest("oos", "2019-06-01", "GetParameters")
{
setMethod(HttpRequest::Method::Post);
}
GetParametersRequest::~GetParametersRequest()
{}
std::string GetParametersRequest::getNames()const
{
return names_;
}
void GetParametersRequest::setNames(const std::string& names)
{
names_ = names;
setParameter("Names", names);
}
std::string GetParametersRequest::getRegionId()const
{
return regionId_;
}
void GetParametersRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}

View 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/oos/model/GetParametersResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Oos;
using namespace AlibabaCloud::Oos::Model;
GetParametersResult::GetParametersResult() :
ServiceResult()
{}
GetParametersResult::GetParametersResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetParametersResult::~GetParametersResult()
{}
void GetParametersResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allParametersNode = value["Parameters"]["Parameter"];
for (auto valueParametersParameter : allParametersNode)
{
_Parameter parametersObject;
if(!valueParametersParameter["Id"].isNull())
parametersObject.id = valueParametersParameter["Id"].asString();
if(!valueParametersParameter["Name"].isNull())
parametersObject.name = valueParametersParameter["Name"].asString();
if(!valueParametersParameter["CreatedDate"].isNull())
parametersObject.createdDate = valueParametersParameter["CreatedDate"].asString();
if(!valueParametersParameter["CreatedBy"].isNull())
parametersObject.createdBy = valueParametersParameter["CreatedBy"].asString();
if(!valueParametersParameter["UpdatedDate"].isNull())
parametersObject.updatedDate = valueParametersParameter["UpdatedDate"].asString();
if(!valueParametersParameter["UpdatedBy"].isNull())
parametersObject.updatedBy = valueParametersParameter["UpdatedBy"].asString();
if(!valueParametersParameter["Description"].isNull())
parametersObject.description = valueParametersParameter["Description"].asString();
if(!valueParametersParameter["ShareType"].isNull())
parametersObject.shareType = valueParametersParameter["ShareType"].asString();
if(!valueParametersParameter["ParameterVersion"].isNull())
parametersObject.parameterVersion = std::stoi(valueParametersParameter["ParameterVersion"].asString());
if(!valueParametersParameter["Type"].isNull())
parametersObject.type = valueParametersParameter["Type"].asString();
if(!valueParametersParameter["Value"].isNull())
parametersObject.value = valueParametersParameter["Value"].asString();
if(!valueParametersParameter["Constraints"].isNull())
parametersObject.constraints = valueParametersParameter["Constraints"].asString();
parameters_.push_back(parametersObject);
}
auto allInvalidParameters = value["InvalidParameters"]["InvalidParameter"];
for (const auto &item : allInvalidParameters)
invalidParameters_.push_back(item.asString());
}
std::vector<GetParametersResult::_Parameter> GetParametersResult::getParameters()const
{
return parameters_;
}
std::vector<std::string> GetParametersResult::getInvalidParameters()const
{
return invalidParameters_;
}

View File

@@ -62,6 +62,10 @@ void GetSecretParameterResult::parse(const std::string &payload)
_parameter_.type = _parameterNode["Type"].asString();
if(!_parameterNode["Value"].isNull())
_parameter_.value = _parameterNode["Value"].asString();
if(!_parameterNode["Constraints"].isNull())
_parameter_.constraints = _parameterNode["Constraints"].asString();
if(!_parameterNode["KeyId"].isNull())
_parameter_.keyId = _parameterNode["KeyId"].asString();
}

View File

@@ -0,0 +1,95 @@
/*
* 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/oos/model/GetSecretParametersByPathRequest.h>
using AlibabaCloud::Oos::Model::GetSecretParametersByPathRequest;
GetSecretParametersByPathRequest::GetSecretParametersByPathRequest() :
RpcServiceRequest("oos", "2019-06-01", "GetSecretParametersByPath")
{
setMethod(HttpRequest::Method::Post);
}
GetSecretParametersByPathRequest::~GetSecretParametersByPathRequest()
{}
bool GetSecretParametersByPathRequest::getWithDecryption()const
{
return withDecryption_;
}
void GetSecretParametersByPathRequest::setWithDecryption(bool withDecryption)
{
withDecryption_ = withDecryption;
setParameter("WithDecryption", withDecryption ? "true" : "false");
}
bool GetSecretParametersByPathRequest::getRecursive()const
{
return recursive_;
}
void GetSecretParametersByPathRequest::setRecursive(bool recursive)
{
recursive_ = recursive;
setParameter("Recursive", recursive ? "true" : "false");
}
std::string GetSecretParametersByPathRequest::getPath()const
{
return path_;
}
void GetSecretParametersByPathRequest::setPath(const std::string& path)
{
path_ = path;
setParameter("Path", path);
}
std::string GetSecretParametersByPathRequest::getRegionId()const
{
return regionId_;
}
void GetSecretParametersByPathRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string GetSecretParametersByPathRequest::getNextToken()const
{
return nextToken_;
}
void GetSecretParametersByPathRequest::setNextToken(const std::string& nextToken)
{
nextToken_ = nextToken;
setParameter("NextToken", nextToken);
}
int GetSecretParametersByPathRequest::getMaxResults()const
{
return maxResults_;
}
void GetSecretParametersByPathRequest::setMaxResults(int maxResults)
{
maxResults_ = maxResults;
setParameter("MaxResults", std::to_string(maxResults));
}

View File

@@ -0,0 +1,102 @@
/*
* 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/oos/model/GetSecretParametersByPathResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Oos;
using namespace AlibabaCloud::Oos::Model;
GetSecretParametersByPathResult::GetSecretParametersByPathResult() :
ServiceResult()
{}
GetSecretParametersByPathResult::GetSecretParametersByPathResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetSecretParametersByPathResult::~GetSecretParametersByPathResult()
{}
void GetSecretParametersByPathResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allParametersNode = value["Parameters"]["Parameter"];
for (auto valueParametersParameter : allParametersNode)
{
_Parameter parametersObject;
if(!valueParametersParameter["Id"].isNull())
parametersObject.id = valueParametersParameter["Id"].asString();
if(!valueParametersParameter["Name"].isNull())
parametersObject.name = valueParametersParameter["Name"].asString();
if(!valueParametersParameter["CreatedDate"].isNull())
parametersObject.createdDate = valueParametersParameter["CreatedDate"].asString();
if(!valueParametersParameter["CreatedBy"].isNull())
parametersObject.createdBy = valueParametersParameter["CreatedBy"].asString();
if(!valueParametersParameter["UpdatedDate"].isNull())
parametersObject.updatedDate = valueParametersParameter["UpdatedDate"].asString();
if(!valueParametersParameter["UpdatedBy"].isNull())
parametersObject.updatedBy = valueParametersParameter["UpdatedBy"].asString();
if(!valueParametersParameter["Description"].isNull())
parametersObject.description = valueParametersParameter["Description"].asString();
if(!valueParametersParameter["ShareType"].isNull())
parametersObject.shareType = valueParametersParameter["ShareType"].asString();
if(!valueParametersParameter["ParameterVersion"].isNull())
parametersObject.parameterVersion = std::stoi(valueParametersParameter["ParameterVersion"].asString());
if(!valueParametersParameter["Type"].isNull())
parametersObject.type = valueParametersParameter["Type"].asString();
if(!valueParametersParameter["Value"].isNull())
parametersObject.value = valueParametersParameter["Value"].asString();
if(!valueParametersParameter["Constraints"].isNull())
parametersObject.constraints = valueParametersParameter["Constraints"].asString();
if(!valueParametersParameter["KeyId"].isNull())
parametersObject.keyId = valueParametersParameter["KeyId"].asString();
parameters_.push_back(parametersObject);
}
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
if(!value["MaxResults"].isNull())
maxResults_ = std::stoi(value["MaxResults"].asString());
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
}
int GetSecretParametersByPathResult::getTotalCount()const
{
return totalCount_;
}
std::vector<GetSecretParametersByPathResult::_Parameter> GetSecretParametersByPathResult::getParameters()const
{
return parameters_;
}
std::string GetSecretParametersByPathResult::getNextToken()const
{
return nextToken_;
}
int GetSecretParametersByPathResult::getMaxResults()const
{
return maxResults_;
}

View 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/oos/model/GetSecretParametersRequest.h>
using AlibabaCloud::Oos::Model::GetSecretParametersRequest;
GetSecretParametersRequest::GetSecretParametersRequest() :
RpcServiceRequest("oos", "2019-06-01", "GetSecretParameters")
{
setMethod(HttpRequest::Method::Post);
}
GetSecretParametersRequest::~GetSecretParametersRequest()
{}
bool GetSecretParametersRequest::getWithDecryption()const
{
return withDecryption_;
}
void GetSecretParametersRequest::setWithDecryption(bool withDecryption)
{
withDecryption_ = withDecryption;
setParameter("WithDecryption", withDecryption ? "true" : "false");
}
std::string GetSecretParametersRequest::getNames()const
{
return names_;
}
void GetSecretParametersRequest::setNames(const std::string& names)
{
names_ = names;
setParameter("Names", names);
}
std::string GetSecretParametersRequest::getRegionId()const
{
return regionId_;
}
void GetSecretParametersRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}

View File

@@ -0,0 +1,89 @@
/*
* 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/oos/model/GetSecretParametersResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Oos;
using namespace AlibabaCloud::Oos::Model;
GetSecretParametersResult::GetSecretParametersResult() :
ServiceResult()
{}
GetSecretParametersResult::GetSecretParametersResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetSecretParametersResult::~GetSecretParametersResult()
{}
void GetSecretParametersResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allParametersNode = value["Parameters"]["Parameter"];
for (auto valueParametersParameter : allParametersNode)
{
_Parameter parametersObject;
if(!valueParametersParameter["Id"].isNull())
parametersObject.id = valueParametersParameter["Id"].asString();
if(!valueParametersParameter["Name"].isNull())
parametersObject.name = valueParametersParameter["Name"].asString();
if(!valueParametersParameter["CreatedDate"].isNull())
parametersObject.createdDate = valueParametersParameter["CreatedDate"].asString();
if(!valueParametersParameter["CreatedBy"].isNull())
parametersObject.createdBy = valueParametersParameter["CreatedBy"].asString();
if(!valueParametersParameter["UpdatedDate"].isNull())
parametersObject.updatedDate = valueParametersParameter["UpdatedDate"].asString();
if(!valueParametersParameter["UpdatedBy"].isNull())
parametersObject.updatedBy = valueParametersParameter["UpdatedBy"].asString();
if(!valueParametersParameter["Description"].isNull())
parametersObject.description = valueParametersParameter["Description"].asString();
if(!valueParametersParameter["ShareType"].isNull())
parametersObject.shareType = valueParametersParameter["ShareType"].asString();
if(!valueParametersParameter["ParameterVersion"].isNull())
parametersObject.parameterVersion = std::stoi(valueParametersParameter["ParameterVersion"].asString());
if(!valueParametersParameter["Type"].isNull())
parametersObject.type = valueParametersParameter["Type"].asString();
if(!valueParametersParameter["Value"].isNull())
parametersObject.value = valueParametersParameter["Value"].asString();
if(!valueParametersParameter["Constraints"].isNull())
parametersObject.constraints = valueParametersParameter["Constraints"].asString();
if(!valueParametersParameter["KeyId"].isNull())
parametersObject.keyId = valueParametersParameter["KeyId"].asString();
parameters_.push_back(parametersObject);
}
auto allInvalidParameters = value["InvalidParameters"]["InvalidParameter"];
for (const auto &item : allInvalidParameters)
invalidParameters_.push_back(item.asString());
}
std::vector<GetSecretParametersResult::_Parameter> GetSecretParametersResult::getParameters()const
{
return parameters_;
}
std::vector<std::string> GetSecretParametersResult::getInvalidParameters()const
{
return invalidParameters_;
}

View File

@@ -0,0 +1,92 @@
/*
* 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/oos/model/ListInventoryEntriesRequest.h>
using AlibabaCloud::Oos::Model::ListInventoryEntriesRequest;
ListInventoryEntriesRequest::ListInventoryEntriesRequest() :
RpcServiceRequest("oos", "2019-06-01", "ListInventoryEntries")
{
setMethod(HttpRequest::Method::Post);
}
ListInventoryEntriesRequest::~ListInventoryEntriesRequest()
{}
std::vector<ListInventoryEntriesRequest::Filter> ListInventoryEntriesRequest::getFilter()const
{
return filter_;
}
void ListInventoryEntriesRequest::setFilter(const std::vector<Filter>& filter)
{
filter_ = filter;
for(int dep1 = 0; dep1!= filter.size(); dep1++) {
auto filterObj = filter.at(dep1);
std::string filterObjStr = "Filter." + std::to_string(dep1 + 1);
setParameter(filterObjStr + ".Name", filterObj.name);
for(int dep2 = 0; dep2!= filterObj.value.size(); dep2++) {
setParameter(filterObjStr + ".Value."+ std::to_string(dep2), filterObj.value.at(dep2));
}
setParameter(filterObjStr + "._Operator", filterObj._operator);
}
}
std::string ListInventoryEntriesRequest::getInstanceId()const
{
return instanceId_;
}
void ListInventoryEntriesRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string ListInventoryEntriesRequest::getNextToken()const
{
return nextToken_;
}
void ListInventoryEntriesRequest::setNextToken(const std::string& nextToken)
{
nextToken_ = nextToken;
setParameter("NextToken", nextToken);
}
int ListInventoryEntriesRequest::getMaxResults()const
{
return maxResults_;
}
void ListInventoryEntriesRequest::setMaxResults(int maxResults)
{
maxResults_ = maxResults;
setParameter("MaxResults", std::to_string(maxResults));
}
std::string ListInventoryEntriesRequest::getTypeName()const
{
return typeName_;
}
void ListInventoryEntriesRequest::setTypeName(const std::string& typeName)
{
typeName_ = typeName;
setParameter("TypeName", typeName);
}

View File

@@ -0,0 +1,94 @@
/*
* 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/oos/model/ListInventoryEntriesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Oos;
using namespace AlibabaCloud::Oos::Model;
ListInventoryEntriesResult::ListInventoryEntriesResult() :
ServiceResult()
{}
ListInventoryEntriesResult::ListInventoryEntriesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListInventoryEntriesResult::~ListInventoryEntriesResult()
{}
void ListInventoryEntriesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allEntries = value["Entries"]["Entries"];
for (const auto &item : allEntries)
entries_.push_back(item.asString());
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
if(!value["InstanceId"].isNull())
instanceId_ = value["InstanceId"].asString();
if(!value["CaptureTime"].isNull())
captureTime_ = value["CaptureTime"].asString();
if(!value["TypeName"].isNull())
typeName_ = value["TypeName"].asString();
if(!value["SchemaVersion"].isNull())
schemaVersion_ = value["SchemaVersion"].asString();
if(!value["MaxResults"].isNull())
maxResults_ = std::stoi(value["MaxResults"].asString());
}
std::string ListInventoryEntriesResult::getTypeName()const
{
return typeName_;
}
std::string ListInventoryEntriesResult::getCaptureTime()const
{
return captureTime_;
}
std::string ListInventoryEntriesResult::getNextToken()const
{
return nextToken_;
}
std::string ListInventoryEntriesResult::getSchemaVersion()const
{
return schemaVersion_;
}
std::string ListInventoryEntriesResult::getInstanceId()const
{
return instanceId_;
}
int ListInventoryEntriesResult::getMaxResults()const
{
return maxResults_;
}
std::vector<std::string> ListInventoryEntriesResult::getEntries()const
{
return entries_;
}

View File

@@ -63,6 +63,8 @@ void ListSecretParametersResult::parse(const std::string &payload)
parametersObject.parameterVersion = valueParametersParameter["ParameterVersion"].asString();
if(!valueParametersParameter["Type"].isNull())
parametersObject.type = valueParametersParameter["Type"].asString();
if(!valueParametersParameter["KeyId"].isNull())
parametersObject.keyId = valueParametersParameter["KeyId"].asString();
parameters_.push_back(parametersObject);
}
if(!value["MaxResults"].isNull())

View File

@@ -0,0 +1,94 @@
/*
* 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/oos/model/SearchInventoryRequest.h>
using AlibabaCloud::Oos::Model::SearchInventoryRequest;
SearchInventoryRequest::SearchInventoryRequest() :
RpcServiceRequest("oos", "2019-06-01", "SearchInventory")
{
setMethod(HttpRequest::Method::Post);
}
SearchInventoryRequest::~SearchInventoryRequest()
{}
std::vector<std::string> SearchInventoryRequest::getAggregator()const
{
return aggregator_;
}
void SearchInventoryRequest::setAggregator(const std::vector<std::string>& aggregator)
{
aggregator_ = aggregator;
for(int dep1 = 0; dep1!= aggregator.size(); dep1++) {
setParameter("Aggregator."+ std::to_string(dep1), aggregator.at(dep1));
}
}
std::vector<SearchInventoryRequest::Filter> SearchInventoryRequest::getFilter()const
{
return filter_;
}
void SearchInventoryRequest::setFilter(const std::vector<Filter>& filter)
{
filter_ = filter;
for(int dep1 = 0; dep1!= filter.size(); dep1++) {
auto filterObj = filter.at(dep1);
std::string filterObjStr = "Filter." + std::to_string(dep1 + 1);
setParameter(filterObjStr + ".Name", filterObj.name);
for(int dep2 = 0; dep2!= filterObj.value.size(); dep2++) {
setParameter(filterObjStr + ".Value."+ std::to_string(dep2), filterObj.value.at(dep2));
}
setParameter(filterObjStr + "._Operator", filterObj._operator);
}
}
std::string SearchInventoryRequest::getRegionId()const
{
return regionId_;
}
void SearchInventoryRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string SearchInventoryRequest::getNextToken()const
{
return nextToken_;
}
void SearchInventoryRequest::setNextToken(const std::string& nextToken)
{
nextToken_ = nextToken;
setParameter("NextToken", nextToken);
}
int SearchInventoryRequest::getMaxResults()const
{
return maxResults_;
}
void SearchInventoryRequest::setMaxResults(int maxResults)
{
maxResults_ = maxResults;
setParameter("MaxResults", std::to_string(maxResults));
}

View 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/oos/model/SearchInventoryResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Oos;
using namespace AlibabaCloud::Oos::Model;
SearchInventoryResult::SearchInventoryResult() :
ServiceResult()
{}
SearchInventoryResult::SearchInventoryResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SearchInventoryResult::~SearchInventoryResult()
{}
void SearchInventoryResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allEntities = value["Entities"]["Entity"];
for (const auto &item : allEntities)
entities_.push_back(item.asString());
if(!value["MaxResults"].isNull())
maxResults_ = std::stoi(value["MaxResults"].asString());
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
}
std::string SearchInventoryResult::getNextToken()const
{
return nextToken_;
}
int SearchInventoryResult::getMaxResults()const
{
return maxResults_;
}
std::vector<std::string> SearchInventoryResult::getEntities()const
{
return entities_;
}

View 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/oos/model/UpdateExecutionRequest.h>
using AlibabaCloud::Oos::Model::UpdateExecutionRequest;
UpdateExecutionRequest::UpdateExecutionRequest() :
RpcServiceRequest("oos", "2019-06-01", "UpdateExecution")
{
setMethod(HttpRequest::Method::Post);
}
UpdateExecutionRequest::~UpdateExecutionRequest()
{}
std::string UpdateExecutionRequest::getClientToken()const
{
return clientToken_;
}
void UpdateExecutionRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string UpdateExecutionRequest::getExecutionId()const
{
return executionId_;
}
void UpdateExecutionRequest::setExecutionId(const std::string& executionId)
{
executionId_ = executionId;
setParameter("ExecutionId", executionId);
}
std::string UpdateExecutionRequest::getRegionId()const
{
return regionId_;
}
void UpdateExecutionRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string UpdateExecutionRequest::getParameters()const
{
return parameters_;
}
void UpdateExecutionRequest::setParameters(const std::string& parameters)
{
parameters_ = parameters;
setParameter("Parameters", parameters);
}

View 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/oos/model/UpdateExecutionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Oos;
using namespace AlibabaCloud::Oos::Model;
UpdateExecutionResult::UpdateExecutionResult() :
ServiceResult()
{}
UpdateExecutionResult::UpdateExecutionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateExecutionResult::~UpdateExecutionResult()
{}
void UpdateExecutionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,128 @@
/*
* 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/oos/model/UpdateInstanceInformationRequest.h>
using AlibabaCloud::Oos::Model::UpdateInstanceInformationRequest;
UpdateInstanceInformationRequest::UpdateInstanceInformationRequest() :
RpcServiceRequest("oos", "2019-06-01", "UpdateInstanceInformation")
{
setMethod(HttpRequest::Method::Post);
}
UpdateInstanceInformationRequest::~UpdateInstanceInformationRequest()
{}
std::string UpdateInstanceInformationRequest::getAgentVersion()const
{
return agentVersion_;
}
void UpdateInstanceInformationRequest::setAgentVersion(const std::string& agentVersion)
{
agentVersion_ = agentVersion;
setParameter("AgentVersion", agentVersion);
}
std::string UpdateInstanceInformationRequest::getIpAddress()const
{
return ipAddress_;
}
void UpdateInstanceInformationRequest::setIpAddress(const std::string& ipAddress)
{
ipAddress_ = ipAddress;
setParameter("IpAddress", ipAddress);
}
std::string UpdateInstanceInformationRequest::getComputerName()const
{
return computerName_;
}
void UpdateInstanceInformationRequest::setComputerName(const std::string& computerName)
{
computerName_ = computerName;
setParameter("ComputerName", computerName);
}
std::string UpdateInstanceInformationRequest::getRegionId()const
{
return regionId_;
}
void UpdateInstanceInformationRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string UpdateInstanceInformationRequest::getPlatformName()const
{
return platformName_;
}
void UpdateInstanceInformationRequest::setPlatformName(const std::string& platformName)
{
platformName_ = platformName;
setParameter("PlatformName", platformName);
}
std::string UpdateInstanceInformationRequest::getInstanceId()const
{
return instanceId_;
}
void UpdateInstanceInformationRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string UpdateInstanceInformationRequest::getAgentName()const
{
return agentName_;
}
void UpdateInstanceInformationRequest::setAgentName(const std::string& agentName)
{
agentName_ = agentName;
setParameter("AgentName", agentName);
}
std::string UpdateInstanceInformationRequest::getPlatformType()const
{
return platformType_;
}
void UpdateInstanceInformationRequest::setPlatformType(const std::string& platformType)
{
platformType_ = platformType;
setParameter("PlatformType", platformType);
}
std::string UpdateInstanceInformationRequest::getPlatformVersion()const
{
return platformVersion_;
}
void UpdateInstanceInformationRequest::setPlatformVersion(const std::string& platformVersion)
{
platformVersion_ = platformVersion;
setParameter("PlatformVersion", platformVersion);
}

View 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/oos/model/UpdateInstanceInformationResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Oos;
using namespace AlibabaCloud::Oos::Model;
UpdateInstanceInformationResult::UpdateInstanceInformationResult() :
ServiceResult()
{}
UpdateInstanceInformationResult::UpdateInstanceInformationResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateInstanceInformationResult::~UpdateInstanceInformationResult()
{}
void UpdateInstanceInformationResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -60,6 +60,8 @@ void UpdateParameterResult::parse(const std::string &payload)
_parameter_.parameterVersion = std::stoi(_parameterNode["ParameterVersion"].asString());
if(!_parameterNode["Type"].isNull())
_parameter_.type = _parameterNode["Type"].asString();
if(!_parameterNode["Constraints"].isNull())
_parameter_.constraints = _parameterNode["Constraints"].asString();
}

View File

@@ -60,6 +60,10 @@ void UpdateSecretParameterResult::parse(const std::string &payload)
_parameter_.parameterVersion = std::stoi(_parameterNode["ParameterVersion"].asString());
if(!_parameterNode["Type"].isNull())
_parameter_.type = _parameterNode["Type"].asString();
if(!_parameterNode["Constraints"].isNull())
_parameter_.constraints = _parameterNode["Constraints"].asString();
if(!_parameterNode["KeyId"].isNull())
_parameter_.keyId = _parameterNode["KeyId"].asString();
}