Compare commits

..

9 Commits

Author SHA1 Message Date
sdk-team
678893901f Add TimeOut. 2023-07-17 15:06:01 +00:00
sdk-team
1bf5fe98af Get Workflow Instance Add Node Field. 2023-07-17 08:49:00 +00:00
sdk-team
2173eb9110 Get Job Instance API add Field. 2023-07-17 06:06:10 +00:00
sdk-team
045dcc9fa9 Generated 2020-05-18 for dataworks-public. 2023-07-17 04:14:08 +00:00
sdk-team
2fa7d5dc9f Add error code. 2023-07-16 15:05:44 +00:00
sdk-team
0a04d9d475 Add error code. 2023-07-15 15:05:08 +00:00
sdk-team
1193bcf394 Support Serverless Job API. 2023-07-14 03:18:13 +00:00
sdk-team
c2ce4a0048 Support change instance config event for rds. 2023-07-13 15:04:50 +00:00
sdk-team
a63623d1a9 Update API ListTransitRouterRouteEntries to support PathAttributes. 2023-07-13 06:33:54 +00:00
73 changed files with 3451 additions and 262 deletions

View File

@@ -1 +1 @@
1.36.1654
1.36.1663

View File

@@ -36,6 +36,8 @@ public:
void setCenId(const std::string &cenId);
int getPageNumber() const;
void setPageNumber(int pageNumber);
std::string getTrRegionId() const;
void setTrRegionId(const std::string &trRegionId);
int getPageSize() const;
void setPageSize(int pageSize);
std::string getResourceOwnerAccount() const;
@@ -51,6 +53,7 @@ private:
long resourceOwnerId_;
std::string cenId_;
int pageNumber_;
std::string trRegionId_;
int pageSize_;
std::string resourceOwnerAccount_;
std::string ownerAccount_;

View File

@@ -41,8 +41,10 @@ namespace AlibabaCloud
};
std::string status;
std::string transitRouterMulticastDomainId;
std::string cenId;
std::string transitRouterMulticastDomainName;
std::string transitRouterMulticastDomainDescription;
std::string regionId;
std::vector<TransitRouterMulticastDomain::Tag> tags;
std::string transitRouterId;
};

View File

@@ -34,10 +34,21 @@ namespace AlibabaCloud
public:
struct TransitRouterRouteEntry
{
struct PathAttributes
{
std::string originRouteType;
int preference;
std::string originInstanceType;
std::string originInstanceId;
std::vector<std::string> communities1;
std::vector<std::string> asPaths2;
};
std::string transitRouterRouteEntryOriginResourceType;
std::string transitRouterRouteEntryNextHopId;
std::string transitRouterRouteEntryOriginResourceId;
std::string prefixListId;
std::vector<std::string> communities;
PathAttributes pathAttributes;
std::string createTime;
std::string transitRouterRouteEntryNextHopType;
bool operationalMode;
@@ -45,9 +56,11 @@ namespace AlibabaCloud
std::string transitRouterRouteEntryNextHopResourceId;
std::string transitRouterRouteEntryNextHopResourceType;
std::string transitRouterRouteEntryType;
int preference;
std::string transitRouterRouteEntryDescription;
std::string transitRouterRouteEntryName;
std::string tag;
std::vector<std::string> asPaths;
std::string transitRouterRouteEntryId;
std::string transitRouterRouteEntryStatus;
};

View File

@@ -52,6 +52,15 @@ void DescribeCenInterRegionBandwidthLimitsRequest::setPageNumber(int pageNumber)
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
}
std::string DescribeCenInterRegionBandwidthLimitsRequest::getTrRegionId() const {
return trRegionId_;
}
void DescribeCenInterRegionBandwidthLimitsRequest::setTrRegionId(const std::string &trRegionId) {
trRegionId_ = trRegionId;
setParameter(std::string("TrRegionId"), trRegionId);
}
int DescribeCenInterRegionBandwidthLimitsRequest::getPageSize() const {
return pageSize_;
}

View File

@@ -53,6 +53,10 @@ void ListTransitRouterMulticastDomainsResult::parse(const std::string &payload)
transitRouterMulticastDomainsObject.status = valueTransitRouterMulticastDomainsTransitRouterMulticastDomain["Status"].asString();
if(!valueTransitRouterMulticastDomainsTransitRouterMulticastDomain["TransitRouterId"].isNull())
transitRouterMulticastDomainsObject.transitRouterId = valueTransitRouterMulticastDomainsTransitRouterMulticastDomain["TransitRouterId"].asString();
if(!valueTransitRouterMulticastDomainsTransitRouterMulticastDomain["RegionId"].isNull())
transitRouterMulticastDomainsObject.regionId = valueTransitRouterMulticastDomainsTransitRouterMulticastDomain["RegionId"].asString();
if(!valueTransitRouterMulticastDomainsTransitRouterMulticastDomain["CenId"].isNull())
transitRouterMulticastDomainsObject.cenId = valueTransitRouterMulticastDomainsTransitRouterMulticastDomain["CenId"].asString();
auto allTagsNode = valueTransitRouterMulticastDomainsTransitRouterMulticastDomain["Tags"]["Tag"];
for (auto valueTransitRouterMulticastDomainsTransitRouterMulticastDomainTagsTag : allTagsNode)
{

View File

@@ -75,6 +75,29 @@ void ListTransitRouterRouteEntriesResult::parse(const std::string &payload)
transitRouterRouteEntriesObject.transitRouterRouteEntryOriginResourceId = valueTransitRouterRouteEntriesTransitRouterRouteEntry["TransitRouterRouteEntryOriginResourceId"].asString();
if(!valueTransitRouterRouteEntriesTransitRouterRouteEntry["PrefixListId"].isNull())
transitRouterRouteEntriesObject.prefixListId = valueTransitRouterRouteEntriesTransitRouterRouteEntry["PrefixListId"].asString();
if(!valueTransitRouterRouteEntriesTransitRouterRouteEntry["Preference"].isNull())
transitRouterRouteEntriesObject.preference = std::stoi(valueTransitRouterRouteEntriesTransitRouterRouteEntry["Preference"].asString());
auto pathAttributesNode = value["PathAttributes"];
if(!pathAttributesNode["OriginInstanceId"].isNull())
transitRouterRouteEntriesObject.pathAttributes.originInstanceId = pathAttributesNode["OriginInstanceId"].asString();
if(!pathAttributesNode["OriginInstanceType"].isNull())
transitRouterRouteEntriesObject.pathAttributes.originInstanceType = pathAttributesNode["OriginInstanceType"].asString();
if(!pathAttributesNode["OriginRouteType"].isNull())
transitRouterRouteEntriesObject.pathAttributes.originRouteType = pathAttributesNode["OriginRouteType"].asString();
if(!pathAttributesNode["Preference"].isNull())
transitRouterRouteEntriesObject.pathAttributes.preference = std::stoi(pathAttributesNode["Preference"].asString());
auto allCommunities1 = pathAttributesNode["Communities"]["Community"];
for (auto value : allCommunities1)
transitRouterRouteEntriesObject.pathAttributes.communities1.push_back(value.asString());
auto allAsPaths2 = pathAttributesNode["AsPaths"]["AsPath"];
for (auto value : allAsPaths2)
transitRouterRouteEntriesObject.pathAttributes.asPaths2.push_back(value.asString());
auto allCommunities = value["Communities"]["Community"];
for (auto value : allCommunities)
transitRouterRouteEntriesObject.communities.push_back(value.asString());
auto allAsPaths = value["AsPaths"]["AsPath"];
for (auto value : allAsPaths)
transitRouterRouteEntriesObject.asPaths.push_back(value.asString());
transitRouterRouteEntries_.push_back(transitRouterRouteEntriesObject);
}
if(!value["NextToken"].isNull())

View File

