Add ListTemplateVersions API.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2020-04-29 Version: 1.36.391
|
||||||
|
- Add ListTemplateVersions API.
|
||||||
|
- GenerateExecutionPolicy supports TemplateVersion.
|
||||||
|
- CreateTemplate and UpdateTemplate support VersionName.
|
||||||
|
|
||||||
|
|
||||||
2020-04-29 Version: 1.36.390
|
2020-04-29 Version: 1.36.390
|
||||||
- Support groupId operations.
|
- Support groupId operations.
|
||||||
|
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ set(oos_public_header_model
|
|||||||
include/alibabacloud/oos/model/ListTagValuesResult.h
|
include/alibabacloud/oos/model/ListTagValuesResult.h
|
||||||
include/alibabacloud/oos/model/ListTaskExecutionsRequest.h
|
include/alibabacloud/oos/model/ListTaskExecutionsRequest.h
|
||||||
include/alibabacloud/oos/model/ListTaskExecutionsResult.h
|
include/alibabacloud/oos/model/ListTaskExecutionsResult.h
|
||||||
|
include/alibabacloud/oos/model/ListTemplateVersionsRequest.h
|
||||||
|
include/alibabacloud/oos/model/ListTemplateVersionsResult.h
|
||||||
include/alibabacloud/oos/model/ListTemplatesRequest.h
|
include/alibabacloud/oos/model/ListTemplatesRequest.h
|
||||||
include/alibabacloud/oos/model/ListTemplatesResult.h
|
include/alibabacloud/oos/model/ListTemplatesResult.h
|
||||||
include/alibabacloud/oos/model/NotifyExecutionRequest.h
|
include/alibabacloud/oos/model/NotifyExecutionRequest.h
|
||||||
@@ -108,6 +110,8 @@ set(oos_src
|
|||||||
src/model/ListTagValuesResult.cc
|
src/model/ListTagValuesResult.cc
|
||||||
src/model/ListTaskExecutionsRequest.cc
|
src/model/ListTaskExecutionsRequest.cc
|
||||||
src/model/ListTaskExecutionsResult.cc
|
src/model/ListTaskExecutionsResult.cc
|
||||||
|
src/model/ListTemplateVersionsRequest.cc
|
||||||
|
src/model/ListTemplateVersionsResult.cc
|
||||||
src/model/ListTemplatesRequest.cc
|
src/model/ListTemplatesRequest.cc
|
||||||
src/model/ListTemplatesResult.cc
|
src/model/ListTemplatesResult.cc
|
||||||
src/model/NotifyExecutionRequest.cc
|
src/model/NotifyExecutionRequest.cc
|
||||||
|
|||||||
@@ -56,6 +56,8 @@
|
|||||||
#include "model/ListTagValuesResult.h"
|
#include "model/ListTagValuesResult.h"
|
||||||
#include "model/ListTaskExecutionsRequest.h"
|
#include "model/ListTaskExecutionsRequest.h"
|
||||||
#include "model/ListTaskExecutionsResult.h"
|
#include "model/ListTaskExecutionsResult.h"
|
||||||
|
#include "model/ListTemplateVersionsRequest.h"
|
||||||
|
#include "model/ListTemplateVersionsResult.h"
|
||||||
#include "model/ListTemplatesRequest.h"
|
#include "model/ListTemplatesRequest.h"
|
||||||
#include "model/ListTemplatesResult.h"
|
#include "model/ListTemplatesResult.h"
|
||||||
#include "model/NotifyExecutionRequest.h"
|
#include "model/NotifyExecutionRequest.h"
|
||||||
@@ -132,6 +134,9 @@ namespace AlibabaCloud
|
|||||||
typedef Outcome<Error, Model::ListTaskExecutionsResult> ListTaskExecutionsOutcome;
|
typedef Outcome<Error, Model::ListTaskExecutionsResult> ListTaskExecutionsOutcome;
|
||||||
typedef std::future<ListTaskExecutionsOutcome> ListTaskExecutionsOutcomeCallable;
|
typedef std::future<ListTaskExecutionsOutcome> ListTaskExecutionsOutcomeCallable;
|
||||||
typedef std::function<void(const OosClient*, const Model::ListTaskExecutionsRequest&, const ListTaskExecutionsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTaskExecutionsAsyncHandler;
|
typedef std::function<void(const OosClient*, const Model::ListTaskExecutionsRequest&, const ListTaskExecutionsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTaskExecutionsAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::ListTemplateVersionsResult> ListTemplateVersionsOutcome;
|
||||||
|
typedef std::future<ListTemplateVersionsOutcome> ListTemplateVersionsOutcomeCallable;
|
||||||
|
typedef std::function<void(const OosClient*, const Model::ListTemplateVersionsRequest&, const ListTemplateVersionsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTemplateVersionsAsyncHandler;
|
||||||
typedef Outcome<Error, Model::ListTemplatesResult> ListTemplatesOutcome;
|
typedef Outcome<Error, Model::ListTemplatesResult> ListTemplatesOutcome;
|
||||||
typedef std::future<ListTemplatesOutcome> ListTemplatesOutcomeCallable;
|
typedef std::future<ListTemplatesOutcome> ListTemplatesOutcomeCallable;
|
||||||
typedef std::function<void(const OosClient*, const Model::ListTemplatesRequest&, const ListTemplatesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTemplatesAsyncHandler;
|
typedef std::function<void(const OosClient*, const Model::ListTemplatesRequest&, const ListTemplatesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTemplatesAsyncHandler;
|
||||||
@@ -212,6 +217,9 @@ namespace AlibabaCloud
|
|||||||
ListTaskExecutionsOutcome listTaskExecutions(const Model::ListTaskExecutionsRequest &request)const;
|
ListTaskExecutionsOutcome listTaskExecutions(const Model::ListTaskExecutionsRequest &request)const;
|
||||||
void listTaskExecutionsAsync(const Model::ListTaskExecutionsRequest& request, const ListTaskExecutionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void listTaskExecutionsAsync(const Model::ListTaskExecutionsRequest& request, const ListTaskExecutionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
ListTaskExecutionsOutcomeCallable listTaskExecutionsCallable(const Model::ListTaskExecutionsRequest& request) const;
|
ListTaskExecutionsOutcomeCallable listTaskExecutionsCallable(const Model::ListTaskExecutionsRequest& request) const;
|
||||||
|
ListTemplateVersionsOutcome listTemplateVersions(const Model::ListTemplateVersionsRequest &request)const;
|
||||||
|
void listTemplateVersionsAsync(const Model::ListTemplateVersionsRequest& request, const ListTemplateVersionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
ListTemplateVersionsOutcomeCallable listTemplateVersionsCallable(const Model::ListTemplateVersionsRequest& request) const;
|
||||||
ListTemplatesOutcome listTemplates(const Model::ListTemplatesRequest &request)const;
|
ListTemplatesOutcome listTemplates(const Model::ListTemplatesRequest &request)const;
|
||||||
void listTemplatesAsync(const Model::ListTemplatesRequest& request, const ListTemplatesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
void listTemplatesAsync(const Model::ListTemplatesRequest& request, const ListTemplatesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
ListTemplatesOutcomeCallable listTemplatesCallable(const Model::ListTemplatesRequest& request) const;
|
ListTemplatesOutcomeCallable listTemplatesCallable(const Model::ListTemplatesRequest& request) const;
|
||||||
|
|||||||
@@ -43,12 +43,15 @@ namespace AlibabaCloud
|
|||||||
void setRegionId(const std::string& regionId);
|
void setRegionId(const std::string& regionId);
|
||||||
std::string getTemplateName()const;
|
std::string getTemplateName()const;
|
||||||
void setTemplateName(const std::string& templateName);
|
void setTemplateName(const std::string& templateName);
|
||||||
|
std::string getVersionName()const;
|
||||||
|
void setVersionName(const std::string& versionName);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string content_;
|
std::string content_;
|
||||||
std::map<std::string, std::string> tags_;
|
std::map<std::string, std::string> tags_;
|
||||||
std::string regionId_;
|
std::string regionId_;
|
||||||
std::string templateName_;
|
std::string templateName_;
|
||||||
|
std::string versionName_;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,11 +54,13 @@ namespace AlibabaCloud
|
|||||||
explicit CreateTemplateResult(const std::string &payload);
|
explicit CreateTemplateResult(const std::string &payload);
|
||||||
~CreateTemplateResult();
|
~CreateTemplateResult();
|
||||||
_Template get_Template()const;
|
_Template get_Template()const;
|
||||||
|
std::string getTemplateType()const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void parse(const std::string &payload);
|
void parse(const std::string &payload);
|
||||||
private:
|
private:
|
||||||
_Template _template_;
|
_Template _template_;
|
||||||
|
std::string templateType_;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,12 +35,15 @@ namespace AlibabaCloud
|
|||||||
GenerateExecutionPolicyRequest();
|
GenerateExecutionPolicyRequest();
|
||||||
~GenerateExecutionPolicyRequest();
|
~GenerateExecutionPolicyRequest();
|
||||||
|
|
||||||
|
std::string getTemplateVersion()const;
|
||||||
|
void setTemplateVersion(const std::string& templateVersion);
|
||||||
std::string getRegionId()const;
|
std::string getRegionId()const;
|
||||||
void setRegionId(const std::string& regionId);
|
void setRegionId(const std::string& regionId);
|
||||||
std::string getTemplateName()const;
|
std::string getTemplateName()const;
|
||||||
void setTemplateName(const std::string& templateName);
|
void setTemplateName(const std::string& templateName);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
std::string templateVersion_;
|
||||||
std::string regionId_;
|
std::string regionId_;
|
||||||
std::string templateName_;
|
std::string templateName_;
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ namespace AlibabaCloud
|
|||||||
std::string templateFormat;
|
std::string templateFormat;
|
||||||
std::string updatedDate;
|
std::string updatedDate;
|
||||||
std::string templateVersion;
|
std::string templateVersion;
|
||||||
|
std::string templateType;
|
||||||
std::string hash;
|
std::string hash;
|
||||||
std::string updatedBy;
|
std::string updatedBy;
|
||||||
bool hasTrigger;
|
bool hasTrigger;
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_OOS_MODEL_LISTTEMPLATEVERSIONSREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_OOS_MODEL_LISTTEMPLATEVERSIONSREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/oos/OosExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Oos
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OOS_EXPORT ListTemplateVersionsRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
ListTemplateVersionsRequest();
|
||||||
|
~ListTemplateVersionsRequest();
|
||||||
|
|
||||||
|
std::string getRegionId()const;
|
||||||
|
void setRegionId(const std::string& regionId);
|
||||||
|
std::string getNextToken()const;
|
||||||
|
void setNextToken(const std::string& nextToken);
|
||||||
|
int getMaxResults()const;
|
||||||
|
void setMaxResults(int maxResults);
|
||||||
|
std::string getTemplateName()const;
|
||||||
|
void setTemplateName(const std::string& templateName);
|
||||||
|
std::string getShareType()const;
|
||||||
|
void setShareType(const std::string& shareType);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string regionId_;
|
||||||
|
std::string nextToken_;
|
||||||
|
int maxResults_;
|
||||||
|
std::string templateName_;
|
||||||
|
std::string shareType_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OOS_MODEL_LISTTEMPLATEVERSIONSREQUEST_H_
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_OOS_MODEL_LISTTEMPLATEVERSIONSRESULT_H_
|
||||||
|
#define ALIBABACLOUD_OOS_MODEL_LISTTEMPLATEVERSIONSRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/oos/OosExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace Oos
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_OOS_EXPORT ListTemplateVersionsResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct TemplateVersion
|
||||||
|
{
|
||||||
|
std::string updatedBy;
|
||||||
|
std::string description;
|
||||||
|
std::string templateFormat;
|
||||||
|
std::string updatedDate;
|
||||||
|
std::string templateVersion;
|
||||||
|
std::string versionName;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
ListTemplateVersionsResult();
|
||||||
|
explicit ListTemplateVersionsResult(const std::string &payload);
|
||||||
|
~ListTemplateVersionsResult();
|
||||||
|
std::string getNextToken()const;
|
||||||
|
int getMaxResults()const;
|
||||||
|
std::vector<TemplateVersion> getTemplateVersions()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
std::string nextToken_;
|
||||||
|
int maxResults_;
|
||||||
|
std::vector<TemplateVersion> templateVersions_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_OOS_MODEL_LISTTEMPLATEVERSIONSRESULT_H_
|
||||||
@@ -43,6 +43,8 @@ namespace AlibabaCloud
|
|||||||
void setCreatedBy(const std::string& createdBy);
|
void setCreatedBy(const std::string& createdBy);
|
||||||
std::string getNextToken()const;
|
std::string getNextToken()const;
|
||||||
void setNextToken(const std::string& nextToken);
|
void setNextToken(const std::string& nextToken);
|
||||||
|
std::string getTemplateType()const;
|
||||||
|
void setTemplateType(const std::string& templateType);
|
||||||
std::string getTemplateName()const;
|
std::string getTemplateName()const;
|
||||||
void setTemplateName(const std::string& templateName);
|
void setTemplateName(const std::string& templateName);
|
||||||
std::string getSortOrder()const;
|
std::string getSortOrder()const;
|
||||||
@@ -69,6 +71,7 @@ namespace AlibabaCloud
|
|||||||
std::string regionId_;
|
std::string regionId_;
|
||||||
std::string createdBy_;
|
std::string createdBy_;
|
||||||
std::string nextToken_;
|
std::string nextToken_;
|
||||||
|
std::string templateType_;
|
||||||
std::string templateName_;
|
std::string templateName_;
|
||||||
std::string sortOrder_;
|
std::string sortOrder_;
|
||||||
std::string shareType_;
|
std::string shareType_;
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ namespace AlibabaCloud
|
|||||||
std::string updatedDate;
|
std::string updatedDate;
|
||||||
int popularity;
|
int popularity;
|
||||||
std::string templateVersion;
|
std::string templateVersion;
|
||||||
|
std::string templateType;
|
||||||
std::string hash;
|
std::string hash;
|
||||||
std::string updatedBy;
|
std::string updatedBy;
|
||||||
bool hasTrigger;
|
bool hasTrigger;
|
||||||
|
|||||||
@@ -43,12 +43,15 @@ namespace AlibabaCloud
|
|||||||
void setRegionId(const std::string& regionId);
|
void setRegionId(const std::string& regionId);
|
||||||
std::string getTemplateName()const;
|
std::string getTemplateName()const;
|
||||||
void setTemplateName(const std::string& templateName);
|
void setTemplateName(const std::string& templateName);
|
||||||
|
std::string getVersionName()const;
|
||||||
|
void setVersionName(const std::string& versionName);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string content_;
|
std::string content_;
|
||||||
std::map<std::string, std::string> tags_;
|
std::map<std::string, std::string> tags_;
|
||||||
std::string regionId_;
|
std::string regionId_;
|
||||||
std::string templateName_;
|
std::string templateName_;
|
||||||
|
std::string versionName_;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -663,6 +663,42 @@ OosClient::ListTaskExecutionsOutcomeCallable OosClient::listTaskExecutionsCallab
|
|||||||
return task->get_future();
|
return task->get_future();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OosClient::ListTemplateVersionsOutcome OosClient::listTemplateVersions(const ListTemplateVersionsRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return ListTemplateVersionsOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return ListTemplateVersionsOutcome(ListTemplateVersionsResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return ListTemplateVersionsOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void OosClient::listTemplateVersionsAsync(const ListTemplateVersionsRequest& request, const ListTemplateVersionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, listTemplateVersions(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
OosClient::ListTemplateVersionsOutcomeCallable OosClient::listTemplateVersionsCallable(const ListTemplateVersionsRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<ListTemplateVersionsOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->listTemplateVersions(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
OosClient::ListTemplatesOutcome OosClient::listTemplates(const ListTemplatesRequest &request) const
|
OosClient::ListTemplatesOutcome OosClient::listTemplates(const ListTemplatesRequest &request) const
|
||||||
{
|
{
|
||||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
|||||||
@@ -71,3 +71,14 @@ void CreateTemplateRequest::setTemplateName(const std::string& templateName)
|
|||||||
setParameter("TemplateName", templateName);
|
setParameter("TemplateName", templateName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string CreateTemplateRequest::getVersionName()const
|
||||||
|
{
|
||||||
|
return versionName_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CreateTemplateRequest::setVersionName(const std::string& versionName)
|
||||||
|
{
|
||||||
|
versionName_ = versionName;
|
||||||
|
setParameter("VersionName", versionName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ void CreateTemplateResult::parse(const std::string &payload)
|
|||||||
_template_.hasTrigger = _templateNode["HasTrigger"].asString() == "true";
|
_template_.hasTrigger = _templateNode["HasTrigger"].asString() == "true";
|
||||||
if(!_templateNode["Tags"].isNull())
|
if(!_templateNode["Tags"].isNull())
|
||||||
_template_.tags = _templateNode["Tags"].asString();
|
_template_.tags = _templateNode["Tags"].asString();
|
||||||
|
if(!value["TemplateType"].isNull())
|
||||||
|
templateType_ = value["TemplateType"].asString();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,3 +76,8 @@ CreateTemplateResult::_Template CreateTemplateResult::get_Template()const
|
|||||||
return _template_;
|
return _template_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string CreateTemplateResult::getTemplateType()const
|
||||||
|
{
|
||||||
|
return templateType_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,17 @@ GenerateExecutionPolicyRequest::GenerateExecutionPolicyRequest() :
|
|||||||
GenerateExecutionPolicyRequest::~GenerateExecutionPolicyRequest()
|
GenerateExecutionPolicyRequest::~GenerateExecutionPolicyRequest()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
std::string GenerateExecutionPolicyRequest::getTemplateVersion()const
|
||||||
|
{
|
||||||
|
return templateVersion_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GenerateExecutionPolicyRequest::setTemplateVersion(const std::string& templateVersion)
|
||||||
|
{
|
||||||
|
templateVersion_ = templateVersion;
|
||||||
|
setParameter("TemplateVersion", templateVersion);
|
||||||
|
}
|
||||||
|
|
||||||
std::string GenerateExecutionPolicyRequest::getRegionId()const
|
std::string GenerateExecutionPolicyRequest::getRegionId()const
|
||||||
{
|
{
|
||||||
return regionId_;
|
return regionId_;
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ void GetTemplateResult::parse(const std::string &payload)
|
|||||||
_template_.hasTrigger = _templateNode["HasTrigger"].asString() == "true";
|
_template_.hasTrigger = _templateNode["HasTrigger"].asString() == "true";
|
||||||
if(!_templateNode["Tags"].isNull())
|
if(!_templateNode["Tags"].isNull())
|
||||||
_template_.tags = _templateNode["Tags"].asString();
|
_template_.tags = _templateNode["Tags"].asString();
|
||||||
|
if(!_templateNode["TemplateType"].isNull())
|
||||||
|
_template_.templateType = _templateNode["TemplateType"].asString();
|
||||||
if(!value["Content"].isNull())
|
if(!value["Content"].isNull())
|
||||||
content_ = value["Content"].asString();
|
content_ = value["Content"].asString();
|
||||||
|
|
||||||
|
|||||||
84
oos/src/model/ListTemplateVersionsRequest.cc
Normal file
84
oos/src/model/ListTemplateVersionsRequest.cc
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/oos/model/ListTemplateVersionsRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::Oos::Model::ListTemplateVersionsRequest;
|
||||||
|
|
||||||
|
ListTemplateVersionsRequest::ListTemplateVersionsRequest() :
|
||||||
|
RpcServiceRequest("oos", "2019-06-01", "ListTemplateVersions")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
ListTemplateVersionsRequest::~ListTemplateVersionsRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
std::string ListTemplateVersionsRequest::getRegionId()const
|
||||||
|
{
|
||||||
|
return regionId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListTemplateVersionsRequest::setRegionId(const std::string& regionId)
|
||||||
|
{
|
||||||
|
regionId_ = regionId;
|
||||||
|
setParameter("RegionId", regionId);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListTemplateVersionsRequest::getNextToken()const
|
||||||
|
{
|
||||||
|
return nextToken_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListTemplateVersionsRequest::setNextToken(const std::string& nextToken)
|
||||||
|
{
|
||||||
|
nextToken_ = nextToken;
|
||||||
|
setParameter("NextToken", nextToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ListTemplateVersionsRequest::getMaxResults()const
|
||||||
|
{
|
||||||
|
return maxResults_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListTemplateVersionsRequest::setMaxResults(int maxResults)
|
||||||
|
{
|
||||||
|
maxResults_ = maxResults;
|
||||||
|
setParameter("MaxResults", std::to_string(maxResults));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListTemplateVersionsRequest::getTemplateName()const
|
||||||
|
{
|
||||||
|
return templateName_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListTemplateVersionsRequest::setTemplateName(const std::string& templateName)
|
||||||
|
{
|
||||||
|
templateName_ = templateName;
|
||||||
|
setParameter("TemplateName", templateName);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListTemplateVersionsRequest::getShareType()const
|
||||||
|
{
|
||||||
|
return shareType_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListTemplateVersionsRequest::setShareType(const std::string& shareType)
|
||||||
|
{
|
||||||
|
shareType_ = shareType;
|
||||||
|
setParameter("ShareType", shareType);
|
||||||
|
}
|
||||||
|
|
||||||
81
oos/src/model/ListTemplateVersionsResult.cc
Normal file
81
oos/src/model/ListTemplateVersionsResult.cc
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
/*
|
||||||
|
* 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/ListTemplateVersionsResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::Oos;
|
||||||
|
using namespace AlibabaCloud::Oos::Model;
|
||||||
|
|
||||||
|
ListTemplateVersionsResult::ListTemplateVersionsResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
ListTemplateVersionsResult::ListTemplateVersionsResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
ListTemplateVersionsResult::~ListTemplateVersionsResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void ListTemplateVersionsResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto allTemplateVersionsNode = value["TemplateVersions"]["TemplateVersion"];
|
||||||
|
for (auto valueTemplateVersionsTemplateVersion : allTemplateVersionsNode)
|
||||||
|
{
|
||||||
|
TemplateVersion templateVersionsObject;
|
||||||
|
if(!valueTemplateVersionsTemplateVersion["Description"].isNull())
|
||||||
|
templateVersionsObject.description = valueTemplateVersionsTemplateVersion["Description"].asString();
|
||||||
|
if(!valueTemplateVersionsTemplateVersion["TemplateFormat"].isNull())
|
||||||
|
templateVersionsObject.templateFormat = valueTemplateVersionsTemplateVersion["TemplateFormat"].asString();
|
||||||
|
if(!valueTemplateVersionsTemplateVersion["TemplateVersion"].isNull())
|
||||||
|
templateVersionsObject.templateVersion = valueTemplateVersionsTemplateVersion["TemplateVersion"].asString();
|
||||||
|
if(!valueTemplateVersionsTemplateVersion["UpdatedDate"].isNull())
|
||||||
|
templateVersionsObject.updatedDate = valueTemplateVersionsTemplateVersion["UpdatedDate"].asString();
|
||||||
|
if(!valueTemplateVersionsTemplateVersion["UpdatedBy"].isNull())
|
||||||
|
templateVersionsObject.updatedBy = valueTemplateVersionsTemplateVersion["UpdatedBy"].asString();
|
||||||
|
if(!valueTemplateVersionsTemplateVersion["VersionName"].isNull())
|
||||||
|
templateVersionsObject.versionName = valueTemplateVersionsTemplateVersion["VersionName"].asString();
|
||||||
|
templateVersions_.push_back(templateVersionsObject);
|
||||||
|
}
|
||||||
|
if(!value["MaxResults"].isNull())
|
||||||
|
maxResults_ = std::stoi(value["MaxResults"].asString());
|
||||||
|
if(!value["NextToken"].isNull())
|
||||||
|
nextToken_ = value["NextToken"].asString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListTemplateVersionsResult::getNextToken()const
|
||||||
|
{
|
||||||
|
return nextToken_;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ListTemplateVersionsResult::getMaxResults()const
|
||||||
|
{
|
||||||
|
return maxResults_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<ListTemplateVersionsResult::TemplateVersion> ListTemplateVersionsResult::getTemplateVersions()const
|
||||||
|
{
|
||||||
|
return templateVersions_;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -71,6 +71,17 @@ void ListTemplatesRequest::setNextToken(const std::string& nextToken)
|
|||||||
setParameter("NextToken", nextToken);
|
setParameter("NextToken", nextToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string ListTemplatesRequest::getTemplateType()const
|
||||||
|
{
|
||||||
|
return templateType_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListTemplatesRequest::setTemplateType(const std::string& templateType)
|
||||||
|
{
|
||||||
|
templateType_ = templateType;
|
||||||
|
setParameter("TemplateType", templateType);
|
||||||
|
}
|
||||||
|
|
||||||
std::string ListTemplatesRequest::getTemplateName()const
|
std::string ListTemplatesRequest::getTemplateName()const
|
||||||
{
|
{
|
||||||
return templateName_;
|
return templateName_;
|
||||||
|
|||||||
@@ -75,6 +75,8 @@ void ListTemplatesResult::parse(const std::string &payload)
|
|||||||
templatesObject.tags = valueTemplatesTemplate["Tags"].asString();
|
templatesObject.tags = valueTemplatesTemplate["Tags"].asString();
|
||||||
if(!valueTemplatesTemplate["Category"].isNull())
|
if(!valueTemplatesTemplate["Category"].isNull())
|
||||||
templatesObject.category = valueTemplatesTemplate["Category"].asString();
|
templatesObject.category = valueTemplatesTemplate["Category"].asString();
|
||||||
|
if(!valueTemplatesTemplate["TemplateType"].isNull())
|
||||||
|
templatesObject.templateType = valueTemplatesTemplate["TemplateType"].asString();
|
||||||
templates_.push_back(templatesObject);
|
templates_.push_back(templatesObject);
|
||||||
}
|
}
|
||||||
if(!value["MaxResults"].isNull())
|
if(!value["MaxResults"].isNull())
|
||||||
|
|||||||
@@ -71,3 +71,14 @@ void UpdateTemplateRequest::setTemplateName(const std::string& templateName)
|
|||||||
setParameter("TemplateName", templateName);
|
setParameter("TemplateName", templateName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string UpdateTemplateRequest::getVersionName()const
|
||||||
|
{
|
||||||
|
return versionName_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateTemplateRequest::setVersionName(const std::string& versionName)
|
||||||
|
{
|
||||||
|
versionName_ = versionName;
|
||||||
|
setParameter("VersionName", versionName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user