Compare commits

...

1 Commits

Author SHA1 Message Date
sdk-team
38eb8f243a Generated 2018-03-13 for retailcloud. 2021-01-28 03:37:50 +00:00
27 changed files with 1570 additions and 72 deletions

View File

@@ -1,3 +1,6 @@
2021-01-28 Version: patch
- Generated 2018-03-13 for `retailcloud`.
2021-01-27 Version: patch
- Add New BatchTranslate API.

View File

@@ -23,6 +23,8 @@ set(retailcloud_public_header
set(retailcloud_public_header_model
include/alibabacloud/retailcloud/model/AddClusterNodeRequest.h
include/alibabacloud/retailcloud/model/AddClusterNodeResult.h
include/alibabacloud/retailcloud/model/AllocatePodConfigRequest.h
include/alibabacloud/retailcloud/model/AllocatePodConfigResult.h
include/alibabacloud/retailcloud/model/BatchAddServersRequest.h
include/alibabacloud/retailcloud/model/BatchAddServersResult.h
include/alibabacloud/retailcloud/model/BindNodeLabelRequest.h
@@ -85,6 +87,8 @@ set(retailcloud_public_header_model
include/alibabacloud/retailcloud/model/DescribeAppEnvironmentDetailResult.h
include/alibabacloud/retailcloud/model/DescribeAppResourceAllocRequest.h
include/alibabacloud/retailcloud/model/DescribeAppResourceAllocResult.h
include/alibabacloud/retailcloud/model/DescribeClusterDetailRequest.h
include/alibabacloud/retailcloud/model/DescribeClusterDetailResult.h
include/alibabacloud/retailcloud/model/DescribeDatabasesRequest.h
include/alibabacloud/retailcloud/model/DescribeDatabasesResult.h
include/alibabacloud/retailcloud/model/DescribeDeployOrderDetailRequest.h
@@ -165,6 +169,10 @@ set(retailcloud_public_header_model
include/alibabacloud/retailcloud/model/ScaleAppResult.h
include/alibabacloud/retailcloud/model/SetDeployPauseTypeRequest.h
include/alibabacloud/retailcloud/model/SetDeployPauseTypeResult.h
include/alibabacloud/retailcloud/model/SubmitInfoRequest.h
include/alibabacloud/retailcloud/model/SubmitInfoResult.h
include/alibabacloud/retailcloud/model/SyncPodInfoRequest.h
include/alibabacloud/retailcloud/model/SyncPodInfoResult.h
include/alibabacloud/retailcloud/model/UnbindNodeLabelRequest.h
include/alibabacloud/retailcloud/model/UnbindNodeLabelResult.h
include/alibabacloud/retailcloud/model/UpdateAppRequest.h
@@ -178,6 +186,8 @@ set(retailcloud_src
src/RetailcloudClient.cc
src/model/AddClusterNodeRequest.cc
src/model/AddClusterNodeResult.cc
src/model/AllocatePodConfigRequest.cc
src/model/AllocatePodConfigResult.cc
src/model/BatchAddServersRequest.cc
src/model/BatchAddServersResult.cc
src/model/BindNodeLabelRequest.cc
@@ -240,6 +250,8 @@ set(retailcloud_src
src/model/DescribeAppEnvironmentDetailResult.cc
src/model/DescribeAppResourceAllocRequest.cc
src/model/DescribeAppResourceAllocResult.cc
src/model/DescribeClusterDetailRequest.cc
src/model/DescribeClusterDetailResult.cc
src/model/DescribeDatabasesRequest.cc
src/model/DescribeDatabasesResult.cc
src/model/DescribeDeployOrderDetailRequest.cc
@@ -320,6 +332,10 @@ set(retailcloud_src
src/model/ScaleAppResult.cc
src/model/SetDeployPauseTypeRequest.cc
src/model/SetDeployPauseTypeResult.cc
src/model/SubmitInfoRequest.cc
src/model/SubmitInfoResult.cc
src/model/SyncPodInfoRequest.cc
src/model/SyncPodInfoResult.cc
src/model/UnbindNodeLabelRequest.cc
src/model/UnbindNodeLabelResult.cc
src/model/UpdateAppRequest.cc

View File

@@ -24,6 +24,8 @@
#include "RetailcloudExport.h"
#include "model/AddClusterNodeRequest.h"
#include "model/AddClusterNodeResult.h"
#include "model/AllocatePodConfigRequest.h"
#include "model/AllocatePodConfigResult.h"
#include "model/BatchAddServersRequest.h"
#include "model/BatchAddServersResult.h"
#include "model/BindNodeLabelRequest.h"
@@ -86,6 +88,8 @@
#include "model/DescribeAppEnvironmentDetailResult.h"
#include "model/DescribeAppResourceAllocRequest.h"
#include "model/DescribeAppResourceAllocResult.h"
#include "model/DescribeClusterDetailRequest.h"
#include "model/DescribeClusterDetailResult.h"
#include "model/DescribeDatabasesRequest.h"
#include "model/DescribeDatabasesResult.h"
#include "model/DescribeDeployOrderDetailRequest.h"
@@ -166,6 +170,10 @@
#include "model/ScaleAppResult.h"
#include "model/SetDeployPauseTypeRequest.h"
#include "model/SetDeployPauseTypeResult.h"
#include "model/SubmitInfoRequest.h"
#include "model/SubmitInfoResult.h"
#include "model/SyncPodInfoRequest.h"
#include "model/SyncPodInfoResult.h"
#include "model/UnbindNodeLabelRequest.h"
#include "model/UnbindNodeLabelResult.h"
#include "model/UpdateAppRequest.h"
@@ -186,6 +194,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::AddClusterNodeResult> AddClusterNodeOutcome;
typedef std::future<AddClusterNodeOutcome> AddClusterNodeOutcomeCallable;
typedef std::function<void(const RetailcloudClient*, const Model::AddClusterNodeRequest&, const AddClusterNodeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddClusterNodeAsyncHandler;
typedef Outcome<Error, Model::AllocatePodConfigResult> AllocatePodConfigOutcome;
typedef std::future<AllocatePodConfigOutcome> AllocatePodConfigOutcomeCallable;
typedef std::function<void(const RetailcloudClient*, const Model::AllocatePodConfigRequest&, const AllocatePodConfigOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AllocatePodConfigAsyncHandler;
typedef Outcome<Error, Model::BatchAddServersResult> BatchAddServersOutcome;
typedef std::future<BatchAddServersOutcome> BatchAddServersOutcomeCallable;
typedef std::function<void(const RetailcloudClient*, const Model::BatchAddServersRequest&, const BatchAddServersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BatchAddServersAsyncHandler;
@@ -279,6 +290,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DescribeAppResourceAllocResult> DescribeAppResourceAllocOutcome;
typedef std::future<DescribeAppResourceAllocOutcome> DescribeAppResourceAllocOutcomeCallable;
typedef std::function<void(const RetailcloudClient*, const Model::DescribeAppResourceAllocRequest&, const DescribeAppResourceAllocOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeAppResourceAllocAsyncHandler;
typedef Outcome<Error, Model::DescribeClusterDetailResult> DescribeClusterDetailOutcome;
typedef std::future<DescribeClusterDetailOutcome> DescribeClusterDetailOutcomeCallable;
typedef std::function<void(const RetailcloudClient*, const Model::DescribeClusterDetailRequest&, const DescribeClusterDetailOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeClusterDetailAsyncHandler;
typedef Outcome<Error, Model::DescribeDatabasesResult> DescribeDatabasesOutcome;
typedef std::future<DescribeDatabasesOutcome> DescribeDatabasesOutcomeCallable;
typedef std::function<void(const RetailcloudClient*, const Model::DescribeDatabasesRequest&, const DescribeDatabasesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDatabasesAsyncHandler;
@@ -399,6 +413,12 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::SetDeployPauseTypeResult> SetDeployPauseTypeOutcome;
typedef std::future<SetDeployPauseTypeOutcome> SetDeployPauseTypeOutcomeCallable;
typedef std::function<void(const RetailcloudClient*, const Model::SetDeployPauseTypeRequest&, const SetDeployPauseTypeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SetDeployPauseTypeAsyncHandler;
typedef Outcome<Error, Model::SubmitInfoResult> SubmitInfoOutcome;
typedef std::future<SubmitInfoOutcome> SubmitInfoOutcomeCallable;
typedef std::function<void(const RetailcloudClient*, const Model::SubmitInfoRequest&, const SubmitInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SubmitInfoAsyncHandler;
typedef Outcome<Error, Model::SyncPodInfoResult> SyncPodInfoOutcome;
typedef std::future<SyncPodInfoOutcome> SyncPodInfoOutcomeCallable;
typedef std::function<void(const RetailcloudClient*, const Model::SyncPodInfoRequest&, const SyncPodInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SyncPodInfoAsyncHandler;
typedef Outcome<Error, Model::UnbindNodeLabelResult> UnbindNodeLabelOutcome;
typedef std::future<UnbindNodeLabelOutcome> UnbindNodeLabelOutcomeCallable;
typedef std::function<void(const RetailcloudClient*, const Model::UnbindNodeLabelRequest&, const UnbindNodeLabelOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UnbindNodeLabelAsyncHandler;
@@ -419,6 +439,9 @@ namespace AlibabaCloud
AddClusterNodeOutcome addClusterNode(const Model::AddClusterNodeRequest &request)const;
void addClusterNodeAsync(const Model::AddClusterNodeRequest& request, const AddClusterNodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AddClusterNodeOutcomeCallable addClusterNodeCallable(const Model::AddClusterNodeRequest& request) const;
AllocatePodConfigOutcome allocatePodConfig(const Model::AllocatePodConfigRequest &request)const;
void allocatePodConfigAsync(const Model::AllocatePodConfigRequest& request, const AllocatePodConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AllocatePodConfigOutcomeCallable allocatePodConfigCallable(const Model::AllocatePodConfigRequest& request) const;
BatchAddServersOutcome batchAddServers(const Model::BatchAddServersRequest &request)const;
void batchAddServersAsync(const Model::BatchAddServersRequest& request, const BatchAddServersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
BatchAddServersOutcomeCallable batchAddServersCallable(const Model::BatchAddServersRequest& request) const;
@@ -512,6 +535,9 @@ namespace AlibabaCloud
DescribeAppResourceAllocOutcome describeAppResourceAlloc(const Model::DescribeAppResourceAllocRequest &request)const;
void describeAppResourceAllocAsync(const Model::DescribeAppResourceAllocRequest& request, const DescribeAppResourceAllocAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeAppResourceAllocOutcomeCallable describeAppResourceAllocCallable(const Model::DescribeAppResourceAllocRequest& request) const;
DescribeClusterDetailOutcome describeClusterDetail(const Model::DescribeClusterDetailRequest &request)const;
void describeClusterDetailAsync(const Model::DescribeClusterDetailRequest& request, const DescribeClusterDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeClusterDetailOutcomeCallable describeClusterDetailCallable(const Model::DescribeClusterDetailRequest& request) const;
DescribeDatabasesOutcome describeDatabases(const Model::DescribeDatabasesRequest &request)const;
void describeDatabasesAsync(const Model::DescribeDatabasesRequest& request, const DescribeDatabasesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeDatabasesOutcomeCallable describeDatabasesCallable(const Model::DescribeDatabasesRequest& request) const;
@@ -632,6 +658,12 @@ namespace AlibabaCloud
SetDeployPauseTypeOutcome setDeployPauseType(const Model::SetDeployPauseTypeRequest &request)const;
void setDeployPauseTypeAsync(const Model::SetDeployPauseTypeRequest& request, const SetDeployPauseTypeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SetDeployPauseTypeOutcomeCallable setDeployPauseTypeCallable(const Model::SetDeployPauseTypeRequest& request) const;
SubmitInfoOutcome submitInfo(const Model::SubmitInfoRequest &request)const;
void submitInfoAsync(const Model::SubmitInfoRequest& request, const SubmitInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SubmitInfoOutcomeCallable submitInfoCallable(const Model::SubmitInfoRequest& request) const;
SyncPodInfoOutcome syncPodInfo(const Model::SyncPodInfoRequest &request)const;
void syncPodInfoAsync(const Model::SyncPodInfoRequest& request, const SyncPodInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SyncPodInfoOutcomeCallable syncPodInfoCallable(const Model::SyncPodInfoRequest& request) const;
UnbindNodeLabelOutcome unbindNodeLabel(const Model::UnbindNodeLabelRequest &request)const;
void unbindNodeLabelAsync(const Model::UnbindNodeLabelRequest& request, const UnbindNodeLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UnbindNodeLabelOutcomeCallable unbindNodeLabelCallable(const Model::UnbindNodeLabelRequest& request) const;

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_RETAILCLOUD_MODEL_ALLOCATEPODCONFIGREQUEST_H_
#define ALIBABACLOUD_RETAILCLOUD_MODEL_ALLOCATEPODCONFIGREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/retailcloud/RetailcloudExport.h>
namespace AlibabaCloud
{
namespace Retailcloud
{
namespace Model
{
class ALIBABACLOUD_RETAILCLOUD_EXPORT AllocatePodConfigRequest : public RpcServiceRequest
{
public:
AllocatePodConfigRequest();
~AllocatePodConfigRequest();
std::string getRequestId()const;
void setRequestId(const std::string& requestId);
long getAppId()const;
void setAppId(long appId);
long getEnvId()const;
void setEnvId(long envId);
private:
std::string requestId_;
long appId_;
long envId_;
};
}
}
}
#endif // !ALIBABACLOUD_RETAILCLOUD_MODEL_ALLOCATEPODCONFIGREQUEST_H_

View File

@@ -0,0 +1,61 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_RETAILCLOUD_MODEL_ALLOCATEPODCONFIGRESULT_H_
#define ALIBABACLOUD_RETAILCLOUD_MODEL_ALLOCATEPODCONFIGRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/retailcloud/RetailcloudExport.h>
namespace AlibabaCloud
{
namespace Retailcloud
{
namespace Model
{
class ALIBABACLOUD_RETAILCLOUD_EXPORT AllocatePodConfigResult : public ServiceResult
{
public:
struct Result
{
std::string configData;
};
AllocatePodConfigResult();
explicit AllocatePodConfigResult(const std::string &payload);
~AllocatePodConfigResult();
std::string getErrMsg()const;
int getCode()const;
bool getSuccess()const;
Result getResult()const;
protected:
void parse(const std::string &payload);
private:
std::string errMsg_;
int code_;
bool success_;
Result result_;
};
}
}
}
#endif // !ALIBABACLOUD_RETAILCLOUD_MODEL_ALLOCATEPODCONFIGRESULT_H_

View File

@@ -35,31 +35,40 @@ namespace AlibabaCloud
DeployAppRequest();
~DeployAppRequest();
long getDeployPacketId()const;
void setDeployPacketId(long deployPacketId);
std::string getDeployPacketUrl()const;
void setDeployPacketUrl(const std::string& deployPacketUrl);
int getTotalPartitions()const;
void setTotalPartitions(int totalPartitions);
std::string getName()const;
void setName(const std::string& name);
std::string getDescription()const;
void setDescription(const std::string& description);
long getEnvId()const;
void setEnvId(long envId);
std::string getUpdateStrategyType()const;
void setUpdateStrategyType(const std::string& updateStrategyType);
std::string getPauseType()const;
void setPauseType(const std::string& pauseType);
long getDeployPacketId()const;
void setDeployPacketId(long deployPacketId);
std::vector<std::string> getContainerImageList()const;
void setContainerImageList(const std::vector<std::string>& containerImageList);
std::string getName()const;
void setName(const std::string& name);
std::vector<std::string> getInitContainerImageList()const;
void setInitContainerImageList(const std::vector<std::string>& initContainerImageList);
bool getArmsFlag()const;
void setArmsFlag(bool armsFlag);
private:
long deployPacketId_;
std::string deployPacketUrl_;
int totalPartitions_;
std::string name_;
std::string description_;
long envId_;
std::string updateStrategyType_;
std::string pauseType_;
long deployPacketId_;
std::vector<std::string> containerImageList_;
std::string name_;
std::vector<std::string> initContainerImageList_;
bool armsFlag_;
};

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_RETAILCLOUD_MODEL_DESCRIBECLUSTERDETAILREQUEST_H_
#define ALIBABACLOUD_RETAILCLOUD_MODEL_DESCRIBECLUSTERDETAILREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/retailcloud/RetailcloudExport.h>
namespace AlibabaCloud
{
namespace Retailcloud
{
namespace Model
{
class ALIBABACLOUD_RETAILCLOUD_EXPORT DescribeClusterDetailRequest : public RpcServiceRequest
{
public:
DescribeClusterDetailRequest();
~DescribeClusterDetailRequest();
std::string getClusterInstanceId()const;
void setClusterInstanceId(const std::string& clusterInstanceId);
private:
std::string clusterInstanceId_;
};
}
}
}
#endif // !ALIBABACLOUD_RETAILCLOUD_MODEL_DESCRIBECLUSTERDETAILREQUEST_H_

View File

@@ -0,0 +1,148 @@
/*
* 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_RETAILCLOUD_MODEL_DESCRIBECLUSTERDETAILRESULT_H_
#define ALIBABACLOUD_RETAILCLOUD_MODEL_DESCRIBECLUSTERDETAILRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/retailcloud/RetailcloudExport.h>
namespace AlibabaCloud
{
namespace Retailcloud
{
namespace Model
{
class ALIBABACLOUD_RETAILCLOUD_EXPORT DescribeClusterDetailResult : public ServiceResult
{
public:
struct Result
{
struct BasicInfo
{
std::string clusterInstanceId;
std::string mainUserId;
bool installLogInProcess;
long clusterId;
bool hasInstallLogController;
std::vector<std::string> ecsIds;
std::string businessCode;
std::vector<std::string> vswitchs;
bool hasInstallArmsPilot;
std::string envType;
std::string vpcId;
bool installArmsInProcess;
std::string regionName;
std::string clusterName;
std::string regionId;
std::string userNick;
};
struct InstanceInfo
{
struct AllocatedPodInstanceInfo
{
int podCount;
long appId;
std::string memRequest;
long envId;
std::string cupRequest;
std::string envName;
std::string appName;
};
struct AvailablePodInstanceInfo
{
int availablePodCount;
std::string memRequest;
std::string cupRequest;
};
std::vector<AllocatedPodInstanceInfo> allocatedPodInfoList;
int allocatePodCount;
int appCount;
std::vector<AvailablePodInstanceInfo> availablePodInfoList;
};
struct NetInfo
{
std::string prodCIDR;
std::string netPlugType;
std::string serviceCIDR;
};
struct WorkLoad
{
std::string memLevel;
int allocateAppPodCount;
std::string cpuRequestPercent;
std::string memRequest;
std::string memUsePercent;
std::string cpuUsePercent;
std::string cpuUse;
std::string memTotal;
std::string cpuLevel;
std::string memUse;
std::string memRequestPercent;
int allNodeCount;
int allocateAllPodCount;
std::string cpuCapacityTotal;
std::string memCapacityTotal;
std::string cpuRequest;
std::string cpuTotal;
};
struct ClusterNodeWorkLoad
{
int podCount;
bool ready;
std::string memRequest;
int appPodCount;
std::string instanceId;
std::string memUse;
std::string nodeName;
std::string cpuUse;
std::string memTotal;
std::string cpuRequest;
bool unschedulable;
std::string cpuTotal;
};
BasicInfo basicInfo;
InstanceInfo instanceInfo;
WorkLoad workLoad;
NetInfo netInfo;
std::vector<ClusterNodeWorkLoad> nodeWorkLoadList;
};
DescribeClusterDetailResult();
explicit DescribeClusterDetailResult(const std::string &payload);
~DescribeClusterDetailResult();
std::string getErrMsg()const;
int getCode()const;
bool getSuccess()const;
Result getResult()const;
protected:
void parse(const std::string &payload);
private:
std::string errMsg_;
int code_;
bool success_;
Result result_;
};
}
}
}
#endif // !ALIBABACLOUD_RETAILCLOUD_MODEL_DESCRIBECLUSTERDETAILRESULT_H_

View File

@@ -0,0 +1,69 @@
/*
* 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_RETAILCLOUD_MODEL_SUBMITINFOREQUEST_H_
#define ALIBABACLOUD_RETAILCLOUD_MODEL_SUBMITINFOREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/retailcloud/RetailcloudExport.h>
namespace AlibabaCloud
{
namespace Retailcloud
{
namespace Model
{
class ALIBABACLOUD_RETAILCLOUD_EXPORT SubmitInfoRequest : public RpcServiceRequest
{
public:
struct EcsDescList
{
std::string resourceId;
std::string bussinessDesc;
std::string middleWareDesc;
std::string otherMiddleWareDesc;
std::string bussinessType;
std::string appType;
std::string envType;
std::string userId;
};
public:
SubmitInfoRequest();
~SubmitInfoRequest();
std::string getRequestId()const;
void setRequestId(const std::string& requestId);
long getMainUserId()const;
void setMainUserId(long mainUserId);
std::vector<EcsDescList> getEcsDescList()const;
void setEcsDescList(const std::vector<EcsDescList>& ecsDescList);
long getCallerUid()const;
void setCallerUid(long callerUid);
private:
std::string requestId_;
long mainUserId_;
std::vector<EcsDescList> ecsDescList_;
long callerUid_;
};
}
}
}
#endif // !ALIBABACLOUD_RETAILCLOUD_MODEL_SUBMITINFOREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* 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_RETAILCLOUD_MODEL_SUBMITINFORESULT_H_
#define ALIBABACLOUD_RETAILCLOUD_MODEL_SUBMITINFORESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/retailcloud/RetailcloudExport.h>
namespace AlibabaCloud
{
namespace Retailcloud
{
namespace Model
{
class ALIBABACLOUD_RETAILCLOUD_EXPORT SubmitInfoResult : public ServiceResult
{
public:
SubmitInfoResult();
explicit SubmitInfoResult(const std::string &payload);
~SubmitInfoResult();
std::string getErrMsg()const;
int getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string errMsg_;
int code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_RETAILCLOUD_MODEL_SUBMITINFORESULT_H_

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_RETAILCLOUD_MODEL_SYNCPODINFOREQUEST_H_
#define ALIBABACLOUD_RETAILCLOUD_MODEL_SYNCPODINFOREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/retailcloud/RetailcloudExport.h>
namespace AlibabaCloud
{
namespace Retailcloud
{
namespace Model
{
class ALIBABACLOUD_RETAILCLOUD_EXPORT SyncPodInfoRequest : public RpcServiceRequest
{
public:
SyncPodInfoRequest();
~SyncPodInfoRequest();
std::string getReason()const;
void setReason(const std::string& reason);
std::string getRequestId()const;
void setRequestId(const std::string& requestId);
std::string getPodName()const;
void setPodName(const std::string& podName);
std::string getSideCarType()const;
void setSideCarType(const std::string& sideCarType);
long getTaskId()const;
void setTaskId(long taskId);
bool getStatus()const;
void setStatus(bool status);
private:
std::string reason_;
std::string requestId_;
std::string podName_;
std::string sideCarType_;
long taskId_;
bool status_;
};
}
}
}
#endif // !ALIBABACLOUD_RETAILCLOUD_MODEL_SYNCPODINFOREQUEST_H_

View File

@@ -0,0 +1,59 @@
/*
* 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_RETAILCLOUD_MODEL_SYNCPODINFORESULT_H_
#define ALIBABACLOUD_RETAILCLOUD_MODEL_SYNCPODINFORESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/retailcloud/RetailcloudExport.h>
namespace AlibabaCloud
{
namespace Retailcloud
{
namespace Model
{
class ALIBABACLOUD_RETAILCLOUD_EXPORT SyncPodInfoResult : public ServiceResult
{
public:
struct Result
{
bool success;
};
SyncPodInfoResult();
explicit SyncPodInfoResult(const std::string &payload);
~SyncPodInfoResult();
std::string getErrMsg()const;
int getCode()const;
Result getResult()const;
protected:
void parse(const std::string &payload);
private:
std::string errMsg_;
int code_;
Result result_;
};
}
}
}
#endif // !ALIBABACLOUD_RETAILCLOUD_MODEL_SYNCPODINFORESULT_H_

View File

@@ -87,6 +87,42 @@ RetailcloudClient::AddClusterNodeOutcomeCallable RetailcloudClient::addClusterNo
return task->get_future();
}
RetailcloudClient::AllocatePodConfigOutcome RetailcloudClient::allocatePodConfig(const AllocatePodConfigRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AllocatePodConfigOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AllocatePodConfigOutcome(AllocatePodConfigResult(outcome.result()));
else
return AllocatePodConfigOutcome(outcome.error());
}
void RetailcloudClient::allocatePodConfigAsync(const AllocatePodConfigRequest& request, const AllocatePodConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, allocatePodConfig(request), context);
};
asyncExecute(new Runnable(fn));
}
RetailcloudClient::AllocatePodConfigOutcomeCallable RetailcloudClient::allocatePodConfigCallable(const AllocatePodConfigRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AllocatePodConfigOutcome()>>(
[this, request]()
{
return this->allocatePodConfig(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
RetailcloudClient::BatchAddServersOutcome RetailcloudClient::batchAddServers(const BatchAddServersRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1203,6 +1239,42 @@ RetailcloudClient::DescribeAppResourceAllocOutcomeCallable RetailcloudClient::de
return task->get_future();
}
RetailcloudClient::DescribeClusterDetailOutcome RetailcloudClient::describeClusterDetail(const DescribeClusterDetailRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeClusterDetailOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeClusterDetailOutcome(DescribeClusterDetailResult(outcome.result()));
else
return DescribeClusterDetailOutcome(outcome.error());
}
void RetailcloudClient::describeClusterDetailAsync(const DescribeClusterDetailRequest& request, const DescribeClusterDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeClusterDetail(request), context);
};
asyncExecute(new Runnable(fn));
}
RetailcloudClient::DescribeClusterDetailOutcomeCallable RetailcloudClient::describeClusterDetailCallable(const DescribeClusterDetailRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeClusterDetailOutcome()>>(
[this, request]()
{
return this->describeClusterDetail(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
RetailcloudClient::DescribeDatabasesOutcome RetailcloudClient::describeDatabases(const DescribeDatabasesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2643,6 +2715,78 @@ RetailcloudClient::SetDeployPauseTypeOutcomeCallable RetailcloudClient::setDeplo
return task->get_future();
}
RetailcloudClient::SubmitInfoOutcome RetailcloudClient::submitInfo(const SubmitInfoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SubmitInfoOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SubmitInfoOutcome(SubmitInfoResult(outcome.result()));
else
return SubmitInfoOutcome(outcome.error());
}
void RetailcloudClient::submitInfoAsync(const SubmitInfoRequest& request, const SubmitInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, submitInfo(request), context);
};
asyncExecute(new Runnable(fn));
}
RetailcloudClient::SubmitInfoOutcomeCallable RetailcloudClient::submitInfoCallable(const SubmitInfoRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SubmitInfoOutcome()>>(
[this, request]()
{
return this->submitInfo(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
RetailcloudClient::SyncPodInfoOutcome RetailcloudClient::syncPodInfo(const SyncPodInfoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SyncPodInfoOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SyncPodInfoOutcome(SyncPodInfoResult(outcome.result()));
else
return SyncPodInfoOutcome(outcome.error());
}
void RetailcloudClient::syncPodInfoAsync(const SyncPodInfoRequest& request, const SyncPodInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, syncPodInfo(request), context);
};
asyncExecute(new Runnable(fn));
}
RetailcloudClient::SyncPodInfoOutcomeCallable RetailcloudClient::syncPodInfoCallable(const SyncPodInfoRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SyncPodInfoOutcome()>>(
[this, request]()
{
return this->syncPodInfo(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
RetailcloudClient::UnbindNodeLabelOutcome RetailcloudClient::unbindNodeLabel(const UnbindNodeLabelRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/retailcloud/model/AllocatePodConfigRequest.h>
using AlibabaCloud::Retailcloud::Model::AllocatePodConfigRequest;
AllocatePodConfigRequest::AllocatePodConfigRequest() :
RpcServiceRequest("retailcloud", "2018-03-13", "AllocatePodConfig")
{
setMethod(HttpRequest::Method::Post);
}
AllocatePodConfigRequest::~AllocatePodConfigRequest()
{}
std::string AllocatePodConfigRequest::getRequestId()const
{
return requestId_;
}
void AllocatePodConfigRequest::setRequestId(const std::string& requestId)
{
requestId_ = requestId;
setParameter("RequestId", requestId);
}
long AllocatePodConfigRequest::getAppId()const
{
return appId_;
}
void AllocatePodConfigRequest::setAppId(long appId)
{
appId_ = appId;
setParameter("AppId", std::to_string(appId));
}
long AllocatePodConfigRequest::getEnvId()const
{
return envId_;
}
void AllocatePodConfigRequest::setEnvId(long envId)
{
envId_ = envId;
setParameter("EnvId", std::to_string(envId));
}

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/retailcloud/model/AllocatePodConfigResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Retailcloud;
using namespace AlibabaCloud::Retailcloud::Model;
AllocatePodConfigResult::AllocatePodConfigResult() :
ServiceResult()
{}
AllocatePodConfigResult::AllocatePodConfigResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AllocatePodConfigResult::~AllocatePodConfigResult()
{}
void AllocatePodConfigResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["ConfigData"].isNull())
result_.configData = resultNode["ConfigData"].asString();
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["ErrMsg"].isNull())
errMsg_ = value["ErrMsg"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string AllocatePodConfigResult::getErrMsg()const
{
return errMsg_;
}
int AllocatePodConfigResult::getCode()const
{
return code_;
}
bool AllocatePodConfigResult::getSuccess()const
{
return success_;
}
AllocatePodConfigResult::Result AllocatePodConfigResult::getResult()const
{
return result_;
}

View File

@@ -27,17 +27,6 @@ DeployAppRequest::DeployAppRequest() :
DeployAppRequest::~DeployAppRequest()
{}
long DeployAppRequest::getDeployPacketId()const
{
return deployPacketId_;
}
void DeployAppRequest::setDeployPacketId(long deployPacketId)
{
deployPacketId_ = deployPacketId;
setParameter("DeployPacketId", std::to_string(deployPacketId));
}
std::string DeployAppRequest::getDeployPacketUrl()const
{
return deployPacketUrl_;
@@ -60,17 +49,6 @@ void DeployAppRequest::setTotalPartitions(int totalPartitions)
setParameter("TotalPartitions", std::to_string(totalPartitions));
}
std::string DeployAppRequest::getName()const
{
return name_;
}
void DeployAppRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
std::string DeployAppRequest::getDescription()const
{
return description_;
@@ -93,6 +71,17 @@ void DeployAppRequest::setEnvId(long envId)
setParameter("EnvId", std::to_string(envId));
}
std::string DeployAppRequest::getUpdateStrategyType()const
{
return updateStrategyType_;
}
void DeployAppRequest::setUpdateStrategyType(const std::string& updateStrategyType)
{
updateStrategyType_ = updateStrategyType;
setParameter("UpdateStrategyType", updateStrategyType);
}
std::string DeployAppRequest::getPauseType()const
{
return pauseType_;
@@ -104,6 +93,54 @@ void DeployAppRequest::setPauseType(const std::string& pauseType)
setParameter("PauseType", pauseType);
}
long DeployAppRequest::getDeployPacketId()const
{
return deployPacketId_;
}
void DeployAppRequest::setDeployPacketId(long deployPacketId)
{
deployPacketId_ = deployPacketId;
setParameter("DeployPacketId", std::to_string(deployPacketId));
}
std::vector<std::string> DeployAppRequest::getContainerImageList()const
{
return containerImageList_;
}
void DeployAppRequest::setContainerImageList(const std::vector<std::string>& containerImageList)
{
containerImageList_ = containerImageList;
for(int dep1 = 0; dep1!= containerImageList.size(); dep1++) {
setParameter("ContainerImageList."+ std::to_string(dep1), containerImageList.at(dep1));
}
}
std::string DeployAppRequest::getName()const
{
return name_;
}
void DeployAppRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
std::vector<std::string> DeployAppRequest::getInitContainerImageList()const
{
return initContainerImageList_;
}
void DeployAppRequest::setInitContainerImageList(const std::vector<std::string>& initContainerImageList)
{
initContainerImageList_ = initContainerImageList;
for(int dep1 = 0; dep1!= initContainerImageList.size(); dep1++) {
setParameter("InitContainerImageList."+ std::to_string(dep1), initContainerImageList.at(dep1));
}
}
bool DeployAppRequest::getArmsFlag()const
{
return armsFlag_;

View File

@@ -0,0 +1,40 @@
/*
* 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/retailcloud/model/DescribeClusterDetailRequest.h>
using AlibabaCloud::Retailcloud::Model::DescribeClusterDetailRequest;
DescribeClusterDetailRequest::DescribeClusterDetailRequest() :
RpcServiceRequest("retailcloud", "2018-03-13", "DescribeClusterDetail")
{
setMethod(HttpRequest::Method::Post);
}
DescribeClusterDetailRequest::~DescribeClusterDetailRequest()
{}
std::string DescribeClusterDetailRequest::getClusterInstanceId()const
{
return clusterInstanceId_;
}
void DescribeClusterDetailRequest::setClusterInstanceId(const std::string& clusterInstanceId)
{
clusterInstanceId_ = clusterInstanceId;
setParameter("ClusterInstanceId", clusterInstanceId);
}

View File

@@ -0,0 +1,215 @@
/*
* 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/retailcloud/model/DescribeClusterDetailResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Retailcloud;
using namespace AlibabaCloud::Retailcloud::Model;
DescribeClusterDetailResult::DescribeClusterDetailResult() :
ServiceResult()
{}
DescribeClusterDetailResult::DescribeClusterDetailResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeClusterDetailResult::~DescribeClusterDetailResult()
{}
void DescribeClusterDetailResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
auto allNodeWorkLoadListNode = resultNode["NodeWorkLoadList"]["ClusterNodeWorkLoad"];
for (auto resultNodeNodeWorkLoadListClusterNodeWorkLoad : allNodeWorkLoadListNode)
{
Result::ClusterNodeWorkLoad clusterNodeWorkLoadObject;
if(!resultNodeNodeWorkLoadListClusterNodeWorkLoad["AppPodCount"].isNull())
clusterNodeWorkLoadObject.appPodCount = std::stoi(resultNodeNodeWorkLoadListClusterNodeWorkLoad["AppPodCount"].asString());
if(!resultNodeNodeWorkLoadListClusterNodeWorkLoad["CpuRequest"].isNull())
clusterNodeWorkLoadObject.cpuRequest = resultNodeNodeWorkLoadListClusterNodeWorkLoad["CpuRequest"].asString();
if(!resultNodeNodeWorkLoadListClusterNodeWorkLoad["CpuTotal"].isNull())
clusterNodeWorkLoadObject.cpuTotal = resultNodeNodeWorkLoadListClusterNodeWorkLoad["CpuTotal"].asString();
if(!resultNodeNodeWorkLoadListClusterNodeWorkLoad["CpuUse"].isNull())
clusterNodeWorkLoadObject.cpuUse = resultNodeNodeWorkLoadListClusterNodeWorkLoad["CpuUse"].asString();
if(!resultNodeNodeWorkLoadListClusterNodeWorkLoad["InstanceId"].isNull())
clusterNodeWorkLoadObject.instanceId = resultNodeNodeWorkLoadListClusterNodeWorkLoad["InstanceId"].asString();
if(!resultNodeNodeWorkLoadListClusterNodeWorkLoad["MemRequest"].isNull())
clusterNodeWorkLoadObject.memRequest = resultNodeNodeWorkLoadListClusterNodeWorkLoad["MemRequest"].asString();
if(!resultNodeNodeWorkLoadListClusterNodeWorkLoad["MemTotal"].isNull())
clusterNodeWorkLoadObject.memTotal = resultNodeNodeWorkLoadListClusterNodeWorkLoad["MemTotal"].asString();
if(!resultNodeNodeWorkLoadListClusterNodeWorkLoad["MemUse"].isNull())
clusterNodeWorkLoadObject.memUse = resultNodeNodeWorkLoadListClusterNodeWorkLoad["MemUse"].asString();
if(!resultNodeNodeWorkLoadListClusterNodeWorkLoad["NodeName"].isNull())
clusterNodeWorkLoadObject.nodeName = resultNodeNodeWorkLoadListClusterNodeWorkLoad["NodeName"].asString();
if(!resultNodeNodeWorkLoadListClusterNodeWorkLoad["PodCount"].isNull())
clusterNodeWorkLoadObject.podCount = std::stoi(resultNodeNodeWorkLoadListClusterNodeWorkLoad["PodCount"].asString());
if(!resultNodeNodeWorkLoadListClusterNodeWorkLoad["Ready"].isNull())
clusterNodeWorkLoadObject.ready = resultNodeNodeWorkLoadListClusterNodeWorkLoad["Ready"].asString() == "true";
if(!resultNodeNodeWorkLoadListClusterNodeWorkLoad["Unschedulable"].isNull())
clusterNodeWorkLoadObject.unschedulable = resultNodeNodeWorkLoadListClusterNodeWorkLoad["Unschedulable"].asString() == "true";
result_.nodeWorkLoadList.push_back(clusterNodeWorkLoadObject);
}
auto basicInfoNode = resultNode["BasicInfo"];
if(!basicInfoNode["BusinessCode"].isNull())
result_.basicInfo.businessCode = basicInfoNode["BusinessCode"].asString();
if(!basicInfoNode["ClusterId"].isNull())
result_.basicInfo.clusterId = std::stol(basicInfoNode["ClusterId"].asString());
if(!basicInfoNode["ClusterInstanceId"].isNull())
result_.basicInfo.clusterInstanceId = basicInfoNode["ClusterInstanceId"].asString();
if(!basicInfoNode["ClusterName"].isNull())
result_.basicInfo.clusterName = basicInfoNode["ClusterName"].asString();
if(!basicInfoNode["EnvType"].isNull())
result_.basicInfo.envType = basicInfoNode["EnvType"].asString();
if(!basicInfoNode["HasInstallArmsPilot"].isNull())
result_.basicInfo.hasInstallArmsPilot = basicInfoNode["HasInstallArmsPilot"].asString() == "true";
if(!basicInfoNode["HasInstallLogController"].isNull())
result_.basicInfo.hasInstallLogController = basicInfoNode["HasInstallLogController"].asString() == "true";
if(!basicInfoNode["InstallArmsInProcess"].isNull())
result_.basicInfo.installArmsInProcess = basicInfoNode["InstallArmsInProcess"].asString() == "true";
if(!basicInfoNode["InstallLogInProcess"].isNull())
result_.basicInfo.installLogInProcess = basicInfoNode["InstallLogInProcess"].asString() == "true";
if(!basicInfoNode["MainUserId"].isNull())
result_.basicInfo.mainUserId = basicInfoNode["MainUserId"].asString();
if(!basicInfoNode["RegionId"].isNull())
result_.basicInfo.regionId = basicInfoNode["RegionId"].asString();
if(!basicInfoNode["RegionName"].isNull())
result_.basicInfo.regionName = basicInfoNode["RegionName"].asString();
if(!basicInfoNode["UserNick"].isNull())
result_.basicInfo.userNick = basicInfoNode["UserNick"].asString();
if(!basicInfoNode["VpcId"].isNull())
result_.basicInfo.vpcId = basicInfoNode["VpcId"].asString();
auto allEcsIds = basicInfoNode["EcsIds"]["String"];
for (auto value : allEcsIds)
result_.basicInfo.ecsIds.push_back(value.asString());
auto allVswitchs = basicInfoNode["Vswitchs"]["String"];
for (auto value : allVswitchs)
result_.basicInfo.vswitchs.push_back(value.asString());
auto instanceInfoNode = resultNode["InstanceInfo"];
if(!instanceInfoNode["AllocatePodCount"].isNull())
result_.instanceInfo.allocatePodCount = std::stoi(instanceInfoNode["AllocatePodCount"].asString());
if(!instanceInfoNode["AppCount"].isNull())
result_.instanceInfo.appCount = std::stoi(instanceInfoNode["AppCount"].asString());
auto allAllocatedPodInfoListNode = instanceInfoNode["AllocatedPodInfoList"]["AllocatedPodInstanceInfo"];
for (auto instanceInfoNodeAllocatedPodInfoListAllocatedPodInstanceInfo : allAllocatedPodInfoListNode)
{
Result::InstanceInfo::AllocatedPodInstanceInfo allocatedPodInstanceInfoObject;
if(!instanceInfoNodeAllocatedPodInfoListAllocatedPodInstanceInfo["AppId"].isNull())
allocatedPodInstanceInfoObject.appId = std::stol(instanceInfoNodeAllocatedPodInfoListAllocatedPodInstanceInfo["AppId"].asString());
if(!instanceInfoNodeAllocatedPodInfoListAllocatedPodInstanceInfo["AppName"].isNull())
allocatedPodInstanceInfoObject.appName = instanceInfoNodeAllocatedPodInfoListAllocatedPodInstanceInfo["AppName"].asString();
if(!instanceInfoNodeAllocatedPodInfoListAllocatedPodInstanceInfo["CupRequest"].isNull())
allocatedPodInstanceInfoObject.cupRequest = instanceInfoNodeAllocatedPodInfoListAllocatedPodInstanceInfo["CupRequest"].asString();
if(!instanceInfoNodeAllocatedPodInfoListAllocatedPodInstanceInfo["EnvId"].isNull())
allocatedPodInstanceInfoObject.envId = std::stol(instanceInfoNodeAllocatedPodInfoListAllocatedPodInstanceInfo["EnvId"].asString());
if(!instanceInfoNodeAllocatedPodInfoListAllocatedPodInstanceInfo["EnvName"].isNull())
allocatedPodInstanceInfoObject.envName = instanceInfoNodeAllocatedPodInfoListAllocatedPodInstanceInfo["EnvName"].asString();
if(!instanceInfoNodeAllocatedPodInfoListAllocatedPodInstanceInfo["MemRequest"].isNull())
allocatedPodInstanceInfoObject.memRequest = instanceInfoNodeAllocatedPodInfoListAllocatedPodInstanceInfo["MemRequest"].asString();
if(!instanceInfoNodeAllocatedPodInfoListAllocatedPodInstanceInfo["PodCount"].isNull())
allocatedPodInstanceInfoObject.podCount = std::stoi(instanceInfoNodeAllocatedPodInfoListAllocatedPodInstanceInfo["PodCount"].asString());
result_.instanceInfo.allocatedPodInfoList.push_back(allocatedPodInstanceInfoObject);
}
auto allAvailablePodInfoListNode = instanceInfoNode["AvailablePodInfoList"]["AvailablePodInstanceInfo"];
for (auto instanceInfoNodeAvailablePodInfoListAvailablePodInstanceInfo : allAvailablePodInfoListNode)
{
Result::InstanceInfo::AvailablePodInstanceInfo availablePodInstanceInfoObject;
if(!instanceInfoNodeAvailablePodInfoListAvailablePodInstanceInfo["AvailablePodCount"].isNull())
availablePodInstanceInfoObject.availablePodCount = std::stoi(instanceInfoNodeAvailablePodInfoListAvailablePodInstanceInfo["AvailablePodCount"].asString());
if(!instanceInfoNodeAvailablePodInfoListAvailablePodInstanceInfo["CupRequest"].isNull())
availablePodInstanceInfoObject.cupRequest = instanceInfoNodeAvailablePodInfoListAvailablePodInstanceInfo["CupRequest"].asString();
if(!instanceInfoNodeAvailablePodInfoListAvailablePodInstanceInfo["MemRequest"].isNull())
availablePodInstanceInfoObject.memRequest = instanceInfoNodeAvailablePodInfoListAvailablePodInstanceInfo["MemRequest"].asString();
result_.instanceInfo.availablePodInfoList.push_back(availablePodInstanceInfoObject);
}
auto netInfoNode = resultNode["NetInfo"];
if(!netInfoNode["NetPlugType"].isNull())
result_.netInfo.netPlugType = netInfoNode["NetPlugType"].asString();
if(!netInfoNode["ProdCIDR"].isNull())
result_.netInfo.prodCIDR = netInfoNode["ProdCIDR"].asString();
if(!netInfoNode["ServiceCIDR"].isNull())
result_.netInfo.serviceCIDR = netInfoNode["ServiceCIDR"].asString();
auto workLoadNode = resultNode["WorkLoad"];
if(!workLoadNode["AllNodeCount"].isNull())
result_.workLoad.allNodeCount = std::stoi(workLoadNode["AllNodeCount"].asString());
if(!workLoadNode["AllocateAllPodCount"].isNull())
result_.workLoad.allocateAllPodCount = std::stoi(workLoadNode["AllocateAllPodCount"].asString());
if(!workLoadNode["AllocateAppPodCount"].isNull())
result_.workLoad.allocateAppPodCount = std::stoi(workLoadNode["AllocateAppPodCount"].asString());
if(!workLoadNode["CpuCapacityTotal"].isNull())
result_.workLoad.cpuCapacityTotal = workLoadNode["CpuCapacityTotal"].asString();
if(!workLoadNode["CpuLevel"].isNull())
result_.workLoad.cpuLevel = workLoadNode["CpuLevel"].asString();
if(!workLoadNode["CpuRequest"].isNull())
result_.workLoad.cpuRequest = workLoadNode["CpuRequest"].asString();
if(!workLoadNode["CpuRequestPercent"].isNull())
result_.workLoad.cpuRequestPercent = workLoadNode["CpuRequestPercent"].asString();
if(!workLoadNode["CpuTotal"].isNull())
result_.workLoad.cpuTotal = workLoadNode["CpuTotal"].asString();
if(!workLoadNode["CpuUse"].isNull())
result_.workLoad.cpuUse = workLoadNode["CpuUse"].asString();
if(!workLoadNode["CpuUsePercent"].isNull())
result_.workLoad.cpuUsePercent = workLoadNode["CpuUsePercent"].asString();
if(!workLoadNode["MemCapacityTotal"].isNull())
result_.workLoad.memCapacityTotal = workLoadNode["MemCapacityTotal"].asString();
if(!workLoadNode["MemLevel"].isNull())
result_.workLoad.memLevel = workLoadNode["MemLevel"].asString();
if(!workLoadNode["MemRequest"].isNull())
result_.workLoad.memRequest = workLoadNode["MemRequest"].asString();
if(!workLoadNode["MemRequestPercent"].isNull())
result_.workLoad.memRequestPercent = workLoadNode["MemRequestPercent"].asString();
if(!workLoadNode["MemTotal"].isNull())
result_.workLoad.memTotal = workLoadNode["MemTotal"].asString();
if(!workLoadNode["MemUse"].isNull())
result_.workLoad.memUse = workLoadNode["MemUse"].asString();
if(!workLoadNode["MemUsePercent"].isNull())
result_.workLoad.memUsePercent = workLoadNode["MemUsePercent"].asString();
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["ErrMsg"].isNull())
errMsg_ = value["ErrMsg"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string DescribeClusterDetailResult::getErrMsg()const
{
return errMsg_;
}
int DescribeClusterDetailResult::getCode()const
{
return code_;
}
bool DescribeClusterDetailResult::getSuccess()const
{
return success_;
}
DescribeClusterDetailResult::Result DescribeClusterDetailResult::getResult()const
{
return result_;
}

View File

@@ -56,16 +56,16 @@ void DescribeDatabasesResult::parse(const std::string &payload)
databasesItemObject.characterSetName = resultNodeDatabasesDatabasesItem["CharacterSetName"].asString();
if(!resultNodeDatabasesDatabasesItem["DBInstanceId"].isNull())
databasesItemObject.dBInstanceId = resultNodeDatabasesDatabasesItem["DBInstanceId"].asString();
auto allAccountsNode = allDatabasesNode["Accounts"]["AccountsItem"];
for (auto allDatabasesNodeAccountsAccountsItem : allAccountsNode)
auto allAccountsNode = resultNodeDatabasesDatabasesItem["Accounts"]["AccountsItem"];
for (auto resultNodeDatabasesDatabasesItemAccountsAccountsItem : allAccountsNode)
{
Result::DatabasesItem::AccountsItem accountsObject;
if(!allDatabasesNodeAccountsAccountsItem["AccountPrivilegeDetail"].isNull())
accountsObject.accountPrivilegeDetail = allDatabasesNodeAccountsAccountsItem["AccountPrivilegeDetail"].asString();
if(!allDatabasesNodeAccountsAccountsItem["AccountPrivilege"].isNull())
accountsObject.accountPrivilege = allDatabasesNodeAccountsAccountsItem["AccountPrivilege"].asString();
if(!allDatabasesNodeAccountsAccountsItem["Account"].isNull())
accountsObject.account = allDatabasesNodeAccountsAccountsItem["Account"].asString();
if(!resultNodeDatabasesDatabasesItemAccountsAccountsItem["AccountPrivilegeDetail"].isNull())
accountsObject.accountPrivilegeDetail = resultNodeDatabasesDatabasesItemAccountsAccountsItem["AccountPrivilegeDetail"].asString();
if(!resultNodeDatabasesDatabasesItemAccountsAccountsItem["AccountPrivilege"].isNull())
accountsObject.accountPrivilege = resultNodeDatabasesDatabasesItemAccountsAccountsItem["AccountPrivilege"].asString();
if(!resultNodeDatabasesDatabasesItemAccountsAccountsItem["Account"].isNull())
accountsObject.account = resultNodeDatabasesDatabasesItemAccountsAccountsItem["Account"].asString();
databasesItemObject.accounts.push_back(accountsObject);
}
result_.databases.push_back(databasesItemObject);

View File

@@ -56,16 +56,16 @@ void DescribeRdsAccountsResult::parse(const std::string &payload)
accountsItemObject.privExceeded = resultNodeAccountsAccountsItem["PrivExceeded"].asString();
if(!resultNodeAccountsAccountsItem["DBInstanceId"].isNull())
accountsItemObject.dBInstanceId = resultNodeAccountsAccountsItem["DBInstanceId"].asString();
auto allDatabasePrivilegesNode = allAccountsNode["DatabasePrivileges"]["DatabasePrivilegesItem"];
for (auto allAccountsNodeDatabasePrivilegesDatabasePrivilegesItem : allDatabasePrivilegesNode)
auto allDatabasePrivilegesNode = resultNodeAccountsAccountsItem["DatabasePrivileges"]["DatabasePrivilegesItem"];
for (auto resultNodeAccountsAccountsItemDatabasePrivilegesDatabasePrivilegesItem : allDatabasePrivilegesNode)
{
Result::AccountsItem::DatabasePrivilegesItem databasePrivilegesObject;
if(!allAccountsNodeDatabasePrivilegesDatabasePrivilegesItem["DBName"].isNull())
databasePrivilegesObject.dBName = allAccountsNodeDatabasePrivilegesDatabasePrivilegesItem["DBName"].asString();
if(!allAccountsNodeDatabasePrivilegesDatabasePrivilegesItem["AccountPrivilege"].isNull())
databasePrivilegesObject.accountPrivilege = allAccountsNodeDatabasePrivilegesDatabasePrivilegesItem["AccountPrivilege"].asString();
if(!allAccountsNodeDatabasePrivilegesDatabasePrivilegesItem["AccountPrivilegeDetail"].isNull())
databasePrivilegesObject.accountPrivilegeDetail = allAccountsNodeDatabasePrivilegesDatabasePrivilegesItem["AccountPrivilegeDetail"].asString();
if(!resultNodeAccountsAccountsItemDatabasePrivilegesDatabasePrivilegesItem["DBName"].isNull())
databasePrivilegesObject.dBName = resultNodeAccountsAccountsItemDatabasePrivilegesDatabasePrivilegesItem["DBName"].asString();
if(!resultNodeAccountsAccountsItemDatabasePrivilegesDatabasePrivilegesItem["AccountPrivilege"].isNull())
databasePrivilegesObject.accountPrivilege = resultNodeAccountsAccountsItemDatabasePrivilegesDatabasePrivilegesItem["AccountPrivilege"].asString();
if(!resultNodeAccountsAccountsItemDatabasePrivilegesDatabasePrivilegesItem["AccountPrivilegeDetail"].isNull())
databasePrivilegesObject.accountPrivilegeDetail = resultNodeAccountsAccountsItemDatabasePrivilegesDatabasePrivilegesItem["AccountPrivilegeDetail"].asString();
accountsItemObject.databasePrivileges.push_back(databasePrivilegesObject);
}
result_.accounts.push_back(accountsItemObject);

View File

@@ -63,16 +63,16 @@ void ListAppResult::parse(const std::string &payload)
dataObject.bizTitle = valueDataAppDetail["BizTitle"].asString();
if(!valueDataAppDetail["AppStateType"].isNull())
dataObject.appStateType = valueDataAppDetail["AppStateType"].asString();
auto allMiddleWareListNode = allDataNode["MiddleWareList"]["MiddleWareInfo"];
for (auto allDataNodeMiddleWareListMiddleWareInfo : allMiddleWareListNode)
auto allMiddleWareListNode = valueDataAppDetail["MiddleWareList"]["MiddleWareInfo"];
for (auto valueDataAppDetailMiddleWareListMiddleWareInfo : allMiddleWareListNode)
{
AppDetail::MiddleWareInfo middleWareListObject;
if(!allDataNodeMiddleWareListMiddleWareInfo["AppId"].isNull())
middleWareListObject.appId = std::stol(allDataNodeMiddleWareListMiddleWareInfo["AppId"].asString());
if(!allDataNodeMiddleWareListMiddleWareInfo["Code"].isNull())
middleWareListObject.code = std::stoi(allDataNodeMiddleWareListMiddleWareInfo["Code"].asString());
if(!allDataNodeMiddleWareListMiddleWareInfo["Name"].isNull())
middleWareListObject.name = allDataNodeMiddleWareListMiddleWareInfo["Name"].asString();
if(!valueDataAppDetailMiddleWareListMiddleWareInfo["AppId"].isNull())
middleWareListObject.appId = std::stol(valueDataAppDetailMiddleWareListMiddleWareInfo["AppId"].asString());
if(!valueDataAppDetailMiddleWareListMiddleWareInfo["Code"].isNull())
middleWareListObject.code = std::stoi(valueDataAppDetailMiddleWareListMiddleWareInfo["Code"].asString());
if(!valueDataAppDetailMiddleWareListMiddleWareInfo["Name"].isNull())
middleWareListObject.name = valueDataAppDetailMiddleWareListMiddleWareInfo["Name"].asString();
dataObject.middleWareList.push_back(middleWareListObject);
}
data_.push_back(dataObject);

View File

@@ -71,16 +71,16 @@ void ListPodsResult::parse(const std::string &payload)
dataObject.statusName = valueDataPodDetail["StatusName"].asString();
if(!valueDataPodDetail["UpdateTime"].isNull())
dataObject.updateTime = valueDataPodDetail["UpdateTime"].asString();
auto allDeployStepsNode = allDataNode["DeploySteps"]["DeployStep"];
for (auto allDataNodeDeployStepsDeployStep : allDeployStepsNode)
auto allDeployStepsNode = valueDataPodDetail["DeploySteps"]["DeployStep"];
for (auto valueDataPodDetailDeployStepsDeployStep : allDeployStepsNode)
{
PodDetail::DeployStep deployStepsObject;
if(!allDataNodeDeployStepsDeployStep["Status"].isNull())
deployStepsObject.status = allDataNodeDeployStepsDeployStep["Status"].asString();
if(!allDataNodeDeployStepsDeployStep["StepCode"].isNull())
deployStepsObject.stepCode = allDataNodeDeployStepsDeployStep["StepCode"].asString();
if(!allDataNodeDeployStepsDeployStep["StepName"].isNull())
deployStepsObject.stepName = allDataNodeDeployStepsDeployStep["StepName"].asString();
if(!valueDataPodDetailDeployStepsDeployStep["Status"].isNull())
deployStepsObject.status = valueDataPodDetailDeployStepsDeployStep["Status"].asString();
if(!valueDataPodDetailDeployStepsDeployStep["StepCode"].isNull())
deployStepsObject.stepCode = valueDataPodDetailDeployStepsDeployStep["StepCode"].asString();
if(!valueDataPodDetailDeployStepsDeployStep["StepName"].isNull())
deployStepsObject.stepName = valueDataPodDetailDeployStepsDeployStep["StepName"].asString();
dataObject.deploySteps.push_back(deployStepsObject);
}
data_.push_back(dataObject);

View File

@@ -59,20 +59,20 @@ void ListServicesResult::parse(const std::string &payload)
dataObject.serviceType = valueDataServiceInstance["ServiceType"].asString();
if(!valueDataServiceInstance["ClusterIP"].isNull())
dataObject.clusterIP = valueDataServiceInstance["ClusterIP"].asString();
auto allPortMappingsNode = allDataNode["PortMappings"]["ServicePortMapping"];
for (auto allDataNodePortMappingsServicePortMapping : allPortMappingsNode)
auto allPortMappingsNode = valueDataServiceInstance["PortMappings"]["ServicePortMapping"];
for (auto valueDataServiceInstancePortMappingsServicePortMapping : allPortMappingsNode)
{
ServiceInstance::ServicePortMapping portMappingsObject;
if(!allDataNodePortMappingsServicePortMapping["Name"].isNull())
portMappingsObject.name = allDataNodePortMappingsServicePortMapping["Name"].asString();
if(!allDataNodePortMappingsServicePortMapping["NodePort"].isNull())
portMappingsObject.nodePort = std::stoi(allDataNodePortMappingsServicePortMapping["NodePort"].asString());
if(!allDataNodePortMappingsServicePortMapping["Port"].isNull())
portMappingsObject.port = std::stoi(allDataNodePortMappingsServicePortMapping["Port"].asString());
if(!allDataNodePortMappingsServicePortMapping["Protocol"].isNull())
portMappingsObject.protocol = allDataNodePortMappingsServicePortMapping["Protocol"].asString();
if(!allDataNodePortMappingsServicePortMapping["TargetPort"].isNull())
portMappingsObject.targetPort = allDataNodePortMappingsServicePortMapping["TargetPort"].asString();
if(!valueDataServiceInstancePortMappingsServicePortMapping["Name"].isNull())
portMappingsObject.name = valueDataServiceInstancePortMappingsServicePortMapping["Name"].asString();
if(!valueDataServiceInstancePortMappingsServicePortMapping["NodePort"].isNull())
portMappingsObject.nodePort = std::stoi(valueDataServiceInstancePortMappingsServicePortMapping["NodePort"].asString());
if(!valueDataServiceInstancePortMappingsServicePortMapping["Port"].isNull())
portMappingsObject.port = std::stoi(valueDataServiceInstancePortMappingsServicePortMapping["Port"].asString());
if(!valueDataServiceInstancePortMappingsServicePortMapping["Protocol"].isNull())
portMappingsObject.protocol = valueDataServiceInstancePortMappingsServicePortMapping["Protocol"].asString();
if(!valueDataServiceInstancePortMappingsServicePortMapping["TargetPort"].isNull())
portMappingsObject.targetPort = valueDataServiceInstancePortMappingsServicePortMapping["TargetPort"].asString();
dataObject.portMappings.push_back(portMappingsObject);
}
data_.push_back(dataObject);

View File

@@ -0,0 +1,84 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/retailcloud/model/SubmitInfoRequest.h>
using AlibabaCloud::Retailcloud::Model::SubmitInfoRequest;
SubmitInfoRequest::SubmitInfoRequest() :
RpcServiceRequest("retailcloud", "2018-03-13", "SubmitInfo")
{
setMethod(HttpRequest::Method::Post);
}
SubmitInfoRequest::~SubmitInfoRequest()
{}
std::string SubmitInfoRequest::getRequestId()const
{
return requestId_;
}
void SubmitInfoRequest::setRequestId(const std::string& requestId)
{
requestId_ = requestId;
setParameter("RequestId", requestId);
}
long SubmitInfoRequest::getMainUserId()const
{
return mainUserId_;
}
void SubmitInfoRequest::setMainUserId(long mainUserId)
{
mainUserId_ = mainUserId;
setParameter("MainUserId", std::to_string(mainUserId));
}
std::vector<SubmitInfoRequest::EcsDescList> SubmitInfoRequest::getEcsDescList()const
{
return ecsDescList_;
}
void SubmitInfoRequest::setEcsDescList(const std::vector<EcsDescList>& ecsDescList)
{
ecsDescList_ = ecsDescList;
for(int dep1 = 0; dep1!= ecsDescList.size(); dep1++) {
auto ecsDescListObj = ecsDescList.at(dep1);
std::string ecsDescListObjStr = "EcsDescList." + std::to_string(dep1 + 1);
setParameter(ecsDescListObjStr + ".ResourceId", ecsDescListObj.resourceId);
setParameter(ecsDescListObjStr + ".BussinessDesc", ecsDescListObj.bussinessDesc);
setParameter(ecsDescListObjStr + ".MiddleWareDesc", ecsDescListObj.middleWareDesc);
setParameter(ecsDescListObjStr + ".OtherMiddleWareDesc", ecsDescListObj.otherMiddleWareDesc);
setParameter(ecsDescListObjStr + ".BussinessType", ecsDescListObj.bussinessType);
setParameter(ecsDescListObjStr + ".AppType", ecsDescListObj.appType);
setParameter(ecsDescListObjStr + ".EnvType", ecsDescListObj.envType);
setParameter(ecsDescListObjStr + ".UserId", ecsDescListObj.userId);
}
}
long SubmitInfoRequest::getCallerUid()const
{
return callerUid_;
}
void SubmitInfoRequest::setCallerUid(long callerUid)
{
callerUid_ = callerUid;
setParameter("CallerUid", std::to_string(callerUid));
}

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/retailcloud/model/SubmitInfoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Retailcloud;
using namespace AlibabaCloud::Retailcloud::Model;
SubmitInfoResult::SubmitInfoResult() :
ServiceResult()
{}
SubmitInfoResult::SubmitInfoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SubmitInfoResult::~SubmitInfoResult()
{}
void SubmitInfoResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["ErrMsg"].isNull())
errMsg_ = value["ErrMsg"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string SubmitInfoResult::getErrMsg()const
{
return errMsg_;
}
int SubmitInfoResult::getCode()const
{
return code_;
}
bool SubmitInfoResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,95 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/retailcloud/model/SyncPodInfoRequest.h>
using AlibabaCloud::Retailcloud::Model::SyncPodInfoRequest;
SyncPodInfoRequest::SyncPodInfoRequest() :
RpcServiceRequest("retailcloud", "2018-03-13", "SyncPodInfo")
{
setMethod(HttpRequest::Method::Post);
}
SyncPodInfoRequest::~SyncPodInfoRequest()
{}
std::string SyncPodInfoRequest::getReason()const
{
return reason_;
}
void SyncPodInfoRequest::setReason(const std::string& reason)
{
reason_ = reason;
setParameter("Reason", reason);
}
std::string SyncPodInfoRequest::getRequestId()const
{
return requestId_;
}
void SyncPodInfoRequest::setRequestId(const std::string& requestId)
{
requestId_ = requestId;
setParameter("RequestId", requestId);
}
std::string SyncPodInfoRequest::getPodName()const
{
return podName_;
}
void SyncPodInfoRequest::setPodName(const std::string& podName)
{
podName_ = podName;
setParameter("PodName", podName);
}
std::string SyncPodInfoRequest::getSideCarType()const
{
return sideCarType_;
}
void SyncPodInfoRequest::setSideCarType(const std::string& sideCarType)
{
sideCarType_ = sideCarType;
setParameter("SideCarType", sideCarType);
}
long SyncPodInfoRequest::getTaskId()const
{
return taskId_;
}
void SyncPodInfoRequest::setTaskId(long taskId)
{
taskId_ = taskId;
setParameter("TaskId", std::to_string(taskId));
}
bool SyncPodInfoRequest::getStatus()const
{
return status_;
}
void SyncPodInfoRequest::setStatus(bool status)
{
status_ = status;
setParameter("Status", status ? "true" : "false");
}

View File

@@ -0,0 +1,66 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/retailcloud/model/SyncPodInfoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Retailcloud;
using namespace AlibabaCloud::Retailcloud::Model;
SyncPodInfoResult::SyncPodInfoResult() :
ServiceResult()
{}
SyncPodInfoResult::SyncPodInfoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SyncPodInfoResult::~SyncPodInfoResult()
{}
void SyncPodInfoResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["Success"].isNull())
result_.success = resultNode["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["ErrMsg"].isNull())
errMsg_ = value["ErrMsg"].asString();
}
std::string SyncPodInfoResult::getErrMsg()const
{
return errMsg_;
}
int SyncPodInfoResult::getCode()const
{
return code_;
}
SyncPodInfoResult::Result SyncPodInfoResult::getResult()const
{
return result_;
}