Supported AAA for BBB.
This commit is contained in:
@@ -1275,6 +1275,42 @@ RetailcloudClient::DescribeDeployOrderDetailOutcomeCallable RetailcloudClient::d
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
RetailcloudClient::DescribeJobLogOutcome RetailcloudClient::describeJobLog(const DescribeJobLogRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeJobLogOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeJobLogOutcome(DescribeJobLogResult(outcome.result()));
|
||||
else
|
||||
return DescribeJobLogOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void RetailcloudClient::describeJobLogAsync(const DescribeJobLogRequest& request, const DescribeJobLogAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeJobLog(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
RetailcloudClient::DescribeJobLogOutcomeCallable RetailcloudClient::describeJobLogCallable(const DescribeJobLogRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeJobLogOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeJobLog(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
RetailcloudClient::DescribePodEventsOutcome RetailcloudClient::describePodEvents(const DescribePodEventsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1923,6 +1959,42 @@ RetailcloudClient::ListDeployOrdersOutcomeCallable RetailcloudClient::listDeploy
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
RetailcloudClient::ListJobHistoriesOutcome RetailcloudClient::listJobHistories(const ListJobHistoriesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListJobHistoriesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListJobHistoriesOutcome(ListJobHistoriesResult(outcome.result()));
|
||||
else
|
||||
return ListJobHistoriesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void RetailcloudClient::listJobHistoriesAsync(const ListJobHistoriesRequest& request, const ListJobHistoriesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listJobHistories(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
RetailcloudClient::ListJobHistoriesOutcomeCallable RetailcloudClient::listJobHistoriesCallable(const ListJobHistoriesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListJobHistoriesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listJobHistories(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
RetailcloudClient::ListNodeLabelBindingsOutcome RetailcloudClient::listNodeLabelBindings(const ListNodeLabelBindingsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -2319,6 +2391,42 @@ RetailcloudClient::QueryClusterDetailOutcomeCallable RetailcloudClient::queryClu
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
RetailcloudClient::RebuildAppInstanceOutcome RetailcloudClient::rebuildAppInstance(const RebuildAppInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RebuildAppInstanceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RebuildAppInstanceOutcome(RebuildAppInstanceResult(outcome.result()));
|
||||
else
|
||||
return RebuildAppInstanceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void RetailcloudClient::rebuildAppInstanceAsync(const RebuildAppInstanceRequest& request, const RebuildAppInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, rebuildAppInstance(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
RetailcloudClient::RebuildAppInstanceOutcomeCallable RetailcloudClient::rebuildAppInstanceCallable(const RebuildAppInstanceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RebuildAppInstanceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->rebuildAppInstance(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
RetailcloudClient::RemoveClusterNodeOutcome RetailcloudClient::removeClusterNode(const RemoveClusterNodeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -119,6 +119,17 @@ void CreateDeployConfigRequest::setSecretList(const std::vector<std::string>& se
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateDeployConfigRequest::getCronJob()const
|
||||
{
|
||||
return cronJob_;
|
||||
}
|
||||
|
||||
void CreateDeployConfigRequest::setCronJob(const std::string& cronJob)
|
||||
{
|
||||
cronJob_ = cronJob;
|
||||
setParameter("CronJob", cronJob);
|
||||
}
|
||||
|
||||
std::string CreateDeployConfigRequest::getDeployment()const
|
||||
{
|
||||
return deployment_;
|
||||
|
||||
62
retailcloud/src/model/DescribeJobLogRequest.cc
Normal file
62
retailcloud/src/model/DescribeJobLogRequest.cc
Normal 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/DescribeJobLogRequest.h>
|
||||
|
||||
using AlibabaCloud::Retailcloud::Model::DescribeJobLogRequest;
|
||||
|
||||
DescribeJobLogRequest::DescribeJobLogRequest() :
|
||||
RpcServiceRequest("retailcloud", "2018-03-13", "DescribeJobLog")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribeJobLogRequest::~DescribeJobLogRequest()
|
||||
{}
|
||||
|
||||
long DescribeJobLogRequest::getAppId()const
|
||||
{
|
||||
return appId_;
|
||||
}
|
||||
|
||||
void DescribeJobLogRequest::setAppId(long appId)
|
||||
{
|
||||
appId_ = appId;
|
||||
setParameter("AppId", std::to_string(appId));
|
||||
}
|
||||
|
||||
std::string DescribeJobLogRequest::getPodName()const
|
||||
{
|
||||
return podName_;
|
||||
}
|
||||
|
||||
void DescribeJobLogRequest::setPodName(const std::string& podName)
|
||||
{
|
||||
podName_ = podName;
|
||||
setParameter("PodName", podName);
|
||||
}
|
||||
|
||||
long DescribeJobLogRequest::getEnvId()const
|
||||
{
|
||||
return envId_;
|
||||
}
|
||||
|
||||
void DescribeJobLogRequest::setEnvId(long envId)
|
||||
{
|
||||
envId_ = envId;
|
||||
setParameter("EnvId", std::to_string(envId));
|
||||
}
|
||||
|
||||
94
retailcloud/src/model/DescribeJobLogResult.cc
Normal file
94
retailcloud/src/model/DescribeJobLogResult.cc
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/retailcloud/model/DescribeJobLogResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Retailcloud;
|
||||
using namespace AlibabaCloud::Retailcloud::Model;
|
||||
|
||||
DescribeJobLogResult::DescribeJobLogResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeJobLogResult::DescribeJobLogResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeJobLogResult::~DescribeJobLogResult()
|
||||
{}
|
||||
|
||||
void DescribeJobLogResult::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["AppId"].isNull())
|
||||
result_.appId = std::stol(resultNode["AppId"].asString());
|
||||
if(!resultNode["EnvId"].isNull())
|
||||
result_.envId = std::stol(resultNode["EnvId"].asString());
|
||||
if(!resultNode["PodName"].isNull())
|
||||
result_.podName = resultNode["PodName"].asString();
|
||||
if(!resultNode["JobLog"].isNull())
|
||||
result_.jobLog = resultNode["JobLog"].asString();
|
||||
auto allEventsNode = resultNode["Events"]["Event"];
|
||||
for (auto resultNodeEventsEvent : allEventsNode)
|
||||
{
|
||||
Result::Event eventObject;
|
||||
if(!resultNodeEventsEvent["Action"].isNull())
|
||||
eventObject.action = resultNodeEventsEvent["Action"].asString();
|
||||
if(!resultNodeEventsEvent["Count"].isNull())
|
||||
eventObject.count = std::stoi(resultNodeEventsEvent["Count"].asString());
|
||||
if(!resultNodeEventsEvent["EventTime"].isNull())
|
||||
eventObject.eventTime = resultNodeEventsEvent["EventTime"].asString();
|
||||
if(!resultNodeEventsEvent["FirstTimestamp"].isNull())
|
||||
eventObject.firstTimestamp = resultNodeEventsEvent["FirstTimestamp"].asString();
|
||||
if(!resultNodeEventsEvent["LastTimestamp"].isNull())
|
||||
eventObject.lastTimestamp = resultNodeEventsEvent["LastTimestamp"].asString();
|
||||
if(!resultNodeEventsEvent["Mesage"].isNull())
|
||||
eventObject.mesage = resultNodeEventsEvent["Mesage"].asString();
|
||||
if(!resultNodeEventsEvent["Reason"].isNull())
|
||||
eventObject.reason = resultNodeEventsEvent["Reason"].asString();
|
||||
if(!resultNodeEventsEvent["Type"].isNull())
|
||||
eventObject.type = resultNodeEventsEvent["Type"].asString();
|
||||
result_.events.push_back(eventObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["ErrMsg"].isNull())
|
||||
errMsg_ = value["ErrMsg"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeJobLogResult::getErrMsg()const
|
||||
{
|
||||
return errMsg_;
|
||||
}
|
||||
|
||||
int DescribeJobLogResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
DescribeJobLogResult::Result DescribeJobLogResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,8 @@ void ListDeployConfigResult::parse(const std::string &payload)
|
||||
dataObject.containerYamlConf.configMap = containerYamlConfNode["ConfigMap"].asString();
|
||||
if(!containerYamlConfNode["StatefulSet"].isNull())
|
||||
dataObject.containerYamlConf.statefulSet = containerYamlConfNode["StatefulSet"].asString();
|
||||
if(!containerYamlConfNode["CronJob"].isNull())
|
||||
dataObject.containerYamlConf.cronJob = containerYamlConfNode["CronJob"].asString();
|
||||
auto allConfigMapList = containerYamlConfNode["ConfigMapList"]["ConfigMapList"];
|
||||
for (auto value : allConfigMapList)
|
||||
dataObject.containerYamlConf.configMapList.push_back(value.asString());
|
||||
|
||||
84
retailcloud/src/model/ListJobHistoriesRequest.cc
Normal file
84
retailcloud/src/model/ListJobHistoriesRequest.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/retailcloud/model/ListJobHistoriesRequest.h>
|
||||
|
||||
using AlibabaCloud::Retailcloud::Model::ListJobHistoriesRequest;
|
||||
|
||||
ListJobHistoriesRequest::ListJobHistoriesRequest() :
|
||||
RpcServiceRequest("retailcloud", "2018-03-13", "ListJobHistories")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListJobHistoriesRequest::~ListJobHistoriesRequest()
|
||||
{}
|
||||
|
||||
long ListJobHistoriesRequest::getAppId()const
|
||||
{
|
||||
return appId_;
|
||||
}
|
||||
|
||||
void ListJobHistoriesRequest::setAppId(long appId)
|
||||
{
|
||||
appId_ = appId;
|
||||
setParameter("AppId", std::to_string(appId));
|
||||
}
|
||||
|
||||
int ListJobHistoriesRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListJobHistoriesRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
long ListJobHistoriesRequest::getEnvId()const
|
||||
{
|
||||
return envId_;
|
||||
}
|
||||
|
||||
void ListJobHistoriesRequest::setEnvId(long envId)
|
||||
{
|
||||
envId_ = envId;
|
||||
setParameter("EnvId", std::to_string(envId));
|
||||
}
|
||||
|
||||
int ListJobHistoriesRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListJobHistoriesRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string ListJobHistoriesRequest::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
void ListJobHistoriesRequest::setStatus(const std::string& status)
|
||||
{
|
||||
status_ = status;
|
||||
setParameter("Status", status);
|
||||
}
|
||||
|
||||
113
retailcloud/src/model/ListJobHistoriesResult.cc
Normal file
113
retailcloud/src/model/ListJobHistoriesResult.cc
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* 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/ListJobHistoriesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Retailcloud;
|
||||
using namespace AlibabaCloud::Retailcloud::Model;
|
||||
|
||||
ListJobHistoriesResult::ListJobHistoriesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListJobHistoriesResult::ListJobHistoriesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListJobHistoriesResult::~ListJobHistoriesResult()
|
||||
{}
|
||||
|
||||
void ListJobHistoriesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDataNode = value["Data"]["JobDetail"];
|
||||
for (auto valueDataJobDetail : allDataNode)
|
||||
{
|
||||
JobDetail dataObject;
|
||||
if(!valueDataJobDetail["Name"].isNull())
|
||||
dataObject.name = valueDataJobDetail["Name"].asString();
|
||||
if(!valueDataJobDetail["CompletionTime"].isNull())
|
||||
dataObject.completionTime = valueDataJobDetail["CompletionTime"].asString();
|
||||
if(!valueDataJobDetail["StartTime"].isNull())
|
||||
dataObject.startTime = valueDataJobDetail["StartTime"].asString();
|
||||
if(!valueDataJobDetail["Succeeded"].isNull())
|
||||
dataObject.succeeded = std::stoi(valueDataJobDetail["Succeeded"].asString());
|
||||
if(!valueDataJobDetail["Failed"].isNull())
|
||||
dataObject.failed = std::stoi(valueDataJobDetail["Failed"].asString());
|
||||
if(!valueDataJobDetail["Message"].isNull())
|
||||
dataObject.message = valueDataJobDetail["Message"].asString();
|
||||
if(!valueDataJobDetail["ActiveDeadlineSeconds"].isNull())
|
||||
dataObject.activeDeadlineSeconds = std::stoi(valueDataJobDetail["ActiveDeadlineSeconds"].asString());
|
||||
if(!valueDataJobDetail["BackoffLimit"].isNull())
|
||||
dataObject.backoffLimit = std::stoi(valueDataJobDetail["BackoffLimit"].asString());
|
||||
if(!valueDataJobDetail["Completions"].isNull())
|
||||
dataObject.completions = std::stoi(valueDataJobDetail["Completions"].asString());
|
||||
if(!valueDataJobDetail["Parallelism"].isNull())
|
||||
dataObject.parallelism = std::stoi(valueDataJobDetail["Parallelism"].asString());
|
||||
auto allPodList = value["PodList"]["PodName"];
|
||||
for (auto value : allPodList)
|
||||
dataObject.podList.push_back(value.asString());
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stol(value["TotalCount"].asString());
|
||||
if(!value["ErrorMsg"].isNull())
|
||||
errorMsg_ = value["ErrorMsg"].asString();
|
||||
|
||||
}
|
||||
|
||||
long ListJobHistoriesResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int ListJobHistoriesResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int ListJobHistoriesResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
std::string ListJobHistoriesResult::getErrorMsg()const
|
||||
{
|
||||
return errorMsg_;
|
||||
}
|
||||
|
||||
std::vector<ListJobHistoriesResult::JobDetail> ListJobHistoriesResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
int ListJobHistoriesResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
62
retailcloud/src/model/RebuildAppInstanceRequest.cc
Normal file
62
retailcloud/src/model/RebuildAppInstanceRequest.cc
Normal 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/RebuildAppInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::Retailcloud::Model::RebuildAppInstanceRequest;
|
||||
|
||||
RebuildAppInstanceRequest::RebuildAppInstanceRequest() :
|
||||
RpcServiceRequest("retailcloud", "2018-03-13", "RebuildAppInstance")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RebuildAppInstanceRequest::~RebuildAppInstanceRequest()
|
||||
{}
|
||||
|
||||
long RebuildAppInstanceRequest::getAppId()const
|
||||
{
|
||||
return appId_;
|
||||
}
|
||||
|
||||
void RebuildAppInstanceRequest::setAppId(long appId)
|
||||
{
|
||||
appId_ = appId;
|
||||
setParameter("AppId", std::to_string(appId));
|
||||
}
|
||||
|
||||
long RebuildAppInstanceRequest::getEnvId()const
|
||||
{
|
||||
return envId_;
|
||||
}
|
||||
|
||||
void RebuildAppInstanceRequest::setEnvId(long envId)
|
||||
{
|
||||
envId_ = envId;
|
||||
setParameter("EnvId", std::to_string(envId));
|
||||
}
|
||||
|
||||
std::string RebuildAppInstanceRequest::getAppInstanceId()const
|
||||
{
|
||||
return appInstanceId_;
|
||||
}
|
||||
|
||||
void RebuildAppInstanceRequest::setAppInstanceId(const std::string& appInstanceId)
|
||||
{
|
||||
appInstanceId_ = appInstanceId;
|
||||
setParameter("AppInstanceId", appInstanceId);
|
||||
}
|
||||
|
||||
66
retailcloud/src/model/RebuildAppInstanceResult.cc
Normal file
66
retailcloud/src/model/RebuildAppInstanceResult.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/retailcloud/model/RebuildAppInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Retailcloud;
|
||||
using namespace AlibabaCloud::Retailcloud::Model;
|
||||
|
||||
RebuildAppInstanceResult::RebuildAppInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RebuildAppInstanceResult::RebuildAppInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RebuildAppInstanceResult::~RebuildAppInstanceResult()
|
||||
{}
|
||||
|
||||
void RebuildAppInstanceResult::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 RebuildAppInstanceResult::getErrMsg()const
|
||||
{
|
||||
return errMsg_;
|
||||
}
|
||||
|
||||
int RebuildAppInstanceResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
RebuildAppInstanceResult::Result RebuildAppInstanceResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
@@ -108,6 +108,17 @@ void UpdateDeployConfigRequest::setId(long id)
|
||||
setParameter("Id", std::to_string(id));
|
||||
}
|
||||
|
||||
std::string UpdateDeployConfigRequest::getCronJob()const
|
||||
{
|
||||
return cronJob_;
|
||||
}
|
||||
|
||||
void UpdateDeployConfigRequest::setCronJob(const std::string& cronJob)
|
||||
{
|
||||
cronJob_ = cronJob;
|
||||
setParameter("CronJob", cronJob);
|
||||
}
|
||||
|
||||
std::string UpdateDeployConfigRequest::getDeployment()const
|
||||
{
|
||||
return deployment_;
|
||||
|
||||
Reference in New Issue
Block a user