@@ -89,6 +89,8 @@ set(dataworks-public_public_header_model
include/alibabacloud/dataworks-public/model/CreateQualityRuleResult.h
include/alibabacloud/dataworks-public/model/CreateRemindRequest.h
include/alibabacloud/dataworks-public/model/CreateRemindResult.h
include/alibabacloud/dataworks-public/model/CreateResourceFileRequest.h
include/alibabacloud/dataworks-public/model/CreateResourceFileResult.h
include/alibabacloud/dataworks-public/model/CreateTableRequest.h
include/alibabacloud/dataworks-public/model/CreateTableResult.h
include/alibabacloud/dataworks-public/model/CreateTableLevelRequest.h
@@ -604,6 +606,8 @@ set(dataworks-public_src
src/model/CreateQualityRuleResult.cc
src/model/CreateRemindRequest.cc
src/model/CreateRemindResult.cc
src/model/CreateResourceFileRequest.cc
src/model/CreateResourceFileResult.cc
src/model/CreateTableRequest.cc
src/model/CreateTableResult.cc
src/model/CreateTableLevelRequest.cc

View File

@@ -90,6 +90,8 @@
#include "model/CreateQualityRuleResult.h"
#include "model/CreateRemindRequest.h"
#include "model/CreateRemindResult.h"
#include "model/CreateResourceFileRequest.h"
#include "model/CreateResourceFileResult.h"
#include "model/CreateTableRequest.h"
#include "model/CreateTableResult.h"
#include "model/CreateTableLevelRequest.h"
@@ -645,6 +647,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::CreateRemindResult> CreateRemindOutcome;
typedef std::future<CreateRemindOutcome> CreateRemindOutcomeCallable;
typedef std::function<void(const Dataworks_publicClient*, const Model::CreateRemindRequest&, const CreateRemindOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateRemindAsyncHandler;
typedef Outcome<Error, Model::CreateResourceFileResult> CreateResourceFileOutcome;
typedef std::future<CreateResourceFileOutcome> CreateResourceFileOutcomeCallable;
typedef std::function<void(const Dataworks_publicClient*, const Model::CreateResourceFileRequest&, const CreateResourceFileOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateResourceFileAsyncHandler;
typedef Outcome<Error, Model::CreateTableResult> CreateTableOutcome;
typedef std::future<CreateTableOutcome> CreateTableOutcomeCallable;
typedef std::function<void(const Dataworks_publicClient*, const Model::CreateTableRequest&, const CreateTableOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateTableAsyncHandler;
@@ -1418,6 +1423,9 @@ namespace AlibabaCloud
CreateRemindOutcome createRemind(const Model::CreateRemindRequest &request)const;
void createRemindAsync(const Model::CreateRemindRequest& request, const CreateRemindAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateRemindOutcomeCallable createRemindCallable(const Model::CreateRemindRequest& request) const;
CreateResourceFileOutcome createResourceFile(const Model::CreateResourceFileRequest &request)const;
void createResourceFileAsync(const Model::CreateResourceFileRequest& request, const CreateResourceFileAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateResourceFileOutcomeCallable createResourceFileCallable(const Model::CreateResourceFileRequest& request) const;
CreateTableOutcome createTable(const Model::CreateTableRequest &request)const;
void createTableAsync(const Model::CreateTableRequest& request, const CreateTableAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateTableOutcomeCallable createTableCallable(const Model::CreateTableRequest& request) const;

View File

@@ -56,6 +56,8 @@ public:
void setAutoRerunIntervalMillis(int autoRerunIntervalMillis);
std::string getInputList() const;
void setInputList(const std::string &inputList);
bool getCreateFolderIfNotExists() const;
void setCreateFolderIfNotExists(bool createFolderIfNotExists);
std::string getRerunMode() const;
void setRerunMode(const std::string &rerunMode);
std::string getConnectionName() const;
@@ -105,6 +107,7 @@ private:
std::string owner_;
int autoRerunIntervalMillis_;
std::string inputList_;
bool createFolderIfNotExists_;
std::string rerunMode_;
std::string connectionName_;
std::string outputParameters_;

View File

@@ -0,0 +1,75 @@
/*
* 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_DATAWORKS_PUBLIC_MODEL_CREATERESOURCEFILEREQUEST_H_
#define ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATERESOURCEFILEREQUEST_H_
#include <alibabacloud/dataworks-public/Dataworks_publicExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace Dataworks_public {
namespace Model {
class ALIBABACLOUD_DATAWORKS_PUBLIC_EXPORT CreateResourceFileRequest : public RpcServiceRequest {
public:
CreateResourceFileRequest();
~CreateResourceFileRequest();
int getFileType() const;
void setFileType(int fileType);
std::string getContent() const;
void setContent(const std::string &content);
std::string getResourceFile() const;
void setResourceFile(const std::string &resourceFile);
std::string getOriginResourceName() const;
void setOriginResourceName(const std::string &originResourceName);
long getProjectId() const;
void setProjectId(long projectId);
std::string getStorageURL() const;
void setStorageURL(const std::string &storageURL);
std::string getOwner() const;
void setOwner(const std::string &owner);
bool getRegisterToCalcEngine() const;
void setRegisterToCalcEngine(bool registerToCalcEngine);
bool getUploadMode() const;
void setUploadMode(bool uploadMode);
std::string getFileName() const;
void setFileName(const std::string &fileName);
std::string getFileFolderPath() const;
void setFileFolderPath(const std::string &fileFolderPath);
std::string getFileDescription() const;
void setFileDescription(const std::string &fileDescription);
private:
int fileType_;
std::string content_;
std::string resourceFile_;
std::string originResourceName_;
long projectId_;
std::string storageURL_;
std::string owner_;
bool registerToCalcEngine_;
bool uploadMode_;
std::string fileName_;
std::string fileFolderPath_;
std::string fileDescription_;
};
} // namespace Model
} // namespace Dataworks_public
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATERESOURCEFILEREQUEST_H_

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.
*/
#ifndef ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATERESOURCEFILERESULT_H_
#define ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATERESOURCEFILERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/dataworks-public/Dataworks_publicExport.h>
namespace AlibabaCloud
{
namespace Dataworks_public
{
namespace Model
{
class ALIBABACLOUD_DATAWORKS_PUBLIC_EXPORT CreateResourceFileResult : public ServiceResult
{
public:
CreateResourceFileResult();
explicit CreateResourceFileResult(const std::string &payload);
~CreateResourceFileResult();
long getData()const;
protected:
void parse(const std::string &payload);
private:
long data_;
};
}
}
}
#endif // !ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATERESOURCEFILERESULT_H_

View File

@@ -30,6 +30,8 @@ class ALIBABACLOUD_DATAWORKS_PUBLIC_EXPORT CreateUdfFileRequest : public RpcServ
public:
CreateUdfFileRequest();
~CreateUdfFileRequest();
bool getCreateFolderIfNotExists() const;
void setCreateFolderIfNotExists(bool createFolderIfNotExists);
std::string getReturnValue() const;
void setReturnValue(const std::string &returnValue);
std::string getResources() const;
@@ -56,6 +58,7 @@ public:
void setProjectId(long projectId);
private:
bool createFolderIfNotExists_;
std::string returnValue_;
std::string resources_;
std::string functionType_;

View File

@@ -34,14 +34,22 @@ public:
void setOwner(const std::string &owner);
std::string getFileTypes() const;
void setFileTypes(const std::string &fileTypes);
bool getNeedContent() const;
void setNeedContent(bool needContent);
bool getNeedAbsoluteFolderPath() const;
void setNeedAbsoluteFolderPath(bool needAbsoluteFolderPath);
std::string getProjectIdentifier() const;
void setProjectIdentifier(const std::string &projectIdentifier);
int getPageNumber() const;
void setPageNumber(int pageNumber);
std::string getFileIdIn() const;
void setFileIdIn(const std::string &fileIdIn);
std::string getFileFolderPath() const;
void setFileFolderPath(const std::string &fileFolderPath);
int getPageSize() const;
void setPageSize(int pageSize);
std::string getExactFileName() const;
void setExactFileName(const std::string &exactFileName);
std::string getKeyword() const;
void setKeyword(const std::string &keyword);
long getProjectId() const;
@@ -54,10 +62,14 @@ public:
private:
std::string owner_;
std::string fileTypes_;
bool needContent_;
bool needAbsoluteFolderPath_;
std::string projectIdentifier_;
int pageNumber_;
std::string fileIdIn_;
std::string fileFolderPath_;
int pageSize_;
std::string exactFileName_;
std::string keyword_;
long projectId_;
std::string useType_;

View File

@@ -50,6 +50,7 @@ namespace AlibabaCloud
int fileType;
std::string lastEditUser;
std::string content;
std::string absoluteFolderPath;
int commitStatus;
long nodeId;
bool autoParsing;

View File

@@ -1275,6 +1275,42 @@ Dataworks_publicClient::CreateRemindOutcomeCallable Dataworks_publicClient::crea
return task->get_future();
}
Dataworks_publicClient::CreateResourceFileOutcome Dataworks_publicClient::createResourceFile(const CreateResourceFileRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateResourceFileOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateResourceFileOutcome(CreateResourceFileResult(outcome.result()));
else
return CreateResourceFileOutcome(outcome.error());
}
void Dataworks_publicClient::createResourceFileAsync(const CreateResourceFileRequest& request, const CreateResourceFileAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createResourceFile(request), context);
};
asyncExecute(new Runnable(fn));
}
Dataworks_publicClient::CreateResourceFileOutcomeCallable Dataworks_publicClient::createResourceFileCallable(const CreateResourceFileRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateResourceFileOutcome()>>(
[this, request]()
{
return this->createResourceFile(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
Dataworks_publicClient::CreateTableOutcome Dataworks_publicClient::createTable(const CreateTableRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -142,6 +142,15 @@ void CreateFileRequest::setInputList(const std::string &inputList) {
setBodyParameter(std::string("InputList"), inputList);
}
bool CreateFileRequest::getCreateFolderIfNotExists() const {
return createFolderIfNotExists_;
}
void CreateFileRequest::setCreateFolderIfNotExists(bool createFolderIfNotExists) {
createFolderIfNotExists_ = createFolderIfNotExists;
setBodyParameter(std::string("CreateFolderIfNotExists"), createFolderIfNotExists ? "true" : "false");
}
std::string CreateFileRequest::getRerunMode() const {
return rerunMode_;
}

View File

@@ -0,0 +1,135 @@
/*
* 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/dataworks-public/model/CreateResourceFileRequest.h>
using AlibabaCloud::Dataworks_public::Model::CreateResourceFileRequest;
CreateResourceFileRequest::CreateResourceFileRequest()
: RpcServiceRequest("dataworks-public", "2020-05-18", "CreateResourceFile") {
setMethod(HttpRequest::Method::Post);
}
CreateResourceFileRequest::~CreateResourceFileRequest() {}
int CreateResourceFileRequest::getFileType() const {
return fileType_;
}
void CreateResourceFileRequest::setFileType(int fileType) {
fileType_ = fileType;
setBodyParameter(std::string("FileType"), std::to_string(fileType));
}
std::string CreateResourceFileRequest::getContent() const {
return content_;
}
void CreateResourceFileRequest::setContent(const std::string &content) {
content_ = content;
setBodyParameter(std::string("Content"), content);
}
std::string CreateResourceFileRequest::getResourceFile() const {
return resourceFile_;
}
void CreateResourceFileRequest::setResourceFile(const std::string &resourceFile) {
resourceFile_ = resourceFile;
setBodyParameter(std::string("ResourceFile"), resourceFile);
}
std::string CreateResourceFileRequest::getOriginResourceName() const {
return originResourceName_;
}
void CreateResourceFileRequest::setOriginResourceName(const std::string &originResourceName) {
originResourceName_ = originResourceName;
setBodyParameter(std::string("OriginResourceName"), originResourceName);
}
long CreateResourceFileRequest::getProjectId() const {
return projectId_;
}
void CreateResourceFileRequest::setProjectId(long projectId) {
projectId_ = projectId;
setBodyParameter(std::string("ProjectId"), std::to_string(projectId));
}
std::string CreateResourceFileRequest::getStorageURL() const {
return storageURL_;
}
void CreateResourceFileRequest::setStorageURL(const std::string &storageURL) {
storageURL_ = storageURL;
setBodyParameter(std::string("StorageURL"), storageURL);
}
std::string CreateResourceFileRequest::getOwner() const {
return owner_;
}
void CreateResourceFileRequest::setOwner(const std::string &owner) {
owner_ = owner;
setBodyParameter(std::string("Owner"), owner);
}
bool CreateResourceFileRequest::getRegisterToCalcEngine() const {
return registerToCalcEngine_;
}
void CreateResourceFileRequest::setRegisterToCalcEngine(bool registerToCalcEngine) {
registerToCalcEngine_ = registerToCalcEngine;
setBodyParameter(std::string("RegisterToCalcEngine"), registerToCalcEngine ? "true" : "false");
}
bool CreateResourceFileRequest::getUploadMode() const {
return uploadMode_;
}
void CreateResourceFileRequest::setUploadMode(bool uploadMode) {
uploadMode_ = uploadMode;
setBodyParameter(std::string("UploadMode"), uploadMode ? "true" : "false");
}
std::string CreateResourceFileRequest::getFileName() const {
return fileName_;
}
void CreateResourceFileRequest::setFileName(const std::string &fileName) {
fileName_ = fileName;
setBodyParameter(std::string("FileName"), fileName);
}
std::string CreateResourceFileRequest::getFileFolderPath() const {
return fileFolderPath_;
}
void CreateResourceFileRequest::setFileFolderPath(const std::string &fileFolderPath) {
fileFolderPath_ = fileFolderPath;
setBodyParameter(std::string("FileFolderPath"), fileFolderPath);
}
std::string CreateResourceFileRequest::getFileDescription() const {
return fileDescription_;
}
void CreateResourceFileRequest::setFileDescription(const std::string &fileDescription) {
fileDescription_ = fileDescription;
setBodyParameter(std::string("FileDescription"), fileDescription);
}

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/dataworks-public/model/CreateResourceFileResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dataworks_public;
using namespace AlibabaCloud::Dataworks_public::Model;
CreateResourceFileResult::CreateResourceFileResult() :
ServiceResult()
{}
CreateResourceFileResult::CreateResourceFileResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateResourceFileResult::~CreateResourceFileResult()
{}
void CreateResourceFileResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Data"].isNull())
data_ = std::stol(value["Data"].asString());
}
long CreateResourceFileResult::getData()const
{
return data_;
}

View File

@@ -25,6 +25,15 @@ CreateUdfFileRequest::CreateUdfFileRequest()
CreateUdfFileRequest::~CreateUdfFileRequest() {}
bool CreateUdfFileRequest::getCreateFolderIfNotExists() const {
return createFolderIfNotExists_;
}
void CreateUdfFileRequest::setCreateFolderIfNotExists(bool createFolderIfNotExists) {
createFolderIfNotExists_ = createFolderIfNotExists;
setBodyParameter(std::string("CreateFolderIfNotExists"), createFolderIfNotExists ? "true" : "false");
}
std::string CreateUdfFileRequest::getReturnValue() const {
return returnValue_;
}

View File

@@ -43,6 +43,24 @@ void ListFilesRequest::setFileTypes(const std::string &fileTypes) {
setBodyParameter(std::string("FileTypes"), fileTypes);
}
bool ListFilesRequest::getNeedContent() const {
return needContent_;
}
void ListFilesRequest::setNeedContent(bool needContent) {
needContent_ = needContent;
setBodyParameter(std::string("NeedContent"), needContent ? "true" : "false");
}
bool ListFilesRequest::getNeedAbsoluteFolderPath() const {
return needAbsoluteFolderPath_;
}
void ListFilesRequest::setNeedAbsoluteFolderPath(bool needAbsoluteFolderPath) {
needAbsoluteFolderPath_ = needAbsoluteFolderPath;
setBodyParameter(std::string("NeedAbsoluteFolderPath"), needAbsoluteFolderPath ? "true" : "false");
}
std::string ListFilesRequest::getProjectIdentifier() const {
return projectIdentifier_;
}
@@ -61,6 +79,15 @@ void ListFilesRequest::setPageNumber(int pageNumber) {
setBodyParameter(std::string("PageNumber"), std::to_string(pageNumber));
}
std::string ListFilesRequest::getFileIdIn() const {
return fileIdIn_;
}
void ListFilesRequest::setFileIdIn(const std::string &fileIdIn) {
fileIdIn_ = fileIdIn;
setBodyParameter(std::string("FileIdIn"), fileIdIn);
}
std::string ListFilesRequest::getFileFolderPath() const {
return fileFolderPath_;
}
@@ -79,6 +106,15 @@ void ListFilesRequest::setPageSize(int pageSize) {
setBodyParameter(std::string("PageSize"), std::to_string(pageSize));
}
std::string ListFilesRequest::getExactFileName() const {
return exactFileName_;
}
void ListFilesRequest::setExactFileName(const std::string &exactFileName) {
exactFileName_ = exactFileName;
setBodyParameter(std::string("ExactFileName"), exactFileName);
}
std::string ListFilesRequest::getKeyword() const {
return keyword_;
}

View File

@@ -92,6 +92,8 @@ void ListFilesResult::parse(const std::string &payload)
fileObject.content = dataNodeFilesFile["Content"].asString();
if(!dataNodeFilesFile["NodeId"].isNull())
fileObject.nodeId = std::stol(dataNodeFilesFile["NodeId"].asString());
if(!dataNodeFilesFile["AbsoluteFolderPath"].isNull())
fileObject.absoluteFolderPath = dataNodeFilesFile["AbsoluteFolderPath"].asString();
data_.files.push_back(fileObject);
}
if(!value["HttpStatusCode"].isNull())

View File

@@ -103,6 +103,8 @@ set(ehpc_public_header_model
include/alibabacloud/ehpc/model/DescribeNFSClientStatusResult.h
include/alibabacloud/ehpc/model/DescribePriceRequest.h
include/alibabacloud/ehpc/model/DescribePriceResult.h
include/alibabacloud/ehpc/model/DescribeServerlessJobsRequest.h
include/alibabacloud/ehpc/model/DescribeServerlessJobsResult.h
include/alibabacloud/ehpc/model/EditJobTemplateRequest.h
include/alibabacloud/ehpc/model/EditJobTemplateResult.h
include/alibabacloud/ehpc/model/GetAccountingReportRequest.h
@@ -195,6 +197,8 @@ set(ehpc_public_header_model
include/alibabacloud/ehpc/model/ListRegionsResult.h
include/alibabacloud/ehpc/model/ListSecurityGroupsRequest.h
include/alibabacloud/ehpc/model/ListSecurityGroupsResult.h
include/alibabacloud/ehpc/model/ListServerlessJobsRequest.h
include/alibabacloud/ehpc/model/ListServerlessJobsResult.h
include/alibabacloud/ehpc/model/ListSoftwaresRequest.h
include/alibabacloud/ehpc/model/ListSoftwaresResult.h
include/alibabacloud/ehpc/model/ListTagResourcesRequest.h
@@ -265,10 +269,14 @@ set(ehpc_public_header_model
include/alibabacloud/ehpc/model/StopJobsResult.h
include/alibabacloud/ehpc/model/StopNodesRequest.h
include/alibabacloud/ehpc/model/StopNodesResult.h
include/alibabacloud/ehpc/model/StopServerlessJobsRequest.h
include/alibabacloud/ehpc/model/StopServerlessJobsResult.h
include/alibabacloud/ehpc/model/StopVisualServiceRequest.h
include/alibabacloud/ehpc/model/StopVisualServiceResult.h
include/alibabacloud/ehpc/model/SubmitJobRequest.h
include/alibabacloud/ehpc/model/SubmitJobResult.h
include/alibabacloud/ehpc/model/SubmitServerlessJobRequest.h
include/alibabacloud/ehpc/model/SubmitServerlessJobResult.h
include/alibabacloud/ehpc/model/SummaryImagesRequest.h
include/alibabacloud/ehpc/model/SummaryImagesResult.h
include/alibabacloud/ehpc/model/SummaryImagesInfoRequest.h
@@ -372,6 +380,8 @@ set(ehpc_src
src/model/DescribeNFSClientStatusResult.cc
src/model/DescribePriceRequest.cc
src/model/DescribePriceResult.cc
src/model/DescribeServerlessJobsRequest.cc
src/model/DescribeServerlessJobsResult.cc
src/model/EditJobTemplateRequest.cc
src/model/EditJobTemplateResult.cc
src/model/GetAccountingReportRequest.cc
@@ -464,6 +474,8 @@ set(ehpc_src
src/model/ListRegionsResult.cc
src/model/ListSecurityGroupsRequest.cc
src/model/ListSecurityGroupsResult.cc
src/model/ListServerlessJobsRequest.cc
src/model/ListServerlessJobsResult.cc
src/model/ListSoftwaresRequest.cc
src/model/ListSoftwaresResult.cc
src/model/ListTagResourcesRequest.cc
@@ -534,10 +546,14 @@ set(ehpc_src
src/model/StopJobsResult.cc
src/model/StopNodesRequest.cc
src/model/StopNodesResult.cc
src/model/StopServerlessJobsRequest.cc
src/model/StopServerlessJobsResult.cc
src/model/StopVisualServiceRequest.cc
src/model/StopVisualServiceResult.cc
src/model/SubmitJobRequest.cc
src/model/SubmitJobResult.cc
src/model/SubmitServerlessJobRequest.cc
src/model/SubmitServerlessJobResult.cc
src/model/SummaryImagesRequest.cc
src/model/SummaryImagesResult.cc
src/model/SummaryImagesInfoRequest.cc

View File

@@ -104,6 +104,8 @@
#include "model/DescribeNFSClientStatusResult.h"
#include "model/DescribePriceRequest.h"
#include "model/DescribePriceResult.h"
#include "model/DescribeServerlessJobsRequest.h"
#include "model/DescribeServerlessJobsResult.h"
#include "model/EditJobTemplateRequest.h"
#include "model/EditJobTemplateResult.h"
#include "model/GetAccountingReportRequest.h"
@@ -196,6 +198,8 @@
#include "model/ListRegionsResult.h"
#include "model/ListSecurityGroupsRequest.h"
#include "model/ListSecurityGroupsResult.h"
#include "model/ListServerlessJobsRequest.h"
#include "model/ListServerlessJobsResult.h"
#include "model/ListSoftwaresRequest.h"
#include "model/ListSoftwaresResult.h"
#include "model/ListTagResourcesRequest.h"
@@ -266,10 +270,14 @@
#include "model/StopJobsResult.h"
#include "model/StopNodesRequest.h"
#include "model/StopNodesResult.h"
#include "model/StopServerlessJobsRequest.h"
#include "model/StopServerlessJobsResult.h"
#include "model/StopVisualServiceRequest.h"
#include "model/StopVisualServiceResult.h"
#include "model/SubmitJobRequest.h"
#include "model/SubmitJobResult.h"
#include "model/SubmitServerlessJobRequest.h"
#include "model/SubmitServerlessJobResult.h"
#include "model/SummaryImagesRequest.h"
#include "model/SummaryImagesResult.h"
#include "model/SummaryImagesInfoRequest.h"
@@ -420,6 +428,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DescribePriceResult> DescribePriceOutcome;
typedef std::future<DescribePriceOutcome> DescribePriceOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::DescribePriceRequest&, const DescribePriceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribePriceAsyncHandler;
typedef Outcome<Error, Model::DescribeServerlessJobsResult> DescribeServerlessJobsOutcome;
typedef std::future<DescribeServerlessJobsOutcome> DescribeServerlessJobsOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::DescribeServerlessJobsRequest&, const DescribeServerlessJobsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeServerlessJobsAsyncHandler;
typedef Outcome<Error, Model::EditJobTemplateResult> EditJobTemplateOutcome;
typedef std::future<EditJobTemplateOutcome> EditJobTemplateOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::EditJobTemplateRequest&, const EditJobTemplateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> EditJobTemplateAsyncHandler;
@@ -558,6 +569,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ListSecurityGroupsResult> ListSecurityGroupsOutcome;
typedef std::future<ListSecurityGroupsOutcome> ListSecurityGroupsOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::ListSecurityGroupsRequest&, const ListSecurityGroupsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListSecurityGroupsAsyncHandler;
typedef Outcome<Error, Model::ListServerlessJobsResult> ListServerlessJobsOutcome;
typedef std::future<ListServerlessJobsOutcome> ListServerlessJobsOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::ListServerlessJobsRequest&, const ListServerlessJobsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListServerlessJobsAsyncHandler;
typedef Outcome<Error, Model::ListSoftwaresResult> ListSoftwaresOutcome;
typedef std::future<ListSoftwaresOutcome> ListSoftwaresOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::ListSoftwaresRequest&, const ListSoftwaresOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListSoftwaresAsyncHandler;
@@ -663,12 +677,18 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::StopNodesResult> StopNodesOutcome;
typedef std::future<StopNodesOutcome> StopNodesOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::StopNodesRequest&, const StopNodesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StopNodesAsyncHandler;
typedef Outcome<Error, Model::StopServerlessJobsResult> StopServerlessJobsOutcome;
typedef std::future<StopServerlessJobsOutcome> StopServerlessJobsOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::StopServerlessJobsRequest&, const StopServerlessJobsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StopServerlessJobsAsyncHandler;
typedef Outcome<Error, Model::StopVisualServiceResult> StopVisualServiceOutcome;
typedef std::future<StopVisualServiceOutcome> StopVisualServiceOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::StopVisualServiceRequest&, const StopVisualServiceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StopVisualServiceAsyncHandler;
typedef Outcome<Error, Model::SubmitJobResult> SubmitJobOutcome;
typedef std::future<SubmitJobOutcome> SubmitJobOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::SubmitJobRequest&, const SubmitJobOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SubmitJobAsyncHandler;
typedef Outcome<Error, Model::SubmitServerlessJobResult> SubmitServerlessJobOutcome;
typedef std::future<SubmitServerlessJobOutcome> SubmitServerlessJobOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::SubmitServerlessJobRequest&, const SubmitServerlessJobOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SubmitServerlessJobAsyncHandler;
typedef Outcome<Error, Model::SummaryImagesResult> SummaryImagesOutcome;
typedef std::future<SummaryImagesOutcome> SummaryImagesOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::SummaryImagesRequest&, const SummaryImagesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SummaryImagesAsyncHandler;
@@ -824,6 +844,9 @@ namespace AlibabaCloud
DescribePriceOutcome describePrice(const Model::DescribePriceRequest &request)const;
void describePriceAsync(const Model::DescribePriceRequest& request, const DescribePriceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribePriceOutcomeCallable describePriceCallable(const Model::DescribePriceRequest& request) const;
DescribeServerlessJobsOutcome describeServerlessJobs(const Model::DescribeServerlessJobsRequest &request)const;
void describeServerlessJobsAsync(const Model::DescribeServerlessJobsRequest& request, const DescribeServerlessJobsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeServerlessJobsOutcomeCallable describeServerlessJobsCallable(const Model::DescribeServerlessJobsRequest& request) const;
EditJobTemplateOutcome editJobTemplate(const Model::EditJobTemplateRequest &request)const;
void editJobTemplateAsync(const Model::EditJobTemplateRequest& request, const EditJobTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
EditJobTemplateOutcomeCallable editJobTemplateCallable(const Model::EditJobTemplateRequest& request) const;
@@ -962,6 +985,9 @@ namespace AlibabaCloud
ListSecurityGroupsOutcome listSecurityGroups(const Model::ListSecurityGroupsRequest &request)const;
void listSecurityGroupsAsync(const Model::ListSecurityGroupsRequest& request, const ListSecurityGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListSecurityGroupsOutcomeCallable listSecurityGroupsCallable(const Model::ListSecurityGroupsRequest& request) const;
ListServerlessJobsOutcome listServerlessJobs(const Model::ListServerlessJobsRequest &request)const;
void listServerlessJobsAsync(const Model::ListServerlessJobsRequest& request, const ListServerlessJobsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListServerlessJobsOutcomeCallable listServerlessJobsCallable(const Model::ListServerlessJobsRequest& request) const;
ListSoftwaresOutcome listSoftwares(const Model::ListSoftwaresRequest &request)const;
void listSoftwaresAsync(const Model::ListSoftwaresRequest& request, const ListSoftwaresAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListSoftwaresOutcomeCallable listSoftwaresCallable(const Model::ListSoftwaresRequest& request) const;
@@ -1067,12 +1093,18 @@ namespace AlibabaCloud
StopNodesOutcome stopNodes(const Model::StopNodesRequest &request)const;
void stopNodesAsync(const Model::StopNodesRequest& request, const StopNodesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
StopNodesOutcomeCallable stopNodesCallable(const Model::StopNodesRequest& request) const;
StopServerlessJobsOutcome stopServerlessJobs(const Model::StopServerlessJobsRequest &request)const;
void stopServerlessJobsAsync(const Model::StopServerlessJobsRequest& request, const StopServerlessJobsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
StopServerlessJobsOutcomeCallable stopServerlessJobsCallable(const Model::StopServerlessJobsRequest& request) const;
StopVisualServiceOutcome stopVisualService(const Model::StopVisualServiceRequest &request)const;
void stopVisualServiceAsync(const Model::StopVisualServiceRequest& request, const StopVisualServiceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
StopVisualServiceOutcomeCallable stopVisualServiceCallable(const Model::StopVisualServiceRequest& request) const;
SubmitJobOutcome submitJob(const Model::SubmitJobRequest &request)const;
void submitJobAsync(const Model::SubmitJobRequest& request, const SubmitJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SubmitJobOutcomeCallable submitJobCallable(const Model::SubmitJobRequest& request) const;
SubmitServerlessJobOutcome submitServerlessJob(const Model::SubmitServerlessJobRequest &request)const;
void submitServerlessJobAsync(const Model::SubmitServerlessJobRequest& request, const SubmitServerlessJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SubmitServerlessJobOutcomeCallable submitServerlessJobCallable(const Model::SubmitServerlessJobRequest& request) const;
SummaryImagesOutcome summaryImages(const Model::SummaryImagesRequest &request)const;
void summaryImagesAsync(const Model::SummaryImagesRequest& request, const SummaryImagesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SummaryImagesOutcomeCallable summaryImagesCallable(const Model::SummaryImagesRequest& request) const;

View File

@@ -38,6 +38,48 @@ public:
};
AddNodesRequest();
~AddNodesRequest();
std::string getDnsConfig() const;
void setDnsConfig(const std::string &dnsConfig);
std::string getImageOwnerAlias() const;
void setImageOwnerAlias(const std::string &imageOwnerAlias);
std::vector<DataDisks> getDataDisks() const;
void setDataDisks(const std::vector<DataDisks> &dataDisks);
int getSystemDiskSize() const;
void setSystemDiskSize(int systemDiskSize);
std::string getHostNamePrefix() const;
void setHostNamePrefix(const std::string &hostNamePrefix);
std::string getComputeSpotInterruptionBehavior() const;
void setComputeSpotInterruptionBehavior(const std::string &computeSpotInterruptionBehavior);
std::string getComputeSpotPriceLimit() const;
void setComputeSpotPriceLimit(const std::string &computeSpotPriceLimit);
int getAutoRenewPeriod() const;
void setAutoRenewPeriod(int autoRenewPeriod);
int getPeriod() const;
void setPeriod(int period);
int getCount() const;
void setCount(int count);
std::string getComputeSpotStrategy() const;
void setComputeSpotStrategy(const std::string &computeSpotStrategy);
std::string getHostNameSuffix() const;
void setHostNameSuffix(const std::string &hostNameSuffix);
bool getSync() const;
void setSync(bool sync);
std::string getVSwitchId() const;
void setVSwitchId(const std::string &vSwitchId);
std::string getPeriodUnit() const;
void setPeriodUnit(const std::string &periodUnit);
bool getComputeEnableHt() const;
void setComputeEnableHt(bool computeEnableHt);
std::string getAutoRenew() const;
void setAutoRenew(const std::string &autoRenew);
std::string getInternetChargeType() const;
void setInternetChargeType(const std::string &internetChargeType);
std::string getCreateMode() const;
void setCreateMode(const std::string &createMode);
std::string getZoneId() const;
void setZoneId(const std::string &zoneId);
int getInternetMaxBandWidthIn() const;
void setInternetMaxBandWidthIn(int internetMaxBandWidthIn);
std::string getImageId() const;
void setImageId(const std::string &imageId);
std::string getSystemDiskLevel() const;
@@ -52,62 +94,43 @@ public:
void setJobQueue(const std::string &jobQueue);
std::string getAccessKeyId() const;
void setAccessKeyId(const std::string &accessKeyId);
std::string getImageOwnerAlias() const;
void setImageOwnerAlias(const std::string &imageOwnerAlias);
std::string getSystemDiskType() const;
void setSystemDiskType(const std::string &systemDiskType);
std::vector<DataDisks> getDataDisks() const;
void setDataDisks(const std::vector<DataDisks> &dataDisks);
int getMinCount() const;
void setMinCount(int minCount);
int getSystemDiskSize() const;
void setSystemDiskSize(int systemDiskSize);
std::string getInstanceType() const;
void setInstanceType(const std::string &instanceType);
std::string getHostNamePrefix() const;
void setHostNamePrefix(const std::string &hostNamePrefix);
std::string getComputeSpotInterruptionBehavior() const;
void setComputeSpotInterruptionBehavior(const std::string &computeSpotInterruptionBehavior);
std::string getComputeSpotPriceLimit() const;
void setComputeSpotPriceLimit(const std::string &computeSpotPriceLimit);
int getAutoRenewPeriod() const;
void setAutoRenewPeriod(int autoRenewPeriod);
int getPeriod() const;
void setPeriod(int period);
int getCount() const;
void setCount(int count);
std::string getClusterId() const;
void setClusterId(const std::string &clusterId);
std::string getComputeSpotStrategy() const;
void setComputeSpotStrategy(const std::string &computeSpotStrategy);
std::string getHostNameSuffix() const;
void setHostNameSuffix(const std::string &hostNameSuffix);
bool getSync() const;
void setSync(bool sync);
std::string getNetworkInterfaceTrafficMode() const;
void setNetworkInterfaceTrafficMode(const std::string &networkInterfaceTrafficMode);
std::string getVSwitchId() const;
void setVSwitchId(const std::string &vSwitchId);
int getComputeSpotDuration() const;
void setComputeSpotDuration(int computeSpotDuration);
std::string getPeriodUnit() const;
void setPeriodUnit(const std::string &periodUnit);
bool getComputeEnableHt() const;
void setComputeEnableHt(bool computeEnableHt);
std::string getAutoRenew() const;
void setAutoRenew(const std::string &autoRenew);
std::string getEcsChargeType() const;
void setEcsChargeType(const std::string &ecsChargeType);
std::string getInternetChargeType() const;
void setInternetChargeType(const std::string &internetChargeType);
std::string getCreateMode() const;
void setCreateMode(const std::string &createMode);
std::string getZoneId() const;
void setZoneId(const std::string &zoneId);
int getInternetMaxBandWidthIn() const;
void setInternetMaxBandWidthIn(int internetMaxBandWidthIn);
private:
std::string dnsConfig_;
std::string imageOwnerAlias_;
std::vector<DataDisks> dataDisks_;
int systemDiskSize_;
std::string hostNamePrefix_;
std::string computeSpotInterruptionBehavior_;
std::string computeSpotPriceLimit_;
int autoRenewPeriod_;
int period_;
int count_;
std::string computeSpotStrategy_;
std::string hostNameSuffix_;
bool sync_;
std::string vSwitchId_;
std::string periodUnit_;
bool computeEnableHt_;
std::string autoRenew_;
std::string internetChargeType_;
std::string createMode_;
std::string zoneId_;
int internetMaxBandWidthIn_;
std::string imageId_;
std::string systemDiskLevel_;
std::string clientToken_;
@@ -115,33 +138,13 @@ private:
int internetMaxBandWidthOut_;
std::string jobQueue_;
std::string accessKeyId_;
std::string imageOwnerAlias_;
std::string systemDiskType_;
std::vector<DataDisks> dataDisks_;
int minCount_;
int systemDiskSize_;
std::string instanceType_;
std::string hostNamePrefix_;
std::string computeSpotInterruptionBehavior_;
std::string computeSpotPriceLimit_;
int autoRenewPeriod_;
int period_;
int count_;
std::string clusterId_;
std::string computeSpotStrategy_;
std::string hostNameSuffix_;
bool sync_;
std::string networkInterfaceTrafficMode_;
std::string vSwitchId_;
int computeSpotDuration_;
std::string periodUnit_;
bool computeEnableHt_;
std::string autoRenew_;
std::string ecsChargeType_;
std::string internetChargeType_;
std::string createMode_;
std::string zoneId_;
int internetMaxBandWidthIn_;
};
} // namespace Model
} // namespace EHPC

View File

@@ -30,16 +30,22 @@ class ALIBABACLOUD_EHPC_EXPORT AddQueueRequest : public RpcServiceRequest {
public:
AddQueueRequest();
~AddQueueRequest();
std::string getDeploymentSetId() const;
void setDeploymentSetId(const std::string &deploymentSetId);
std::string getQueueName() const;
void setQueueName(const std::string &queueName);
std::string getClusterId() const;
void setClusterId(const std::string &clusterId);
std::string getNetworkInterfaceTrafficMode() const;
void setNetworkInterfaceTrafficMode(const std::string &networkInterfaceTrafficMode);
std::string getAccessKeyId() const;
void setAccessKeyId(const std::string &accessKeyId);
private:
std::string deploymentSetId_;
std::string queueName_;
std::string clusterId_;
std::string networkInterfaceTrafficMode_;
std::string accessKeyId_;
};
} // namespace Model

View File

@@ -43,6 +43,15 @@ public:
std::string location;
std::string jobQueue;
};
struct AddOns {
std::string deployMode;
float port;
std::string configFile;
bool defaultStart;
std::string name;
std::string dBType;
std::string version;
};
struct Tag {
std::string value;
std::string key;
@@ -58,12 +67,16 @@ public:
~CreateClusterRequest();
std::vector<AdditionalVolumes> getAdditionalVolumes() const;
void setAdditionalVolumes(const std::vector<AdditionalVolumes> &additionalVolumes);
std::vector<AddOns> getAddOns() const;
void setAddOns(const std::vector<AddOns> &addOns);
std::string getEcsOrderManagerInstanceType() const;
void setEcsOrderManagerInstanceType(const std::string &ecsOrderManagerInstanceType);
std::string getKeyPairName() const;
void setKeyPairName(const std::string &keyPairName);
std::string getSecurityGroupName() const;
void setSecurityGroupName(const std::string &securityGroupName);
bool getWithoutNas() const;
void setWithoutNas(bool withoutNas);
std::string getImageOwnerAlias() const;
void setImageOwnerAlias(const std::string &imageOwnerAlias);
std::string getDeployMode() const;
@@ -144,6 +157,8 @@ public:
void setVolumeType(const std::string &volumeType);
std::string getSystemDiskType() const;
void setSystemDiskType(const std::string &systemDiskType);
std::string getDeploymentSetId() const;
void setDeploymentSetId(const std::string &deploymentSetId);
std::string getVolumeProtocol() const;
void setVolumeProtocol(const std::string &volumeProtocol);
std::string getClientVersion() const;
@@ -181,9 +196,11 @@ public:
private:
std::vector<AdditionalVolumes> additionalVolumes_;
std::vector<AddOns> addOns_;
std::string ecsOrderManagerInstanceType_;
std::string keyPairName_;
std::string securityGroupName_;
bool withoutNas_;
std::string imageOwnerAlias_;
std::string deployMode_;
int ecsOrderManagerCount_;
@@ -224,6 +241,7 @@ private:
std::string accessKeyId_;
std::string volumeType_;
std::string systemDiskType_;
std::string deploymentSetId_;
std::string volumeProtocol_;
std::string clientVersion_;
std::string osTag_;

View File

@@ -39,6 +39,7 @@ public:
std::string url;
};
struct OpenldapPar {
std::string fallbackHomeDir;
std::string baseDn;
std::string ldapServerIp;
};
@@ -71,6 +72,8 @@ public:
void setResourceGroupId(const std::string &resourceGroupId);
std::string getPassword() const;
void setPassword(const std::string &password);
std::string getHybridClusterOpMode() const;
void setHybridClusterOpMode(const std::string &hybridClusterOpMode);
WinAdPar getWinAdPar() const;
void setWinAdPar(const WinAdPar &winAdPar);
float getComputeSpotPriceLimit() const;
@@ -147,6 +150,7 @@ private:
std::string imageOwnerAlias_;
std::string resourceGroupId_;
std::string password_;
std::string hybridClusterOpMode_;
WinAdPar winAdPar_;
float computeSpotPriceLimit_;
std::string onPremiseVolumeLocalPath_;

View File

@@ -61,6 +61,12 @@ namespace AlibabaCloud
ProxyMgr proxyMgr;
Manager manager;
};
struct InitialImage
{
std::string imageOwnerAlias;
std::string osTag;
std::string imageId;
};
struct ApplicationInfo
{
std::string version;
@@ -78,40 +84,75 @@ namespace AlibabaCloud
std::string iP;
std::string hostName;
};
struct AddOnsInfoItem
{
std::string status;
std::string softwareId;
std::string deployMode;
int port;
std::string uRL;
};
struct NodesInfo
{
std::string role;
std::string ipAddress;
std::string schedulerType;
std::string dir;
std::string accountType;
std::string hostName;
};
std::string volumeProtocol;
std::string resourceGroupId;
std::vector<AddOnsInfoItem> addOnsInfo;
std::string name;
std::string volumeId;
std::string ramRoleName;
std::string deployMode;
std::string openldapPar;
std::string imageId;
std::string status;
std::vector<PostInstallScriptInfo> postInstallScripts;
std::string vSwitchId;
std::string period;
std::string computeSpotStrategy;
std::string volumeMountpoint;
std::string vpcId;
EcsInfo ecsInfo;
std::string id;
std::string domain;
InitialImage initialImage;
std::string periodUnit;
std::string imageOwnerAlias;
std::string description;
std::string autoRenew;
std::string computeSpotPriceLimit;
std::string ramNodeTypes;
std::string clientVersion;
std::vector<OnPremiseInfoItem> onPremiseInfo;
std::string name;
std::string volumeId;
std::string winAdPar;
std::string volumeType;
std::string ramRoleName;
std::string deployMode;
std::string imageId;
std::string status;
int schedulerPreInstall;
std::string autoRenewPeriod;
std::string keyPairName;
std::string remoteDirectory;
std::string sccClusterId;
std::vector<ApplicationInfo> applications;
std::vector<PostInstallScriptInfo> postInstallScripts;
std::string zoneId;
std::string clusterVersion;
std::string securityGroupId;
std::string createTime;
std::string vSwitchId;
std::string schedulerType;
std::string accountType;
std::vector<NodesInfo> nodes;
std::string baseOsTag;
std::string volumeMountpoint;
int withoutAgent;
std::string imageName;
std::string vpcId;
EcsInfo ecsInfo;
bool haEnable;
std::string osTag;
std::string ecsChargeType;
std::string regionId;
std::string id;
std::string location;
std::string plugin;
};

View File

@@ -0,0 +1,48 @@
/*
* 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_EHPC_MODEL_DESCRIBESERVERLESSJOBSREQUEST_H_
#define ALIBABACLOUD_EHPC_MODEL_DESCRIBESERVERLESSJOBSREQUEST_H_
#include <alibabacloud/ehpc/EHPCExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace EHPC {
namespace Model {
class ALIBABACLOUD_EHPC_EXPORT DescribeServerlessJobsRequest : public RpcServiceRequest {
public:
DescribeServerlessJobsRequest();
~DescribeServerlessJobsRequest();
std::string getClusterId() const;
void setClusterId(const std::string &clusterId);
std::string getAccessKeyId() const;
void setAccessKeyId(const std::string &accessKeyId);
std::vector<std::string> getJobIds() const;
void setJobIds(const std::vector<std::string> &jobIds);
private:
std::string clusterId_;
std::string accessKeyId_;
std::vector<std::string> jobIds_;
};
} // namespace Model
} // namespace EHPC
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_EHPC_MODEL_DESCRIBESERVERLESSJOBSREQUEST_H_

View File

@@ -0,0 +1,383 @@
/*
* 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_EHPC_MODEL_DESCRIBESERVERLESSJOBSRESULT_H_
#define ALIBABACLOUD_EHPC_MODEL_DESCRIBESERVERLESSJOBSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ehpc/EHPCExport.h>
namespace AlibabaCloud
{
namespace EHPC
{
namespace Model
{
class ALIBABACLOUD_EHPC_EXPORT DescribeServerlessJobsResult : public ServiceResult
{
public:
struct JobInfo
{
struct ArrayProperties
{
long indexStart;
long indexEnd;
long indexStep;
};
struct ContainerGroup
{
struct DnsConfig
{
struct Option
{
std::string value;
std::string name;
};
std::vector<Option> options;
std::vector<std::string> searches;
std::vector<std::string> nameServers;
};
struct EciSecurityContext
{
struct Sysctl
{
std::string value;
std::string name;
};
std::vector<Sysctl> sysctls;
};
struct Container
{
struct CurrentState
{
long signal;
std::string finishTime;
std::string message;
std::string state;
long exitCode;
std::string startTime;
std::string detailStatus;
std::string reason;
};
struct LivenessProbe
{
struct HttpGet
{
std::string path;
std::string scheme;
long port;
};
struct TcpSocket
{
long port;
std::string host;
};
long initialDelaySeconds;
long timeoutSeconds;
std::vector<std::string> execs;
HttpGet httpGet;
long periodSeconds;
TcpSocket tcpSocket;
long failureThreshold;
long successThreshold;
};
struct PreviousState
{
long signal;
std::string finishTime;
std::string message;
std::string state;
long exitCode;
std::string startTime;
std::string detailStatus;
std::string reason;
};
struct ReadinessProbe
{
struct HttpGet2
{
std::string path;
std::string scheme;
long port;
};
struct TcpSocket3
{
long port;
std::string host;
};
long initialDelaySeconds;
long timeoutSeconds;
HttpGet2 httpGet2;
TcpSocket3 tcpSocket3;
std::vector<std::string> execs1;
long periodSeconds;
long failureThreshold;
long successThreshold;
};
struct SecurityContext
{
struct Capability
{
std::vector<std::string> adds;
};
long runAsUser;
Capability capability;
bool readOnlyRootFilesystem;
};
struct EnvironmentVar
{
struct ValueFrom
{
struct FieldRef
{
std::string fieldPath;
};
FieldRef fieldRef;
};
ValueFrom valueFrom;
std::string value;
std::string key;
};
struct Port
{
long port;
std::string protocol;
};
struct VolumeMount
{
std::string mountPath;
bool readOnly;
std::string subPath;
std::string mountPropagation;
std::string name;
};
ReadinessProbe readinessProbe;
std::vector<Container::EnvironmentVar> environmentVars;
std::vector<std::string> args;
LivenessProbe livenessProbe;
float memory;
std::vector<Container::Port> ports;
float cpu;
std::string image;
int gpu;
PreviousState previousState;
bool stdinOnce;
std::string name;
bool stdin;
int restartCount;
bool ready;
std::string workingDir;
std::vector<Container::VolumeMount> volumeMounts;
std::string imagePullPolicy;
CurrentState currentState;
SecurityContext securityContext;
bool tty;
std::vector<std::string> commands;
};
struct Event
{
std::string type;
std::string lastTimestamp;
std::string message;
int count;
std::string firstTimestamp;
std::string reason;
std::string name;
};
struct HostAlias
{
std::string ip;
std::vector<std::string> hostnames;
};
struct InitContainer
{
struct CurrentState5
{
long signal;
std::string finishTime;
std::string message;
std::string state;
long exitCode;
std::string startTime;
std::string detailStatus;
std::string reason;
};
struct PreviousState6
{
long signal;
std::string finishTime;
std::string message;
std::string state;
long exitCode;
std::string startTime;
std::string detailStatus;
std::string reason;
};
struct SecurityContext7
{
struct Capability16
{
std::vector<std::string> adds17;
};
long runAsUser;
bool readOnlyRootFilesystem;
Capability16 capability16;
};
struct EnvironmentVar11
{
struct ValueFrom12
{
struct FieldRef13
{
std::string fieldPath;
};
FieldRef13 fieldRef13;
};
std::string value;
std::string key;
ValueFrom12 valueFrom12;
};
struct Port14
{
long port;
std::string protocol;
};
struct VolumeMount15
{
std::string mountPath;
bool readOnly;
std::string mountPropagation;
std::string name;
};
PreviousState6 previousState6;
long memory;
long cpu;
std::string image;
long gpu;
std::string name;
CurrentState5 currentState5;
long restartCount;
std::vector<InitContainer::EnvironmentVar11> environmentVars8;
bool ready;
std::string workingDir;
std::vector<InitContainer::Port14> ports9;
std::vector<InitContainer::VolumeMount15> volumeMounts10;
std::string imagePullPolicy;
std::vector<std::string> command;
SecurityContext7 securityContext7;
std::vector<std::string> args4;
};
struct Tag
{
std::string value;
std::string key;
};
struct Volume
{
struct ConfigFileVolumeConfigFileToPath
{
std::string path;
std::string content;
};
std::string emptyDirVolumeSizeLimit;
std::string flexVolumeFsType;
std::string nFSVolumeServer;
std::vector<Volume::ConfigFileVolumeConfigFileToPath> configFileVolumeConfigFileToPaths;
bool nFSVolumeReadOnly;
std::string name;
std::string nFSVolumePath;
std::string type;
std::string flexVolumeDriver;
std::string diskVolumeDiskId;
std::string flexVolumeOptions;
std::string emptyDirVolumeMedium;
std::string diskVolumeFsType;
};
long discount;
std::string resourceGroupId;
float memory;
std::vector<ContainerGroup::Container> containers;
float cpu;
EciSecurityContext eciSecurityContext;
std::string tenantSecurityGroupId;
std::string failedTime;
std::string containerGroupName;
std::string intranetIp;
std::vector<ContainerGroup::Volume> volumes;
std::string ramRoleName;
DnsConfig dnsConfig;
std::string internetIp;
std::vector<ContainerGroup::Event> events;
std::string expiredTime;
float spotPriceLimit;
std::string instanceType;
std::vector<ContainerGroup::Tag> tags;
std::string ipv6Address;
std::string spotStrategy;
std::string status;
std::string tenantEniIp;
std::vector<ContainerGroup::InitContainer> initContainers;
std::string zoneId;
std::string succeededTime;
std::string securityGroupId;
std::string vSwitchId;
std::string restartPolicy;
std::string tenantEniInstanceId;
std::vector<ContainerGroup::HostAlias> hostAliases;
std::string tenantVSwitchId;
std::string vpcId;
std::string creationTime;
std::string eniInstanceId;
std::string containerGroupId;
std::string regionId;
long ephemeralStorage;
};
std::string owner;
std::vector<JobInfo::ContainerGroup> containerGroups;
long endTime;
long priority;
long startTime;
long lastModifyTime;
long submitTime;
std::string name;
ArrayProperties arrayProperties;
std::string state;
bool isArrayJob;
std::string id;
std::string queue;
};
DescribeServerlessJobsResult();
explicit DescribeServerlessJobsResult(const std::string &payload);
~DescribeServerlessJobsResult();
int getTotalCount()const;
std::vector<JobInfo> getJobInfos()const;
protected:
void parse(const std::string &payload);
private:
int totalCount_;
std::vector<JobInfo> jobInfos_;
};
}
}
}
#endif // !ALIBABACLOUD_EHPC_MODEL_DESCRIBESERVERLESSJOBSRESULT_H_

View File

@@ -57,6 +57,7 @@ namespace AlibabaCloud
std::string hostNameSuffix;
int minNodesInQueue;
int maxNodesInQueue;
bool sortedByInventory;
std::vector<QueueInfo::DataDisksInfo> dataDisks;
bool enableAutoGrow;
std::string resourceGroupId;
@@ -81,6 +82,7 @@ namespace AlibabaCloud
~GetAutoScaleConfigResult();
int getExtraNodesGrowRatio()const;
bool getEnableAutoGrow()const;
bool getComputeEnableHt()const;
std::string getClusterId()const;
int getMaxNodesInCluster()const;
int getShrinkIdleTimes()const;
@@ -90,6 +92,7 @@ namespace AlibabaCloud
int getGrowIntervalInMinutes()const;
std::string getUid()const;
int getGrowTimeoutInMinutes()const;
std::string getDnsConfig()const;
std::string getImageId()const;
int getShrinkIntervalInMinutes()const;
float getSpotPriceLimit()const;
@@ -102,6 +105,7 @@ namespace AlibabaCloud
private:
int extraNodesGrowRatio_;
bool enableAutoGrow_;
bool computeEnableHt_;
std::string clusterId_;
int maxNodesInCluster_;
int shrinkIdleTimes_;
@@ -111,6 +115,7 @@ namespace AlibabaCloud
int growIntervalInMinutes_;
std::string uid_;
int growTimeoutInMinutes_;
std::string dnsConfig_;
std::string imageId_;
int shrinkIntervalInMinutes_;
float spotPriceLimit_;

View File

@@ -64,6 +64,7 @@ namespace AlibabaCloud
};
std::string imageOwnerAlias;
std::string description;
std::string resourceGroupId;
std::string nodePrefix;
std::string instanceChargeType;
float computeSpotPriceLimit;

View File

@@ -39,6 +39,7 @@ namespace AlibabaCloud
float spotPriceLimit;
std::string instanceType;
};
std::string deploymentSetId;
std::string hostNameSuffix;
std::string type;
std::vector<QueueInfo::Instance> spotInstanceTypes;

View File

@@ -0,0 +1,78 @@
/*
* 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_EHPC_MODEL_LISTSERVERLESSJOBSREQUEST_H_
#define ALIBABACLOUD_EHPC_MODEL_LISTSERVERLESSJOBSREQUEST_H_
#include <alibabacloud/ehpc/EHPCExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace EHPC {
namespace Model {
class ALIBABACLOUD_EHPC_EXPORT ListServerlessJobsRequest : public RpcServiceRequest {
public:
ListServerlessJobsRequest();
~ListServerlessJobsRequest();
std::string getSubmitTimeStart() const;
void setSubmitTimeStart(const std::string &submitTimeStart);
long getPageNumber() const;
void setPageNumber(long pageNumber);
std::string getRegionId() const;
void setRegionId(const std::string &regionId);
long getPageSize() const;
void setPageSize(long pageSize);
std::string getState() const;
void setState(const std::string &state);
std::string getSubmitOrder() const;
void setSubmitOrder(const std::string &submitOrder);
std::string getClusterId() const;
void setClusterId(const std::string &clusterId);
std::vector<std::string> getJobNames() const;
void setJobNames(const std::vector<std::string> &jobNames);
std::vector<std::string> getUsers() const;
void setUsers(const std::vector<std::string> &users);
std::string getStartOrder() const;
void setStartOrder(const std::string &startOrder);
std::string getSubmitTimeEnd() const;
void setSubmitTimeEnd(const std::string &submitTimeEnd);
std::vector<std::string> getQueues() const;
void setQueues(const std::vector<std::string> &queues);
std::vector<std::string> getJobIds() const;
void setJobIds(const std::vector<std::string> &jobIds);
private:
std::string submitTimeStart_;
long pageNumber_;
std::string regionId_;
long pageSize_;
std::string state_;
std::string submitOrder_;
std::string clusterId_;
std::vector<std::string> jobNames_;
std::vector<std::string> users_;
std::string startOrder_;
std::string submitTimeEnd_;
std::vector<std::string> queues_;
std::vector<std::string> jobIds_;
};
} // namespace Model
} // namespace EHPC
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_EHPC_MODEL_LISTSERVERLESSJOBSREQUEST_H_

View File

@@ -0,0 +1,70 @@
/*
* 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_EHPC_MODEL_LISTSERVERLESSJOBSRESULT_H_
#define ALIBABACLOUD_EHPC_MODEL_LISTSERVERLESSJOBSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ehpc/EHPCExport.h>
namespace AlibabaCloud
{
namespace EHPC
{
namespace Model
{
class ALIBABACLOUD_EHPC_EXPORT ListServerlessJobsResult : public ServiceResult
{
public:
struct JobInfo
{
std::string owner;
std::string endTime;
std::string state;
std::string priority;
bool isArrayJob;
std::string startTime;
std::string id;
std::string submitTime;
std::string queue;
std::string name;
};
ListServerlessJobsResult();
explicit ListServerlessJobsResult(const std::string &payload);
~ListServerlessJobsResult();
int getTotalCount()const;
long getPageSize()const;
std::vector<JobInfo> getJobs()const;
long getPageNumber()const;
protected:
void parse(const std::string &payload);
private:
int totalCount_;
long pageSize_;
std::vector<JobInfo> jobs_;
long pageNumber_;
};
}
}
}
#endif // !ALIBABACLOUD_EHPC_MODEL_LISTSERVERLESSJOBSRESULT_H_

View File

@@ -28,6 +28,13 @@ namespace EHPC {
namespace Model {
class ALIBABACLOUD_EHPC_EXPORT ModifyClusterAttributesRequest : public RpcServiceRequest {
public:
struct WinAdPar {
std::string adUser;
std::string adUserPasswd;
std::string adIp;
std::string fallbackHomeDir;
std::string adDc;
};
ModifyClusterAttributesRequest();
~ModifyClusterAttributesRequest();
std::string getImageId() const;
@@ -46,6 +53,8 @@ public:
void setRamNodeTypes(const std::vector<std::string> &ramNodeTypes);
std::string getPassword() const;
void setPassword(const std::string &password);
WinAdPar getWinAdPar() const;
void setWinAdPar(const WinAdPar &winAdPar);
std::string getName() const;
void setName(const std::string &name);
@@ -58,6 +67,7 @@ private:
std::string imageOwnerAlias_;
std::vector<std::string> ramNodeTypes_;
std::string password_;
WinAdPar winAdPar_;
std::string name_;
};
} // namespace Model

View File

@@ -31,6 +31,7 @@ public:
struct Queues {
std::string queueName;
std::string systemDiskLevel;
bool sortedByInventory;
struct InstanceTypes {
std::string vSwitchId;
std::string spotStrategy;
@@ -69,6 +70,8 @@ public:
~SetAutoScaleConfigRequest();
std::string getImageId() const;
void setImageId(const std::string &imageId);
std::string getDnsConfig() const;
void setDnsConfig(const std::string &dnsConfig);
float getSpotPriceLimit() const;
void setSpotPriceLimit(float spotPriceLimit);
std::string getAccessKeyId() const;
@@ -91,6 +94,8 @@ public:
void setSpotStrategy(const std::string &spotStrategy);
int getMaxNodesInCluster() const;
void setMaxNodesInCluster(int maxNodesInCluster);
bool getComputeEnableHt() const;
void setComputeEnableHt(bool computeEnableHt);
int getShrinkIntervalInMinutes() const;
void setShrinkIntervalInMinutes(int shrinkIntervalInMinutes);
std::vector<Queues> getQueues() const;
@@ -102,6 +107,7 @@ public:
private:
std::string imageId_;
std::string dnsConfig_;
float spotPriceLimit_;
std::string accessKeyId_;
std::string excludeNodes_;
@@ -113,6 +119,7 @@ private:
bool enableAutoShrink_;
std::string spotStrategy_;
int maxNodesInCluster_;
bool computeEnableHt_;
int shrinkIntervalInMinutes_;
std::vector<Queues> queues_;
int growIntervalInMinutes_;

View File

@@ -0,0 +1,48 @@
/*
* 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_EHPC_MODEL_STOPSERVERLESSJOBSREQUEST_H_
#define ALIBABACLOUD_EHPC_MODEL_STOPSERVERLESSJOBSREQUEST_H_
#include <alibabacloud/ehpc/EHPCExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace EHPC {
namespace Model {
class ALIBABACLOUD_EHPC_EXPORT StopServerlessJobsRequest : public RpcServiceRequest {
public:
StopServerlessJobsRequest();
~StopServerlessJobsRequest();
std::string getClusterId() const;
void setClusterId(const std::string &clusterId);
std::string getAccessKeyId() const;
void setAccessKeyId(const std::string &accessKeyId);
std::vector<std::string> getJobIds() const;
void setJobIds(const std::vector<std::string> &jobIds);
private:
std::string clusterId_;
std::string accessKeyId_;
std::vector<std::string> jobIds_;
};
} // namespace Model
} // namespace EHPC
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_EHPC_MODEL_STOPSERVERLESSJOBSREQUEST_H_

View File

@@ -0,0 +1,49 @@
/*
* 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_EHPC_MODEL_STOPSERVERLESSJOBSRESULT_H_
#define ALIBABACLOUD_EHPC_MODEL_STOPSERVERLESSJOBSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ehpc/EHPCExport.h>
namespace AlibabaCloud
{
namespace EHPC
{
namespace Model
{
class ALIBABACLOUD_EHPC_EXPORT StopServerlessJobsResult : public ServiceResult
{
public:
StopServerlessJobsResult();
explicit StopServerlessJobsResult(const std::string &payload);
~StopServerlessJobsResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_EHPC_MODEL_STOPSERVERLESSJOBSRESULT_H_

View File

@@ -0,0 +1,170 @@
/*
* 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_EHPC_MODEL_SUBMITSERVERLESSJOBREQUEST_H_
#define ALIBABACLOUD_EHPC_MODEL_SUBMITSERVERLESSJOBREQUEST_H_
#include <alibabacloud/ehpc/EHPCExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace EHPC {
namespace Model {
class ALIBABACLOUD_EHPC_EXPORT SubmitServerlessJobRequest : public RpcServiceRequest {
public:
struct Container {
struct VolumeMountItem {
std::string flexVolumeOptions;
std::string nFSVolumeServer;
std::string mountPath;
bool readOnly;
std::string mountPropagation;
std::string subPath;
std::string nFSVolumePath;
std::string type;
bool nFSVolumeReadOnly;
std::string flexVolumeDriver;
};
VolumeMountItem volumeMountItem;
std::vector<VolumeMountItem> volumeMount;
std::string image;
struct PortItem {
std::string protocol;
int port;
};
PortItem portItem;
std::vector<PortItem> port;
struct EnvironmentVarItem {
std::string name;
std::string value;
};
EnvironmentVarItem environmentVarItem;
std::vector<EnvironmentVarItem> environmentVar;
std::string workingDir;
std::string string;
std::vector<std::string> arg;
std::string name;
int gpu;
std::string string;
std::vector<std::string> command;
};
struct DependsOn {
std::string jobId;
std::string type;
};
struct AcrRegistryInfo {
std::string instanceName;
std::string instanceId;
std::string regionId;
std::string string;
std::vector<std::string> domain;
};
struct Volume {
std::string flexVolumeOptions;
std::string nFSVolumeServer;
std::string nFSVolumePath;
bool nFSVolumeReadOnly;
std::string flexVolumeDriver;
};
struct RetryStrategy {
struct EvaluateOnExitItem {
std::string action;
std::string onExitCode;
};
EvaluateOnExitItem evaluateOnExitItem;
std::vector<EvaluateOnExitItem> evaluateOnExit;
int attempts;
};
struct ArrayProperties {
long indexStart;
long indexStep;
long indexEnd;
};
SubmitServerlessJobRequest();
~SubmitServerlessJobRequest();
Container getContainer() const;
void setContainer(const Container &container);
float getMemory() const;
void setMemory(float memory);
std::vector<DependsOn> getDependsOn() const;
void setDependsOn(const std::vector<DependsOn> &dependsOn);
float getSpotPriceLimit() const;
void setSpotPriceLimit(float spotPriceLimit);
std::string getJobQueue() const;
void setJobQueue(const std::string &jobQueue);
long getTimeout() const;
void setTimeout(long timeout);
std::string getAccessKeyId() const;
void setAccessKeyId(const std::string &accessKeyId);
std::string getJobUser() const;
void setJobUser(const std::string &jobUser);
std::vector<std::string> getInstanceType() const;
void setInstanceType(const std::vector<std::string> &instanceType);
std::string getJobName() const;
void setJobName(const std::string &jobName);
long getJobPriority() const;
void setJobPriority(long jobPriority);
float getCpu() const;
void setCpu(float cpu);
std::string getRamRoleName() const;
void setRamRoleName(const std::string &ramRoleName);
std::vector<AcrRegistryInfo> getAcrRegistryInfo() const;
void setAcrRegistryInfo(const std::vector<AcrRegistryInfo> &acrRegistryInfo);
std::string getClusterId() const;
void setClusterId(const std::string &clusterId);
std::string getSpotStrategy() const;
void setSpotStrategy(const std::string &spotStrategy);
std::vector<std::string> getVSwitchId() const;
void setVSwitchId(const std::vector<std::string> &vSwitchId);
std::vector<Volume> getVolume() const;
void setVolume(const std::vector<Volume> &volume);
RetryStrategy getRetryStrategy() const;
void setRetryStrategy(const RetryStrategy &retryStrategy);
int getEphemeralStorage() const;
void setEphemeralStorage(int ephemeralStorage);
ArrayProperties getArrayProperties() const;
void setArrayProperties(const ArrayProperties &arrayProperties);
private:
Container container_;
float memory_;
std::vector<DependsOn> dependsOn_;
float spotPriceLimit_;
std::string jobQueue_;
long timeout_;
std::string accessKeyId_;
std::string jobUser_;
std::vector<std::string> instanceType_;
std::string jobName_;
long jobPriority_;
float cpu_;
std::string ramRoleName_;
std::vector<AcrRegistryInfo> acrRegistryInfo_;
std::string clusterId_;
std::string spotStrategy_;
std::vector<std::string> vSwitchId_;
std::vector<Volume> volume_;
RetryStrategy retryStrategy_;
int ephemeralStorage_;
ArrayProperties arrayProperties_;
};
} // namespace Model
} // namespace EHPC
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_EHPC_MODEL_SUBMITSERVERLESSJOBREQUEST_H_

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.
*/
#ifndef ALIBABACLOUD_EHPC_MODEL_SUBMITSERVERLESSJOBRESULT_H_
#define ALIBABACLOUD_EHPC_MODEL_SUBMITSERVERLESSJOBRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ehpc/EHPCExport.h>
namespace AlibabaCloud
{
namespace EHPC
{
namespace Model
{
class ALIBABACLOUD_EHPC_EXPORT SubmitServerlessJobResult : public ServiceResult
{
public:
SubmitServerlessJobResult();
explicit SubmitServerlessJobResult(const std::string &payload);
~SubmitServerlessJobResult();
std::string getJobId()const;
protected:
void parse(const std::string &payload);
private:
std::string jobId_;
};
}
}
}
#endif // !ALIBABACLOUD_EHPC_MODEL_SUBMITSERVERLESSJOBRESULT_H_

View File

@@ -31,6 +31,7 @@ public:
struct AdditionalVolumes {
std::string volumeType;
std::string volumeProtocol;
std::string volumeMountOption;
std::string localDirectory;
std::string remoteDirectory;
struct Roles {

View File

@@ -30,6 +30,8 @@ class ALIBABACLOUD_EHPC_EXPORT UpdateQueueConfigRequest : public RpcServiceReque
public:
UpdateQueueConfigRequest();
~UpdateQueueConfigRequest();
std::string getDeploymentSetId() const;
void setDeploymentSetId(const std::string &deploymentSetId);
std::string getQueueName() const;
void setQueueName(const std::string &queueName);
std::string getClusterId() const;
@@ -42,6 +44,7 @@ public:
void setComputeInstanceType(const std::string &computeInstanceType);
private:
std::string deploymentSetId_;
std::string queueName_;
std::string clusterId_;
std::string accessKeyId_;

View File

@@ -1527,6 +1527,42 @@ EHPCClient::DescribePriceOutcomeCallable EHPCClient::describePriceCallable(const
return task->get_future();
}
EHPCClient::DescribeServerlessJobsOutcome EHPCClient::describeServerlessJobs(const DescribeServerlessJobsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeServerlessJobsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeServerlessJobsOutcome(DescribeServerlessJobsResult(outcome.result()));
else
return DescribeServerlessJobsOutcome(outcome.error());
}
void EHPCClient::describeServerlessJobsAsync(const DescribeServerlessJobsRequest& request, const DescribeServerlessJobsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeServerlessJobs(request), context);
};
asyncExecute(new Runnable(fn));
}
EHPCClient::DescribeServerlessJobsOutcomeCallable EHPCClient::describeServerlessJobsCallable(const DescribeServerlessJobsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeServerlessJobsOutcome()>>(
[this, request]()
{
return this->describeServerlessJobs(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EHPCClient::EditJobTemplateOutcome EHPCClient::editJobTemplate(const EditJobTemplateRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3183,6 +3219,42 @@ EHPCClient::ListSecurityGroupsOutcomeCallable EHPCClient::listSecurityGroupsCall
return task->get_future();
}
EHPCClient::ListServerlessJobsOutcome EHPCClient::listServerlessJobs(const ListServerlessJobsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListServerlessJobsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListServerlessJobsOutcome(ListServerlessJobsResult(outcome.result()));
else
return ListServerlessJobsOutcome(outcome.error());
}
void EHPCClient::listServerlessJobsAsync(const ListServerlessJobsRequest& request, const ListServerlessJobsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listServerlessJobs(request), context);
};
asyncExecute(new Runnable(fn));
}
EHPCClient::ListServerlessJobsOutcomeCallable EHPCClient::listServerlessJobsCallable(const ListServerlessJobsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListServerlessJobsOutcome()>>(
[this, request]()
{
return this->listServerlessJobs(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EHPCClient::ListSoftwaresOutcome EHPCClient::listSoftwares(const ListSoftwaresRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -4443,6 +4515,42 @@ EHPCClient::StopNodesOutcomeCallable EHPCClient::stopNodesCallable(const StopNod
return task->get_future();
}
EHPCClient::StopServerlessJobsOutcome EHPCClient::stopServerlessJobs(const StopServerlessJobsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return StopServerlessJobsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return StopServerlessJobsOutcome(StopServerlessJobsResult(outcome.result()));
else
return StopServerlessJobsOutcome(outcome.error());
}
void EHPCClient::stopServerlessJobsAsync(const StopServerlessJobsRequest& request, const StopServerlessJobsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, stopServerlessJobs(request), context);
};
asyncExecute(new Runnable(fn));
}
EHPCClient::StopServerlessJobsOutcomeCallable EHPCClient::stopServerlessJobsCallable(const StopServerlessJobsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<StopServerlessJobsOutcome()>>(
[this, request]()
{
return this->stopServerlessJobs(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EHPCClient::StopVisualServiceOutcome EHPCClient::stopVisualService(const StopVisualServiceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -4515,6 +4623,42 @@ EHPCClient::SubmitJobOutcomeCallable EHPCClient::submitJobCallable(const SubmitJ
return task->get_future();
}
EHPCClient::SubmitServerlessJobOutcome EHPCClient::submitServerlessJob(const SubmitServerlessJobRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SubmitServerlessJobOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SubmitServerlessJobOutcome(SubmitServerlessJobResult(outcome.result()));
else
return SubmitServerlessJobOutcome(outcome.error());
}
void EHPCClient::submitServerlessJobAsync(const SubmitServerlessJobRequest& request, const SubmitServerlessJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, submitServerlessJob(request), context);
};
asyncExecute(new Runnable(fn));
}
EHPCClient::SubmitServerlessJobOutcomeCallable EHPCClient::submitServerlessJobCallable(const SubmitServerlessJobRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SubmitServerlessJobOutcome()>>(
[this, request]()
{
return this->submitServerlessJob(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EHPCClient::SummaryImagesOutcome EHPCClient::summaryImages(const SummaryImagesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -25,6 +25,204 @@ AddNodesRequest::AddNodesRequest()
AddNodesRequest::~AddNodesRequest() {}
std::string AddNodesRequest::getDnsConfig() const {
return dnsConfig_;
}
void AddNodesRequest::setDnsConfig(const std::string &dnsConfig) {
dnsConfig_ = dnsConfig;
setParameter(std::string("DnsConfig"), dnsConfig);
}
std::string AddNodesRequest::getImageOwnerAlias() const {
return imageOwnerAlias_;
}
void AddNodesRequest::setImageOwnerAlias(const std::string &imageOwnerAlias) {
imageOwnerAlias_ = imageOwnerAlias;
setParameter(std::string("ImageOwnerAlias"), imageOwnerAlias);
}
std::vector<AddNodesRequest::DataDisks> AddNodesRequest::getDataDisks() const {
return dataDisks_;
}
void AddNodesRequest::setDataDisks(const std::vector<AddNodesRequest::DataDisks> &dataDisks) {
dataDisks_ = dataDisks;
for(int dep1 = 0; dep1 != dataDisks.size(); dep1++) {
auto dataDisksObj = dataDisks.at(dep1);
std::string dataDisksObjStr = std::string("DataDisks") + "." + std::to_string(dep1 + 1);
setParameter(dataDisksObjStr + ".DataDiskDeleteWithInstance", dataDisksObj.dataDiskDeleteWithInstance ? "true" : "false");
setParameter(dataDisksObjStr + ".DataDiskEncrypted", dataDisksObj.dataDiskEncrypted ? "true" : "false");
setParameter(dataDisksObjStr + ".DataDiskKMSKeyId", dataDisksObj.dataDiskKMSKeyId);
setParameter(dataDisksObjStr + ".DataDiskSize", std::to_string(dataDisksObj.dataDiskSize));
setParameter(dataDisksObjStr + ".DataDiskCategory", dataDisksObj.dataDiskCategory);
setParameter(dataDisksObjStr + ".DataDiskPerformanceLevel", dataDisksObj.dataDiskPerformanceLevel);
}
}
int AddNodesRequest::getSystemDiskSize() const {
return systemDiskSize_;
}
void AddNodesRequest::setSystemDiskSize(int systemDiskSize) {
systemDiskSize_ = systemDiskSize;
setParameter(std::string("SystemDiskSize"), std::to_string(systemDiskSize));
}
std::string AddNodesRequest::getHostNamePrefix() const {
return hostNamePrefix_;
}
void AddNodesRequest::setHostNamePrefix(const std::string &hostNamePrefix) {
hostNamePrefix_ = hostNamePrefix;
setParameter(std::string("HostNamePrefix"), hostNamePrefix);
}
std::string AddNodesRequest::getComputeSpotInterruptionBehavior() const {
return computeSpotInterruptionBehavior_;
}
void AddNodesRequest::setComputeSpotInterruptionBehavior(const std::string &computeSpotInterruptionBehavior) {
computeSpotInterruptionBehavior_ = computeSpotInterruptionBehavior;
setParameter(std::string("ComputeSpotInterruptionBehavior"), computeSpotInterruptionBehavior);
}
std::string AddNodesRequest::getComputeSpotPriceLimit() const {
return computeSpotPriceLimit_;
}
void AddNodesRequest::setComputeSpotPriceLimit(const std::string &computeSpotPriceLimit) {
computeSpotPriceLimit_ = computeSpotPriceLimit;
setParameter(std::string("ComputeSpotPriceLimit"), computeSpotPriceLimit);
}
int AddNodesRequest::getAutoRenewPeriod() const {
return autoRenewPeriod_;
}
void AddNodesRequest::setAutoRenewPeriod(int autoRenewPeriod) {
autoRenewPeriod_ = autoRenewPeriod;
setParameter(std::string("AutoRenewPeriod"), std::to_string(autoRenewPeriod));
}
int AddNodesRequest::getPeriod() const {
return period_;
}
void AddNodesRequest::setPeriod(int period) {
period_ = period;
setParameter(std::string("Period"), std::to_string(period));
}
int AddNodesRequest::getCount() const {
return count_;
}
void AddNodesRequest::setCount(int count) {
count_ = count;
setParameter(std::string("Count"), std::to_string(count));
}
std::string AddNodesRequest::getComputeSpotStrategy() const {
return computeSpotStrategy_;
}
void AddNodesRequest::setComputeSpotStrategy(const std::string &computeSpotStrategy) {
computeSpotStrategy_ = computeSpotStrategy;
setParameter(std::string("ComputeSpotStrategy"), computeSpotStrategy);
}
std::string AddNodesRequest::getHostNameSuffix() const {
return hostNameSuffix_;
}
void AddNodesRequest::setHostNameSuffix(const std::string &hostNameSuffix) {
hostNameSuffix_ = hostNameSuffix;
setParameter(std::string("HostNameSuffix"), hostNameSuffix);
}
bool AddNodesRequest::getSync() const {
return sync_;
}
void AddNodesRequest::setSync(bool sync) {
sync_ = sync;
setParameter(std::string("Sync"), sync ? "true" : "false");
}
std::string AddNodesRequest::getVSwitchId() const {
return vSwitchId_;
}
void AddNodesRequest::setVSwitchId(const std::string &vSwitchId) {
vSwitchId_ = vSwitchId;
setParameter(std::string("VSwitchId"), vSwitchId);
}
std::string AddNodesRequest::getPeriodUnit() const {
return periodUnit_;
}
void AddNodesRequest::setPeriodUnit(const std::string &periodUnit) {
periodUnit_ = periodUnit;
setParameter(std::string("PeriodUnit"), periodUnit);
}
bool AddNodesRequest::getComputeEnableHt() const {
return computeEnableHt_;
}
void AddNodesRequest::setComputeEnableHt(bool computeEnableHt) {
computeEnableHt_ = computeEnableHt;
setParameter(std::string("ComputeEnableHt"), computeEnableHt ? "true" : "false");
}
std::string AddNodesRequest::getAutoRenew() const {
return autoRenew_;
}
void AddNodesRequest::setAutoRenew(const std::string &autoRenew) {
autoRenew_ = autoRenew;
setParameter(std::string("AutoRenew"), autoRenew);
}
std::string AddNodesRequest::getInternetChargeType() const {
return internetChargeType_;
}
void AddNodesRequest::setInternetChargeType(const std::string &internetChargeType) {
internetChargeType_ = internetChargeType;
setParameter(std::string("InternetChargeType"), internetChargeType);
}
std::string AddNodesRequest::getCreateMode() const {
return createMode_;
}
void AddNodesRequest::setCreateMode(const std::string &createMode) {
createMode_ = createMode;
setParameter(std::string("CreateMode"), createMode);
}
std::string AddNodesRequest::getZoneId() const {
return zoneId_;
}
void AddNodesRequest::setZoneId(const std::string &zoneId) {
zoneId_ = zoneId;
setParameter(std::string("ZoneId"), zoneId);
}
int AddNodesRequest::getInternetMaxBandWidthIn() const {
return internetMaxBandWidthIn_;
}
void AddNodesRequest::setInternetMaxBandWidthIn(int internetMaxBandWidthIn) {
internetMaxBandWidthIn_ = internetMaxBandWidthIn;
setParameter(std::string("InternetMaxBandWidthIn"), std::to_string(internetMaxBandWidthIn));
}
std::string AddNodesRequest::getImageId() const {
return imageId_;
}
@@ -88,15 +286,6 @@ void AddNodesRequest::setAccessKeyId(const std::string &accessKeyId) {
setParameter(std::string("AccessKeyId"), accessKeyId);
}
std::string AddNodesRequest::getImageOwnerAlias() const {
return imageOwnerAlias_;
}
void AddNodesRequest::setImageOwnerAlias(const std::string &imageOwnerAlias) {
imageOwnerAlias_ = imageOwnerAlias;
setParameter(std::string("ImageOwnerAlias"), imageOwnerAlias);
}
std::string AddNodesRequest::getSystemDiskType() const {
return systemDiskType_;
}
@@ -106,24 +295,6 @@ void AddNodesRequest::setSystemDiskType(const std::string &systemDiskType) {
setParameter(std::string("SystemDiskType"), systemDiskType);
}
std::vector<AddNodesRequest::DataDisks> AddNodesRequest::getDataDisks() const {
return dataDisks_;
}
void AddNodesRequest::setDataDisks(const std::vector<AddNodesRequest::DataDisks> &dataDisks) {
dataDisks_ = dataDisks;
for(int dep1 = 0; dep1 != dataDisks.size(); dep1++) {
auto dataDisksObj = dataDisks.at(dep1);
std::string dataDisksObjStr = std::string("DataDisks") + "." + std::to_string(dep1 + 1);
setParameter(dataDisksObjStr + ".DataDiskDeleteWithInstance", dataDisksObj.dataDiskDeleteWithInstance ? "true" : "false");
setParameter(dataDisksObjStr + ".DataDiskEncrypted", dataDisksObj.dataDiskEncrypted ? "true" : "false");
setParameter(dataDisksObjStr + ".DataDiskKMSKeyId", dataDisksObj.dataDiskKMSKeyId);
setParameter(dataDisksObjStr + ".DataDiskSize", std::to_string(dataDisksObj.dataDiskSize));
setParameter(dataDisksObjStr + ".DataDiskCategory", dataDisksObj.dataDiskCategory);
setParameter(dataDisksObjStr + ".DataDiskPerformanceLevel", dataDisksObj.dataDiskPerformanceLevel);
}
}
int AddNodesRequest::getMinCount() const {
return minCount_;
}
@@ -133,15 +304,6 @@ void AddNodesRequest::setMinCount(int minCount) {
setParameter(std::string("MinCount"), std::to_string(minCount));
}
int AddNodesRequest::getSystemDiskSize() const {
return systemDiskSize_;
}
void AddNodesRequest::setSystemDiskSize(int systemDiskSize) {
systemDiskSize_ = systemDiskSize;
setParameter(std::string("SystemDiskSize"), std::to_string(systemDiskSize));
}
std::string AddNodesRequest::getInstanceType() const {
return instanceType_;
}
@@ -151,60 +313,6 @@ void AddNodesRequest::setInstanceType(const std::string &instanceType) {
setParameter(std::string("InstanceType"), instanceType);
}
std::string AddNodesRequest::getHostNamePrefix() const {
return hostNamePrefix_;
}
void AddNodesRequest::setHostNamePrefix(const std::string &hostNamePrefix) {
hostNamePrefix_ = hostNamePrefix;
setParameter(std::string("HostNamePrefix"), hostNamePrefix);
}
std::string AddNodesRequest::getComputeSpotInterruptionBehavior() const {
return computeSpotInterruptionBehavior_;
}
void AddNodesRequest::setComputeSpotInterruptionBehavior(const std::string &computeSpotInterruptionBehavior) {
computeSpotInterruptionBehavior_ = computeSpotInterruptionBehavior;
setParameter(std::string("ComputeSpotInterruptionBehavior"), computeSpotInterruptionBehavior);
}
std::string AddNodesRequest::getComputeSpotPriceLimit() const {
return computeSpotPriceLimit_;
}
void AddNodesRequest::setComputeSpotPriceLimit(const std::string &computeSpotPriceLimit) {
computeSpotPriceLimit_ = computeSpotPriceLimit;
setParameter(std::string("ComputeSpotPriceLimit"), computeSpotPriceLimit);
}
int AddNodesRequest::getAutoRenewPeriod() const {
return autoRenewPeriod_;
}
void AddNodesRequest::setAutoRenewPeriod(int autoRenewPeriod) {
autoRenewPeriod_ = autoRenewPeriod;
setParameter(std::string("AutoRenewPeriod"), std::to_string(autoRenewPeriod));
}
int AddNodesRequest::getPeriod() const {
return period_;
}
void AddNodesRequest::setPeriod(int period) {
period_ = period;
setParameter(std::string("Period"), std::to_string(period));
}
int AddNodesRequest::getCount() const {
return count_;
}
void AddNodesRequest::setCount(int count) {
count_ = count;
setParameter(std::string("Count"), std::to_string(count));
}
std::string AddNodesRequest::getClusterId() const {
return clusterId_;
}
@@ -214,33 +322,6 @@ void AddNodesRequest::setClusterId(const std::string &clusterId) {
setParameter(std::string("ClusterId"), clusterId);
}
std::string AddNodesRequest::getComputeSpotStrategy() const {
return computeSpotStrategy_;
}
void AddNodesRequest::setComputeSpotStrategy(const std::string &computeSpotStrategy) {
computeSpotStrategy_ = computeSpotStrategy;
setParameter(std::string("ComputeSpotStrategy"), computeSpotStrategy);
}
std::string AddNodesRequest::getHostNameSuffix() const {
return hostNameSuffix_;
}
void AddNodesRequest::setHostNameSuffix(const std::string &hostNameSuffix) {
hostNameSuffix_ = hostNameSuffix;
setParameter(std::string("HostNameSuffix"), hostNameSuffix);
}
bool AddNodesRequest::getSync() const {
return sync_;
}
void AddNodesRequest::setSync(bool sync) {
sync_ = sync;
setParameter(std::string("Sync"), sync ? "true" : "false");
}
std::string AddNodesRequest::getNetworkInterfaceTrafficMode() const {
return networkInterfaceTrafficMode_;
}
@@ -250,15 +331,6 @@ void AddNodesRequest::setNetworkInterfaceTrafficMode(const std::string &networkI
setParameter(std::string("NetworkInterfaceTrafficMode"), networkInterfaceTrafficMode);
}
std::string AddNodesRequest::getVSwitchId() const {
return vSwitchId_;
}
void AddNodesRequest::setVSwitchId(const std::string &vSwitchId) {
vSwitchId_ = vSwitchId;
setParameter(std::string("VSwitchId"), vSwitchId);
}
int AddNodesRequest::getComputeSpotDuration() const {
return computeSpotDuration_;
}
@@ -268,33 +340,6 @@ void AddNodesRequest::setComputeSpotDuration(int computeSpotDuration) {
setParameter(std::string("ComputeSpotDuration"), std::to_string(computeSpotDuration));
}
std::string AddNodesRequest::getPeriodUnit() const {
return periodUnit_;
}
void AddNodesRequest::setPeriodUnit(const std::string &periodUnit) {
periodUnit_ = periodUnit;
setParameter(std::string("PeriodUnit"), periodUnit);
}
bool AddNodesRequest::getComputeEnableHt() const {
return computeEnableHt_;
}
void AddNodesRequest::setComputeEnableHt(bool computeEnableHt) {
computeEnableHt_ = computeEnableHt;
setParameter(std::string("ComputeEnableHt"), computeEnableHt ? "true" : "false");
}
std::string AddNodesRequest::getAutoRenew() const {
return autoRenew_;
}
void AddNodesRequest::setAutoRenew(const std::string &autoRenew) {
autoRenew_ = autoRenew;
setParameter(std::string("AutoRenew"), autoRenew);
}
std::string AddNodesRequest::getEcsChargeType() const {
return ecsChargeType_;
}
@@ -304,39 +349,3 @@ void AddNodesRequest::setEcsChargeType(const std::string &ecsChargeType) {
setParameter(std::string("EcsChargeType"), ecsChargeType);
}
std::string AddNodesRequest::getInternetChargeType() const {
return internetChargeType_;
}
void AddNodesRequest::setInternetChargeType(const std::string &internetChargeType) {
internetChargeType_ = internetChargeType;
setParameter(std::string("InternetChargeType"), internetChargeType);
}
std::string AddNodesRequest::getCreateMode() const {
return createMode_;
}
void AddNodesRequest::setCreateMode(const std::string &createMode) {
createMode_ = createMode;
setParameter(std::string("CreateMode"), createMode);
}
std::string AddNodesRequest::getZoneId() const {
return zoneId_;
}
void AddNodesRequest::setZoneId(const std::string &zoneId) {
zoneId_ = zoneId;
setParameter(std::string("ZoneId"), zoneId);
}
int AddNodesRequest::getInternetMaxBandWidthIn() const {
return internetMaxBandWidthIn_;
}
void AddNodesRequest::setInternetMaxBandWidthIn(int internetMaxBandWidthIn) {
internetMaxBandWidthIn_ = internetMaxBandWidthIn;
setParameter(std::string("InternetMaxBandWidthIn"), std::to_string(internetMaxBandWidthIn));
}

View File

@@ -25,6 +25,15 @@ AddQueueRequest::AddQueueRequest()
AddQueueRequest::~AddQueueRequest() {}
std::string AddQueueRequest::getDeploymentSetId() const {
return deploymentSetId_;
}
void AddQueueRequest::setDeploymentSetId(const std::string &deploymentSetId) {
deploymentSetId_ = deploymentSetId;
setParameter(std::string("DeploymentSetId"), deploymentSetId);
}
std::string AddQueueRequest::getQueueName() const {
return queueName_;
}
@@ -43,6 +52,15 @@ void AddQueueRequest::setClusterId(const std::string &clusterId) {
setParameter(std::string("ClusterId"), clusterId);
}
std::string AddQueueRequest::getNetworkInterfaceTrafficMode() const {
return networkInterfaceTrafficMode_;
}
void AddQueueRequest::setNetworkInterfaceTrafficMode(const std::string &networkInterfaceTrafficMode) {
networkInterfaceTrafficMode_ = networkInterfaceTrafficMode;
setParameter(std::string("NetworkInterfaceTrafficMode"), networkInterfaceTrafficMode);
}
std::string AddQueueRequest::getAccessKeyId() const {
return accessKeyId_;
}

View File

@@ -51,6 +51,25 @@ void CreateClusterRequest::setAdditionalVolumes(const std::vector<CreateClusterR
}
}
std::vector<CreateClusterRequest::AddOns> CreateClusterRequest::getAddOns() const {
return addOns_;
}
void CreateClusterRequest::setAddOns(const std::vector<CreateClusterRequest::AddOns> &addOns) {
addOns_ = addOns;
for(int dep1 = 0; dep1 != addOns.size(); dep1++) {
auto addOnsObj = addOns.at(dep1);
std::string addOnsObjStr = std::string("AddOns") + "." + std::to_string(dep1 + 1);
setParameter(addOnsObjStr + ".DeployMode", addOnsObj.deployMode);
setParameter(addOnsObjStr + ".Port", std::to_string(addOnsObj.port));
setParameter(addOnsObjStr + ".ConfigFile", addOnsObj.configFile);
setParameter(addOnsObjStr + ".DefaultStart", addOnsObj.defaultStart ? "true" : "false");
setParameter(addOnsObjStr + ".Name", addOnsObj.name);
setParameter(addOnsObjStr + ".DBType", addOnsObj.dBType);
setParameter(addOnsObjStr + ".Version", addOnsObj.version);
}
}
std::string CreateClusterRequest::getEcsOrderManagerInstanceType() const {
return ecsOrderManagerInstanceType_;
}
@@ -78,6 +97,15 @@ void CreateClusterRequest::setSecurityGroupName(const std::string &securityGroup
setParameter(std::string("SecurityGroupName"), securityGroupName);
}
bool CreateClusterRequest::getWithoutNas() const {
return withoutNas_;
}
void CreateClusterRequest::setWithoutNas(bool withoutNas) {
withoutNas_ = withoutNas;
setParameter(std::string("WithoutNas"), withoutNas ? "true" : "false");
}
std::string CreateClusterRequest::getImageOwnerAlias() const {
return imageOwnerAlias_;
}
@@ -447,6 +475,15 @@ void CreateClusterRequest::setSystemDiskType(const std::string &systemDiskType)
setParameter(std::string("SystemDiskType"), systemDiskType);
}
std::string CreateClusterRequest::getDeploymentSetId() const {
return deploymentSetId_;
}
void CreateClusterRequest::setDeploymentSetId(const std::string &deploymentSetId) {
deploymentSetId_ = deploymentSetId;
setParameter(std::string("DeploymentSetId"), deploymentSetId);
}
std::string CreateClusterRequest::getVolumeProtocol() const {
return volumeProtocol_;
}

View File

@@ -97,6 +97,15 @@ void CreateHybridClusterRequest::setPassword(const std::string &password) {
setParameter(std::string("Password"), password);
}
std::string CreateHybridClusterRequest::getHybridClusterOpMode() const {
return hybridClusterOpMode_;
}
void CreateHybridClusterRequest::setHybridClusterOpMode(const std::string &hybridClusterOpMode) {
hybridClusterOpMode_ = hybridClusterOpMode;
setParameter(std::string("HybridClusterOpMode"), hybridClusterOpMode);
}
CreateHybridClusterRequest::WinAdPar CreateHybridClusterRequest::getWinAdPar() const {
return winAdPar_;
}
@@ -264,6 +273,7 @@ CreateHybridClusterRequest::OpenldapPar CreateHybridClusterRequest::getOpenldapP
void CreateHybridClusterRequest::setOpenldapPar(const CreateHybridClusterRequest::OpenldapPar &openldapPar) {
openldapPar_ = openldapPar;
setParameter(std::string("OpenldapPar") + ".FallbackHomeDir", openldapPar.fallbackHomeDir);
setParameter(std::string("OpenldapPar") + ".BaseDn", openldapPar.baseDn);
setParameter(std::string("OpenldapPar") + ".LdapServerIp", openldapPar.ldapServerIp);
}

View File

@@ -96,10 +96,40 @@ void DescribeClusterResult::parse(const std::string &payload)
clusterInfo_.id = clusterInfoNode["Id"].asString();
if(!clusterInfoNode["ClientVersion"].isNull())
clusterInfo_.clientVersion = clusterInfoNode["ClientVersion"].asString();
if(!clusterInfoNode["ZoneId"].isNull())
clusterInfo_.zoneId = clusterInfoNode["ZoneId"].asString();
if(!clusterInfoNode["ResourceGroupId"].isNull())
clusterInfo_.resourceGroupId = clusterInfoNode["ResourceGroupId"].asString();
if(!clusterInfoNode["RamRoleName"].isNull())
clusterInfo_.ramRoleName = clusterInfoNode["RamRoleName"].asString();
if(!clusterInfoNode["RamNodeTypes"].isNull())
clusterInfo_.ramNodeTypes = clusterInfoNode["RamNodeTypes"].asString();
if(!clusterInfoNode["ClusterVersion"].isNull())
clusterInfo_.clusterVersion = clusterInfoNode["ClusterVersion"].asString();
if(!clusterInfoNode["WithoutAgent"].isNull())
clusterInfo_.withoutAgent = std::stoi(clusterInfoNode["WithoutAgent"].asString());
if(!clusterInfoNode["Plugin"].isNull())
clusterInfo_.plugin = clusterInfoNode["Plugin"].asString();
if(!clusterInfoNode["SchedulerPreInstall"].isNull())
clusterInfo_.schedulerPreInstall = std::stoi(clusterInfoNode["SchedulerPreInstall"].asString());
if(!clusterInfoNode["Domain"].isNull())
clusterInfo_.domain = clusterInfoNode["Domain"].asString();
if(!clusterInfoNode["OpenldapPar"].isNull())
clusterInfo_.openldapPar = clusterInfoNode["OpenldapPar"].asString();
if(!clusterInfoNode["WinAdPar"].isNull())
clusterInfo_.winAdPar = clusterInfoNode["WinAdPar"].asString();
if(!clusterInfoNode["Period"].isNull())
clusterInfo_.period = clusterInfoNode["Period"].asString();
if(!clusterInfoNode["PeriodUnit"].isNull())
clusterInfo_.periodUnit = clusterInfoNode["PeriodUnit"].asString();
if(!clusterInfoNode["AutoRenewPeriod"].isNull())
clusterInfo_.autoRenewPeriod = clusterInfoNode["AutoRenewPeriod"].asString();
if(!clusterInfoNode["AutoRenew"].isNull())
clusterInfo_.autoRenew = clusterInfoNode["AutoRenew"].asString();
if(!clusterInfoNode["ComputeSpotStrategy"].isNull())
clusterInfo_.computeSpotStrategy = clusterInfoNode["ComputeSpotStrategy"].asString();
if(!clusterInfoNode["ComputeSpotPriceLimit"].isNull())
clusterInfo_.computeSpotPriceLimit = clusterInfoNode["ComputeSpotPriceLimit"].asString();
auto allApplicationsNode = clusterInfoNode["Applications"]["ApplicationInfo"];
for (auto clusterInfoNodeApplicationsApplicationInfo : allApplicationsNode)
{
@@ -134,6 +164,40 @@ void DescribeClusterResult::parse(const std::string &payload)
onPremiseInfoItemObject.iP = clusterInfoNodeOnPremiseInfoOnPremiseInfoItem["IP"].asString();
clusterInfo_.onPremiseInfo.push_back(onPremiseInfoItemObject);
}
auto allAddOnsInfoNode = clusterInfoNode["AddOnsInfo"]["AddOnsInfoItem"];
for (auto clusterInfoNodeAddOnsInfoAddOnsInfoItem : allAddOnsInfoNode)
{
ClusterInfo::AddOnsInfoItem addOnsInfoItemObject;
if(!clusterInfoNodeAddOnsInfoAddOnsInfoItem["SoftwareId"].isNull())
addOnsInfoItemObject.softwareId = clusterInfoNodeAddOnsInfoAddOnsInfoItem["SoftwareId"].asString();
if(!clusterInfoNodeAddOnsInfoAddOnsInfoItem["DeployMode"].isNull())
addOnsInfoItemObject.deployMode = clusterInfoNodeAddOnsInfoAddOnsInfoItem["DeployMode"].asString();
if(!clusterInfoNodeAddOnsInfoAddOnsInfoItem["Port"].isNull())
addOnsInfoItemObject.port = std::stoi(clusterInfoNodeAddOnsInfoAddOnsInfoItem["Port"].asString());
if(!clusterInfoNodeAddOnsInfoAddOnsInfoItem["Status"].isNull())
addOnsInfoItemObject.status = clusterInfoNodeAddOnsInfoAddOnsInfoItem["Status"].asString();
if(!clusterInfoNodeAddOnsInfoAddOnsInfoItem["URL"].isNull())
addOnsInfoItemObject.uRL = clusterInfoNodeAddOnsInfoAddOnsInfoItem["URL"].asString();
clusterInfo_.addOnsInfo.push_back(addOnsInfoItemObject);
}
auto allNodesNode = clusterInfoNode["Nodes"]["NodesInfo"];
for (auto clusterInfoNodeNodesNodesInfo : allNodesNode)
{
ClusterInfo::NodesInfo nodesInfoObject;
if(!clusterInfoNodeNodesNodesInfo["Role"].isNull())
nodesInfoObject.role = clusterInfoNodeNodesNodesInfo["Role"].asString();
if(!clusterInfoNodeNodesNodesInfo["HostName"].isNull())
nodesInfoObject.hostName = clusterInfoNodeNodesNodesInfo["HostName"].asString();
if(!clusterInfoNodeNodesNodesInfo["IpAddress"].isNull())
nodesInfoObject.ipAddress = clusterInfoNodeNodesNodesInfo["IpAddress"].asString();
if(!clusterInfoNodeNodesNodesInfo["AccountType"].isNull())
nodesInfoObject.accountType = clusterInfoNodeNodesNodesInfo["AccountType"].asString();
if(!clusterInfoNodeNodesNodesInfo["Dir"].isNull())
nodesInfoObject.dir = clusterInfoNodeNodesNodesInfo["Dir"].asString();
if(!clusterInfoNodeNodesNodesInfo["SchedulerType"].isNull())
nodesInfoObject.schedulerType = clusterInfoNodeNodesNodesInfo["SchedulerType"].asString();
clusterInfo_.nodes.push_back(nodesInfoObject);
}
auto ecsInfoNode = clusterInfoNode["EcsInfo"];
auto managerNode = ecsInfoNode["Manager"];
if(!managerNode["InstanceType"].isNull())
@@ -155,6 +219,13 @@ void DescribeClusterResult::parse(const std::string &payload)
clusterInfo_.ecsInfo.proxyMgr.instanceType = proxyMgrNode["InstanceType"].asString();
if(!proxyMgrNode["Count"].isNull())
clusterInfo_.ecsInfo.proxyMgr.count = std::stoi(proxyMgrNode["Count"].asString());
auto initialImageNode = clusterInfoNode["InitialImage"];
if(!initialImageNode["OsTag"].isNull())
clusterInfo_.initialImage.osTag = initialImageNode["OsTag"].asString();
if(!initialImageNode["ImageOwnerAlias"].isNull())
clusterInfo_.initialImage.imageOwnerAlias = initialImageNode["ImageOwnerAlias"].asString();
if(!initialImageNode["ImageId"].isNull())
clusterInfo_.initialImage.imageId = initialImageNode["ImageId"].asString();
}

View File

@@ -0,0 +1,56 @@
/*
* 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/ehpc/model/DescribeServerlessJobsRequest.h>
using AlibabaCloud::EHPC::Model::DescribeServerlessJobsRequest;
DescribeServerlessJobsRequest::DescribeServerlessJobsRequest()
: RpcServiceRequest("ehpc", "2018-04-12", "DescribeServerlessJobs") {
setMethod(HttpRequest::Method::Post);
}
DescribeServerlessJobsRequest::~DescribeServerlessJobsRequest() {}
std::string DescribeServerlessJobsRequest::getClusterId() const {
return clusterId_;
}
void DescribeServerlessJobsRequest::setClusterId(const std::string &clusterId) {
clusterId_ = clusterId;
setParameter(std::string("ClusterId"), clusterId);
}
std::string DescribeServerlessJobsRequest::getAccessKeyId() const {
return accessKeyId_;
}
void DescribeServerlessJobsRequest::setAccessKeyId(const std::string &accessKeyId) {
accessKeyId_ = accessKeyId;
setParameter(std::string("AccessKeyId"), accessKeyId);
}
std::vector<DescribeServerlessJobsRequest::std::string> DescribeServerlessJobsRequest::getJobIds() const {
return jobIds_;
}
void DescribeServerlessJobsRequest::setJobIds(const std::vector<DescribeServerlessJobsRequest::std::string> &jobIds) {
jobIds_ = jobIds;
for(int dep1 = 0; dep1 != jobIds.size(); dep1++) {
setParameter(std::string("JobIds") + "." + std::to_string(dep1 + 1), jobIds[dep1]);
}
}

View File

@@ -0,0 +1,548 @@
/*
* 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/ehpc/model/DescribeServerlessJobsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::EHPC;
using namespace AlibabaCloud::EHPC::Model;
DescribeServerlessJobsResult::DescribeServerlessJobsResult() :
ServiceResult()
{}
DescribeServerlessJobsResult::DescribeServerlessJobsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeServerlessJobsResult::~DescribeServerlessJobsResult()
{}
void DescribeServerlessJobsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allJobInfosNode = value["JobInfos"]["JobInfo"];
for (auto valueJobInfosJobInfo : allJobInfosNode)
{
JobInfo jobInfosObject;
if(!valueJobInfosJobInfo["EndTime"].isNull())
jobInfosObject.endTime = std::stol(valueJobInfosJobInfo["EndTime"].asString());
if(!valueJobInfosJobInfo["Id"].isNull())
jobInfosObject.id = valueJobInfosJobInfo["Id"].asString();
if(!valueJobInfosJobInfo["IsArrayJob"].isNull())
jobInfosObject.isArrayJob = valueJobInfosJobInfo["IsArrayJob"].asString() == "true";
if(!valueJobInfosJobInfo["LastModifyTime"].isNull())
jobInfosObject.lastModifyTime = std::stol(valueJobInfosJobInfo["LastModifyTime"].asString());
if(!valueJobInfosJobInfo["Name"].isNull())
jobInfosObject.name = valueJobInfosJobInfo["Name"].asString();
if(!valueJobInfosJobInfo["Owner"].isNull())
jobInfosObject.owner = valueJobInfosJobInfo["Owner"].asString();
if(!valueJobInfosJobInfo["Priority"].isNull())
jobInfosObject.priority = std::stol(valueJobInfosJobInfo["Priority"].asString());
if(!valueJobInfosJobInfo["Queue"].isNull())
jobInfosObject.queue = valueJobInfosJobInfo["Queue"].asString();
if(!valueJobInfosJobInfo["StartTime"].isNull())
jobInfosObject.startTime = std::stol(valueJobInfosJobInfo["StartTime"].asString());
if(!valueJobInfosJobInfo["State"].isNull())
jobInfosObject.state = valueJobInfosJobInfo["State"].asString();
if(!valueJobInfosJobInfo["SubmitTime"].isNull())
jobInfosObject.submitTime = std::stol(valueJobInfosJobInfo["SubmitTime"].asString());
auto allContainerGroupsNode = valueJobInfosJobInfo["ContainerGroups"]["ContainerGroup"];
for (auto valueJobInfosJobInfoContainerGroupsContainerGroup : allContainerGroupsNode)
{
JobInfo::ContainerGroup containerGroupsObject;
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["ContainerGroupId"].isNull())
containerGroupsObject.containerGroupId = valueJobInfosJobInfoContainerGroupsContainerGroup["ContainerGroupId"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["ContainerGroupName"].isNull())
containerGroupsObject.containerGroupName = valueJobInfosJobInfoContainerGroupsContainerGroup["ContainerGroupName"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["Cpu"].isNull())
containerGroupsObject.cpu = std::stof(valueJobInfosJobInfoContainerGroupsContainerGroup["Cpu"].asString());
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["CreationTime"].isNull())
containerGroupsObject.creationTime = valueJobInfosJobInfoContainerGroupsContainerGroup["CreationTime"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["Discount"].isNull())
containerGroupsObject.discount = std::stol(valueJobInfosJobInfoContainerGroupsContainerGroup["Discount"].asString());
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["EniInstanceId"].isNull())
containerGroupsObject.eniInstanceId = valueJobInfosJobInfoContainerGroupsContainerGroup["EniInstanceId"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["EphemeralStorage"].isNull())
containerGroupsObject.ephemeralStorage = std::stol(valueJobInfosJobInfoContainerGroupsContainerGroup["EphemeralStorage"].asString());
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["ExpiredTime"].isNull())
containerGroupsObject.expiredTime = valueJobInfosJobInfoContainerGroupsContainerGroup["ExpiredTime"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["FailedTime"].isNull())
containerGroupsObject.failedTime = valueJobInfosJobInfoContainerGroupsContainerGroup["FailedTime"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["InstanceType"].isNull())
containerGroupsObject.instanceType = valueJobInfosJobInfoContainerGroupsContainerGroup["InstanceType"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["InternetIp"].isNull())
containerGroupsObject.internetIp = valueJobInfosJobInfoContainerGroupsContainerGroup["InternetIp"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["IntranetIp"].isNull())
containerGroupsObject.intranetIp = valueJobInfosJobInfoContainerGroupsContainerGroup["IntranetIp"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["Ipv6Address"].isNull())
containerGroupsObject.ipv6Address = valueJobInfosJobInfoContainerGroupsContainerGroup["Ipv6Address"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["Memory"].isNull())
containerGroupsObject.memory = std::stof(valueJobInfosJobInfoContainerGroupsContainerGroup["Memory"].asString());
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["RamRoleName"].isNull())
containerGroupsObject.ramRoleName = valueJobInfosJobInfoContainerGroupsContainerGroup["RamRoleName"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["RegionId"].isNull())
containerGroupsObject.regionId = valueJobInfosJobInfoContainerGroupsContainerGroup["RegionId"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["ResourceGroupId"].isNull())
containerGroupsObject.resourceGroupId = valueJobInfosJobInfoContainerGroupsContainerGroup["ResourceGroupId"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["RestartPolicy"].isNull())
containerGroupsObject.restartPolicy = valueJobInfosJobInfoContainerGroupsContainerGroup["RestartPolicy"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["SecurityGroupId"].isNull())
containerGroupsObject.securityGroupId = valueJobInfosJobInfoContainerGroupsContainerGroup["SecurityGroupId"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["SpotPriceLimit"].isNull())
containerGroupsObject.spotPriceLimit = std::stof(valueJobInfosJobInfoContainerGroupsContainerGroup["SpotPriceLimit"].asString());
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["SpotStrategy"].isNull())
containerGroupsObject.spotStrategy = valueJobInfosJobInfoContainerGroupsContainerGroup["SpotStrategy"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["Status"].isNull())
containerGroupsObject.status = valueJobInfosJobInfoContainerGroupsContainerGroup["Status"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["SucceededTime"].isNull())
containerGroupsObject.succeededTime = valueJobInfosJobInfoContainerGroupsContainerGroup["SucceededTime"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["TenantEniInstanceId"].isNull())
containerGroupsObject.tenantEniInstanceId = valueJobInfosJobInfoContainerGroupsContainerGroup["TenantEniInstanceId"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["TenantEniIp"].isNull())
containerGroupsObject.tenantEniIp = valueJobInfosJobInfoContainerGroupsContainerGroup["TenantEniIp"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["TenantSecurityGroupId"].isNull())
containerGroupsObject.tenantSecurityGroupId = valueJobInfosJobInfoContainerGroupsContainerGroup["TenantSecurityGroupId"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["TenantVSwitchId"].isNull())
containerGroupsObject.tenantVSwitchId = valueJobInfosJobInfoContainerGroupsContainerGroup["TenantVSwitchId"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["VSwitchId"].isNull())
containerGroupsObject.vSwitchId = valueJobInfosJobInfoContainerGroupsContainerGroup["VSwitchId"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["VpcId"].isNull())
containerGroupsObject.vpcId = valueJobInfosJobInfoContainerGroupsContainerGroup["VpcId"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroup["ZoneId"].isNull())
containerGroupsObject.zoneId = valueJobInfosJobInfoContainerGroupsContainerGroup["ZoneId"].asString();
auto allContainersNode = valueJobInfosJobInfoContainerGroupsContainerGroup["Containers"]["Container"];
for (auto valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer : allContainersNode)
{
JobInfo::ContainerGroup::Container containersObject;
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["Cpu"].isNull())
containersObject.cpu = std::stof(valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["Cpu"].asString());
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["Gpu"].isNull())
containersObject.gpu = std::stoi(valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["Gpu"].asString());
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["Image"].isNull())
containersObject.image = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["Image"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["ImagePullPolicy"].isNull())
containersObject.imagePullPolicy = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["ImagePullPolicy"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["Memory"].isNull())
containersObject.memory = std::stof(valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["Memory"].asString());
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["Name"].isNull())
containersObject.name = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["Name"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["Ready"].isNull())
containersObject.ready = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["Ready"].asString() == "true";
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["RestartCount"].isNull())
containersObject.restartCount = std::stoi(valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["RestartCount"].asString());
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["Stdin"].isNull())
containersObject.stdin = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["Stdin"].asString() == "true";
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["StdinOnce"].isNull())
containersObject.stdinOnce = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["StdinOnce"].asString() == "true";
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["Tty"].isNull())
containersObject.tty = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["Tty"].asString() == "true";
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["WorkingDir"].isNull())
containersObject.workingDir = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["WorkingDir"].asString();
auto allEnvironmentVarsNode = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["EnvironmentVars"]["EnvironmentVar"];
for (auto valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerEnvironmentVarsEnvironmentVar : allEnvironmentVarsNode)
{
JobInfo::ContainerGroup::Container::EnvironmentVar environmentVarsObject;
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerEnvironmentVarsEnvironmentVar["Key"].isNull())
environmentVarsObject.key = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerEnvironmentVarsEnvironmentVar["Key"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerEnvironmentVarsEnvironmentVar["Value"].isNull())
environmentVarsObject.value = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerEnvironmentVarsEnvironmentVar["Value"].asString();
auto valueFromNode = value["ValueFrom"];
auto fieldRefNode = valueFromNode["FieldRef"];
if(!fieldRefNode["FieldPath"].isNull())
environmentVarsObject.valueFrom.fieldRef.fieldPath = fieldRefNode["FieldPath"].asString();
containersObject.environmentVars.push_back(environmentVarsObject);
}
auto allPortsNode = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["Ports"]["Port"];
for (auto valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerPortsPort : allPortsNode)
{
JobInfo::ContainerGroup::Container::Port portsObject;
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerPortsPort["Port"].isNull())
portsObject.port = std::stol(valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerPortsPort["Port"].asString());
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerPortsPort["Protocol"].isNull())
portsObject.protocol = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerPortsPort["Protocol"].asString();
containersObject.ports.push_back(portsObject);
}
auto allVolumeMountsNode = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainer["VolumeMounts"]["VolumeMount"];
for (auto valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerVolumeMountsVolumeMount : allVolumeMountsNode)
{
JobInfo::ContainerGroup::Container::VolumeMount volumeMountsObject;
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerVolumeMountsVolumeMount["MountPath"].isNull())
volumeMountsObject.mountPath = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerVolumeMountsVolumeMount["MountPath"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerVolumeMountsVolumeMount["MountPropagation"].isNull())
volumeMountsObject.mountPropagation = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerVolumeMountsVolumeMount["MountPropagation"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerVolumeMountsVolumeMount["Name"].isNull())
volumeMountsObject.name = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerVolumeMountsVolumeMount["Name"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerVolumeMountsVolumeMount["ReadOnly"].isNull())
volumeMountsObject.readOnly = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerVolumeMountsVolumeMount["ReadOnly"].asString() == "true";
if(!valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerVolumeMountsVolumeMount["SubPath"].isNull())
volumeMountsObject.subPath = valueJobInfosJobInfoContainerGroupsContainerGroupContainersContainerVolumeMountsVolumeMount["SubPath"].asString();
containersObject.volumeMounts.push_back(volumeMountsObject);
}
auto currentStateNode = value["CurrentState"];
if(!currentStateNode["DetailStatus"].isNull())
containersObject.currentState.detailStatus = currentStateNode["DetailStatus"].asString();
if(!currentStateNode["ExitCode"].isNull())
containersObject.currentState.exitCode = std::stol(currentStateNode["ExitCode"].asString());
if(!currentStateNode["FinishTime"].isNull())
containersObject.currentState.finishTime = currentStateNode["FinishTime"].asString();
if(!currentStateNode["Message"].isNull())
containersObject.currentState.message = currentStateNode["Message"].asString();
if(!currentStateNode["Reason"].isNull())
containersObject.currentState.reason = currentStateNode["Reason"].asString();
if(!currentStateNode["Signal"].isNull())
containersObject.currentState.signal = std::stol(currentStateNode["Signal"].asString());
if(!currentStateNode["StartTime"].isNull())
containersObject.currentState.startTime = currentStateNode["StartTime"].asString();
if(!currentStateNode["State"].isNull())
containersObject.currentState.state = currentStateNode["State"].asString();
auto livenessProbeNode = value["LivenessProbe"];
if(!livenessProbeNode["FailureThreshold"].isNull())
containersObject.livenessProbe.failureThreshold = std::stol(livenessProbeNode["FailureThreshold"].asString());
if(!livenessProbeNode["InitialDelaySeconds"].isNull())
containersObject.livenessProbe.initialDelaySeconds = std::stol(livenessProbeNode["InitialDelaySeconds"].asString());
if(!livenessProbeNode["PeriodSeconds"].isNull())
containersObject.livenessProbe.periodSeconds = std::stol(livenessProbeNode["PeriodSeconds"].asString());
if(!livenessProbeNode["SuccessThreshold"].isNull())
containersObject.livenessProbe.successThreshold = std::stol(livenessProbeNode["SuccessThreshold"].asString());
if(!livenessProbeNode["TimeoutSeconds"].isNull())
containersObject.livenessProbe.timeoutSeconds = std::stol(livenessProbeNode["TimeoutSeconds"].asString());
auto httpGetNode = livenessProbeNode["HttpGet"];
if(!httpGetNode["Path"].isNull())
containersObject.livenessProbe.httpGet.path = httpGetNode["Path"].asString();
if(!httpGetNode["Port"].isNull())
containersObject.livenessProbe.httpGet.port = std::stol(httpGetNode["Port"].asString());
if(!httpGetNode["Scheme"].isNull())
containersObject.livenessProbe.httpGet.scheme = httpGetNode["Scheme"].asString();
auto tcpSocketNode = livenessProbeNode["TcpSocket"];
if(!tcpSocketNode["Host"].isNull())
containersObject.livenessProbe.tcpSocket.host = tcpSocketNode["Host"].asString();
if(!tcpSocketNode["Port"].isNull())
containersObject.livenessProbe.tcpSocket.port = std::stol(tcpSocketNode["Port"].asString());
auto allExecs = livenessProbeNode["Execs"]["Exec"];
for (auto value : allExecs)
containersObject.livenessProbe.execs.push_back(value.asString());
auto previousStateNode = value["PreviousState"];
if(!previousStateNode["DetailStatus"].isNull())
containersObject.previousState.detailStatus = previousStateNode["DetailStatus"].asString();
if(!previousStateNode["ExitCode"].isNull())
containersObject.previousState.exitCode = std::stol(previousStateNode["ExitCode"].asString());
if(!previousStateNode["FinishTime"].isNull())
containersObject.previousState.finishTime = previousStateNode["FinishTime"].asString();
if(!previousStateNode["Message"].isNull())
containersObject.previousState.message = previousStateNode["Message"].asString();
if(!previousStateNode["Reason"].isNull())
containersObject.previousState.reason = previousStateNode["Reason"].asString();
if(!previousStateNode["Signal"].isNull())
containersObject.previousState.signal = std::stol(previousStateNode["Signal"].asString());
if(!previousStateNode["StartTime"].isNull())
containersObject.previousState.startTime = previousStateNode["StartTime"].asString();
if(!previousStateNode["State"].isNull())
containersObject.previousState.state = previousStateNode["State"].asString();
auto readinessProbeNode = value["ReadinessProbe"];
if(!readinessProbeNode["FailureThreshold"].isNull())
containersObject.readinessProbe.failureThreshold = std::stol(readinessProbeNode["FailureThreshold"].asString());
if(!readinessProbeNode["InitialDelaySeconds"].isNull())
containersObject.readinessProbe.initialDelaySeconds = std::stol(readinessProbeNode["InitialDelaySeconds"].asString());
if(!readinessProbeNode["PeriodSeconds"].isNull())
containersObject.readinessProbe.periodSeconds = std::stol(readinessProbeNode["PeriodSeconds"].asString());
if(!readinessProbeNode["SuccessThreshold"].isNull())
containersObject.readinessProbe.successThreshold = std::stol(readinessProbeNode["SuccessThreshold"].asString());
if(!readinessProbeNode["TimeoutSeconds"].isNull())
containersObject.readinessProbe.timeoutSeconds = std::stol(readinessProbeNode["TimeoutSeconds"].asString());
auto httpGet2Node = readinessProbeNode["HttpGet"];
if(!httpGet2Node["Path"].isNull())
containersObject.readinessProbe.httpGet2.path = httpGet2Node["Path"].asString();
if(!httpGet2Node["Port"].isNull())
containersObject.readinessProbe.httpGet2.port = std::stol(httpGet2Node["Port"].asString());
if(!httpGet2Node["Scheme"].isNull())
containersObject.readinessProbe.httpGet2.scheme = httpGet2Node["Scheme"].asString();
auto tcpSocket3Node = readinessProbeNode["TcpSocket"];
if(!tcpSocket3Node["Host"].isNull())
containersObject.readinessProbe.tcpSocket3.host = tcpSocket3Node["Host"].asString();
if(!tcpSocket3Node["Port"].isNull())
containersObject.readinessProbe.tcpSocket3.port = std::stol(tcpSocket3Node["Port"].asString());
auto allExecs1 = readinessProbeNode["Execs"]["Exec"];
for (auto value : allExecs1)
containersObject.readinessProbe.execs1.push_back(value.asString());
auto securityContextNode = value["SecurityContext"];
if(!securityContextNode["ReadOnlyRootFilesystem"].isNull())
containersObject.securityContext.readOnlyRootFilesystem = securityContextNode["ReadOnlyRootFilesystem"].asString() == "true";
if(!securityContextNode["RunAsUser"].isNull())
containersObject.securityContext.runAsUser = std::stol(securityContextNode["RunAsUser"].asString());
auto capabilityNode = securityContextNode["Capability"];
auto allAdds = capabilityNode["Adds"]["Add"];
for (auto value : allAdds)
containersObject.securityContext.capability.adds.push_back(value.asString());
auto allArgs = value["Args"]["Arg"];
for (auto value : allArgs)
containersObject.args.push_back(value.asString());
auto allCommands = value["Commands"]["Command"];
for (auto value : allCommands)
containersObject.commands.push_back(value.asString());
containerGroupsObject.containers.push_back(containersObject);
}
auto allEventsNode = valueJobInfosJobInfoContainerGroupsContainerGroup["Events"]["Event"];
for (auto valueJobInfosJobInfoContainerGroupsContainerGroupEventsEvent : allEventsNode)
{
JobInfo::ContainerGroup::Event eventsObject;
if(!valueJobInfosJobInfoContainerGroupsContainerGroupEventsEvent["Count"].isNull())
eventsObject.count = std::stoi(valueJobInfosJobInfoContainerGroupsContainerGroupEventsEvent["Count"].asString());
if(!valueJobInfosJobInfoContainerGroupsContainerGroupEventsEvent["FirstTimestamp"].isNull())
eventsObject.firstTimestamp = valueJobInfosJobInfoContainerGroupsContainerGroupEventsEvent["FirstTimestamp"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupEventsEvent["LastTimestamp"].isNull())
eventsObject.lastTimestamp = valueJobInfosJobInfoContainerGroupsContainerGroupEventsEvent["LastTimestamp"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupEventsEvent["Message"].isNull())
eventsObject.message = valueJobInfosJobInfoContainerGroupsContainerGroupEventsEvent["Message"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupEventsEvent["Name"].isNull())
eventsObject.name = valueJobInfosJobInfoContainerGroupsContainerGroupEventsEvent["Name"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupEventsEvent["Reason"].isNull())
eventsObject.reason = valueJobInfosJobInfoContainerGroupsContainerGroupEventsEvent["Reason"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupEventsEvent["Type"].isNull())
eventsObject.type = valueJobInfosJobInfoContainerGroupsContainerGroupEventsEvent["Type"].asString();
containerGroupsObject.events.push_back(eventsObject);
}
auto allHostAliasesNode = valueJobInfosJobInfoContainerGroupsContainerGroup["HostAliases"]["HostAlias"];
for (auto valueJobInfosJobInfoContainerGroupsContainerGroupHostAliasesHostAlias : allHostAliasesNode)
{
JobInfo::ContainerGroup::HostAlias hostAliasesObject;
if(!valueJobInfosJobInfoContainerGroupsContainerGroupHostAliasesHostAlias["Ip"].isNull())
hostAliasesObject.ip = valueJobInfosJobInfoContainerGroupsContainerGroupHostAliasesHostAlias["Ip"].asString();
auto allHostnames = value["Hostnames"]["Hostname"];
for (auto value : allHostnames)
hostAliasesObject.hostnames.push_back(value.asString());
containerGroupsObject.hostAliases.push_back(hostAliasesObject);
}
auto allInitContainersNode = valueJobInfosJobInfoContainerGroupsContainerGroup["InitContainers"]["InitContainer"];
for (auto valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer : allInitContainersNode)
{
JobInfo::ContainerGroup::InitContainer initContainersObject;
if(!valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["Cpu"].isNull())
initContainersObject.cpu = std::stol(valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["Cpu"].asString());
if(!valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["Gpu"].isNull())
initContainersObject.gpu = std::stol(valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["Gpu"].asString());
if(!valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["Image"].isNull())
initContainersObject.image = valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["Image"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["ImagePullPolicy"].isNull())
initContainersObject.imagePullPolicy = valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["ImagePullPolicy"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["Memory"].isNull())
initContainersObject.memory = std::stol(valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["Memory"].asString());
if(!valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["Name"].isNull())
initContainersObject.name = valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["Name"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["Ready"].isNull())
initContainersObject.ready = valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["Ready"].asString() == "true";
if(!valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["RestartCount"].isNull())
initContainersObject.restartCount = std::stol(valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["RestartCount"].asString());
if(!valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["WorkingDir"].isNull())
initContainersObject.workingDir = valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["WorkingDir"].asString();
auto allEnvironmentVars8Node = valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["EnvironmentVars"]["EnvironmentVar"];
for (auto valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerEnvironmentVarsEnvironmentVar : allEnvironmentVars8Node)
{
JobInfo::ContainerGroup::InitContainer::EnvironmentVar11 environmentVars8Object;
if(!valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerEnvironmentVarsEnvironmentVar["Key"].isNull())
environmentVars8Object.key = valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerEnvironmentVarsEnvironmentVar["Key"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerEnvironmentVarsEnvironmentVar["Value"].isNull())
environmentVars8Object.value = valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerEnvironmentVarsEnvironmentVar["Value"].asString();
auto valueFrom12Node = value["ValueFrom"];
auto fieldRef13Node = valueFrom12Node["FieldRef"];
if(!fieldRef13Node["FieldPath"].isNull())
environmentVars8Object.valueFrom12.fieldRef13.fieldPath = fieldRef13Node["FieldPath"].asString();
initContainersObject.environmentVars8.push_back(environmentVars8Object);
}
auto allPorts9Node = valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["Ports"]["Port"];
for (auto valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerPortsPort : allPorts9Node)
{
JobInfo::ContainerGroup::InitContainer::Port14 ports9Object;
if(!valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerPortsPort["Port"].isNull())
ports9Object.port = std::stol(valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerPortsPort["Port"].asString());
if(!valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerPortsPort["Protocol"].isNull())
ports9Object.protocol = valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerPortsPort["Protocol"].asString();
initContainersObject.ports9.push_back(ports9Object);
}
auto allVolumeMounts10Node = valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainer["VolumeMounts"]["VolumeMount"];
for (auto valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerVolumeMountsVolumeMount : allVolumeMounts10Node)
{
JobInfo::ContainerGroup::InitContainer::VolumeMount15 volumeMounts10Object;
if(!valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerVolumeMountsVolumeMount["MountPath"].isNull())
volumeMounts10Object.mountPath = valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerVolumeMountsVolumeMount["MountPath"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerVolumeMountsVolumeMount["MountPropagation"].isNull())
volumeMounts10Object.mountPropagation = valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerVolumeMountsVolumeMount["MountPropagation"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerVolumeMountsVolumeMount["Name"].isNull())
volumeMounts10Object.name = valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerVolumeMountsVolumeMount["Name"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerVolumeMountsVolumeMount["ReadOnly"].isNull())
volumeMounts10Object.readOnly = valueJobInfosJobInfoContainerGroupsContainerGroupInitContainersInitContainerVolumeMountsVolumeMount["ReadOnly"].asString() == "true";
initContainersObject.volumeMounts10.push_back(volumeMounts10Object);
}
auto currentState5Node = value["CurrentState"];
if(!currentState5Node["DetailStatus"].isNull())
initContainersObject.currentState5.detailStatus = currentState5Node["DetailStatus"].asString();
if(!currentState5Node["ExitCode"].isNull())
initContainersObject.currentState5.exitCode = std::stol(currentState5Node["ExitCode"].asString());
if(!currentState5Node["FinishTime"].isNull())
initContainersObject.currentState5.finishTime = currentState5Node["FinishTime"].asString();
if(!currentState5Node["Message"].isNull())
initContainersObject.currentState5.message = currentState5Node["Message"].asString();
if(!currentState5Node["Reason"].isNull())
initContainersObject.currentState5.reason = currentState5Node["Reason"].asString();
if(!currentState5Node["Signal"].isNull())
initContainersObject.currentState5.signal = std::stol(currentState5Node["Signal"].asString());
if(!currentState5Node["StartTime"].isNull())
initContainersObject.currentState5.startTime = currentState5Node["StartTime"].asString();
if(!currentState5Node["State"].isNull())
initContainersObject.currentState5.state = currentState5Node["State"].asString();
auto previousState6Node = value["PreviousState"];
if(!previousState6Node["DetailStatus"].isNull())
initContainersObject.previousState6.detailStatus = previousState6Node["DetailStatus"].asString();
if(!previousState6Node["ExitCode"].isNull())
initContainersObject.previousState6.exitCode = std::stol(previousState6Node["ExitCode"].asString());
if(!previousState6Node["FinishTime"].isNull())
initContainersObject.previousState6.finishTime = previousState6Node["FinishTime"].asString();
if(!previousState6Node["Message"].isNull())
initContainersObject.previousState6.message = previousState6Node["Message"].asString();
if(!previousState6Node["Reason"].isNull())
initContainersObject.previousState6.reason = previousState6Node["Reason"].asString();
if(!previousState6Node["Signal"].isNull())
initContainersObject.previousState6.signal = std::stol(previousState6Node["Signal"].asString());
if(!previousState6Node["StartTime"].isNull())
initContainersObject.previousState6.startTime = previousState6Node["StartTime"].asString();
if(!previousState6Node["State"].isNull())
initContainersObject.previousState6.state = previousState6Node["State"].asString();
auto securityContext7Node = value["SecurityContext"];
if(!securityContext7Node["ReadOnlyRootFilesystem"].isNull())
initContainersObject.securityContext7.readOnlyRootFilesystem = securityContext7Node["ReadOnlyRootFilesystem"].asString() == "true";
if(!securityContext7Node["RunAsUser"].isNull())
initContainersObject.securityContext7.runAsUser = std::stol(securityContext7Node["RunAsUser"].asString());
auto capability16Node = securityContext7Node["Capability"];
auto allAdds17 = capability16Node["Adds"]["Add"];
for (auto value : allAdds17)
initContainersObject.securityContext7.capability16.adds17.push_back(value.asString());
auto allArgs4 = value["Args"]["Arg"];
for (auto value : allArgs4)
initContainersObject.args4.push_back(value.asString());
auto allCommand = value["Command"]["Command"];
for (auto value : allCommand)
initContainersObject.command.push_back(value.asString());
containerGroupsObject.initContainers.push_back(initContainersObject);
}
auto allTagsNode = valueJobInfosJobInfoContainerGroupsContainerGroup["Tags"]["Tag"];
for (auto valueJobInfosJobInfoContainerGroupsContainerGroupTagsTag : allTagsNode)
{
JobInfo::ContainerGroup::Tag tagsObject;
if(!valueJobInfosJobInfoContainerGroupsContainerGroupTagsTag["Key"].isNull())
tagsObject.key = valueJobInfosJobInfoContainerGroupsContainerGroupTagsTag["Key"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupTagsTag["Value"].isNull())
tagsObject.value = valueJobInfosJobInfoContainerGroupsContainerGroupTagsTag["Value"].asString();
containerGroupsObject.tags.push_back(tagsObject);
}
auto allVolumesNode = valueJobInfosJobInfoContainerGroupsContainerGroup["Volumes"]["Volume"];
for (auto valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume : allVolumesNode)
{
JobInfo::ContainerGroup::Volume volumesObject;
if(!valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["DiskVolumeDiskId"].isNull())
volumesObject.diskVolumeDiskId = valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["DiskVolumeDiskId"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["DiskVolumeFsType"].isNull())
volumesObject.diskVolumeFsType = valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["DiskVolumeFsType"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["EmptyDirVolumeMedium"].isNull())
volumesObject.emptyDirVolumeMedium = valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["EmptyDirVolumeMedium"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["EmptyDirVolumeSizeLimit"].isNull())
volumesObject.emptyDirVolumeSizeLimit = valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["EmptyDirVolumeSizeLimit"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["FlexVolumeDriver"].isNull())
volumesObject.flexVolumeDriver = valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["FlexVolumeDriver"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["FlexVolumeFsType"].isNull())
volumesObject.flexVolumeFsType = valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["FlexVolumeFsType"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["FlexVolumeOptions"].isNull())
volumesObject.flexVolumeOptions = valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["FlexVolumeOptions"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["NFSVolumePath"].isNull())
volumesObject.nFSVolumePath = valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["NFSVolumePath"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["NFSVolumeReadOnly"].isNull())
volumesObject.nFSVolumeReadOnly = valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["NFSVolumeReadOnly"].asString() == "true";
if(!valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["NFSVolumeServer"].isNull())
volumesObject.nFSVolumeServer = valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["NFSVolumeServer"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["Name"].isNull())
volumesObject.name = valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["Name"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["Type"].isNull())
volumesObject.type = valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["Type"].asString();
auto allConfigFileVolumeConfigFileToPathsNode = valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolume["ConfigFileVolumeConfigFileToPaths"]["ConfigFileVolumeConfigFileToPath"];
for (auto valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolumeConfigFileVolumeConfigFileToPathsConfigFileVolumeConfigFileToPath : allConfigFileVolumeConfigFileToPathsNode)
{
JobInfo::ContainerGroup::Volume::ConfigFileVolumeConfigFileToPath configFileVolumeConfigFileToPathsObject;
if(!valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolumeConfigFileVolumeConfigFileToPathsConfigFileVolumeConfigFileToPath["Content"].isNull())
configFileVolumeConfigFileToPathsObject.content = valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolumeConfigFileVolumeConfigFileToPathsConfigFileVolumeConfigFileToPath["Content"].asString();
if(!valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolumeConfigFileVolumeConfigFileToPathsConfigFileVolumeConfigFileToPath["Path"].isNull())
configFileVolumeConfigFileToPathsObject.path = valueJobInfosJobInfoContainerGroupsContainerGroupVolumesVolumeConfigFileVolumeConfigFileToPathsConfigFileVolumeConfigFileToPath["Path"].asString();
volumesObject.configFileVolumeConfigFileToPaths.push_back(configFileVolumeConfigFileToPathsObject);
}
containerGroupsObject.volumes.push_back(volumesObject);
}
auto dnsConfigNode = value["DnsConfig"];
auto allOptionsNode = dnsConfigNode["Options"]["Option"];
for (auto dnsConfigNodeOptionsOption : allOptionsNode)
{
JobInfo::ContainerGroup::DnsConfig::Option optionObject;
if(!dnsConfigNodeOptionsOption["Name"].isNull())
optionObject.name = dnsConfigNodeOptionsOption["Name"].asString();
if(!dnsConfigNodeOptionsOption["Value"].isNull())
optionObject.value = dnsConfigNodeOptionsOption["Value"].asString();
containerGroupsObject.dnsConfig.options.push_back(optionObject);
}
auto allNameServers = dnsConfigNode["NameServers"]["NameServer"];
for (auto value : allNameServers)
containerGroupsObject.dnsConfig.nameServers.push_back(value.asString());
auto allSearches = dnsConfigNode["Searches"]["Search"];
for (auto value : allSearches)
containerGroupsObject.dnsConfig.searches.push_back(value.asString());
auto eciSecurityContextNode = value["EciSecurityContext"];
auto allSysctlsNode = eciSecurityContextNode["Sysctls"]["Sysctl"];
for (auto eciSecurityContextNodeSysctlsSysctl : allSysctlsNode)
{
JobInfo::ContainerGroup::EciSecurityContext::Sysctl sysctlObject;
if(!eciSecurityContextNodeSysctlsSysctl["Name"].isNull())
sysctlObject.name = eciSecurityContextNodeSysctlsSysctl["Name"].asString();
if(!eciSecurityContextNodeSysctlsSysctl["Value"].isNull())
sysctlObject.value = eciSecurityContextNodeSysctlsSysctl["Value"].asString();
containerGroupsObject.eciSecurityContext.sysctls.push_back(sysctlObject);
}
jobInfosObject.containerGroups.push_back(containerGroupsObject);
}
auto arrayPropertiesNode = value["ArrayProperties"];
if(!arrayPropertiesNode["IndexStart"].isNull())
jobInfosObject.arrayProperties.indexStart = std::stol(arrayPropertiesNode["IndexStart"].asString());
if(!arrayPropertiesNode["IndexEnd"].isNull())
jobInfosObject.arrayProperties.indexEnd = std::stol(arrayPropertiesNode["IndexEnd"].asString());
if(!arrayPropertiesNode["IndexStep"].isNull())
jobInfosObject.arrayProperties.indexStep = std::stol(arrayPropertiesNode["IndexStep"].asString());
jobInfos_.push_back(jobInfosObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
}
int DescribeServerlessJobsResult::getTotalCount()const
{
return totalCount_;
}
std::vector<DescribeServerlessJobsResult::JobInfo> DescribeServerlessJobsResult::getJobInfos()const
{
return jobInfos_;
}

View File

@@ -77,6 +77,8 @@ void GetAutoScaleConfigResult::parse(const std::string &payload)
queuesObject.maxNodesPerCycle = std::stol(valueQueuesQueueInfo["MaxNodesPerCycle"].asString());
if(!valueQueuesQueueInfo["MinNodesPerCycle"].isNull())
queuesObject.minNodesPerCycle = std::stol(valueQueuesQueueInfo["MinNodesPerCycle"].asString());
if(!valueQueuesQueueInfo["SortedByInventory"].isNull())
queuesObject.sortedByInventory = valueQueuesQueueInfo["SortedByInventory"].asString() == "true";
auto allInstanceTypesNode = valueQueuesQueueInfo["InstanceTypes"]["InstanceTypeInfo"];
for (auto valueQueuesQueueInfoInstanceTypesInstanceTypeInfo : allInstanceTypesNode)
{
@@ -151,6 +153,10 @@ void GetAutoScaleConfigResult::parse(const std::string &payload)
clusterId_ = value["ClusterId"].asString();
if(!value["Uid"].isNull())
uid_ = value["Uid"].asString();
if(!value["ComputeEnableHt"].isNull())
computeEnableHt_ = value["ComputeEnableHt"].asString() == "true";
if(!value["DnsConfig"].isNull())
dnsConfig_ = value["DnsConfig"].asString();
}
@@ -164,6 +170,11 @@ bool GetAutoScaleConfigResult::getEnableAutoGrow()const
return enableAutoGrow_;
}
bool GetAutoScaleConfigResult::getComputeEnableHt()const
{
return computeEnableHt_;
}
std::string GetAutoScaleConfigResult::getClusterId()const
{
return clusterId_;
@@ -209,6 +220,11 @@ int GetAutoScaleConfigResult::getGrowTimeoutInMinutes()const
return growTimeoutInMinutes_;
}
std::string GetAutoScaleConfigResult::getDnsConfig()const
{
return dnsConfig_;
}
std::string GetAutoScaleConfigResult::getImageId()const
{
return imageId_;

View File

@@ -99,6 +99,8 @@ void ListClustersResult::parse(const std::string &payload)
clustersObject.location = valueClustersClusterInfoSimple["Location"].asString();
if(!valueClustersClusterInfoSimple["ClientVersion"].isNull())
clustersObject.clientVersion = valueClustersClusterInfoSimple["ClientVersion"].asString();
if(!valueClustersClusterInfoSimple["ResourceGroupId"].isNull())
clustersObject.resourceGroupId = valueClustersClusterInfoSimple["ResourceGroupId"].asString();
if(!valueClustersClusterInfoSimple["HasPlugin"].isNull())
clustersObject.hasPlugin = valueClustersClusterInfoSimple["HasPlugin"].asString() == "true";
auto managersNode = value["Managers"];

View File

@@ -59,6 +59,8 @@ void ListQueuesResult::parse(const std::string &payload)
queuesObject.hostNameSuffix = valueQueuesQueueInfo["HostNameSuffix"].asString();
if(!valueQueuesQueueInfo["SpotStrategy"].isNull())
queuesObject.spotStrategy = valueQueuesQueueInfo["SpotStrategy"].asString();
if(!valueQueuesQueueInfo["DeploymentSetId"].isNull())
queuesObject.deploymentSetId = valueQueuesQueueInfo["DeploymentSetId"].asString();
auto allSpotInstanceTypesNode = valueQueuesQueueInfo["SpotInstanceTypes"]["Instance"];
for (auto valueQueuesQueueInfoSpotInstanceTypesInstance : allSpotInstanceTypesNode)
{

View File

@@ -0,0 +1,152 @@
/*
* 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/ehpc/model/ListServerlessJobsRequest.h>
using AlibabaCloud::EHPC::Model::ListServerlessJobsRequest;
ListServerlessJobsRequest::ListServerlessJobsRequest()
: RpcServiceRequest("ehpc", "2018-04-12", "ListServerlessJobs") {
setMethod(HttpRequest::Method::Post);
}
ListServerlessJobsRequest::~ListServerlessJobsRequest() {}
std::string ListServerlessJobsRequest::getSubmitTimeStart() const {
return submitTimeStart_;
}
void ListServerlessJobsRequest::setSubmitTimeStart(const std::string &submitTimeStart) {
submitTimeStart_ = submitTimeStart;
setParameter(std::string("SubmitTimeStart"), submitTimeStart);
}
long ListServerlessJobsRequest::getPageNumber() const {
return pageNumber_;
}
void ListServerlessJobsRequest::setPageNumber(long pageNumber) {
pageNumber_ = pageNumber;
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
}
std::string ListServerlessJobsRequest::getRegionId() const {
return regionId_;
}
void ListServerlessJobsRequest::setRegionId(const std::string &regionId) {
regionId_ = regionId;
setParameter(std::string("RegionId"), regionId);
}
long ListServerlessJobsRequest::getPageSize() const {
return pageSize_;
}
void ListServerlessJobsRequest::setPageSize(long pageSize) {
pageSize_ = pageSize;
setParameter(std::string("PageSize"), std::to_string(pageSize));
}
std::string ListServerlessJobsRequest::getState() const {
return state_;
}
void ListServerlessJobsRequest::setState(const std::string &state) {
state_ = state;
setParameter(std::string("State"), state);
}
std::string ListServerlessJobsRequest::getSubmitOrder() const {
return submitOrder_;
}
void ListServerlessJobsRequest::setSubmitOrder(const std::string &submitOrder) {
submitOrder_ = submitOrder;
setParameter(std::string("SubmitOrder"), submitOrder);
}
std::string ListServerlessJobsRequest::getClusterId() const {
return clusterId_;
}
void ListServerlessJobsRequest::setClusterId(const std::string &clusterId) {
clusterId_ = clusterId;
setParameter(std::string("ClusterId"), clusterId);
}
std::vector<ListServerlessJobsRequest::std::string> ListServerlessJobsRequest::getJobNames() const {
return jobNames_;
}
void ListServerlessJobsRequest::setJobNames(const std::vector<ListServerlessJobsRequest::std::string> &jobNames) {
jobNames_ = jobNames;
for(int dep1 = 0; dep1 != jobNames.size(); dep1++) {
setParameter(std::string("JobNames") + "." + std::to_string(dep1 + 1), jobNames[dep1]);
}
}
std::vector<ListServerlessJobsRequest::std::string> ListServerlessJobsRequest::getUsers() const {
return users_;
}
void ListServerlessJobsRequest::setUsers(const std::vector<ListServerlessJobsRequest::std::string> &users) {
users_ = users;
for(int dep1 = 0; dep1 != users.size(); dep1++) {
setParameter(std::string("Users") + "." + std::to_string(dep1 + 1), users[dep1]);
}
}
std::string ListServerlessJobsRequest::getStartOrder() const {
return startOrder_;
}
void ListServerlessJobsRequest::setStartOrder(const std::string &startOrder) {
startOrder_ = startOrder;
setParameter(std::string("StartOrder"), startOrder);
}
std::string ListServerlessJobsRequest::getSubmitTimeEnd() const {
return submitTimeEnd_;
}
void ListServerlessJobsRequest::setSubmitTimeEnd(const std::string &submitTimeEnd) {
submitTimeEnd_ = submitTimeEnd;
setParameter(std::string("SubmitTimeEnd"), submitTimeEnd);
}
std::vector<ListServerlessJobsRequest::std::string> ListServerlessJobsRequest::getQueues() const {
return queues_;
}
void ListServerlessJobsRequest::setQueues(const std::vector<ListServerlessJobsRequest::std::string> &queues) {
queues_ = queues;
for(int dep1 = 0; dep1 != queues.size(); dep1++) {
setParameter(std::string("Queues") + "." + std::to_string(dep1 + 1), queues[dep1]);
}
}
std::vector<ListServerlessJobsRequest::std::string> ListServerlessJobsRequest::getJobIds() const {
return jobIds_;
}
void ListServerlessJobsRequest::setJobIds(const std::vector<ListServerlessJobsRequest::std::string> &jobIds) {
jobIds_ = jobIds;
for(int dep1 = 0; dep1 != jobIds.size(); dep1++) {
setParameter(std::string("JobIds") + "." + std::to_string(dep1 + 1), jobIds[dep1]);
}
}

View File

@@ -0,0 +1,96 @@
/*
* 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/ehpc/model/ListServerlessJobsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::EHPC;
using namespace AlibabaCloud::EHPC::Model;
ListServerlessJobsResult::ListServerlessJobsResult() :
ServiceResult()
{}
ListServerlessJobsResult::ListServerlessJobsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListServerlessJobsResult::~ListServerlessJobsResult()
{}
void ListServerlessJobsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allJobsNode = value["Jobs"]["JobInfo"];
for (auto valueJobsJobInfo : allJobsNode)
{
JobInfo jobsObject;
if(!valueJobsJobInfo["Id"].isNull())
jobsObject.id = valueJobsJobInfo["Id"].asString();
if(!valueJobsJobInfo["Name"].isNull())
jobsObject.name = valueJobsJobInfo["Name"].asString();
if(!valueJobsJobInfo["Owner"].isNull())
jobsObject.owner = valueJobsJobInfo["Owner"].asString();
if(!valueJobsJobInfo["IsArrayJob"].isNull())
jobsObject.isArrayJob = valueJobsJobInfo["IsArrayJob"].asString() == "true";
if(!valueJobsJobInfo["State"].isNull())
jobsObject.state = valueJobsJobInfo["State"].asString();
if(!valueJobsJobInfo["SubmitTime"].isNull())
jobsObject.submitTime = valueJobsJobInfo["SubmitTime"].asString();
if(!valueJobsJobInfo["StartTime"].isNull())
jobsObject.startTime = valueJobsJobInfo["StartTime"].asString();
if(!valueJobsJobInfo["EndTime"].isNull())
jobsObject.endTime = valueJobsJobInfo["EndTime"].asString();
if(!valueJobsJobInfo["Priority"].isNull())
jobsObject.priority = valueJobsJobInfo["Priority"].asString();
if(!valueJobsJobInfo["Queue"].isNull())
jobsObject.queue = valueJobsJobInfo["Queue"].asString();
jobs_.push_back(jobsObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stol(value["PageSize"].asString());
if(!value["PageNumber"].isNull())
pageNumber_ = std::stol(value["PageNumber"].asString());
}
int ListServerlessJobsResult::getTotalCount()const
{
return totalCount_;
}
long ListServerlessJobsResult::getPageSize()const
{
return pageSize_;
}
std::vector<ListServerlessJobsResult::JobInfo> ListServerlessJobsResult::getJobs()const
{
return jobs_;
}
long ListServerlessJobsResult::getPageNumber()const
{
return pageNumber_;
}

View File

@@ -96,6 +96,19 @@ void ModifyClusterAttributesRequest::setPassword(const std::string &password) {
setParameter(std::string("Password"), password);
}
ModifyClusterAttributesRequest::WinAdPar ModifyClusterAttributesRequest::getWinAdPar() const {
return winAdPar_;
}
void ModifyClusterAttributesRequest::setWinAdPar(const ModifyClusterAttributesRequest::WinAdPar &winAdPar) {
winAdPar_ = winAdPar;
setParameter(std::string("WinAdPar") + ".AdUser", winAdPar.adUser);
setParameter(std::string("WinAdPar") + ".AdUserPasswd", winAdPar.adUserPasswd);
setParameter(std::string("WinAdPar") + ".AdIp", winAdPar.adIp);
setParameter(std::string("WinAdPar") + ".FallbackHomeDir", winAdPar.fallbackHomeDir);
setParameter(std::string("WinAdPar") + ".AdDc", winAdPar.adDc);
}
std::string ModifyClusterAttributesRequest::getName() const {
return name_;
}

View File

@@ -34,6 +34,15 @@ void SetAutoScaleConfigRequest::setImageId(const std::string &imageId) {
setParameter(std::string("ImageId"), imageId);
}
std::string SetAutoScaleConfigRequest::getDnsConfig() const {
return dnsConfig_;
}
void SetAutoScaleConfigRequest::setDnsConfig(const std::string &dnsConfig) {
dnsConfig_ = dnsConfig;
setParameter(std::string("DnsConfig"), dnsConfig);
}
float SetAutoScaleConfigRequest::getSpotPriceLimit() const {
return spotPriceLimit_;
}
@@ -133,6 +142,15 @@ void SetAutoScaleConfigRequest::setMaxNodesInCluster(int maxNodesInCluster) {
setParameter(std::string("MaxNodesInCluster"), std::to_string(maxNodesInCluster));
}
bool SetAutoScaleConfigRequest::getComputeEnableHt() const {
return computeEnableHt_;
}
void SetAutoScaleConfigRequest::setComputeEnableHt(bool computeEnableHt) {
computeEnableHt_ = computeEnableHt;
setParameter(std::string("ComputeEnableHt"), computeEnableHt ? "true" : "false");
}
int SetAutoScaleConfigRequest::getShrinkIntervalInMinutes() const {
return shrinkIntervalInMinutes_;
}
@@ -153,6 +171,7 @@ void SetAutoScaleConfigRequest::setQueues(const std::vector<SetAutoScaleConfigRe
std::string queuesObjStr = std::string("Queues") + "." + std::to_string(dep1 + 1);
setParameter(queuesObjStr + ".QueueName", queuesObj.queueName);
setParameter(queuesObjStr + ".SystemDiskLevel", queuesObj.systemDiskLevel);
setParameter(queuesObjStr + ".SortedByInventory", queuesObj.sortedByInventory ? "true" : "false");
for(int dep2 = 0; dep2 != queuesObj.instanceTypes.size(); dep2++) {
auto instanceTypesObj = queuesObj.instanceTypes.at(dep2);
std::string instanceTypesObjStr = queuesObjStr + ".InstanceTypes" + "." + std::to_string(dep2 + 1);

View File

@@ -0,0 +1,56 @@
/*
* 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/ehpc/model/StopServerlessJobsRequest.h>
using AlibabaCloud::EHPC::Model::StopServerlessJobsRequest;
StopServerlessJobsRequest::StopServerlessJobsRequest()
: RpcServiceRequest("ehpc", "2018-04-12", "StopServerlessJobs") {
setMethod(HttpRequest::Method::Post);
}
StopServerlessJobsRequest::~StopServerlessJobsRequest() {}
std::string StopServerlessJobsRequest::getClusterId() const {
return clusterId_;
}
void StopServerlessJobsRequest::setClusterId(const std::string &clusterId) {
clusterId_ = clusterId;
setParameter(std::string("ClusterId"), clusterId);
}
std::string StopServerlessJobsRequest::getAccessKeyId() const {
return accessKeyId_;
}
void StopServerlessJobsRequest::setAccessKeyId(const std::string &accessKeyId) {
accessKeyId_ = accessKeyId;
setParameter(std::string("AccessKeyId"), accessKeyId);
}
std::vector<StopServerlessJobsRequest::std::string> StopServerlessJobsRequest::getJobIds() const {
return jobIds_;
}
void StopServerlessJobsRequest::setJobIds(const std::vector<StopServerlessJobsRequest::std::string> &jobIds) {
jobIds_ = jobIds;
for(int dep1 = 0; dep1 != jobIds.size(); dep1++) {
setParameter(std::string("JobIds") + "." + std::to_string(dep1 + 1), jobIds[dep1]);
}
}

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

View File

@@ -0,0 +1,271 @@
/*
* 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/ehpc/model/SubmitServerlessJobRequest.h>
using AlibabaCloud::EHPC::Model::SubmitServerlessJobRequest;
SubmitServerlessJobRequest::SubmitServerlessJobRequest()
: RpcServiceRequest("ehpc", "2018-04-12", "SubmitServerlessJob") {
setMethod(HttpRequest::Method::Post);
}
SubmitServerlessJobRequest::~SubmitServerlessJobRequest() {}
SubmitServerlessJobRequest::Container SubmitServerlessJobRequest::getContainer() const {
return container_;
}
void SubmitServerlessJobRequest::setContainer(const SubmitServerlessJobRequest::Container &container) {
container_ = container;
for(int dep1 = 0; dep1 != container.volumeMount.size(); dep1++) {
setParameter(std::string("Container") + ".VolumeMount." + std::to_string(dep1 + 1) + ".FlexVolume.Options", container.volumeMount[dep1].flexVolumeOptions);
setParameter(std::string("Container") + ".VolumeMount." + std::to_string(dep1 + 1) + ".NFSVolume.Server", container.volumeMount[dep1].nFSVolumeServer);
setParameter(std::string("Container") + ".VolumeMount." + std::to_string(dep1 + 1) + ".MountPath", container.volumeMount[dep1].mountPath);
setParameter(std::string("Container") + ".VolumeMount." + std::to_string(dep1 + 1) + ".ReadOnly", container.volumeMount[dep1].readOnly ? "true" : "false");
setParameter(std::string("Container") + ".VolumeMount." + std::to_string(dep1 + 1) + ".MountPropagation", container.volumeMount[dep1].mountPropagation);
setParameter(std::string("Container") + ".VolumeMount." + std::to_string(dep1 + 1) + ".SubPath", container.volumeMount[dep1].subPath);
setParameter(std::string("Container") + ".VolumeMount." + std::to_string(dep1 + 1) + ".NFSVolume.Path", container.volumeMount[dep1].nFSVolumePath);
setParameter(std::string("Container") + ".VolumeMount." + std::to_string(dep1 + 1) + ".Type", container.volumeMount[dep1].type);
setParameter(std::string("Container") + ".VolumeMount." + std::to_string(dep1 + 1) + ".NFSVolume.ReadOnly", container.volumeMount[dep1].nFSVolumeReadOnly ? "true" : "false");
setParameter(std::string("Container") + ".VolumeMount." + std::to_string(dep1 + 1) + ".FlexVolume.Driver", container.volumeMount[dep1].flexVolumeDriver);
}
setParameter(std::string("Container") + ".Image", container.image);
for(int dep1 = 0; dep1 != container.port.size(); dep1++) {
setParameter(std::string("Container") + ".Port." + std::to_string(dep1 + 1) + ".Protocol", container.port[dep1].protocol);
setParameter(std::string("Container") + ".Port." + std::to_string(dep1 + 1) + ".Port", std::to_string(container.port[dep1].port));
}
for(int dep1 = 0; dep1 != container.environmentVar.size(); dep1++) {
setParameter(std::string("Container") + ".EnvironmentVar." + std::to_string(dep1 + 1) + ".Name", container.environmentVar[dep1].name);
setParameter(std::string("Container") + ".EnvironmentVar." + std::to_string(dep1 + 1) + ".Value", container.environmentVar[dep1].value);
}
setParameter(std::string("Container") + ".WorkingDir", container.workingDir);
for(int dep1 = 0; dep1 != container.arg.size(); dep1++) {
setParameter(std::string("Container") + ".Arg." + std::to_string(dep1 + 1), container.arg[dep1]);
}
setParameter(std::string("Container") + ".Name", container.name);
setParameter(std::string("Container") + ".Gpu", std::to_string(container.gpu));
for(int dep1 = 0; dep1 != container.command.size(); dep1++) {
setParameter(std::string("Container") + ".Command." + std::to_string(dep1 + 1), container.command[dep1]);
}
}
float SubmitServerlessJobRequest::getMemory() const {
return memory_;
}
void SubmitServerlessJobRequest::setMemory(float memory) {
memory_ = memory;
setParameter(std::string("Memory"), std::to_string(memory));
}
std::vector<SubmitServerlessJobRequest::DependsOn> SubmitServerlessJobRequest::getDependsOn() const {
return dependsOn_;
}
void SubmitServerlessJobRequest::setDependsOn(const std::vector<SubmitServerlessJobRequest::DependsOn> &dependsOn) {
dependsOn_ = dependsOn;
for(int dep1 = 0; dep1 != dependsOn.size(); dep1++) {
setParameter(std::string("DependsOn") + "." + std::to_string(dep1 + 1) + ".JobId", dependsOn[dep1].jobId);
setParameter(std::string("DependsOn") + "." + std::to_string(dep1 + 1) + ".Type", dependsOn[dep1].type);
}
}
float SubmitServerlessJobRequest::getSpotPriceLimit() const {
return spotPriceLimit_;
}
void SubmitServerlessJobRequest::setSpotPriceLimit(float spotPriceLimit) {
spotPriceLimit_ = spotPriceLimit;
setParameter(std::string("SpotPriceLimit"), std::to_string(spotPriceLimit));
}
std::string SubmitServerlessJobRequest::getJobQueue() const {
return jobQueue_;
}
void SubmitServerlessJobRequest::setJobQueue(const std::string &jobQueue) {
jobQueue_ = jobQueue;
setParameter(std::string("JobQueue"), jobQueue);
}
long SubmitServerlessJobRequest::getTimeout() const {
return timeout_;
}
void SubmitServerlessJobRequest::setTimeout(long timeout) {
timeout_ = timeout;
setParameter(std::string("Timeout"), std::to_string(timeout));
}
std::string SubmitServerlessJobRequest::getAccessKeyId() const {
return accessKeyId_;
}
void SubmitServerlessJobRequest::setAccessKeyId(const std::string &accessKeyId) {
accessKeyId_ = accessKeyId;
setParameter(std::string("AccessKeyId"), accessKeyId);
}
std::string SubmitServerlessJobRequest::getJobUser() const {
return jobUser_;
}
void SubmitServerlessJobRequest::setJobUser(const std::string &jobUser) {
jobUser_ = jobUser;
setParameter(std::string("JobUser"), jobUser);
}
std::vector<SubmitServerlessJobRequest::std::string> SubmitServerlessJobRequest::getInstanceType() const {
return instanceType_;
}
void SubmitServerlessJobRequest::setInstanceType(const std::vector<SubmitServerlessJobRequest::std::string> &instanceType) {
instanceType_ = instanceType;
for(int dep1 = 0; dep1 != instanceType.size(); dep1++) {
setParameter(std::string("InstanceType") + "." + std::to_string(dep1 + 1), instanceType[dep1]);
}
}
std::string SubmitServerlessJobRequest::getJobName() const {
return jobName_;
}
void SubmitServerlessJobRequest::setJobName(const std::string &jobName) {
jobName_ = jobName;
setParameter(std::string("JobName"), jobName);
}
long SubmitServerlessJobRequest::getJobPriority() const {
return jobPriority_;
}
void SubmitServerlessJobRequest::setJobPriority(long jobPriority) {
jobPriority_ = jobPriority;
setParameter(std::string("JobPriority"), std::to_string(jobPriority));
}
float SubmitServerlessJobRequest::getCpu() const {
return cpu_;
}
void SubmitServerlessJobRequest::setCpu(float cpu) {
cpu_ = cpu;
setParameter(std::string("Cpu"), std::to_string(cpu));
}
std::string SubmitServerlessJobRequest::getRamRoleName() const {
return ramRoleName_;
}
void SubmitServerlessJobRequest::setRamRoleName(const std::string &ramRoleName) {
ramRoleName_ = ramRoleName;
setParameter(std::string("RamRoleName"), ramRoleName);
}
std::vector<SubmitServerlessJobRequest::AcrRegistryInfo> SubmitServerlessJobRequest::getAcrRegistryInfo() const {
return acrRegistryInfo_;
}
void SubmitServerlessJobRequest::setAcrRegistryInfo(const std::vector<SubmitServerlessJobRequest::AcrRegistryInfo> &acrRegistryInfo) {
acrRegistryInfo_ = acrRegistryInfo;
for(int dep1 = 0; dep1 != acrRegistryInfo.size(); dep1++) {
setParameter(std::string("AcrRegistryInfo") + "." + std::to_string(dep1 + 1) + ".InstanceName", acrRegistryInfo[dep1].instanceName);
setParameter(std::string("AcrRegistryInfo") + "." + std::to_string(dep1 + 1) + ".InstanceId", acrRegistryInfo[dep1].instanceId);
setParameter(std::string("AcrRegistryInfo") + "." + std::to_string(dep1 + 1) + ".RegionId", acrRegistryInfo[dep1].regionId);
for(int dep2 = 0; dep2 != acrRegistryInfo[dep1].domain.size(); dep2++) {
setParameter(std::string("AcrRegistryInfo") + "." + std::to_string(dep1 + 1) + ".Domain." + std::to_string(dep2 + 1), acrRegistryInfo[dep1].domain[dep2]);
}
}
}
std::string SubmitServerlessJobRequest::getClusterId() const {
return clusterId_;
}
void SubmitServerlessJobRequest::setClusterId(const std::string &clusterId) {
clusterId_ = clusterId;
setParameter(std::string("ClusterId"), clusterId);
}
std::string SubmitServerlessJobRequest::getSpotStrategy() const {
return spotStrategy_;
}
void SubmitServerlessJobRequest::setSpotStrategy(const std::string &spotStrategy) {
spotStrategy_ = spotStrategy;
setParameter(std::string("SpotStrategy"), spotStrategy);
}
std::vector<SubmitServerlessJobRequest::std::string> SubmitServerlessJobRequest::getVSwitchId() const {
return vSwitchId_;
}
void SubmitServerlessJobRequest::setVSwitchId(const std::vector<SubmitServerlessJobRequest::std::string> &vSwitchId) {
vSwitchId_ = vSwitchId;
for(int dep1 = 0; dep1 != vSwitchId.size(); dep1++) {
setParameter(std::string("VSwitchId") + "." + std::to_string(dep1 + 1), vSwitchId[dep1]);
}
}
std::vector<SubmitServerlessJobRequest::Volume> SubmitServerlessJobRequest::getVolume() const {
return volume_;
}
void SubmitServerlessJobRequest::setVolume(const std::vector<SubmitServerlessJobRequest::Volume> &volume) {
volume_ = volume;
for(int dep1 = 0; dep1 != volume.size(); dep1++) {
setParameter(std::string("Volume") + "." + std::to_string(dep1 + 1) + ".FlexVolume.Options", volume[dep1].flexVolumeOptions);
setParameter(std::string("Volume") + "." + std::to_string(dep1 + 1) + ".NFSVolume.Server", volume[dep1].nFSVolumeServer);
setParameter(std::string("Volume") + "." + std::to_string(dep1 + 1) + ".NFSVolume.Path", volume[dep1].nFSVolumePath);
setParameter(std::string("Volume") + "." + std::to_string(dep1 + 1) + ".NFSVolume.ReadOnly", volume[dep1].nFSVolumeReadOnly ? "true" : "false");
setParameter(std::string("Volume") + "." + std::to_string(dep1 + 1) + ".FlexVolume.Driver", volume[dep1].flexVolumeDriver);
}
}
SubmitServerlessJobRequest::RetryStrategy SubmitServerlessJobRequest::getRetryStrategy() const {
return retryStrategy_;
}
void SubmitServerlessJobRequest::setRetryStrategy(const SubmitServerlessJobRequest::RetryStrategy &retryStrategy) {
retryStrategy_ = retryStrategy;
for(int dep1 = 0; dep1 != retryStrategy.evaluateOnExit.size(); dep1++) {
setParameter(std::string("RetryStrategy") + ".EvaluateOnExit." + std::to_string(dep1 + 1) + ".Action", retryStrategy.evaluateOnExit[dep1].action);
setParameter(std::string("RetryStrategy") + ".EvaluateOnExit." + std::to_string(dep1 + 1) + ".OnExitCode", retryStrategy.evaluateOnExit[dep1].onExitCode);
}
setParameter(std::string("RetryStrategy") + ".Attempts", std::to_string(retryStrategy.attempts));
}
int SubmitServerlessJobRequest::getEphemeralStorage() const {
return ephemeralStorage_;
}
void SubmitServerlessJobRequest::setEphemeralStorage(int ephemeralStorage) {
ephemeralStorage_ = ephemeralStorage;
setParameter(std::string("EphemeralStorage"), std::to_string(ephemeralStorage));
}
SubmitServerlessJobRequest::ArrayProperties SubmitServerlessJobRequest::getArrayProperties() const {
return arrayProperties_;
}
void SubmitServerlessJobRequest::setArrayProperties(const SubmitServerlessJobRequest::ArrayProperties &arrayProperties) {
arrayProperties_ = arrayProperties;
setParameter(std::string("ArrayProperties") + ".IndexStart", std::to_string(arrayProperties.indexStart));
setParameter(std::string("ArrayProperties") + ".IndexStep", std::to_string(arrayProperties.indexStep));
setParameter(std::string("ArrayProperties") + ".IndexEnd", std::to_string(arrayProperties.indexEnd));
}

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/ehpc/model/SubmitServerlessJobResult.h>
#include <json/json.h>
using namespace AlibabaCloud::EHPC;
using namespace AlibabaCloud::EHPC::Model;
SubmitServerlessJobResult::SubmitServerlessJobResult() :
ServiceResult()
{}
SubmitServerlessJobResult::SubmitServerlessJobResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SubmitServerlessJobResult::~SubmitServerlessJobResult()
{}
void SubmitServerlessJobResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["JobId"].isNull())
jobId_ = value["JobId"].asString();
}
std::string SubmitServerlessJobResult::getJobId()const
{
return jobId_;
}

View File

@@ -36,6 +36,7 @@ void UpdateClusterVolumesRequest::setAdditionalVolumes(const std::vector<UpdateC
std::string additionalVolumesObjStr = std::string("AdditionalVolumes") + "." + std::to_string(dep1 + 1);
setParameter(additionalVolumesObjStr + ".VolumeType", additionalVolumesObj.volumeType);
setParameter(additionalVolumesObjStr + ".VolumeProtocol", additionalVolumesObj.volumeProtocol);
setParameter(additionalVolumesObjStr + ".VolumeMountOption", additionalVolumesObj.volumeMountOption);
setParameter(additionalVolumesObjStr + ".LocalDirectory", additionalVolumesObj.localDirectory);
setParameter(additionalVolumesObjStr + ".RemoteDirectory", additionalVolumesObj.remoteDirectory);
for(int dep2 = 0; dep2 != additionalVolumesObj.roles.size(); dep2++) {

View File

@@ -25,6 +25,15 @@ UpdateQueueConfigRequest::UpdateQueueConfigRequest()
UpdateQueueConfigRequest::~UpdateQueueConfigRequest() {}
std::string UpdateQueueConfigRequest::getDeploymentSetId() const {
return deploymentSetId_;
}
void UpdateQueueConfigRequest::setDeploymentSetId(const std::string &deploymentSetId) {
deploymentSetId_ = deploymentSetId;
setParameter(std::string("DeploymentSetId"), deploymentSetId);
}
std::string UpdateQueueConfigRequest::getQueueName() const {
return queueName_;
}

View File

@@ -55,6 +55,7 @@ namespace AlibabaCloud
std::string insComment;
std::string changeLevelEn;
std::string allowCancel;
std::string taskParams;
std::string allowChange;
std::vector<std::string> subInsNames;
std::string region;

View File

@@ -44,6 +44,8 @@ public:
void setDBInstanceId(const std::string &dBInstanceId);
std::string getSwitchTime() const;
void setSwitchTime(const std::string &switchTime);
std::string getNodeId() const;
void setNodeId(const std::string &nodeId);
std::string getResourceOwnerAccount() const;
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
std::string getOwnerAccount() const;
@@ -59,6 +61,7 @@ private:
std::string effectiveTime_;
std::string dBInstanceId_;
std::string switchTime_;
std::string nodeId_;
std::string resourceOwnerAccount_;
std::string ownerAccount_;
long ownerId_;

View File

@@ -95,6 +95,8 @@ void DescribeActiveOperationTasksResult::parse(const std::string &payload)
itemsObject.resultInfo = valueItemsItemsItem["ResultInfo"].asString();
if(!valueItemsItemsItem["Id"].isNull())
itemsObject.id = std::stoi(valueItemsItemsItem["Id"].asString());
if(!valueItemsItemsItem["TaskParams"].isNull())
itemsObject.taskParams = valueItemsItemsItem["TaskParams"].asString();
auto allSubInsNames = value["SubInsNames"]["SubInsNames"];
for (auto value : allSubInsNames)
itemsObject.subInsNames.push_back(value.asString());

View File

@@ -88,6 +88,15 @@ void RestartDBInstanceRequest::setSwitchTime(const std::string &switchTime) {
setParameter(std::string("SwitchTime"), switchTime);
}
std::string RestartDBInstanceRequest::getNodeId() const {
return nodeId_;
}
void RestartDBInstanceRequest::setNodeId(const std::string &nodeId) {
nodeId_ = nodeId;
setParameter(std::string("NodeId"), nodeId);
}
std::string RestartDBInstanceRequest::getResourceOwnerAccount() const {
return resourceOwnerAccount_;
}

View File

@@ -39,15 +39,18 @@ namespace AlibabaCloud
int status;
int triggerType;
std::string progress;
std::string parameters;
std::string endTime;
long instanceId;
std::string workAddr;
std::string startTime;
std::string jobName;
std::string dataTime;
std::string result;
int timeType;
std::string executor;
std::string scheduleTime;
std::string traceId;
long jobId;
};
JobInstanceDetail jobInstanceDetail;

View File

@@ -46,12 +46,14 @@ namespace AlibabaCloud
{
struct Node
{
int status;
std::string endTime;
std::string scheduleTime;
int attempt;
long jobInstanceId;
std::string workAddr;
std::string startTime;
std::string jobName;
std::string dataTime;
long jobId;
std::string result;

View File

@@ -67,6 +67,12 @@ void GetJobInstanceResult::parse(const std::string &payload)
data_.jobInstanceDetail.dataTime = jobInstanceDetailNode["DataTime"].asString();
if(!jobInstanceDetailNode["WorkAddr"].isNull())
data_.jobInstanceDetail.workAddr = jobInstanceDetailNode["WorkAddr"].asString();
if(!jobInstanceDetailNode["Parameters"].isNull())
data_.jobInstanceDetail.parameters = jobInstanceDetailNode["Parameters"].asString();
if(!jobInstanceDetailNode["JobName"].isNull())
data_.jobInstanceDetail.jobName = jobInstanceDetailNode["JobName"].asString();
if(!jobInstanceDetailNode["TraceId"].isNull())
data_.jobInstanceDetail.traceId = jobInstanceDetailNode["TraceId"].asString();
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Message"].isNull())

View File

@@ -74,6 +74,10 @@ void GetWorkflowInstanceResult::parse(const std::string &payload)
nodeObject.result = wfInstanceDagNodeNodesNode["Result"].asString();
if(!wfInstanceDagNodeNodesNode["Attempt"].isNull())
nodeObject.attempt = std::stoi(wfInstanceDagNodeNodesNode["Attempt"].asString());
if(!wfInstanceDagNodeNodesNode["Status"].isNull())
nodeObject.status = std::stoi(wfInstanceDagNodeNodesNode["Status"].asString());
if(!wfInstanceDagNodeNodesNode["JobName"].isNull())
nodeObject.jobName = wfInstanceDagNodeNodesNode["JobName"].asString();
data_.wfInstanceDag.nodes.push_back(nodeObject);
}
auto allEdgesNode = wfInstanceDagNode["Edges"]["Edge"];