Support ACR EE, OSS, EIP for deploy.

This commit is contained in:
sdk-team
2021-12-09 08:28:40 +00:00
parent 1d2cdfa39f
commit 6aa3c65c39
89 changed files with 4585 additions and 561 deletions

View File

@@ -375,6 +375,42 @@ SaeClient::CreateConfigMapOutcomeCallable SaeClient::createConfigMapCallable(con
return task->get_future();
}
SaeClient::CreateGreyTagRouteOutcome SaeClient::createGreyTagRoute(const CreateGreyTagRouteRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateGreyTagRouteOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateGreyTagRouteOutcome(CreateGreyTagRouteResult(outcome.result()));
else
return CreateGreyTagRouteOutcome(outcome.error());
}
void SaeClient::createGreyTagRouteAsync(const CreateGreyTagRouteRequest& request, const CreateGreyTagRouteAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createGreyTagRoute(request), context);
};
asyncExecute(new Runnable(fn));
}
SaeClient::CreateGreyTagRouteOutcomeCallable SaeClient::createGreyTagRouteCallable(const CreateGreyTagRouteRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateGreyTagRouteOutcome()>>(
[this, request]()
{
return this->createGreyTagRoute(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SaeClient::CreateIngressOutcome SaeClient::createIngress(const CreateIngressRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -555,6 +591,42 @@ SaeClient::DeleteConfigMapOutcomeCallable SaeClient::deleteConfigMapCallable(con
return task->get_future();
}
SaeClient::DeleteGreyTagRouteOutcome SaeClient::deleteGreyTagRoute(const DeleteGreyTagRouteRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteGreyTagRouteOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteGreyTagRouteOutcome(DeleteGreyTagRouteResult(outcome.result()));
else
return DeleteGreyTagRouteOutcome(outcome.error());
}
void SaeClient::deleteGreyTagRouteAsync(const DeleteGreyTagRouteRequest& request, const DeleteGreyTagRouteAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteGreyTagRoute(request), context);
};
asyncExecute(new Runnable(fn));
}
SaeClient::DeleteGreyTagRouteOutcomeCallable SaeClient::deleteGreyTagRouteCallable(const DeleteGreyTagRouteRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteGreyTagRouteOutcome()>>(
[this, request]()
{
return this->deleteGreyTagRoute(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SaeClient::DeleteIngressOutcome SaeClient::deleteIngress(const DeleteIngressRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -663,6 +735,42 @@ SaeClient::DeployApplicationOutcomeCallable SaeClient::deployApplicationCallable
return task->get_future();
}
SaeClient::DescribeAppServiceDetailOutcome SaeClient::describeAppServiceDetail(const DescribeAppServiceDetailRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeAppServiceDetailOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeAppServiceDetailOutcome(DescribeAppServiceDetailResult(outcome.result()));
else
return DescribeAppServiceDetailOutcome(outcome.error());
}
void SaeClient::describeAppServiceDetailAsync(const DescribeAppServiceDetailRequest& request, const DescribeAppServiceDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeAppServiceDetail(request), context);
};
asyncExecute(new Runnable(fn));
}
SaeClient::DescribeAppServiceDetailOutcomeCallable SaeClient::describeAppServiceDetailCallable(const DescribeAppServiceDetailRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeAppServiceDetailOutcome()>>(
[this, request]()
{
return this->describeAppServiceDetail(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SaeClient::DescribeApplicationConfigOutcome SaeClient::describeApplicationConfig(const DescribeApplicationConfigRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1059,6 +1167,42 @@ SaeClient::DescribeEdasContainersOutcomeCallable SaeClient::describeEdasContaine
return task->get_future();
}
SaeClient::DescribeGreyTagRouteOutcome SaeClient::describeGreyTagRoute(const DescribeGreyTagRouteRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeGreyTagRouteOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeGreyTagRouteOutcome(DescribeGreyTagRouteResult(outcome.result()));
else
return DescribeGreyTagRouteOutcome(outcome.error());
}
void SaeClient::describeGreyTagRouteAsync(const DescribeGreyTagRouteRequest& request, const DescribeGreyTagRouteAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeGreyTagRoute(request), context);
};
asyncExecute(new Runnable(fn));
}
SaeClient::DescribeGreyTagRouteOutcomeCallable SaeClient::describeGreyTagRouteCallable(const DescribeGreyTagRouteRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeGreyTagRouteOutcome()>>(
[this, request]()
{
return this->describeGreyTagRoute(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SaeClient::DescribeIngressOutcome SaeClient::describeIngress(const DescribeIngressRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1419,6 +1563,42 @@ SaeClient::DisableApplicationScalingRuleOutcomeCallable SaeClient::disableApplic
return task->get_future();
}
SaeClient::DownloadFilesOutcome SaeClient::downloadFiles(const DownloadFilesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DownloadFilesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DownloadFilesOutcome(DownloadFilesResult(outcome.result()));
else
return DownloadFilesOutcome(outcome.error());
}
void SaeClient::downloadFilesAsync(const DownloadFilesRequest& request, const DownloadFilesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, downloadFiles(request), context);
};
asyncExecute(new Runnable(fn));
}
SaeClient::DownloadFilesOutcomeCallable SaeClient::downloadFilesCallable(const DownloadFilesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DownloadFilesOutcome()>>(
[this, request]()
{
return this->downloadFiles(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SaeClient::EnableApplicationScalingRuleOutcome SaeClient::enableApplicationScalingRule(const EnableApplicationScalingRuleRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1491,6 +1671,42 @@ SaeClient::ListAppEventsOutcomeCallable SaeClient::listAppEventsCallable(const L
return task->get_future();
}
SaeClient::ListAppServicesPageOutcome SaeClient::listAppServicesPage(const ListAppServicesPageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListAppServicesPageOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListAppServicesPageOutcome(ListAppServicesPageResult(outcome.result()));
else
return ListAppServicesPageOutcome(outcome.error());
}
void SaeClient::listAppServicesPageAsync(const ListAppServicesPageRequest& request, const ListAppServicesPageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listAppServicesPage(request), context);
};
asyncExecute(new Runnable(fn));
}
SaeClient::ListAppServicesPageOutcomeCallable SaeClient::listAppServicesPageCallable(const ListAppServicesPageRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListAppServicesPageOutcome()>>(
[this, request]()
{
return this->listAppServicesPage(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SaeClient::ListAppVersionsOutcome SaeClient::listAppVersions(const ListAppVersionsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1635,6 +1851,42 @@ SaeClient::ListConsumedServicesOutcomeCallable SaeClient::listConsumedServicesCa
return task->get_future();
}
SaeClient::ListGreyTagRouteOutcome SaeClient::listGreyTagRoute(const ListGreyTagRouteRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListGreyTagRouteOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListGreyTagRouteOutcome(ListGreyTagRouteResult(outcome.result()));
else
return ListGreyTagRouteOutcome(outcome.error());
}
void SaeClient::listGreyTagRouteAsync(const ListGreyTagRouteRequest& request, const ListGreyTagRouteAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listGreyTagRoute(request), context);
};
asyncExecute(new Runnable(fn));
}
SaeClient::ListGreyTagRouteOutcomeCallable SaeClient::listGreyTagRouteCallable(const ListGreyTagRouteRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListGreyTagRouteOutcome()>>(
[this, request]()
{
return this->listGreyTagRoute(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SaeClient::ListIngressesOutcome SaeClient::listIngresses(const ListIngressesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1923,6 +2175,42 @@ SaeClient::QueryResourceStaticsOutcomeCallable SaeClient::queryResourceStaticsCa
return task->get_future();
}
SaeClient::ReduceApplicationCapacityByInstanceIdsOutcome SaeClient::reduceApplicationCapacityByInstanceIds(const ReduceApplicationCapacityByInstanceIdsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ReduceApplicationCapacityByInstanceIdsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ReduceApplicationCapacityByInstanceIdsOutcome(ReduceApplicationCapacityByInstanceIdsResult(outcome.result()));
else
return ReduceApplicationCapacityByInstanceIdsOutcome(outcome.error());
}
void SaeClient::reduceApplicationCapacityByInstanceIdsAsync(const ReduceApplicationCapacityByInstanceIdsRequest& request, const ReduceApplicationCapacityByInstanceIdsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, reduceApplicationCapacityByInstanceIds(request), context);
};
asyncExecute(new Runnable(fn));
}
SaeClient::ReduceApplicationCapacityByInstanceIdsOutcomeCallable SaeClient::reduceApplicationCapacityByInstanceIdsCallable(const ReduceApplicationCapacityByInstanceIdsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ReduceApplicationCapacityByInstanceIdsOutcome()>>(
[this, request]()
{
return this->reduceApplicationCapacityByInstanceIds(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SaeClient::RescaleApplicationOutcome SaeClient::rescaleApplication(const RescaleApplicationRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2391,6 +2679,42 @@ SaeClient::UpdateConfigMapOutcomeCallable SaeClient::updateConfigMapCallable(con
return task->get_future();
}
SaeClient::UpdateGreyTagRouteOutcome SaeClient::updateGreyTagRoute(const UpdateGreyTagRouteRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateGreyTagRouteOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateGreyTagRouteOutcome(UpdateGreyTagRouteResult(outcome.result()));
else
return UpdateGreyTagRouteOutcome(outcome.error());
}
void SaeClient::updateGreyTagRouteAsync(const UpdateGreyTagRouteRequest& request, const UpdateGreyTagRouteAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateGreyTagRoute(request), context);
};
asyncExecute(new Runnable(fn));
}
SaeClient::UpdateGreyTagRouteOutcomeCallable SaeClient::updateGreyTagRouteCallable(const UpdateGreyTagRouteRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateGreyTagRouteOutcome()>>(
[this, request]()
{
return this->updateGreyTagRoute(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SaeClient::UpdateIngressOutcome SaeClient::updateIngress(const UpdateIngressRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2499,3 +2823,39 @@ SaeClient::UpdateNamespaceVpcOutcomeCallable SaeClient::updateNamespaceVpcCallab
return task->get_future();
}
SaeClient::UploadFilesOutcome SaeClient::uploadFiles(const UploadFilesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UploadFilesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UploadFilesOutcome(UploadFilesResult(outcome.result()));
else
return UploadFilesOutcome(outcome.error());
}
void SaeClient::uploadFilesAsync(const UploadFilesRequest& request, const UploadFilesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, uploadFiles(request), context);
};
asyncExecute(new Runnable(fn));
}
SaeClient::UploadFilesOutcomeCallable SaeClient::uploadFilesCallable(const UploadFilesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UploadFilesOutcome()>>(
[this, request]()
{
return this->uploadFiles(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -39,17 +39,6 @@ void CreateApplicationRequest::setNasId(const std::string& nasId)
setParameter("NasId", nasId);
}
std::string CreateApplicationRequest::getWebContainer()const
{
return webContainer_;
}
void CreateApplicationRequest::setWebContainer(const std::string& webContainer)
{
webContainer_ = webContainer;
setParameter("WebContainer", webContainer);
}
std::string CreateApplicationRequest::getJarStartArgs()const
{
return jarStartArgs_;
@@ -61,6 +50,237 @@ void CreateApplicationRequest::setJarStartArgs(const std::string& jarStartArgs)
setParameter("JarStartArgs", jarStartArgs);
}
std::string CreateApplicationRequest::getOssAkSecret()const
{
return ossAkSecret_;
}
void CreateApplicationRequest::setOssAkSecret(const std::string& ossAkSecret)
{
ossAkSecret_ = ossAkSecret;
setBodyParameter("OssAkSecret", ossAkSecret);
}
std::string CreateApplicationRequest::getMountHost()const
{
return mountHost_;
}
void CreateApplicationRequest::setMountHost(const std::string& mountHost)
{
mountHost_ = mountHost;
setParameter("MountHost", mountHost);
}
bool CreateApplicationRequest::getAutoConfig()const
{
return autoConfig_;
}
void CreateApplicationRequest::setAutoConfig(bool autoConfig)
{
autoConfig_ = autoConfig;
setParameter("AutoConfig", autoConfig ? "true" : "false");
}
std::string CreateApplicationRequest::getEnvs()const
{
return envs_;
}
void CreateApplicationRequest::setEnvs(const std::string& envs)
{
envs_ = envs;
setParameter("Envs", envs);
}
std::string CreateApplicationRequest::getPhpPECLExtensions()const
{
return phpPECLExtensions_;
}
void CreateApplicationRequest::setPhpPECLExtensions(const std::string& phpPECLExtensions)
{
phpPECLExtensions_ = phpPECLExtensions;
setBodyParameter("PhpPECLExtensions", phpPECLExtensions);
}
std::string CreateApplicationRequest::getPhpArmsConfigLocation()const
{
return phpArmsConfigLocation_;
}
void CreateApplicationRequest::setPhpArmsConfigLocation(const std::string& phpArmsConfigLocation)
{
phpArmsConfigLocation_ = phpArmsConfigLocation;
setParameter("PhpArmsConfigLocation", phpArmsConfigLocation);
}
std::string CreateApplicationRequest::getCustomHostAlias()const
{
return customHostAlias_;
}
void CreateApplicationRequest::setCustomHostAlias(const std::string& customHostAlias)
{
customHostAlias_ = customHostAlias;
setParameter("CustomHostAlias", customHostAlias);
}
bool CreateApplicationRequest::getDeploy()const
{
return deploy_;
}
void CreateApplicationRequest::setDeploy(bool deploy)
{
deploy_ = deploy;
setParameter("Deploy", deploy ? "true" : "false");
}
std::string CreateApplicationRequest::getJarStartOptions()const
{
return jarStartOptions_;
}
void CreateApplicationRequest::setJarStartOptions(const std::string& jarStartOptions)
{
jarStartOptions_ = jarStartOptions;
setParameter("JarStartOptions", jarStartOptions);
}
std::string CreateApplicationRequest::getAppName()const
{
return appName_;
}
void CreateApplicationRequest::setAppName(const std::string& appName)
{
appName_ = appName;
setParameter("AppName", appName);
}
std::string CreateApplicationRequest::getNamespaceId()const
{
return namespaceId_;
}
void CreateApplicationRequest::setNamespaceId(const std::string& namespaceId)
{
namespaceId_ = namespaceId;
setParameter("NamespaceId", namespaceId);
}
std::string CreateApplicationRequest::getConfigMapMountDesc()const
{
return configMapMountDesc_;
}
void CreateApplicationRequest::setConfigMapMountDesc(const std::string& configMapMountDesc)
{
configMapMountDesc_ = configMapMountDesc;
setBodyParameter("ConfigMapMountDesc", configMapMountDesc);
}
std::string CreateApplicationRequest::getOssMountDescs()const
{
return ossMountDescs_;
}
void CreateApplicationRequest::setOssMountDescs(const std::string& ossMountDescs)
{
ossMountDescs_ = ossMountDescs;
setBodyParameter("OssMountDescs", ossMountDescs);
}
std::string CreateApplicationRequest::getPreStop()const
{
return preStop_;
}
void CreateApplicationRequest::setPreStop(const std::string& preStop)
{
preStop_ = preStop;
setParameter("PreStop", preStop);
}
int CreateApplicationRequest::getCpu()const
{
return cpu_;
}
void CreateApplicationRequest::setCpu(int cpu)
{
cpu_ = cpu;
setParameter("Cpu", std::to_string(cpu));
}
std::string CreateApplicationRequest::getVSwitchId()const
{
return vSwitchId_;
}
void CreateApplicationRequest::setVSwitchId(const std::string& vSwitchId)
{
vSwitchId_ = vSwitchId;
setParameter("VSwitchId", vSwitchId);
}
std::string CreateApplicationRequest::getPackageType()const
{
return packageType_;
}
void CreateApplicationRequest::setPackageType(const std::string& packageType)
{
packageType_ = packageType;
setParameter("PackageType", packageType);
}
std::string CreateApplicationRequest::getPostStart()const
{
return postStart_;
}
void CreateApplicationRequest::setPostStart(const std::string& postStart)
{
postStart_ = postStart;
setParameter("PostStart", postStart);
}
std::string CreateApplicationRequest::getPhpExtensions()const
{
return phpExtensions_;
}
void CreateApplicationRequest::setPhpExtensions(const std::string& phpExtensions)
{
phpExtensions_ = phpExtensions;
setBodyParameter("PhpExtensions", phpExtensions);
}
bool CreateApplicationRequest::getAssociateEip()const
{
return associateEip_;
}
void CreateApplicationRequest::setAssociateEip(bool associateEip)
{
associateEip_ = associateEip;
setBodyParameter("AssociateEip", associateEip ? "true" : "false");
}
std::string CreateApplicationRequest::getWebContainer()const
{
return webContainer_;
}
void CreateApplicationRequest::setWebContainer(const std::string& webContainer)
{
webContainer_ = webContainer;
setParameter("WebContainer", webContainer);
}
int CreateApplicationRequest::getMemory()const
{
return memory_;
@@ -127,26 +347,15 @@ void CreateApplicationRequest::setTimezone(const std::string& timezone)
setParameter("Timezone", timezone);
}
std::string CreateApplicationRequest::getMountHost()const
std::string CreateApplicationRequest::getOssAkId()const
{
return mountHost_;
return ossAkId_;
}
void CreateApplicationRequest::setMountHost(const std::string& mountHost)
void CreateApplicationRequest::setOssAkId(const std::string& ossAkId)
{
mountHost_ = mountHost;
setParameter("MountHost", mountHost);
}
bool CreateApplicationRequest::getAutoConfig()const
{
return autoConfig_;
}
void CreateApplicationRequest::setAutoConfig(bool autoConfig)
{
autoConfig_ = autoConfig;
setParameter("AutoConfig", autoConfig ? "true" : "false");
ossAkId_ = ossAkId;
setBodyParameter("OssAkId", ossAkId);
}
std::string CreateApplicationRequest::getLiveness()const
@@ -171,28 +380,6 @@ void CreateApplicationRequest::setSecurityGroupId(const std::string& securityGro
setParameter("SecurityGroupId", securityGroupId);
}
std::string CreateApplicationRequest::getEnvs()const
{
return envs_;
}
void CreateApplicationRequest::setEnvs(const std::string& envs)
{
envs_ = envs;
setParameter("Envs", envs);
}
std::string CreateApplicationRequest::getPhpArmsConfigLocation()const
{
return phpArmsConfigLocation_;
}
void CreateApplicationRequest::setPhpArmsConfigLocation(const std::string& phpArmsConfigLocation)
{
phpArmsConfigLocation_ = phpArmsConfigLocation;
setParameter("PhpArmsConfigLocation", phpArmsConfigLocation);
}
std::string CreateApplicationRequest::getPackageVersion()const
{
return packageVersion_;
@@ -215,28 +402,6 @@ void CreateApplicationRequest::setTomcatConfig(const std::string& tomcatConfig)
setParameter("TomcatConfig", tomcatConfig);
}
std::string CreateApplicationRequest::getCustomHostAlias()const
{
return customHostAlias_;
}
void CreateApplicationRequest::setCustomHostAlias(const std::string& customHostAlias)
{
customHostAlias_ = customHostAlias;
setParameter("CustomHostAlias", customHostAlias);
}
bool CreateApplicationRequest::getDeploy()const
{
return deploy_;
}
void CreateApplicationRequest::setDeploy(bool deploy)
{
deploy_ = deploy;
setParameter("Deploy", deploy ? "true" : "false");
}
std::string CreateApplicationRequest::getWarStartOptions()const
{
return warStartOptions_;
@@ -248,17 +413,6 @@ void CreateApplicationRequest::setWarStartOptions(const std::string& warStartOpt
setParameter("WarStartOptions", warStartOptions);
}
std::string CreateApplicationRequest::getJarStartOptions()const
{
return jarStartOptions_;
}
void CreateApplicationRequest::setJarStartOptions(const std::string& jarStartOptions)
{
jarStartOptions_ = jarStartOptions;
setParameter("JarStartOptions", jarStartOptions);
}
std::string CreateApplicationRequest::getEdasContainerVersion()const
{
return edasContainerVersion_;
@@ -270,28 +424,6 @@ void CreateApplicationRequest::setEdasContainerVersion(const std::string& edasCo
setParameter("EdasContainerVersion", edasContainerVersion);
}
std::string CreateApplicationRequest::getAppName()const
{
return appName_;
}
void CreateApplicationRequest::setAppName(const std::string& appName)
{
appName_ = appName;
setParameter("AppName", appName);
}
std::string CreateApplicationRequest::getNamespaceId()const
{
return namespaceId_;
}
void CreateApplicationRequest::setNamespaceId(const std::string& namespaceId)
{
namespaceId_ = namespaceId;
setParameter("NamespaceId", namespaceId);
}
std::string CreateApplicationRequest::getPackageUrl()const
{
return packageUrl_;
@@ -314,17 +446,6 @@ void CreateApplicationRequest::setTerminationGracePeriodSeconds(int terminationG
setParameter("TerminationGracePeriodSeconds", std::to_string(terminationGracePeriodSeconds));
}
std::string CreateApplicationRequest::getConfigMapMountDesc()const
{
return configMapMountDesc_;
}
void CreateApplicationRequest::setConfigMapMountDesc(const std::string& configMapMountDesc)
{
configMapMountDesc_ = configMapMountDesc;
setBodyParameter("ConfigMapMountDesc", configMapMountDesc);
}
std::string CreateApplicationRequest::getPhpConfig()const
{
return phpConfig_;
@@ -336,17 +457,6 @@ void CreateApplicationRequest::setPhpConfig(const std::string& phpConfig)
setBodyParameter("PhpConfig", phpConfig);
}
std::string CreateApplicationRequest::getPreStop()const
{
return preStop_;
}
void CreateApplicationRequest::setPreStop(const std::string& preStop)
{
preStop_ = preStop;
setParameter("PreStop", preStop);
}
int CreateApplicationRequest::getReplicas()const
{
return replicas_;
@@ -358,17 +468,6 @@ void CreateApplicationRequest::setReplicas(int replicas)
setParameter("Replicas", std::to_string(replicas));
}
int CreateApplicationRequest::getCpu()const
{
return cpu_;
}
void CreateApplicationRequest::setCpu(int cpu)
{
cpu_ = cpu;
setParameter("Cpu", std::to_string(cpu));
}
std::string CreateApplicationRequest::getCommand()const
{
return command_;
@@ -391,17 +490,6 @@ void CreateApplicationRequest::setMountDesc(const std::string& mountDesc)
setParameter("MountDesc", mountDesc);
}
std::string CreateApplicationRequest::getVSwitchId()const
{
return vSwitchId_;
}
void CreateApplicationRequest::setVSwitchId(const std::string& vSwitchId)
{
vSwitchId_ = vSwitchId;
setParameter("VSwitchId", vSwitchId);
}
std::string CreateApplicationRequest::getJdk()const
{
return jdk_;
@@ -424,6 +512,17 @@ void CreateApplicationRequest::setAppDescription(const std::string& appDescripti
setParameter("AppDescription", appDescription);
}
std::string CreateApplicationRequest::getAcrInstanceId()const
{
return acrInstanceId_;
}
void CreateApplicationRequest::setAcrInstanceId(const std::string& acrInstanceId)
{
acrInstanceId_ = acrInstanceId;
setBodyParameter("AcrInstanceId", acrInstanceId);
}
std::string CreateApplicationRequest::getVpcId()const
{
return vpcId_;
@@ -446,15 +545,15 @@ void CreateApplicationRequest::setImageUrl(const std::string& imageUrl)
setParameter("ImageUrl", imageUrl);
}
std::string CreateApplicationRequest::getPackageType()const
std::string CreateApplicationRequest::getPhp()const
{
return packageType_;
return php_;
}
void CreateApplicationRequest::setPackageType(const std::string& packageType)
void CreateApplicationRequest::setPhp(const std::string& php)
{
packageType_ = packageType;
setParameter("PackageType", packageType);
php_ = php;
setBodyParameter("Php", php);
}
std::string CreateApplicationRequest::getPhpConfigLocation()const
@@ -468,14 +567,3 @@ void CreateApplicationRequest::setPhpConfigLocation(const std::string& phpConfig
setParameter("PhpConfigLocation", phpConfigLocation);
}
std::string CreateApplicationRequest::getPostStart()const
{
return postStart_;
}
void CreateApplicationRequest::setPostStart(const std::string& postStart)
{
postStart_ = postStart;
setParameter("PostStart", postStart);
}

View File

@@ -40,10 +40,10 @@ void CreateApplicationResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["AppId"].isNull())
data_.appId = dataNode["AppId"].asString();
if(!dataNode["ChangeOrderId"].isNull())
data_.changeOrderId = dataNode["ChangeOrderId"].asString();
if(!dataNode["AppId"].isNull())
data_.appId = dataNode["AppId"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["TraceId"].isNull())

View File

@@ -50,6 +50,17 @@ void CreateApplicationScalingRuleRequest::setMinReadyInstances(const std::string
setParameter("MinReadyInstances", minReadyInstances);
}
bool CreateApplicationScalingRuleRequest::getScalingRuleEnable()const
{
return scalingRuleEnable_;
}
void CreateApplicationScalingRuleRequest::setScalingRuleEnable(bool scalingRuleEnable)
{
scalingRuleEnable_ = scalingRuleEnable;
setParameter("ScalingRuleEnable", scalingRuleEnable ? "true" : "false");
}
std::string CreateApplicationScalingRuleRequest::getScalingRuleTimer()const
{
return scalingRuleTimer_;

View File

@@ -40,50 +40,50 @@ void CreateApplicationScalingRuleResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["ScaleRuleEnabled"].isNull())
data_.scaleRuleEnabled = dataNode["ScaleRuleEnabled"].asString() == "true";
if(!dataNode["LastDisableTime"].isNull())
data_.lastDisableTime = std::stol(dataNode["LastDisableTime"].asString());
if(!dataNode["UpdateTime"].isNull())
data_.updateTime = std::stol(dataNode["UpdateTime"].asString());
if(!dataNode["AppId"].isNull())
data_.appId = dataNode["AppId"].asString();
if(!dataNode["CreateTime"].isNull())
data_.createTime = std::stol(dataNode["CreateTime"].asString());
if(!dataNode["UpdateTime"].isNull())
data_.updateTime = std::stol(dataNode["UpdateTime"].asString());
if(!dataNode["ScaleRuleName"].isNull())
data_.scaleRuleName = dataNode["ScaleRuleName"].asString();
if(!dataNode["LastDisableTime"].isNull())
data_.lastDisableTime = std::stol(dataNode["LastDisableTime"].asString());
if(!dataNode["ScaleRuleEnabled"].isNull())
data_.scaleRuleEnabled = dataNode["ScaleRuleEnabled"].asString() == "true";
if(!dataNode["ScaleRuleType"].isNull())
data_.scaleRuleType = dataNode["ScaleRuleType"].asString();
if(!dataNode["ScaleRuleName"].isNull())
data_.scaleRuleName = dataNode["ScaleRuleName"].asString();
auto timerNode = dataNode["Timer"];
if(!timerNode["Period"].isNull())
data_.timer.period = timerNode["Period"].asString();
if(!timerNode["EndDate"].isNull())
data_.timer.endDate = timerNode["EndDate"].asString();
if(!timerNode["BeginDate"].isNull())
data_.timer.beginDate = timerNode["BeginDate"].asString();
if(!timerNode["Period"].isNull())
data_.timer.period = timerNode["Period"].asString();
auto allSchedulesNode = timerNode["Schedules"]["Schedule"];
for (auto timerNodeSchedulesSchedule : allSchedulesNode)
{
Data::Timer::Schedule scheduleObject;
if(!timerNodeSchedulesSchedule["TargetReplicas"].isNull())
scheduleObject.targetReplicas = std::stoi(timerNodeSchedulesSchedule["TargetReplicas"].asString());
if(!timerNodeSchedulesSchedule["AtTime"].isNull())
scheduleObject.atTime = timerNodeSchedulesSchedule["AtTime"].asString();
if(!timerNodeSchedulesSchedule["TargetReplicas"].isNull())
scheduleObject.targetReplicas = std::stoi(timerNodeSchedulesSchedule["TargetReplicas"].asString());
data_.timer.schedules.push_back(scheduleObject);
}
auto metricNode = dataNode["Metric"];
if(!metricNode["MinReplicas"].isNull())
data_.metric.minReplicas = std::stoi(metricNode["MinReplicas"].asString());
if(!metricNode["MaxReplicas"].isNull())
data_.metric.maxReplicas = std::stoi(metricNode["MaxReplicas"].asString());
if(!metricNode["MinReplicas"].isNull())
data_.metric.minReplicas = std::stoi(metricNode["MinReplicas"].asString());
auto allMetricsNode = metricNode["Metrics"]["Metric"];
for (auto metricNodeMetricsMetric : allMetricsNode)
{
Data::Metric::Metric1 metric1Object;
if(!metricNodeMetricsMetric["MetricType"].isNull())
metric1Object.metricType = metricNodeMetricsMetric["MetricType"].asString();
if(!metricNodeMetricsMetric["MetricTargetAverageUtilization"].isNull())
metric1Object.metricTargetAverageUtilization = std::stoi(metricNodeMetricsMetric["MetricTargetAverageUtilization"].asString());
if(!metricNodeMetricsMetric["MetricType"].isNull())
metric1Object.metricType = metricNodeMetricsMetric["MetricType"].asString();
data_.metric.metrics.push_back(metric1Object);
}
if(!value["TraceId"].isNull())

View File

@@ -42,14 +42,14 @@ void CreateConfigMapResult::parse(const std::string &payload)
auto dataNode = value["Data"];
if(!dataNode["ConfigMapId"].isNull())
data_.configMapId = std::stol(dataNode["ConfigMapId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["TraceId"].isNull())
traceId_ = value["TraceId"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";

View File

@@ -0,0 +1,85 @@
/*
* 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/sae/model/CreateGreyTagRouteRequest.h>
using AlibabaCloud::Sae::Model::CreateGreyTagRouteRequest;
CreateGreyTagRouteRequest::CreateGreyTagRouteRequest() :
RoaServiceRequest("sae", "2019-05-06")
{
setResourcePath("/pop/v1/sam/tagroute/greyTagRoute");
setMethod(HttpRequest::Method::Post);
}
CreateGreyTagRouteRequest::~CreateGreyTagRouteRequest()
{}
std::string CreateGreyTagRouteRequest::getAppId()const
{
return appId_;
}
void CreateGreyTagRouteRequest::setAppId(const std::string& appId)
{
appId_ = appId;
setParameter("AppId", appId);
}
std::string CreateGreyTagRouteRequest::getName()const
{
return name_;
}
void CreateGreyTagRouteRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
std::string CreateGreyTagRouteRequest::getDescription()const
{
return description_;
}
void CreateGreyTagRouteRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
std::string CreateGreyTagRouteRequest::getDubboRules()const
{
return dubboRules_;
}
void CreateGreyTagRouteRequest::setDubboRules(const std::string& dubboRules)
{
dubboRules_ = dubboRules;
setParameter("DubboRules", dubboRules);
}
std::string CreateGreyTagRouteRequest::getScRules()const
{
return scRules_;
}
void CreateGreyTagRouteRequest::setScRules(const std::string& scRules)
{
scRules_ = scRules;
setParameter("ScRules", scRules);
}

View File

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

View File

@@ -40,24 +40,24 @@ void CreateNamespaceResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["RegionId"].isNull())
data_.regionId = dataNode["RegionId"].asString();
if(!dataNode["NamespaceDescription"].isNull())
data_.namespaceDescription = dataNode["NamespaceDescription"].asString();
if(!dataNode["NamespaceId"].isNull())
data_.namespaceId = dataNode["NamespaceId"].asString();
if(!dataNode["NamespaceName"].isNull())
data_.namespaceName = dataNode["NamespaceName"].asString();
if(!dataNode["NamespaceDescription"].isNull())
data_.namespaceDescription = dataNode["NamespaceDescription"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!dataNode["RegionId"].isNull())
data_.regionId = dataNode["RegionId"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["TraceId"].isNull())
traceId_ = value["TraceId"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}

View File

@@ -0,0 +1,41 @@
/*
* 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/sae/model/DeleteGreyTagRouteRequest.h>
using AlibabaCloud::Sae::Model::DeleteGreyTagRouteRequest;
DeleteGreyTagRouteRequest::DeleteGreyTagRouteRequest() :
RoaServiceRequest("sae", "2019-05-06")
{
setResourcePath("/pop/v1/sam/tagroute/greyTagRoute");
setMethod(HttpRequest::Method::Delete);
}
DeleteGreyTagRouteRequest::~DeleteGreyTagRouteRequest()
{}
long DeleteGreyTagRouteRequest::getGreyTagRouteId()const
{
return greyTagRouteId_;
}
void DeleteGreyTagRouteRequest::setGreyTagRouteId(long greyTagRouteId)
{
greyTagRouteId_ = greyTagRouteId;
setParameter("GreyTagRouteId", std::to_string(greyTagRouteId));
}

View File

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

View File

@@ -42,16 +42,16 @@ void DeleteIngressResult::parse(const std::string &payload)
auto dataNode = value["Data"];
if(!dataNode["IngressId"].isNull())
data_.ingressId = std::stol(dataNode["IngressId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["TraceId"].isNull())
traceId_ = value["TraceId"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}

View File

@@ -39,16 +39,16 @@ void DeleteNamespaceResult::parse(const std::string &payload)
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["TraceId"].isNull())
traceId_ = value["TraceId"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}

View File

@@ -83,6 +83,17 @@ void DeployApplicationRequest::setSlsConfigs(const std::string& slsConfigs)
setParameter("SlsConfigs", slsConfigs);
}
std::string DeployApplicationRequest::getOssAkSecret()const
{
return ossAkSecret_;
}
void DeployApplicationRequest::setOssAkSecret(const std::string& ossAkSecret)
{
ossAkSecret_ = ossAkSecret;
setBodyParameter("OssAkSecret", ossAkSecret);
}
std::string DeployApplicationRequest::getCommandArgs()const
{
return commandArgs_;
@@ -149,6 +160,17 @@ void DeployApplicationRequest::setBatchWaitTime(int batchWaitTime)
setParameter("BatchWaitTime", std::to_string(batchWaitTime));
}
std::string DeployApplicationRequest::getOssAkId()const
{
return ossAkId_;
}
void DeployApplicationRequest::setOssAkId(const std::string& ossAkId)
{
ossAkId_ = ossAkId;
setBodyParameter("OssAkId", ossAkId);
}
std::string DeployApplicationRequest::getLiveness()const
{
return liveness_;
@@ -171,6 +193,17 @@ void DeployApplicationRequest::setEnvs(const std::string& envs)
setParameter("Envs", envs);
}
std::string DeployApplicationRequest::getPhpPECLExtensions()const
{
return phpPECLExtensions_;
}
void DeployApplicationRequest::setPhpPECLExtensions(const std::string& phpPECLExtensions)
{
phpPECLExtensions_ = phpPECLExtensions;
setBodyParameter("PhpPECLExtensions", phpPECLExtensions);
}
std::string DeployApplicationRequest::getPhpArmsConfigLocation()const
{
return phpArmsConfigLocation_;
@@ -281,6 +314,17 @@ void DeployApplicationRequest::setConfigMapMountDesc(const std::string& configMa
setBodyParameter("ConfigMapMountDesc", configMapMountDesc);
}
std::string DeployApplicationRequest::getOssMountDescs()const
{
return ossMountDescs_;
}
void DeployApplicationRequest::setOssMountDescs(const std::string& ossMountDescs)
{
ossMountDescs_ = ossMountDescs;
setBodyParameter("OssMountDescs", ossMountDescs);
}
std::string DeployApplicationRequest::getPhpConfig()const
{
return phpConfig_;
@@ -303,6 +347,17 @@ void DeployApplicationRequest::setPreStop(const std::string& preStop)
setParameter("PreStop", preStop);
}
bool DeployApplicationRequest::getEnableGreyTagRoute()const
{
return enableGreyTagRoute_;
}
void DeployApplicationRequest::setEnableGreyTagRoute(bool enableGreyTagRoute)
{
enableGreyTagRoute_ = enableGreyTagRoute;
setParameter("EnableGreyTagRoute", enableGreyTagRoute ? "true" : "false");
}
std::string DeployApplicationRequest::getCommand()const
{
return command_;
@@ -369,6 +424,17 @@ void DeployApplicationRequest::setChangeOrderDesc(const std::string& changeOrder
setParameter("ChangeOrderDesc", changeOrderDesc);
}
std::string DeployApplicationRequest::getAcrInstanceId()const
{
return acrInstanceId_;
}
void DeployApplicationRequest::setAcrInstanceId(const std::string& acrInstanceId)
{
acrInstanceId_ = acrInstanceId;
setBodyParameter("AcrInstanceId", acrInstanceId);
}
std::string DeployApplicationRequest::getAppId()const
{
return appId_;
@@ -391,6 +457,17 @@ void DeployApplicationRequest::setImageUrl(const std::string& imageUrl)
setParameter("ImageUrl", imageUrl);
}
std::string DeployApplicationRequest::getPhp()const
{
return php_;
}
void DeployApplicationRequest::setPhp(const std::string& php)
{
php_ = php;
setBodyParameter("Php", php);
}
bool DeployApplicationRequest::getAutoEnableApplicationScalingRule()const
{
return autoEnableApplicationScalingRule_;
@@ -424,3 +501,25 @@ void DeployApplicationRequest::setPostStart(const std::string& postStart)
setParameter("PostStart", postStart);
}
std::string DeployApplicationRequest::getPhpExtensions()const
{
return phpExtensions_;
}
void DeployApplicationRequest::setPhpExtensions(const std::string& phpExtensions)
{
phpExtensions_ = phpExtensions;
setBodyParameter("PhpExtensions", phpExtensions);
}
bool DeployApplicationRequest::getAssociateEip()const
{
return associateEip_;
}
void DeployApplicationRequest::setAssociateEip(bool associateEip)
{
associateEip_ = associateEip;
setBodyParameter("AssociateEip", associateEip ? "true" : "false");
}

View File

@@ -40,10 +40,12 @@ void DeployApplicationResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["AppId"].isNull())
data_.appId = dataNode["AppId"].asString();
if(!dataNode["ChangeOrderId"].isNull())
data_.changeOrderId = dataNode["ChangeOrderId"].asString();
if(!dataNode["AppId"].isNull())
data_.appId = dataNode["AppId"].asString();
if(!dataNode["IsNeedApproval"].isNull())
data_.isNeedApproval = dataNode["IsNeedApproval"].asString() == "true";
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["TraceId"].isNull())

View File

@@ -0,0 +1,85 @@
/*
* 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/sae/model/DescribeAppServiceDetailRequest.h>
using AlibabaCloud::Sae::Model::DescribeAppServiceDetailRequest;
DescribeAppServiceDetailRequest::DescribeAppServiceDetailRequest() :
RoaServiceRequest("sae", "2019-05-06")
{
setResourcePath("/pop/v1/sam/service/describeAppServiceDetail");
setMethod(HttpRequest::Method::Get);
}
DescribeAppServiceDetailRequest::~DescribeAppServiceDetailRequest()
{}
std::string DescribeAppServiceDetailRequest::getServiceType()const
{
return serviceType_;
}
void DescribeAppServiceDetailRequest::setServiceType(const std::string& serviceType)
{
serviceType_ = serviceType;
setParameter("ServiceType", serviceType);
}
std::string DescribeAppServiceDetailRequest::getAppId()const
{
return appId_;
}
void DescribeAppServiceDetailRequest::setAppId(const std::string& appId)
{
appId_ = appId;
setParameter("AppId", appId);
}
std::string DescribeAppServiceDetailRequest::getServiceVersion()const
{
return serviceVersion_;
}
void DescribeAppServiceDetailRequest::setServiceVersion(const std::string& serviceVersion)
{
serviceVersion_ = serviceVersion;
setParameter("ServiceVersion", serviceVersion);
}
std::string DescribeAppServiceDetailRequest::getServiceName()const
{
return serviceName_;
}
void DescribeAppServiceDetailRequest::setServiceName(const std::string& serviceName)
{
serviceName_ = serviceName;
setParameter("ServiceName", serviceName);
}
std::string DescribeAppServiceDetailRequest::getServiceGroup()const
{
return serviceGroup_;
}
void DescribeAppServiceDetailRequest::setServiceGroup(const std::string& serviceGroup)
{
serviceGroup_ = serviceGroup;
setParameter("ServiceGroup", serviceGroup);
}

View File

@@ -0,0 +1,141 @@
/*
* 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/sae/model/DescribeAppServiceDetailResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Sae;
using namespace AlibabaCloud::Sae::Model;
DescribeAppServiceDetailResult::DescribeAppServiceDetailResult() :
ServiceResult()
{}
DescribeAppServiceDetailResult::DescribeAppServiceDetailResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeAppServiceDetailResult::~DescribeAppServiceDetailResult()
{}
void DescribeAppServiceDetailResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Group"].isNull())
data_.group = dataNode["Group"].asString();
if(!dataNode["ServiceName"].isNull())
data_.serviceName = dataNode["ServiceName"].asString();
if(!dataNode["Version"].isNull())
data_.version = dataNode["Version"].asString();
if(!dataNode["ServiceType"].isNull())
data_.serviceType = dataNode["ServiceType"].asString();
if(!dataNode["EdasAppName"].isNull())
data_.edasAppName = dataNode["EdasAppName"].asString();
if(!dataNode["Metadata"].isNull())
data_.metadata = dataNode["Metadata"].asString();
if(!dataNode["SpringApplicationName"].isNull())
data_.springApplicationName = dataNode["SpringApplicationName"].asString();
if(!dataNode["DubboApplicationName"].isNull())
data_.dubboApplicationName = dataNode["DubboApplicationName"].asString();
auto allMethodsNode = dataNode["Methods"]["Method"];
for (auto dataNodeMethodsMethod : allMethodsNode)
{
Data::Method methodObject;
if(!dataNodeMethodsMethod["MethodController"].isNull())
methodObject.methodController = dataNodeMethodsMethod["MethodController"].asString();
if(!dataNodeMethodsMethod["ReturnType"].isNull())
methodObject.returnType = dataNodeMethodsMethod["ReturnType"].asString();
if(!dataNodeMethodsMethod["ReturnDetails"].isNull())
methodObject.returnDetails = dataNodeMethodsMethod["ReturnDetails"].asString();
if(!dataNodeMethodsMethod["Name"].isNull())
methodObject.name = dataNodeMethodsMethod["Name"].asString();
if(!dataNodeMethodsMethod["NameDetail"].isNull())
methodObject.nameDetail = dataNodeMethodsMethod["NameDetail"].asString();
auto allParameterDefinitionsNode = dataNodeMethodsMethod["ParameterDefinitions"]["ParameterDefinition"];
for (auto dataNodeMethodsMethodParameterDefinitionsParameterDefinition : allParameterDefinitionsNode)
{
Data::Method::ParameterDefinition parameterDefinitionsObject;
if(!dataNodeMethodsMethodParameterDefinitionsParameterDefinition["Type"].isNull())
parameterDefinitionsObject.type = dataNodeMethodsMethodParameterDefinitionsParameterDefinition["Type"].asString();
if(!dataNodeMethodsMethodParameterDefinitionsParameterDefinition["Description"].isNull())
parameterDefinitionsObject.description = dataNodeMethodsMethodParameterDefinitionsParameterDefinition["Description"].asString();
if(!dataNodeMethodsMethodParameterDefinitionsParameterDefinition["Name"].isNull())
parameterDefinitionsObject.name = dataNodeMethodsMethodParameterDefinitionsParameterDefinition["Name"].asString();
methodObject.parameterDefinitions.push_back(parameterDefinitionsObject);
}
auto allParameterDetails = value["ParameterDetails"]["ParameterDetail"];
for (auto value : allParameterDetails)
methodObject.parameterDetails.push_back(value.asString());
auto allRequestMethods = value["RequestMethods"]["RequestMethod"];
for (auto value : allRequestMethods)
methodObject.requestMethods.push_back(value.asString());
auto allParameterTypes = value["ParameterTypes"]["ParameterType"];
for (auto value : allParameterTypes)
methodObject.parameterTypes.push_back(value.asString());
auto allPaths = value["Paths"]["Path"];
for (auto value : allPaths)
methodObject.paths.push_back(value.asString());
data_.methods.push_back(methodObject);
}
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["TraceId"].isNull())
traceId_ = value["TraceId"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string DescribeAppServiceDetailResult::getMessage()const
{
return message_;
}
std::string DescribeAppServiceDetailResult::getTraceId()const
{
return traceId_;
}
DescribeAppServiceDetailResult::Data DescribeAppServiceDetailResult::getData()const
{
return data_;
}
std::string DescribeAppServiceDetailResult::getErrorCode()const
{
return errorCode_;
}
std::string DescribeAppServiceDetailResult::getCode()const
{
return code_;
}
bool DescribeAppServiceDetailResult::getSuccess()const
{
return success_;
}

View File

@@ -40,90 +40,134 @@ void DescribeApplicationConfigResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Timezone"].isNull())
data_.timezone = dataNode["Timezone"].asString();
if(!dataNode["AppDescription"].isNull())
data_.appDescription = dataNode["AppDescription"].asString();
if(!dataNode["PhpConfig"].isNull())
data_.phpConfig = dataNode["PhpConfig"].asString();
if(!dataNode["NasId"].isNull())
data_.nasId = dataNode["NasId"].asString();
if(!dataNode["WarStartOptions"].isNull())
data_.warStartOptions = dataNode["WarStartOptions"].asString();
if(!dataNode["Liveness"].isNull())
data_.liveness = dataNode["Liveness"].asString();
if(!dataNode["Memory"].isNull())
data_.memory = std::stoi(dataNode["Memory"].asString());
if(!dataNode["WebContainer"].isNull())
data_.webContainer = dataNode["WebContainer"].asString();
if(!dataNode["SlsConfigs"].isNull())
data_.slsConfigs = dataNode["SlsConfigs"].asString();
if(!dataNode["Cpu"].isNull())
data_.cpu = std::stoi(dataNode["Cpu"].asString());
if(!dataNode["PackageVersion"].isNull())
data_.packageVersion = dataNode["PackageVersion"].asString();
if(!dataNode["AppName"].isNull())
data_.appName = dataNode["AppName"].asString();
if(!dataNode["Jdk"].isNull())
data_.jdk = dataNode["Jdk"].asString();
if(!dataNode["JarStartArgs"].isNull())
data_.jarStartArgs = dataNode["JarStartArgs"].asString();
if(!dataNode["MinReadyInstances"].isNull())
data_.minReadyInstances = std::stoi(dataNode["MinReadyInstances"].asString());
if(!dataNode["PreStop"].isNull())
data_.preStop = dataNode["PreStop"].asString();
if(!dataNode["VpcId"].isNull())
data_.vpcId = dataNode["VpcId"].asString();
if(!dataNode["Readiness"].isNull())
data_.readiness = dataNode["Readiness"].asString();
if(!dataNode["PhpArmsConfigLocation"].isNull())
data_.phpArmsConfigLocation = dataNode["PhpArmsConfigLocation"].asString();
if(!dataNode["PackageType"].isNull())
data_.packageType = dataNode["PackageType"].asString();
if(!dataNode["CommandArgs"].isNull())
data_.commandArgs = dataNode["CommandArgs"].asString();
if(!dataNode["AcrAssumeRoleArn"].isNull())
data_.acrAssumeRoleArn = dataNode["AcrAssumeRoleArn"].asString();
if(!dataNode["TerminationGracePeriodSeconds"].isNull())
data_.terminationGracePeriodSeconds = std::stoi(dataNode["TerminationGracePeriodSeconds"].asString());
if(!dataNode["Envs"].isNull())
data_.envs = dataNode["Envs"].asString();
if(!dataNode["VSwitchId"].isNull())
data_.vSwitchId = dataNode["VSwitchId"].asString();
if(!dataNode["SecurityGroupId"].isNull())
data_.securityGroupId = dataNode["SecurityGroupId"].asString();
if(!dataNode["PostStart"].isNull())
data_.postStart = dataNode["PostStart"].asString();
if(!dataNode["BatchWaitTime"].isNull())
data_.batchWaitTime = std::stoi(dataNode["BatchWaitTime"].asString());
if(!dataNode["Jdk"].isNull())
data_.jdk = dataNode["Jdk"].asString();
if(!dataNode["ImageUrl"].isNull())
data_.imageUrl = dataNode["ImageUrl"].asString();
if(!dataNode["MountHost"].isNull())
data_.mountHost = dataNode["MountHost"].asString();
if(!dataNode["SlsConfigs"].isNull())
data_.slsConfigs = dataNode["SlsConfigs"].asString();
if(!dataNode["Liveness"].isNull())
data_.liveness = dataNode["Liveness"].asString();
if(!dataNode["PackageUrl"].isNull())
data_.packageUrl = dataNode["PackageUrl"].asString();
if(!dataNode["PackageType"].isNull())
data_.packageType = dataNode["PackageType"].asString();
if(!dataNode["PreStop"].isNull())
data_.preStop = dataNode["PreStop"].asString();
if(!dataNode["PackageVersion"].isNull())
data_.packageVersion = dataNode["PackageVersion"].asString();
if(!dataNode["JarStartArgs"].isNull())
data_.jarStartArgs = dataNode["JarStartArgs"].asString();
if(!dataNode["AppName"].isNull())
data_.appName = dataNode["AppName"].asString();
if(!dataNode["AppId"].isNull())
data_.appId = dataNode["AppId"].asString();
if(!dataNode["JarStartOptions"].isNull())
data_.jarStartOptions = dataNode["JarStartOptions"].asString();
if(!dataNode["Replicas"].isNull())
data_.replicas = std::stoi(dataNode["Replicas"].asString());
if(!dataNode["CustomHostAlias"].isNull())
data_.customHostAlias = dataNode["CustomHostAlias"].asString();
if(!dataNode["AppId"].isNull())
data_.appId = dataNode["AppId"].asString();
if(!dataNode["VpcId"].isNull())
data_.vpcId = dataNode["VpcId"].asString();
if(!dataNode["EdasContainerVersion"].isNull())
data_.edasContainerVersion = dataNode["EdasContainerVersion"].asString();
if(!dataNode["Command"].isNull())
data_.command = dataNode["Command"].asString();
if(!dataNode["UpdateStrategy"].isNull())
data_.updateStrategy = dataNode["UpdateStrategy"].asString();
if(!dataNode["MinReadyInstances"].isNull())
data_.minReadyInstances = std::stoi(dataNode["MinReadyInstances"].asString());
if(!dataNode["Memory"].isNull())
data_.memory = std::stoi(dataNode["Memory"].asString());
if(!dataNode["Php"].isNull())
data_.php = dataNode["Php"].asString();
if(!dataNode["PhpConfig"].isNull())
data_.phpConfig = dataNode["PhpConfig"].asString();
if(!dataNode["PhpConfigLocation"].isNull())
data_.phpConfigLocation = dataNode["PhpConfigLocation"].asString();
if(!dataNode["PackageUrl"].isNull())
data_.packageUrl = dataNode["PackageUrl"].asString();
if(!dataNode["BatchWaitTime"].isNull())
data_.batchWaitTime = std::stoi(dataNode["BatchWaitTime"].asString());
if(!dataNode["RegionId"].isNull())
data_.regionId = dataNode["RegionId"].asString();
if(!dataNode["PhpExtensions"].isNull())
data_.phpExtensions = dataNode["PhpExtensions"].asString();
if(!dataNode["PhpPECLExtensions"].isNull())
data_.phpPECLExtensions = dataNode["PhpPECLExtensions"].asString();
if(!dataNode["PostStart"].isNull())
data_.postStart = dataNode["PostStart"].asString();
if(!dataNode["TerminationGracePeriodSeconds"].isNull())
data_.terminationGracePeriodSeconds = std::stoi(dataNode["TerminationGracePeriodSeconds"].asString());
if(!dataNode["CommandArgs"].isNull())
data_.commandArgs = dataNode["CommandArgs"].asString();
if(!dataNode["NamespaceId"].isNull())
data_.namespaceId = dataNode["NamespaceId"].asString();
if(!dataNode["EnableAhas"].isNull())
data_.enableAhas = dataNode["EnableAhas"].asString();
if(!dataNode["MountHost"].isNull())
data_.mountHost = dataNode["MountHost"].asString();
if(!dataNode["TomcatConfig"].isNull())
data_.tomcatConfig = dataNode["TomcatConfig"].asString();
if(!dataNode["RegionId"].isNull())
data_.regionId = dataNode["RegionId"].asString();
if(!dataNode["VSwitchId"].isNull())
data_.vSwitchId = dataNode["VSwitchId"].asString();
if(!dataNode["Cpu"].isNull())
data_.cpu = std::stoi(dataNode["Cpu"].asString());
if(!dataNode["Envs"].isNull())
data_.envs = dataNode["Envs"].asString();
if(!dataNode["EnableAhas"].isNull())
data_.enableAhas = dataNode["EnableAhas"].asString();
if(!dataNode["CustomHostAlias"].isNull())
data_.customHostAlias = dataNode["CustomHostAlias"].asString();
if(!dataNode["WebContainer"].isNull())
data_.webContainer = dataNode["WebContainer"].asString();
if(!dataNode["Command"].isNull())
data_.command = dataNode["Command"].asString();
if(!dataNode["WarStartOptions"].isNull())
data_.warStartOptions = dataNode["WarStartOptions"].asString();
if(!dataNode["PhpArmsConfigLocation"].isNull())
data_.phpArmsConfigLocation = dataNode["PhpArmsConfigLocation"].asString();
if(!dataNode["NasId"].isNull())
data_.nasId = dataNode["NasId"].asString();
if(!dataNode["OssAkId"].isNull())
data_.ossAkId = dataNode["OssAkId"].asString();
if(!dataNode["OssAkSecret"].isNull())
data_.ossAkSecret = dataNode["OssAkSecret"].asString();
if(!dataNode["EdasContainerVersion"].isNull())
data_.edasContainerVersion = dataNode["EdasContainerVersion"].asString();
if(!dataNode["Timezone"].isNull())
data_.timezone = dataNode["Timezone"].asString();
if(!dataNode["AppDescription"].isNull())
data_.appDescription = dataNode["AppDescription"].asString();
if(!dataNode["EnableGreyTagRoute"].isNull())
data_.enableGreyTagRoute = dataNode["EnableGreyTagRoute"].asString() == "true";
if(!dataNode["MseApplicationId"].isNull())
data_.mseApplicationId = dataNode["MseApplicationId"].asString();
if(!dataNode["AcrInstanceId"].isNull())
data_.acrInstanceId = dataNode["AcrInstanceId"].asString();
if(!dataNode["AcrAssumeRoleArn"].isNull())
data_.acrAssumeRoleArn = dataNode["AcrAssumeRoleArn"].asString();
if(!dataNode["AssociateEip"].isNull())
data_.associateEip = dataNode["AssociateEip"].asString() == "true";
auto allConfigMapMountDescNode = dataNode["ConfigMapMountDesc"]["ConfigMapMountDescItem"];
for (auto dataNodeConfigMapMountDescConfigMapMountDescItem : allConfigMapMountDescNode)
{
Data::ConfigMapMountDescItem configMapMountDescItemObject;
if(!dataNodeConfigMapMountDescConfigMapMountDescItem["Key"].isNull())
configMapMountDescItemObject.key = dataNodeConfigMapMountDescConfigMapMountDescItem["Key"].asString();
if(!dataNodeConfigMapMountDescConfigMapMountDescItem["ConfigMapName"].isNull())
configMapMountDescItemObject.configMapName = dataNodeConfigMapMountDescConfigMapMountDescItem["ConfigMapName"].asString();
if(!dataNodeConfigMapMountDescConfigMapMountDescItem["MountPath"].isNull())
configMapMountDescItemObject.mountPath = dataNodeConfigMapMountDescConfigMapMountDescItem["MountPath"].asString();
if(!dataNodeConfigMapMountDescConfigMapMountDescItem["ConfigMapId"].isNull())
configMapMountDescItemObject.configMapId = std::stol(dataNodeConfigMapMountDescConfigMapMountDescItem["ConfigMapId"].asString());
data_.configMapMountDesc.push_back(configMapMountDescItemObject);
}
auto allTagsNode = dataNode["Tags"]["Tag"];
for (auto dataNodeTagsTag : allTagsNode)
{
Data::Tag tagObject;
if(!dataNodeTagsTag["Key"].isNull())
tagObject.key = dataNodeTagsTag["Key"].asString();
if(!dataNodeTagsTag["Value"].isNull())
tagObject.value = dataNodeTagsTag["Value"].asString();
data_.tags.push_back(tagObject);
}
auto allMountDescNode = dataNode["MountDesc"]["MountDescItem"];
for (auto dataNodeMountDescMountDescItem : allMountDescNode)
{
@@ -134,29 +178,19 @@ void DescribeApplicationConfigResult::parse(const std::string &payload)
mountDescItemObject.nasPath = dataNodeMountDescMountDescItem["NasPath"].asString();
data_.mountDesc.push_back(mountDescItemObject);
}
auto allTagsNode = dataNode["Tags"]["Tag"];
for (auto dataNodeTagsTag : allTagsNode)
auto allOssMountDescsNode = dataNode["OssMountDescs"]["ossMountDesc"];
for (auto dataNodeOssMountDescsossMountDesc : allOssMountDescsNode)
{
Data::Tag tagObject;
if(!dataNodeTagsTag["Value"].isNull())
tagObject.value = dataNodeTagsTag["Value"].asString();
if(!dataNodeTagsTag["Key"].isNull())
tagObject.key = dataNodeTagsTag["Key"].asString();
data_.tags.push_back(tagObject);
}
auto allConfigMapMountDescNode = dataNode["ConfigMapMountDesc"]["ConfigMapMountDescItem"];
for (auto dataNodeConfigMapMountDescConfigMapMountDescItem : allConfigMapMountDescNode)
{
Data::ConfigMapMountDescItem configMapMountDescItemObject;
if(!dataNodeConfigMapMountDescConfigMapMountDescItem["MountPath"].isNull())
configMapMountDescItemObject.mountPath = dataNodeConfigMapMountDescConfigMapMountDescItem["MountPath"].asString();
if(!dataNodeConfigMapMountDescConfigMapMountDescItem["ConfigMapId"].isNull())
configMapMountDescItemObject.configMapId = std::stol(dataNodeConfigMapMountDescConfigMapMountDescItem["ConfigMapId"].asString());
if(!dataNodeConfigMapMountDescConfigMapMountDescItem["ConfigMapName"].isNull())
configMapMountDescItemObject.configMapName = dataNodeConfigMapMountDescConfigMapMountDescItem["ConfigMapName"].asString();
if(!dataNodeConfigMapMountDescConfigMapMountDescItem["Key"].isNull())
configMapMountDescItemObject.key = dataNodeConfigMapMountDescConfigMapMountDescItem["Key"].asString();
data_.configMapMountDesc.push_back(configMapMountDescItemObject);
Data::OssMountDesc ossMountDescObject;
if(!dataNodeOssMountDescsossMountDesc["bucketName"].isNull())
ossMountDescObject.bucketName = dataNodeOssMountDescsossMountDesc["bucketName"].asString();
if(!dataNodeOssMountDescsossMountDesc["bucketPath"].isNull())
ossMountDescObject.bucketPath = dataNodeOssMountDescsossMountDesc["bucketPath"].asString();
if(!dataNodeOssMountDescsossMountDesc["mountPath"].isNull())
ossMountDescObject.mountPath = dataNodeOssMountDescsossMountDesc["mountPath"].asString();
if(!dataNodeOssMountDescsossMountDesc["readOnly"].isNull())
ossMountDescObject.readOnly = dataNodeOssMountDescsossMountDesc["readOnly"].asString() == "true";
data_.ossMountDescs.push_back(ossMountDescObject);
}
if(!value["Message"].isNull())
message_ = value["Message"].asString();

View File

@@ -72,3 +72,14 @@ void DescribeApplicationInstancesRequest::setCurrentPage(int currentPage)
setParameter("CurrentPage", std::to_string(currentPage));
}
bool DescribeApplicationInstancesRequest::getReverse()const
{
return reverse_;
}
void DescribeApplicationInstancesRequest::setReverse(bool reverse)
{
reverse_ = reverse;
setParameter("Reverse", reverse ? "true" : "false");
}

View File

@@ -40,36 +40,38 @@ void DescribeApplicationInstancesResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["CurrentPage"].isNull())
data_.currentPage = std::stoi(dataNode["CurrentPage"].asString());
if(!dataNode["TotalSize"].isNull())
data_.totalSize = std::stoi(dataNode["TotalSize"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
auto allInstancesNode = dataNode["Instances"]["Instance"];
for (auto dataNodeInstancesInstance : allInstancesNode)
{
Data::Instance instanceObject;
if(!dataNodeInstancesInstance["InstanceContainerIp"].isNull())
instanceObject.instanceContainerIp = dataNodeInstancesInstance["InstanceContainerIp"].asString();
if(!dataNodeInstancesInstance["InstanceHealthStatus"].isNull())
instanceObject.instanceHealthStatus = dataNodeInstancesInstance["InstanceHealthStatus"].asString();
if(!dataNodeInstancesInstance["InstanceId"].isNull())
instanceObject.instanceId = dataNodeInstancesInstance["InstanceId"].asString();
if(!dataNodeInstancesInstance["VSwitchId"].isNull())
instanceObject.vSwitchId = dataNodeInstancesInstance["VSwitchId"].asString();
if(!dataNodeInstancesInstance["ImageUrl"].isNull())
instanceObject.imageUrl = dataNodeInstancesInstance["ImageUrl"].asString();
if(!dataNodeInstancesInstance["InstanceContainerRestarts"].isNull())
instanceObject.instanceContainerRestarts = std::stol(dataNodeInstancesInstance["InstanceContainerRestarts"].asString());
if(!dataNodeInstancesInstance["PackageVersion"].isNull())
instanceObject.packageVersion = dataNodeInstancesInstance["PackageVersion"].asString();
if(!dataNodeInstancesInstance["InstanceContainerStatus"].isNull())
instanceObject.instanceContainerStatus = dataNodeInstancesInstance["InstanceContainerStatus"].asString();
if(!dataNodeInstancesInstance["CreateTimeStamp"].isNull())
instanceObject.createTimeStamp = std::stol(dataNodeInstancesInstance["CreateTimeStamp"].asString());
if(!dataNodeInstancesInstance["VSwitchId"].isNull())
instanceObject.vSwitchId = dataNodeInstancesInstance["VSwitchId"].asString();
if(!dataNodeInstancesInstance["InstanceContainerStatus"].isNull())
instanceObject.instanceContainerStatus = dataNodeInstancesInstance["InstanceContainerStatus"].asString();
if(!dataNodeInstancesInstance["InstanceHealthStatus"].isNull())
instanceObject.instanceHealthStatus = dataNodeInstancesInstance["InstanceHealthStatus"].asString();
if(!dataNodeInstancesInstance["InstanceContainerRestarts"].isNull())
instanceObject.instanceContainerRestarts = std::stol(dataNodeInstancesInstance["InstanceContainerRestarts"].asString());
if(!dataNodeInstancesInstance["GroupId"].isNull())
instanceObject.groupId = dataNodeInstancesInstance["GroupId"].asString();
if(!dataNodeInstancesInstance["InstanceContainerIp"].isNull())
instanceObject.instanceContainerIp = dataNodeInstancesInstance["InstanceContainerIp"].asString();
if(!dataNodeInstancesInstance["InstanceId"].isNull())
instanceObject.instanceId = dataNodeInstancesInstance["InstanceId"].asString();
if(!dataNodeInstancesInstance["ImageUrl"].isNull())
instanceObject.imageUrl = dataNodeInstancesInstance["ImageUrl"].asString();
if(!dataNodeInstancesInstance["PackageVersion"].isNull())
instanceObject.packageVersion = dataNodeInstancesInstance["PackageVersion"].asString();
if(!dataNodeInstancesInstance["Eip"].isNull())
instanceObject.eip = dataNodeInstancesInstance["Eip"].asString();
data_.instances.push_back(instanceObject);
}
if(!value["Message"].isNull())

View File

@@ -40,83 +40,79 @@ void DescribeApplicationScalingRulesResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["CurrentPage"].isNull())
data_.currentPage = std::stoi(dataNode["CurrentPage"].asString());
if(!dataNode["TotalSize"].isNull())
data_.totalSize = std::stoi(dataNode["TotalSize"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
auto allApplicationScalingRulesNode = dataNode["ApplicationScalingRules"]["ApplicationScalingRule"];
for (auto dataNodeApplicationScalingRulesApplicationScalingRule : allApplicationScalingRulesNode)
{
Data::ApplicationScalingRule applicationScalingRuleObject;
if(!dataNodeApplicationScalingRulesApplicationScalingRule["ScaleRuleEnabled"].isNull())
applicationScalingRuleObject.scaleRuleEnabled = dataNodeApplicationScalingRulesApplicationScalingRule["ScaleRuleEnabled"].asString() == "true";
if(!dataNodeApplicationScalingRulesApplicationScalingRule["LastDisableTime"].isNull())
applicationScalingRuleObject.lastDisableTime = std::stol(dataNodeApplicationScalingRulesApplicationScalingRule["LastDisableTime"].asString());
if(!dataNodeApplicationScalingRulesApplicationScalingRule["UpdateTime"].isNull())
applicationScalingRuleObject.updateTime = std::stol(dataNodeApplicationScalingRulesApplicationScalingRule["UpdateTime"].asString());
if(!dataNodeApplicationScalingRulesApplicationScalingRule["AppId"].isNull())
applicationScalingRuleObject.appId = dataNodeApplicationScalingRulesApplicationScalingRule["AppId"].asString();
if(!dataNodeApplicationScalingRulesApplicationScalingRule["CreateTime"].isNull())
applicationScalingRuleObject.createTime = std::stol(dataNodeApplicationScalingRulesApplicationScalingRule["CreateTime"].asString());
if(!dataNodeApplicationScalingRulesApplicationScalingRule["UpdateTime"].isNull())
applicationScalingRuleObject.updateTime = std::stol(dataNodeApplicationScalingRulesApplicationScalingRule["UpdateTime"].asString());
if(!dataNodeApplicationScalingRulesApplicationScalingRule["ScaleRuleName"].isNull())
applicationScalingRuleObject.scaleRuleName = dataNodeApplicationScalingRulesApplicationScalingRule["ScaleRuleName"].asString();
if(!dataNodeApplicationScalingRulesApplicationScalingRule["LastDisableTime"].isNull())
applicationScalingRuleObject.lastDisableTime = std::stol(dataNodeApplicationScalingRulesApplicationScalingRule["LastDisableTime"].asString());
if(!dataNodeApplicationScalingRulesApplicationScalingRule["ScaleRuleEnabled"].isNull())
applicationScalingRuleObject.scaleRuleEnabled = dataNodeApplicationScalingRulesApplicationScalingRule["ScaleRuleEnabled"].asString() == "true";
if(!dataNodeApplicationScalingRulesApplicationScalingRule["ScaleRuleType"].isNull())
applicationScalingRuleObject.scaleRuleType = dataNodeApplicationScalingRulesApplicationScalingRule["ScaleRuleType"].asString();
if(!dataNodeApplicationScalingRulesApplicationScalingRule["ScaleRuleName"].isNull())
applicationScalingRuleObject.scaleRuleName = dataNodeApplicationScalingRulesApplicationScalingRule["ScaleRuleName"].asString();
auto timerNode = value["Timer"];
if(!timerNode["Period"].isNull())
applicationScalingRuleObject.timer.period = timerNode["Period"].asString();
if(!timerNode["EndDate"].isNull())
applicationScalingRuleObject.timer.endDate = timerNode["EndDate"].asString();
if(!timerNode["BeginDate"].isNull())
applicationScalingRuleObject.timer.beginDate = timerNode["BeginDate"].asString();
if(!timerNode["Period"].isNull())
applicationScalingRuleObject.timer.period = timerNode["Period"].asString();
auto allSchedulesNode = timerNode["Schedules"]["Schedule"];
for (auto timerNodeSchedulesSchedule : allSchedulesNode)
{
Data::ApplicationScalingRule::Timer::Schedule scheduleObject;
if(!timerNodeSchedulesSchedule["TargetReplicas"].isNull())
scheduleObject.targetReplicas = std::stoi(timerNodeSchedulesSchedule["TargetReplicas"].asString());
if(!timerNodeSchedulesSchedule["AtTime"].isNull())
scheduleObject.atTime = timerNodeSchedulesSchedule["AtTime"].asString();
if(!timerNodeSchedulesSchedule["TargetReplicas"].isNull())
scheduleObject.targetReplicas = std::stoi(timerNodeSchedulesSchedule["TargetReplicas"].asString());
if(!timerNodeSchedulesSchedule["MaxReplicas"].isNull())
scheduleObject.maxReplicas = std::stol(timerNodeSchedulesSchedule["MaxReplicas"].asString());
if(!timerNodeSchedulesSchedule["MinReplicas"].isNull())
scheduleObject.minReplicas = std::stol(timerNodeSchedulesSchedule["MinReplicas"].asString());
applicationScalingRuleObject.timer.schedules.push_back(scheduleObject);
}
auto metricNode = value["Metric"];
if(!metricNode["MinReplicas"].isNull())
applicationScalingRuleObject.metric.minReplicas = std::stoi(metricNode["MinReplicas"].asString());
if(!metricNode["MaxReplicas"].isNull())
applicationScalingRuleObject.metric.maxReplicas = std::stoi(metricNode["MaxReplicas"].asString());
if(!metricNode["MinReplicas"].isNull())
applicationScalingRuleObject.metric.minReplicas = std::stoi(metricNode["MinReplicas"].asString());
auto allMetricsNode = metricNode["Metrics"]["Metric"];
for (auto metricNodeMetricsMetric : allMetricsNode)
{
Data::ApplicationScalingRule::Metric::Metric1 metric1Object;
if(!metricNodeMetricsMetric["MetricType"].isNull())
metric1Object.metricType = metricNodeMetricsMetric["MetricType"].asString();
if(!metricNodeMetricsMetric["MetricTargetAverageUtilization"].isNull())
metric1Object.metricTargetAverageUtilization = std::stoi(metricNodeMetricsMetric["MetricTargetAverageUtilization"].asString());
if(!metricNodeMetricsMetric["MetricType"].isNull())
metric1Object.metricType = metricNodeMetricsMetric["MetricType"].asString();
applicationScalingRuleObject.metric.metrics.push_back(metric1Object);
}
auto metricsStatusNode = metricNode["MetricsStatus"];
if(!metricsStatusNode["DesiredReplicas"].isNull())
applicationScalingRuleObject.metric.metricsStatus.desiredReplicas = std::stol(metricsStatusNode["DesiredReplicas"].asString());
if(!metricsStatusNode["CurrentReplicas"].isNull())
applicationScalingRuleObject.metric.metricsStatus.currentReplicas = std::stol(metricsStatusNode["CurrentReplicas"].asString());
if(!metricsStatusNode["NextScaleTimePeriod"].isNull())
applicationScalingRuleObject.metric.metricsStatus.nextScaleTimePeriod = std::stoi(metricsStatusNode["NextScaleTimePeriod"].asString());
if(!metricsStatusNode["CurrentReplicas"].isNull())
applicationScalingRuleObject.metric.metricsStatus.currentReplicas = std::stol(metricsStatusNode["CurrentReplicas"].asString());
if(!metricsStatusNode["LastScaleTime"].isNull())
applicationScalingRuleObject.metric.metricsStatus.lastScaleTime = metricsStatusNode["LastScaleTime"].asString();
auto allNextScaleMetricsNode = metricsStatusNode["NextScaleMetrics"]["NextScaleMetric"];
for (auto metricsStatusNodeNextScaleMetricsNextScaleMetric : allNextScaleMetricsNode)
{
Data::ApplicationScalingRule::Metric::MetricsStatus::NextScaleMetric nextScaleMetricObject;
if(!metricsStatusNodeNextScaleMetricsNextScaleMetric["NextScaleInAverageUtilization"].isNull())
nextScaleMetricObject.nextScaleInAverageUtilization = std::stoi(metricsStatusNodeNextScaleMetricsNextScaleMetric["NextScaleInAverageUtilization"].asString());
if(!metricsStatusNodeNextScaleMetricsNextScaleMetric["Name"].isNull())
nextScaleMetricObject.name = metricsStatusNodeNextScaleMetricsNextScaleMetric["Name"].asString();
if(!metricsStatusNodeNextScaleMetricsNextScaleMetric["NextScaleOutAverageUtilization"].isNull())
nextScaleMetricObject.nextScaleOutAverageUtilization = std::stoi(metricsStatusNodeNextScaleMetricsNextScaleMetric["NextScaleOutAverageUtilization"].asString());
applicationScalingRuleObject.metric.metricsStatus.nextScaleMetrics.push_back(nextScaleMetricObject);
}
if(!metricsStatusNode["MaxReplicas"].isNull())
applicationScalingRuleObject.metric.metricsStatus.maxReplicas = std::stol(metricsStatusNode["MaxReplicas"].asString());
if(!metricsStatusNode["MinReplicas"].isNull())
applicationScalingRuleObject.metric.metricsStatus.minReplicas = std::stol(metricsStatusNode["MinReplicas"].asString());
auto allCurrentMetricsNode = metricsStatusNode["CurrentMetrics"]["CurrentMetric"];
for (auto metricsStatusNodeCurrentMetricsCurrentMetric : allCurrentMetricsNode)
{
@@ -129,6 +125,32 @@ void DescribeApplicationScalingRulesResult::parse(const std::string &payload)
currentMetricObject.name = metricsStatusNodeCurrentMetricsCurrentMetric["Name"].asString();
applicationScalingRuleObject.metric.metricsStatus.currentMetrics.push_back(currentMetricObject);
}
auto allNextScaleMetricsNode = metricsStatusNode["NextScaleMetrics"]["NextScaleMetric"];
for (auto metricsStatusNodeNextScaleMetricsNextScaleMetric : allNextScaleMetricsNode)
{
Data::ApplicationScalingRule::Metric::MetricsStatus::NextScaleMetric nextScaleMetricObject;
if(!metricsStatusNodeNextScaleMetricsNextScaleMetric["NextScaleOutAverageUtilization"].isNull())
nextScaleMetricObject.nextScaleOutAverageUtilization = std::stoi(metricsStatusNodeNextScaleMetricsNextScaleMetric["NextScaleOutAverageUtilization"].asString());
if(!metricsStatusNodeNextScaleMetricsNextScaleMetric["NextScaleInAverageUtilization"].isNull())
nextScaleMetricObject.nextScaleInAverageUtilization = std::stoi(metricsStatusNodeNextScaleMetricsNextScaleMetric["NextScaleInAverageUtilization"].asString());
if(!metricsStatusNodeNextScaleMetricsNextScaleMetric["Name"].isNull())
nextScaleMetricObject.name = metricsStatusNodeNextScaleMetricsNextScaleMetric["Name"].asString();
applicationScalingRuleObject.metric.metricsStatus.nextScaleMetrics.push_back(nextScaleMetricObject);
}
auto scaleUpRulesNode = metricNode["ScaleUpRules"];
if(!scaleUpRulesNode["Step"].isNull())
applicationScalingRuleObject.metric.scaleUpRules.step = std::stol(scaleUpRulesNode["Step"].asString());
if(!scaleUpRulesNode["StabilizationWindowSeconds"].isNull())
applicationScalingRuleObject.metric.scaleUpRules.stabilizationWindowSeconds = std::stol(scaleUpRulesNode["StabilizationWindowSeconds"].asString());
if(!scaleUpRulesNode["Disabled"].isNull())
applicationScalingRuleObject.metric.scaleUpRules.disabled = scaleUpRulesNode["Disabled"].asString() == "true";
auto scaleDownRulesNode = metricNode["ScaleDownRules"];
if(!scaleDownRulesNode["Step"].isNull())
applicationScalingRuleObject.metric.scaleDownRules.step = std::stol(scaleDownRulesNode["Step"].asString());
if(!scaleDownRulesNode["StabilizationWindowSeconds"].isNull())
applicationScalingRuleObject.metric.scaleDownRules.stabilizationWindowSeconds = std::stol(scaleDownRulesNode["StabilizationWindowSeconds"].asString());
if(!scaleDownRulesNode["Disabled"].isNull())
applicationScalingRuleObject.metric.scaleDownRules.disabled = scaleDownRulesNode["Disabled"].asString() == "true";
data_.applicationScalingRules.push_back(applicationScalingRuleObject);
}
if(!value["TraceId"].isNull())

View File

@@ -40,34 +40,40 @@ void DescribeApplicationStatusResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["AppId"].isNull())
data_.appId = dataNode["AppId"].asString();
if(!dataNode["LastChangeOrderId"].isNull())
data_.lastChangeOrderId = dataNode["LastChangeOrderId"].asString();
if(!dataNode["LastChangeOrderStatus"].isNull())
data_.lastChangeOrderStatus = dataNode["LastChangeOrderStatus"].asString();
if(!dataNode["LastChangeOrderRunning"].isNull())
data_.lastChangeOrderRunning = dataNode["LastChangeOrderRunning"].asString() == "true";
if(!dataNode["CurrentStatus"].isNull())
data_.currentStatus = dataNode["CurrentStatus"].asString();
if(!dataNode["ArmsApmInfo"].isNull())
data_.armsApmInfo = dataNode["ArmsApmInfo"].asString();
if(!dataNode["RunningInstances"].isNull())
data_.runningInstances = std::stoi(dataNode["RunningInstances"].asString());
if(!dataNode["ArmsAdvancedEnabled"].isNull())
data_.armsAdvancedEnabled = dataNode["ArmsAdvancedEnabled"].asString();
if(!dataNode["LastChangeOrderId"].isNull())
data_.lastChangeOrderId = dataNode["LastChangeOrderId"].asString();
if(!dataNode["ArmsApmInfo"].isNull())
data_.armsApmInfo = dataNode["ArmsApmInfo"].asString();
if(!dataNode["CreateTime"].isNull())
data_.createTime = dataNode["CreateTime"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!dataNode["CurrentStatus"].isNull())
data_.currentStatus = dataNode["CurrentStatus"].asString();
if(!dataNode["AppId"].isNull())
data_.appId = dataNode["AppId"].asString();
if(!dataNode["LastChangeOrderRunning"].isNull())
data_.lastChangeOrderRunning = dataNode["LastChangeOrderRunning"].asString() == "true";
if(!dataNode["RunningInstances"].isNull())
data_.runningInstances = std::stoi(dataNode["RunningInstances"].asString());
if(!dataNode["LastChangeOrderStatus"].isNull())
data_.lastChangeOrderStatus = dataNode["LastChangeOrderStatus"].asString();
if(!dataNode["SubStatus"].isNull())
data_.subStatus = dataNode["SubStatus"].asString();
if(!dataNode["EnableAgent"].isNull())
data_.enableAgent = dataNode["EnableAgent"].asString() == "true";
if(!dataNode["FileSizeLimit"].isNull())
data_.fileSizeLimit = std::stol(dataNode["FileSizeLimit"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["TraceId"].isNull())
traceId_ = value["TraceId"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}

View File

@@ -42,52 +42,56 @@ void DescribeChangeOrderResult::parse(const std::string &payload)
auto dataNode = value["Data"];
if(!dataNode["Status"].isNull())
data_.status = std::stoi(dataNode["Status"].asString());
if(!dataNode["Description"].isNull())
data_.description = dataNode["Description"].asString();
if(!dataNode["SupportAbortFreeze"].isNull())
data_.supportAbortFreeze = dataNode["SupportAbortFreeze"].asString() == "true";
if(!dataNode["SubStatus"].isNull())
data_.subStatus = std::stoi(dataNode["SubStatus"].asString());
if(!dataNode["ApprovalId"].isNull())
data_.approvalId = dataNode["ApprovalId"].asString();
if(!dataNode["ErrorMessage"].isNull())
data_.errorMessage = dataNode["ErrorMessage"].asString();
if(!dataNode["BatchWaitTime"].isNull())
data_.batchWaitTime = std::stoi(dataNode["BatchWaitTime"].asString());
if(!dataNode["CreateTime"].isNull())
data_.createTime = dataNode["CreateTime"].asString();
if(!dataNode["BatchCount"].isNull())
data_.batchCount = std::stoi(dataNode["BatchCount"].asString());
if(!dataNode["CoTypeCode"].isNull())
data_.coTypeCode = dataNode["CoTypeCode"].asString();
if(!dataNode["SupportAbortFreeze"].isNull())
data_.supportAbortFreeze = dataNode["SupportAbortFreeze"].asString() == "true";
if(!dataNode["SupportRollback"].isNull())
data_.supportRollback = dataNode["SupportRollback"].asString() == "true";
if(!dataNode["ChangeOrderId"].isNull())
data_.changeOrderId = dataNode["ChangeOrderId"].asString();
if(!dataNode["BatchType"].isNull())
data_.batchType = dataNode["BatchType"].asString();
if(!dataNode["AppName"].isNull())
data_.appName = dataNode["AppName"].asString();
if(!dataNode["BatchType"].isNull())
data_.batchType = dataNode["BatchType"].asString();
if(!dataNode["Description"].isNull())
data_.description = dataNode["Description"].asString();
if(!dataNode["CoType"].isNull())
data_.coType = dataNode["CoType"].asString();
if(!dataNode["Auto"].isNull())
data_._auto = dataNode["Auto"].asString() == "true";
if(!dataNode["CurrentPipelineId"].isNull())
data_.currentPipelineId = dataNode["CurrentPipelineId"].asString();
if(!dataNode["CoTypeCode"].isNull())
data_.coTypeCode = dataNode["CoTypeCode"].asString();
if(!dataNode["SupportRollback"].isNull())
data_.supportRollback = dataNode["SupportRollback"].asString() == "true";
if(!dataNode["BatchWaitTime"].isNull())
data_.batchWaitTime = std::stoi(dataNode["BatchWaitTime"].asString());
if(!dataNode["ErrorMessage"].isNull())
data_.errorMessage = dataNode["ErrorMessage"].asString();
if(!dataNode["CoType"].isNull())
data_.coType = dataNode["CoType"].asString();
if(!dataNode["BatchCount"].isNull())
data_.batchCount = std::stoi(dataNode["BatchCount"].asString());
auto allPipelinesNode = dataNode["Pipelines"]["Pipeline"];
for (auto dataNodePipelinesPipeline : allPipelinesNode)
{
Data::Pipeline pipelineObject;
if(!dataNodePipelinesPipeline["Status"].isNull())
pipelineObject.status = std::stoi(dataNodePipelinesPipeline["Status"].asString());
if(!dataNodePipelinesPipeline["PipelineName"].isNull())
pipelineObject.pipelineName = dataNodePipelinesPipeline["PipelineName"].asString();
if(!dataNodePipelinesPipeline["ParallelCount"].isNull())
pipelineObject.parallelCount = std::stoi(dataNodePipelinesPipeline["ParallelCount"].asString());
if(!dataNodePipelinesPipeline["UpdateTime"].isNull())
pipelineObject.updateTime = std::stol(dataNodePipelinesPipeline["UpdateTime"].asString());
if(!dataNodePipelinesPipeline["StartTime"].isNull())
pipelineObject.startTime = std::stol(dataNodePipelinesPipeline["StartTime"].asString());
if(!dataNodePipelinesPipeline["PipelineId"].isNull())
pipelineObject.pipelineId = dataNodePipelinesPipeline["PipelineId"].asString();
if(!dataNodePipelinesPipeline["UpdateTime"].isNull())
pipelineObject.updateTime = std::stol(dataNodePipelinesPipeline["UpdateTime"].asString());
if(!dataNodePipelinesPipeline["BatchType"].isNull())
pipelineObject.batchType = std::stoi(dataNodePipelinesPipeline["BatchType"].asString());
if(!dataNodePipelinesPipeline["ParallelCount"].isNull())
pipelineObject.parallelCount = std::stoi(dataNodePipelinesPipeline["ParallelCount"].asString());
if(!dataNodePipelinesPipeline["PipelineName"].isNull())
pipelineObject.pipelineName = dataNodePipelinesPipeline["PipelineName"].asString();
if(!dataNodePipelinesPipeline["PipelineId"].isNull())
pipelineObject.pipelineId = dataNodePipelinesPipeline["PipelineId"].asString();
data_.pipelines.push_back(pipelineObject);
}
auto allCoTargets = dataNode["CoTargets"]["CoTarget"];

View File

@@ -0,0 +1,41 @@
/*
* 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/sae/model/DescribeGreyTagRouteRequest.h>
using AlibabaCloud::Sae::Model::DescribeGreyTagRouteRequest;
DescribeGreyTagRouteRequest::DescribeGreyTagRouteRequest() :
RoaServiceRequest("sae", "2019-05-06")
{
setResourcePath("/pop/v1/sam/tagroute/greyTagRoute");
setMethod(HttpRequest::Method::Get);
}
DescribeGreyTagRouteRequest::~DescribeGreyTagRouteRequest()
{}
long DescribeGreyTagRouteRequest::getGreyTagRouteId()const
{
return greyTagRouteId_;
}
void DescribeGreyTagRouteRequest::setGreyTagRouteId(long greyTagRouteId)
{
greyTagRouteId_ = greyTagRouteId;
setParameter("GreyTagRouteId", std::to_string(greyTagRouteId));
}

View File

@@ -0,0 +1,161 @@
/*
* 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/sae/model/DescribeGreyTagRouteResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Sae;
using namespace AlibabaCloud::Sae::Model;
DescribeGreyTagRouteResult::DescribeGreyTagRouteResult() :
ServiceResult()
{}
DescribeGreyTagRouteResult::DescribeGreyTagRouteResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeGreyTagRouteResult::~DescribeGreyTagRouteResult()
{}
void DescribeGreyTagRouteResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["Description"].isNull())
data_.description = dataNode["Description"].asString();
if(!dataNode["GreyTagRouteId"].isNull())
data_.greyTagRouteId = std::stol(dataNode["GreyTagRouteId"].asString());
if(!dataNode["CreateTime"].isNull())
data_.createTime = std::stol(dataNode["CreateTime"].asString());
if(!dataNode["UpdateTime"].isNull())
data_.updateTime = std::stol(dataNode["UpdateTime"].asString());
if(!dataNode["Name"].isNull())
data_.name = dataNode["Name"].asString();
auto allScRulesNode = dataNode["ScRules"]["scRule"];
for (auto dataNodeScRulesscRule : allScRulesNode)
{
Data::ScRule scRuleObject;
if(!dataNodeScRulesscRule["path"].isNull())
scRuleObject.path = dataNodeScRulesscRule["path"].asString();
if(!dataNodeScRulesscRule["condition"].isNull())
scRuleObject.condition = dataNodeScRulesscRule["condition"].asString();
auto allitemsNode = dataNodeScRulesscRule["items"]["item"];
for (auto dataNodeScRulesscRuleitemsitem : allitemsNode)
{
Data::ScRule::Item itemsObject;
if(!dataNodeScRulesscRuleitemsitem["name"].isNull())
itemsObject.name = dataNodeScRulesscRuleitemsitem["name"].asString();
if(!dataNodeScRulesscRuleitemsitem["index"].isNull())
itemsObject.index = std::stoi(dataNodeScRulesscRuleitemsitem["index"].asString());
if(!dataNodeScRulesscRuleitemsitem["expr"].isNull())
itemsObject.expr = dataNodeScRulesscRuleitemsitem["expr"].asString();
if(!dataNodeScRulesscRuleitemsitem["type"].isNull())
itemsObject.type = dataNodeScRulesscRuleitemsitem["type"].asString();
if(!dataNodeScRulesscRuleitemsitem["cond"].isNull())
itemsObject.cond = dataNodeScRulesscRuleitemsitem["cond"].asString();
if(!dataNodeScRulesscRuleitemsitem["value"].isNull())
itemsObject.value = dataNodeScRulesscRuleitemsitem["value"].asString();
if(!dataNodeScRulesscRuleitemsitem["operator"].isNull())
itemsObject._operator = dataNodeScRulesscRuleitemsitem["operator"].asString();
scRuleObject.items.push_back(itemsObject);
}
data_.scRules.push_back(scRuleObject);
}
auto allDubboRulesNode = dataNode["DubboRules"]["dubboRule"];
for (auto dataNodeDubboRulesdubboRule : allDubboRulesNode)
{
Data::DubboRule dubboRuleObject;
if(!dataNodeDubboRulesdubboRule["condition"].isNull())
dubboRuleObject.condition = dataNodeDubboRulesdubboRule["condition"].asString();
if(!dataNodeDubboRulesdubboRule["methodName"].isNull())
dubboRuleObject.methodName = dataNodeDubboRulesdubboRule["methodName"].asString();
if(!dataNodeDubboRulesdubboRule["serviceName"].isNull())
dubboRuleObject.serviceName = dataNodeDubboRulesdubboRule["serviceName"].asString();
if(!dataNodeDubboRulesdubboRule["version"].isNull())
dubboRuleObject.version = dataNodeDubboRulesdubboRule["version"].asString();
if(!dataNodeDubboRulesdubboRule["group"].isNull())
dubboRuleObject.group = dataNodeDubboRulesdubboRule["group"].asString();
auto allitems1Node = dataNodeDubboRulesdubboRule["items"]["item"];
for (auto dataNodeDubboRulesdubboRuleitemsitem : allitems1Node)
{
Data::DubboRule::Item2 items1Object;
if(!dataNodeDubboRulesdubboRuleitemsitem["name"].isNull())
items1Object.name = dataNodeDubboRulesdubboRuleitemsitem["name"].asString();
if(!dataNodeDubboRulesdubboRuleitemsitem["index"].isNull())
items1Object.index = std::stoi(dataNodeDubboRulesdubboRuleitemsitem["index"].asString());
if(!dataNodeDubboRulesdubboRuleitemsitem["expr"].isNull())
items1Object.expr = dataNodeDubboRulesdubboRuleitemsitem["expr"].asString();
if(!dataNodeDubboRulesdubboRuleitemsitem["type"].isNull())
items1Object.type = dataNodeDubboRulesdubboRuleitemsitem["type"].asString();
if(!dataNodeDubboRulesdubboRuleitemsitem["cond"].isNull())
items1Object.cond = dataNodeDubboRulesdubboRuleitemsitem["cond"].asString();
if(!dataNodeDubboRulesdubboRuleitemsitem["value"].isNull())
items1Object.value = dataNodeDubboRulesdubboRuleitemsitem["value"].asString();
if(!dataNodeDubboRulesdubboRuleitemsitem["operator"].isNull())
items1Object._operator = dataNodeDubboRulesdubboRuleitemsitem["operator"].asString();
dubboRuleObject.items1.push_back(items1Object);
}
data_.dubboRules.push_back(dubboRuleObject);
}
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["TraceId"].isNull())
traceId_ = value["TraceId"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string DescribeGreyTagRouteResult::getMessage()const
{
return message_;
}
std::string DescribeGreyTagRouteResult::getTraceId()const
{
return traceId_;
}
DescribeGreyTagRouteResult::Data DescribeGreyTagRouteResult::getData()const
{
return data_;
}
std::string DescribeGreyTagRouteResult::getErrorCode()const
{
return errorCode_;
}
std::string DescribeGreyTagRouteResult::getCode()const
{
return code_;
}
bool DescribeGreyTagRouteResult::getSuccess()const
{
return success_;
}

View File

@@ -40,56 +40,56 @@ void DescribePipelineResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["PipelineStatus"].isNull())
data_.pipelineStatus = std::stoi(dataNode["PipelineStatus"].asString());
if(!dataNode["ShowBatch"].isNull())
data_.showBatch = dataNode["ShowBatch"].asString() == "true";
if(!dataNode["PipelineStatus"].isNull())
data_.pipelineStatus = std::stoi(dataNode["PipelineStatus"].asString());
if(!dataNode["CurrentPoint"].isNull())
data_.currentPoint = std::stoi(dataNode["CurrentPoint"].asString());
if(!dataNode["PipelineName"].isNull())
data_.pipelineName = dataNode["PipelineName"].asString();
if(!dataNode["PipelineId"].isNull())
data_.pipelineId = dataNode["PipelineId"].asString();
if(!dataNode["CurrentStageId"].isNull())
data_.currentStageId = dataNode["CurrentStageId"].asString();
if(!dataNode["CoStatus"].isNull())
data_.coStatus = dataNode["CoStatus"].asString();
if(!dataNode["PipelineName"].isNull())
data_.pipelineName = dataNode["PipelineName"].asString();
if(!dataNode["NextPipelineId"].isNull())
data_.nextPipelineId = dataNode["NextPipelineId"].asString();
if(!dataNode["PipelineId"].isNull())
data_.pipelineId = dataNode["PipelineId"].asString();
if(!dataNode["CoStatus"].isNull())
data_.coStatus = dataNode["CoStatus"].asString();
auto allStageListNode = dataNode["StageList"]["Stage"];
for (auto dataNodeStageListStage : allStageListNode)
{
Data::Stage stageObject;
if(!dataNodeStageListStage["Status"].isNull())
stageObject.status = std::stoi(dataNodeStageListStage["Status"].asString());
if(!dataNodeStageListStage["StageName"].isNull())
stageObject.stageName = dataNodeStageListStage["StageName"].asString();
if(!dataNodeStageListStage["ExecutorType"].isNull())
stageObject.executorType = std::stoi(dataNodeStageListStage["ExecutorType"].asString());
if(!dataNodeStageListStage["StageId"].isNull())
stageObject.stageId = dataNodeStageListStage["StageId"].asString();
if(!dataNodeStageListStage["ExecutorType"].isNull())
stageObject.executorType = std::stoi(dataNodeStageListStage["ExecutorType"].asString());
if(!dataNodeStageListStage["StageName"].isNull())
stageObject.stageName = dataNodeStageListStage["StageName"].asString();
auto allTaskListNode = dataNodeStageListStage["TaskList"]["Task"];
for (auto dataNodeStageListStageTaskListTask : allTaskListNode)
{
Data::Stage::Task taskListObject;
if(!dataNodeStageListStageTaskListTask["Status"].isNull())
taskListObject.status = std::stoi(dataNodeStageListStageTaskListTask["Status"].asString());
if(!dataNodeStageListStageTaskListTask["StageId"].isNull())
taskListObject.stageId = dataNodeStageListStageTaskListTask["StageId"].asString();
if(!dataNodeStageListStageTaskListTask["ErrorMessage"].isNull())
taskListObject.errorMessage = dataNodeStageListStageTaskListTask["ErrorMessage"].asString();
if(!dataNodeStageListStageTaskListTask["ErrorCode"].isNull())
taskListObject.errorCode = dataNodeStageListStageTaskListTask["ErrorCode"].asString();
if(!dataNodeStageListStageTaskListTask["TaskName"].isNull())
taskListObject.taskName = dataNodeStageListStageTaskListTask["TaskName"].asString();
if(!dataNodeStageListStageTaskListTask["ErrorIgnore"].isNull())
taskListObject.errorIgnore = std::stoi(dataNodeStageListStageTaskListTask["ErrorIgnore"].asString());
if(!dataNodeStageListStageTaskListTask["TaskId"].isNull())
taskListObject.taskId = dataNodeStageListStageTaskListTask["TaskId"].asString();
if(!dataNodeStageListStageTaskListTask["Message"].isNull())
taskListObject.message = dataNodeStageListStageTaskListTask["Message"].asString();
if(!dataNodeStageListStageTaskListTask["ShowManualIgnore"].isNull())
taskListObject.showManualIgnore = dataNodeStageListStageTaskListTask["ShowManualIgnore"].asString() == "true";
if(!dataNodeStageListStageTaskListTask["TaskName"].isNull())
taskListObject.taskName = dataNodeStageListStageTaskListTask["TaskName"].asString();
if(!dataNodeStageListStageTaskListTask["StageId"].isNull())
taskListObject.stageId = dataNodeStageListStageTaskListTask["StageId"].asString();
if(!dataNodeStageListStageTaskListTask["ErrorCode"].isNull())
taskListObject.errorCode = dataNodeStageListStageTaskListTask["ErrorCode"].asString();
if(!dataNodeStageListStageTaskListTask["ErrorMessage"].isNull())
taskListObject.errorMessage = dataNodeStageListStageTaskListTask["ErrorMessage"].asString();
if(!dataNodeStageListStageTaskListTask["TaskId"].isNull())
taskListObject.taskId = dataNodeStageListStageTaskListTask["TaskId"].asString();
stageObject.taskList.push_back(taskListObject);
}
data_.stageList.push_back(stageObject);

View File

@@ -43,18 +43,21 @@ void DescribeRegionsResult::parse(const std::string &payload)
for (auto valueRegionsRegion : allRegionsNode)
{
Region regionsObject;
if(!valueRegionsRegion["RegionId"].isNull())
regionsObject.regionId = valueRegionsRegion["RegionId"].asString();
if(!valueRegionsRegion["RegionEndpoint"].isNull())
regionsObject.regionEndpoint = valueRegionsRegion["RegionEndpoint"].asString();
if(!valueRegionsRegion["LocalName"].isNull())
regionsObject.localName = valueRegionsRegion["LocalName"].asString();
if(!valueRegionsRegion["RegionEndpoint"].isNull())
regionsObject.regionEndpoint = valueRegionsRegion["RegionEndpoint"].asString();
if(!valueRegionsRegion["RegionId"].isNull())
regionsObject.regionId = valueRegionsRegion["RegionId"].asString();
auto allRecommendZones = value["RecommendZones"]["RecommendZone"];
for (auto value : allRecommendZones)
regionsObject.recommendZones.push_back(value.asString());
regions_.push_back(regionsObject);
}
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
}

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.
*/
#include <alibabacloud/sae/model/DownloadFilesRequest.h>
using AlibabaCloud::Sae::Model::DownloadFilesRequest;
DownloadFilesRequest::DownloadFilesRequest() :
RoaServiceRequest("sae", "2019-05-06")
{
setResourcePath("/pop/v1/sam/app/downloadFiles");
setMethod(HttpRequest::Method::Post);
}
DownloadFilesRequest::~DownloadFilesRequest()
{}
std::string DownloadFilesRequest::getInstanceId()const
{
return instanceId_;
}
void DownloadFilesRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string DownloadFilesRequest::getLocalpath()const
{
return localpath_;
}
void DownloadFilesRequest::setLocalpath(const std::string& localpath)
{
localpath_ = localpath;
setParameter("Localpath", localpath);
}
std::string DownloadFilesRequest::getAppId()const
{
return appId_;
}
void DownloadFilesRequest::setAppId(const std::string& appId)
{
appId_ = appId;
setParameter("AppId", appId);
}

View File

@@ -0,0 +1,86 @@
/*
* 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/sae/model/DownloadFilesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Sae;
using namespace AlibabaCloud::Sae::Model;
DownloadFilesResult::DownloadFilesResult() :
ServiceResult()
{}
DownloadFilesResult::DownloadFilesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DownloadFilesResult::~DownloadFilesResult()
{}
void DownloadFilesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["TraceId"].isNull())
traceId_ = value["TraceId"].asString();
if(!value["Data"].isNull())
data_ = value["Data"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string DownloadFilesResult::getMessage()const
{
return message_;
}
std::string DownloadFilesResult::getTraceId()const
{
return traceId_;
}
std::string DownloadFilesResult::getData()const
{
return data_;
}
std::string DownloadFilesResult::getErrorCode()const
{
return errorCode_;
}
std::string DownloadFilesResult::getCode()const
{
return code_;
}
bool DownloadFilesResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,74 @@
/*
* 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/sae/model/ListAppServicesPageRequest.h>
using AlibabaCloud::Sae::Model::ListAppServicesPageRequest;
ListAppServicesPageRequest::ListAppServicesPageRequest() :
RoaServiceRequest("sae", "2019-05-06")
{
setResourcePath("/pop/v1/sam/service/listAppServicesPage");
setMethod(HttpRequest::Method::Get);
}
ListAppServicesPageRequest::~ListAppServicesPageRequest()
{}
std::string ListAppServicesPageRequest::getServiceType()const
{
return serviceType_;
}
void ListAppServicesPageRequest::setServiceType(const std::string& serviceType)
{
serviceType_ = serviceType;
setParameter("ServiceType", serviceType);
}
std::string ListAppServicesPageRequest::getAppId()const
{
return appId_;
}
void ListAppServicesPageRequest::setAppId(const std::string& appId)
{
appId_ = appId;
setParameter("AppId", appId);
}
int ListAppServicesPageRequest::getPageSize()const
{
return pageSize_;
}
void ListAppServicesPageRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
int ListAppServicesPageRequest::getPageNumber()const
{
return pageNumber_;
}
void ListAppServicesPageRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}

View File

@@ -0,0 +1,120 @@
/*
* 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/sae/model/ListAppServicesPageResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Sae;
using namespace AlibabaCloud::Sae::Model;
ListAppServicesPageResult::ListAppServicesPageResult() :
ServiceResult()
{}
ListAppServicesPageResult::ListAppServicesPageResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListAppServicesPageResult::~ListAppServicesPageResult()
{}
void ListAppServicesPageResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataNode = value["Data"]["DataItem"];
for (auto valueDataDataItem : allDataNode)
{
DataItem dataObject;
if(!valueDataDataItem["CurrentPage"].isNull())
dataObject.currentPage = valueDataDataItem["CurrentPage"].asString();
if(!valueDataDataItem["TotalSize"].isNull())
dataObject.totalSize = valueDataDataItem["TotalSize"].asString();
if(!valueDataDataItem["PageNumber"].isNull())
dataObject.pageNumber = valueDataDataItem["PageNumber"].asString();
if(!valueDataDataItem["PageSize"].isNull())
dataObject.pageSize = valueDataDataItem["PageSize"].asString();
auto allResultNode = valueDataDataItem["Result"]["MscAgentServiceResponse"];
for (auto valueDataDataItemResultMscAgentServiceResponse : allResultNode)
{
DataItem::MscAgentServiceResponse resultObject;
if(!valueDataDataItemResultMscAgentServiceResponse["EdasAppName"].isNull())
resultObject.edasAppName = valueDataDataItemResultMscAgentServiceResponse["EdasAppName"].asString();
if(!valueDataDataItemResultMscAgentServiceResponse["Version"].isNull())
resultObject.version = valueDataDataItemResultMscAgentServiceResponse["Version"].asString();
if(!valueDataDataItemResultMscAgentServiceResponse["InstanceNum"].isNull())
resultObject.instanceNum = std::stol(valueDataDataItemResultMscAgentServiceResponse["InstanceNum"].asString());
if(!valueDataDataItemResultMscAgentServiceResponse["EdasAppId"].isNull())
resultObject.edasAppId = valueDataDataItemResultMscAgentServiceResponse["EdasAppId"].asString();
if(!valueDataDataItemResultMscAgentServiceResponse["GmtModifyTime"].isNull())
resultObject.gmtModifyTime = valueDataDataItemResultMscAgentServiceResponse["GmtModifyTime"].asString();
if(!valueDataDataItemResultMscAgentServiceResponse["ServiceName"].isNull())
resultObject.serviceName = valueDataDataItemResultMscAgentServiceResponse["ServiceName"].asString();
if(!valueDataDataItemResultMscAgentServiceResponse["Group"].isNull())
resultObject.group = valueDataDataItemResultMscAgentServiceResponse["Group"].asString();
if(!valueDataDataItemResultMscAgentServiceResponse["ClusterName"].isNull())
resultObject.clusterName = valueDataDataItemResultMscAgentServiceResponse["ClusterName"].asString();
dataObject.result.push_back(resultObject);
}
data_.push_back(dataObject);
}
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["TraceId"].isNull())
traceId_ = value["TraceId"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string ListAppServicesPageResult::getMessage()const
{
return message_;
}
std::string ListAppServicesPageResult::getTraceId()const
{
return traceId_;
}
std::vector<ListAppServicesPageResult::DataItem> ListAppServicesPageResult::getData()const
{
return data_;
}
std::string ListAppServicesPageResult::getErrorCode()const
{
return errorCode_;
}
std::string ListAppServicesPageResult::getCode()const
{
return code_;
}
bool ListAppServicesPageResult::getSuccess()const
{
return success_;
}

View File

@@ -61,6 +61,17 @@ void ListApplicationsRequest::setPageSize(int pageSize)
setParameter("PageSize", std::to_string(pageSize));
}
std::string ListApplicationsRequest::getOrderBy()const
{
return orderBy_;
}
void ListApplicationsRequest::setOrderBy(const std::string& orderBy)
{
orderBy_ = orderBy;
setParameter("OrderBy", orderBy);
}
int ListApplicationsRequest::getCurrentPage()const
{
return currentPage_;
@@ -72,6 +83,39 @@ void ListApplicationsRequest::setCurrentPage(int currentPage)
setParameter("CurrentPage", std::to_string(currentPage));
}
std::string ListApplicationsRequest::getFieldValue()const
{
return fieldValue_;
}
void ListApplicationsRequest::setFieldValue(const std::string& fieldValue)
{
fieldValue_ = fieldValue;
setParameter("FieldValue", fieldValue);
}
bool ListApplicationsRequest::getReverse()const
{
return reverse_;
}
void ListApplicationsRequest::setReverse(bool reverse)
{
reverse_ = reverse;
setParameter("Reverse", reverse ? "true" : "false");
}
std::string ListApplicationsRequest::getFieldType()const
{
return fieldType_;
}
void ListApplicationsRequest::setFieldType(const std::string& fieldType)
{
fieldType_ = fieldType;
setParameter("FieldType", fieldType);
}
std::string ListApplicationsRequest::getTags()const
{
return tags_;

View File

@@ -40,44 +40,44 @@ void ListApplicationsResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["CurrentPage"].isNull())
data_.currentPage = std::stoi(dataNode["CurrentPage"].asString());
if(!dataNode["TotalSize"].isNull())
data_.totalSize = std::stoi(dataNode["TotalSize"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
auto allApplicationsNode = dataNode["Applications"]["Application"];
for (auto dataNodeApplicationsApplication : allApplicationsNode)
{
Data::Application applicationObject;
if(!dataNodeApplicationsApplication["Instances"].isNull())
applicationObject.instances = std::stoi(dataNodeApplicationsApplication["Instances"].asString());
if(!dataNodeApplicationsApplication["ScaleRuleEnabled"].isNull())
applicationObject.scaleRuleEnabled = dataNodeApplicationsApplication["ScaleRuleEnabled"].asString() == "true";
if(!dataNodeApplicationsApplication["AppDescription"].isNull())
applicationObject.appDescription = dataNodeApplicationsApplication["AppDescription"].asString();
if(!dataNodeApplicationsApplication["AppId"].isNull())
applicationObject.appId = dataNodeApplicationsApplication["AppId"].asString();
if(!dataNodeApplicationsApplication["RunningInstances"].isNull())
applicationObject.runningInstances = std::stoi(dataNodeApplicationsApplication["RunningInstances"].asString());
if(!dataNodeApplicationsApplication["RegionId"].isNull())
applicationObject.regionId = dataNodeApplicationsApplication["RegionId"].asString();
if(!dataNodeApplicationsApplication["NamespaceId"].isNull())
applicationObject.namespaceId = dataNodeApplicationsApplication["NamespaceId"].asString();
if(!dataNodeApplicationsApplication["ScaleRuleType"].isNull())
applicationObject.scaleRuleType = dataNodeApplicationsApplication["ScaleRuleType"].asString();
if(!dataNodeApplicationsApplication["AppDeletingStatus"].isNull())
applicationObject.appDeletingStatus = dataNodeApplicationsApplication["AppDeletingStatus"].asString() == "true";
if(!dataNodeApplicationsApplication["AppName"].isNull())
applicationObject.appName = dataNodeApplicationsApplication["AppName"].asString();
if(!dataNodeApplicationsApplication["NamespaceId"].isNull())
applicationObject.namespaceId = dataNodeApplicationsApplication["NamespaceId"].asString();
if(!dataNodeApplicationsApplication["AppDeletingStatus"].isNull())
applicationObject.appDeletingStatus = dataNodeApplicationsApplication["AppDeletingStatus"].asString() == "true";
if(!dataNodeApplicationsApplication["AppId"].isNull())
applicationObject.appId = dataNodeApplicationsApplication["AppId"].asString();
if(!dataNodeApplicationsApplication["ScaleRuleEnabled"].isNull())
applicationObject.scaleRuleEnabled = dataNodeApplicationsApplication["ScaleRuleEnabled"].asString() == "true";
if(!dataNodeApplicationsApplication["ScaleRuleType"].isNull())
applicationObject.scaleRuleType = dataNodeApplicationsApplication["ScaleRuleType"].asString();
if(!dataNodeApplicationsApplication["RunningInstances"].isNull())
applicationObject.runningInstances = std::stoi(dataNodeApplicationsApplication["RunningInstances"].asString());
if(!dataNodeApplicationsApplication["Instances"].isNull())
applicationObject.instances = std::stoi(dataNodeApplicationsApplication["Instances"].asString());
if(!dataNodeApplicationsApplication["RegionId"].isNull())
applicationObject.regionId = dataNodeApplicationsApplication["RegionId"].asString();
if(!dataNodeApplicationsApplication["AppDescription"].isNull())
applicationObject.appDescription = dataNodeApplicationsApplication["AppDescription"].asString();
auto allTagsNode = dataNodeApplicationsApplication["Tags"]["TagsItem"];
for (auto dataNodeApplicationsApplicationTagsTagsItem : allTagsNode)
{
Data::Application::TagsItem tagsObject;
if(!dataNodeApplicationsApplicationTagsTagsItem["Value"].isNull())
tagsObject.value = dataNodeApplicationsApplicationTagsTagsItem["Value"].asString();
if(!dataNodeApplicationsApplicationTagsTagsItem["Key"].isNull())
tagsObject.key = dataNodeApplicationsApplicationTagsTagsItem["Key"].asString();
if(!dataNodeApplicationsApplicationTagsTagsItem["Value"].isNull())
tagsObject.value = dataNodeApplicationsApplicationTagsTagsItem["Value"].asString();
applicationObject.tags.push_back(tagsObject);
}
data_.applications.push_back(applicationObject);
@@ -90,6 +90,12 @@ void ListApplicationsResult::parse(const std::string &payload)
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["CurrentPage"].isNull())
currentPage_ = std::stoi(value["CurrentPage"].asString());
if(!value["TotalSize"].isNull())
totalSize_ = std::stoi(value["TotalSize"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
}
@@ -98,6 +104,16 @@ std::string ListApplicationsResult::getMessage()const
return message_;
}
int ListApplicationsResult::getPageSize()const
{
return pageSize_;
}
int ListApplicationsResult::getCurrentPage()const
{
return currentPage_;
}
ListApplicationsResult::Data ListApplicationsResult::getData()const
{
return data_;
@@ -108,6 +124,11 @@ std::string ListApplicationsResult::getErrorCode()const
return errorCode_;
}
int ListApplicationsResult::getTotalSize()const
{
return totalSize_;
}
std::string ListApplicationsResult::getCode()const
{
return code_;

View File

@@ -0,0 +1,41 @@
/*
* 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/sae/model/ListGreyTagRouteRequest.h>
using AlibabaCloud::Sae::Model::ListGreyTagRouteRequest;
ListGreyTagRouteRequest::ListGreyTagRouteRequest() :
RoaServiceRequest("sae", "2019-05-06")
{
setResourcePath("/pop/v1/sam/tagroute/greyTagRouteList");
setMethod(HttpRequest::Method::Get);
}
ListGreyTagRouteRequest::~ListGreyTagRouteRequest()
{}
std::string ListGreyTagRouteRequest::getAppId()const
{
return appId_;
}
void ListGreyTagRouteRequest::setAppId(const std::string& appId)
{
appId_ = appId;
setParameter("AppId", appId);
}

View File

@@ -0,0 +1,173 @@
/*
* 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/sae/model/ListGreyTagRouteResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Sae;
using namespace AlibabaCloud::Sae::Model;
ListGreyTagRouteResult::ListGreyTagRouteResult() :
ServiceResult()
{}
ListGreyTagRouteResult::ListGreyTagRouteResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListGreyTagRouteResult::~ListGreyTagRouteResult()
{}
void ListGreyTagRouteResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["CurrentPage"].isNull())
data_.currentPage = std::stoi(dataNode["CurrentPage"].asString());
if(!dataNode["TotalSize"].isNull())
data_.totalSize = std::stol(dataNode["TotalSize"].asString());
auto allResultNode = dataNode["Result"]["resultItem"];
for (auto dataNodeResultresultItem : allResultNode)
{
Data::ResultItem resultItemObject;
if(!dataNodeResultresultItem["Description"].isNull())
resultItemObject.description = dataNodeResultresultItem["Description"].asString();
if(!dataNodeResultresultItem["GreyTagRouteId"].isNull())
resultItemObject.greyTagRouteId = std::stol(dataNodeResultresultItem["GreyTagRouteId"].asString());
if(!dataNodeResultresultItem["CreateTime"].isNull())
resultItemObject.createTime = std::stol(dataNodeResultresultItem["CreateTime"].asString());
if(!dataNodeResultresultItem["UpdateTime"].isNull())
resultItemObject.updateTime = std::stol(dataNodeResultresultItem["UpdateTime"].asString());
if(!dataNodeResultresultItem["Name"].isNull())
resultItemObject.name = dataNodeResultresultItem["Name"].asString();
auto allScRulesNode = dataNodeResultresultItem["ScRules"]["scRule"];
for (auto dataNodeResultresultItemScRulesscRule : allScRulesNode)
{
Data::ResultItem::ScRule scRulesObject;
if(!dataNodeResultresultItemScRulesscRule["path"].isNull())
scRulesObject.path = dataNodeResultresultItemScRulesscRule["path"].asString();
if(!dataNodeResultresultItemScRulesscRule["condition"].isNull())
scRulesObject.condition = dataNodeResultresultItemScRulesscRule["condition"].asString();
auto allitemsNode = dataNodeResultresultItemScRulesscRule["items"]["item"];
for (auto dataNodeResultresultItemScRulesscRuleitemsitem : allitemsNode)
{
Data::ResultItem::ScRule::Item itemsObject;
if(!dataNodeResultresultItemScRulesscRuleitemsitem["name"].isNull())
itemsObject.name = dataNodeResultresultItemScRulesscRuleitemsitem["name"].asString();
if(!dataNodeResultresultItemScRulesscRuleitemsitem["index"].isNull())
itemsObject.index = std::stoi(dataNodeResultresultItemScRulesscRuleitemsitem["index"].asString());
if(!dataNodeResultresultItemScRulesscRuleitemsitem["expr"].isNull())
itemsObject.expr = dataNodeResultresultItemScRulesscRuleitemsitem["expr"].asString();
if(!dataNodeResultresultItemScRulesscRuleitemsitem["type"].isNull())
itemsObject.type = dataNodeResultresultItemScRulesscRuleitemsitem["type"].asString();
if(!dataNodeResultresultItemScRulesscRuleitemsitem["cond"].isNull())
itemsObject.cond = dataNodeResultresultItemScRulesscRuleitemsitem["cond"].asString();
if(!dataNodeResultresultItemScRulesscRuleitemsitem["value"].isNull())
itemsObject.value = dataNodeResultresultItemScRulesscRuleitemsitem["value"].asString();
if(!dataNodeResultresultItemScRulesscRuleitemsitem["operator"].isNull())
itemsObject._operator = dataNodeResultresultItemScRulesscRuleitemsitem["operator"].asString();
scRulesObject.items.push_back(itemsObject);
}
resultItemObject.scRules.push_back(scRulesObject);
}
auto allDubboRulesNode = dataNodeResultresultItem["DubboRules"]["dubboRule"];
for (auto dataNodeResultresultItemDubboRulesdubboRule : allDubboRulesNode)
{
Data::ResultItem::DubboRule dubboRulesObject;
if(!dataNodeResultresultItemDubboRulesdubboRule["condition"].isNull())
dubboRulesObject.condition = dataNodeResultresultItemDubboRulesdubboRule["condition"].asString();
if(!dataNodeResultresultItemDubboRulesdubboRule["methodName"].isNull())
dubboRulesObject.methodName = dataNodeResultresultItemDubboRulesdubboRule["methodName"].asString();
if(!dataNodeResultresultItemDubboRulesdubboRule["serviceName"].isNull())
dubboRulesObject.serviceName = dataNodeResultresultItemDubboRulesdubboRule["serviceName"].asString();
if(!dataNodeResultresultItemDubboRulesdubboRule["version"].isNull())
dubboRulesObject.version = dataNodeResultresultItemDubboRulesdubboRule["version"].asString();
if(!dataNodeResultresultItemDubboRulesdubboRule["group"].isNull())
dubboRulesObject.group = dataNodeResultresultItemDubboRulesdubboRule["group"].asString();
auto allitems1Node = dataNodeResultresultItemDubboRulesdubboRule["items"]["item"];
for (auto dataNodeResultresultItemDubboRulesdubboRuleitemsitem : allitems1Node)
{
Data::ResultItem::DubboRule::Item2 items1Object;
if(!dataNodeResultresultItemDubboRulesdubboRuleitemsitem["name"].isNull())
items1Object.name = dataNodeResultresultItemDubboRulesdubboRuleitemsitem["name"].asString();
if(!dataNodeResultresultItemDubboRulesdubboRuleitemsitem["index"].isNull())
items1Object.index = std::stoi(dataNodeResultresultItemDubboRulesdubboRuleitemsitem["index"].asString());
if(!dataNodeResultresultItemDubboRulesdubboRuleitemsitem["expr"].isNull())
items1Object.expr = dataNodeResultresultItemDubboRulesdubboRuleitemsitem["expr"].asString();
if(!dataNodeResultresultItemDubboRulesdubboRuleitemsitem["type"].isNull())
items1Object.type = dataNodeResultresultItemDubboRulesdubboRuleitemsitem["type"].asString();
if(!dataNodeResultresultItemDubboRulesdubboRuleitemsitem["cond"].isNull())
items1Object.cond = dataNodeResultresultItemDubboRulesdubboRuleitemsitem["cond"].asString();
if(!dataNodeResultresultItemDubboRulesdubboRuleitemsitem["value"].isNull())
items1Object.value = dataNodeResultresultItemDubboRulesdubboRuleitemsitem["value"].asString();
if(!dataNodeResultresultItemDubboRulesdubboRuleitemsitem["operator"].isNull())
items1Object._operator = dataNodeResultresultItemDubboRulesdubboRuleitemsitem["operator"].asString();
dubboRulesObject.items1.push_back(items1Object);
}
resultItemObject.dubboRules.push_back(dubboRulesObject);
}
data_.result.push_back(resultItemObject);
}
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["TraceId"].isNull())
traceId_ = value["TraceId"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string ListGreyTagRouteResult::getMessage()const
{
return message_;
}
std::string ListGreyTagRouteResult::getTraceId()const
{
return traceId_;
}
ListGreyTagRouteResult::Data ListGreyTagRouteResult::getData()const
{
return data_;
}
std::string ListGreyTagRouteResult::getErrorCode()const
{
return errorCode_;
}
std::string ListGreyTagRouteResult::getCode()const
{
return code_;
}
bool ListGreyTagRouteResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,52 @@
/*
* 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/sae/model/ReduceApplicationCapacityByInstanceIdsRequest.h>
using AlibabaCloud::Sae::Model::ReduceApplicationCapacityByInstanceIdsRequest;
ReduceApplicationCapacityByInstanceIdsRequest::ReduceApplicationCapacityByInstanceIdsRequest() :
RoaServiceRequest("sae", "2019-05-06")
{
setResourcePath("/pop/v1/sam/app/ScaleInApplicationWithInstanceIds");
setMethod(HttpRequest::Method::Put);
}
ReduceApplicationCapacityByInstanceIdsRequest::~ReduceApplicationCapacityByInstanceIdsRequest()
{}
std::string ReduceApplicationCapacityByInstanceIdsRequest::getInstanceIds()const
{
return instanceIds_;
}
void ReduceApplicationCapacityByInstanceIdsRequest::setInstanceIds(const std::string& instanceIds)
{
instanceIds_ = instanceIds;
setParameter("InstanceIds", instanceIds);
}
std::string ReduceApplicationCapacityByInstanceIdsRequest::getAppId()const
{
return appId_;
}
void ReduceApplicationCapacityByInstanceIdsRequest::setAppId(const std::string& appId)
{
appId_ = appId;
setParameter("AppId", appId);
}

View File

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

View File

@@ -61,3 +61,14 @@ void RescaleApplicationRequest::setAppId(const std::string& appId)
setParameter("AppId", appId);
}
bool RescaleApplicationRequest::getAutoEnableApplicationScalingRule()const
{
return autoEnableApplicationScalingRule_;
}
void RescaleApplicationRequest::setAutoEnableApplicationScalingRule(bool autoEnableApplicationScalingRule)
{
autoEnableApplicationScalingRule_ = autoEnableApplicationScalingRule;
setParameter("AutoEnableApplicationScalingRule", autoEnableApplicationScalingRule ? "true" : "false");
}

View File

@@ -42,14 +42,14 @@ void RescaleApplicationResult::parse(const std::string &payload)
auto dataNode = value["Data"];
if(!dataNode["ChangeOrderId"].isNull())
data_.changeOrderId = dataNode["ChangeOrderId"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}

View File

@@ -42,16 +42,16 @@ void RestartApplicationResult::parse(const std::string &payload)
auto dataNode = value["Data"];
if(!dataNode["ChangeOrderId"].isNull())
data_.changeOrderId = dataNode["ChangeOrderId"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["TraceId"].isNull())
traceId_ = value["TraceId"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}

View File

@@ -42,6 +42,8 @@ void RollbackApplicationResult::parse(const std::string &payload)
auto dataNode = value["Data"];
if(!dataNode["ChangeOrderId"].isNull())
data_.changeOrderId = dataNode["ChangeOrderId"].asString();
if(!dataNode["IsNeedApproval"].isNull())
data_.isNeedApproval = dataNode["IsNeedApproval"].asString() == "true";
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["TraceId"].isNull())

View File

@@ -47,7 +47,7 @@ std::string UpdateConfigMapRequest::getDescription()const
void UpdateConfigMapRequest::setDescription(const std::string& description)
{
description_ = description;
setBodyParameter("Description", description);
setParameter("Description", description);
}
long UpdateConfigMapRequest::getConfigMapId()const

View File

@@ -42,14 +42,14 @@ void UpdateConfigMapResult::parse(const std::string &payload)
auto dataNode = value["Data"];
if(!dataNode["ConfigMapId"].isNull())
data_.configMapId = dataNode["ConfigMapId"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["TraceId"].isNull())
traceId_ = value["TraceId"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";

View File

@@ -0,0 +1,74 @@
/*
* 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/sae/model/UpdateGreyTagRouteRequest.h>
using AlibabaCloud::Sae::Model::UpdateGreyTagRouteRequest;
UpdateGreyTagRouteRequest::UpdateGreyTagRouteRequest() :
RoaServiceRequest("sae", "2019-05-06")
{
setResourcePath("/pop/v1/sam/tagroute/greyTagRoute");
setMethod(HttpRequest::Method::Put);
}
UpdateGreyTagRouteRequest::~UpdateGreyTagRouteRequest()
{}
long UpdateGreyTagRouteRequest::getGreyTagRouteId()const
{
return greyTagRouteId_;
}
void UpdateGreyTagRouteRequest::setGreyTagRouteId(long greyTagRouteId)
{
greyTagRouteId_ = greyTagRouteId;
setParameter("GreyTagRouteId", std::to_string(greyTagRouteId));
}
std::string UpdateGreyTagRouteRequest::getDescription()const
{
return description_;
}
void UpdateGreyTagRouteRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
std::string UpdateGreyTagRouteRequest::getDubboRules()const
{
return dubboRules_;
}
void UpdateGreyTagRouteRequest::setDubboRules(const std::string& dubboRules)
{
dubboRules_ = dubboRules;
setParameter("DubboRules", dubboRules);
}
std::string UpdateGreyTagRouteRequest::getScRules()const
{
return scRules_;
}
void UpdateGreyTagRouteRequest::setScRules(const std::string& scRules)
{
scRules_ = scRules;
setParameter("ScRules", scRules);
}

View File

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

View File

@@ -0,0 +1,74 @@
/*
* 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/sae/model/UploadFilesRequest.h>
using AlibabaCloud::Sae::Model::UploadFilesRequest;
UploadFilesRequest::UploadFilesRequest() :
RoaServiceRequest("sae", "2019-05-06")
{
setResourcePath("/pop/v1/sam/app/uploadFiles");
setMethod(HttpRequest::Method::Post);
}
UploadFilesRequest::~UploadFilesRequest()
{}
std::string UploadFilesRequest::getInstanceId()const
{
return instanceId_;
}
void UploadFilesRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string UploadFilesRequest::getCloudUrl()const
{
return cloudUrl_;
}
void UploadFilesRequest::setCloudUrl(const std::string& cloudUrl)
{
cloudUrl_ = cloudUrl;
setParameter("CloudUrl", cloudUrl);
}
std::string UploadFilesRequest::getLocalpath()const
{
return localpath_;
}
void UploadFilesRequest::setLocalpath(const std::string& localpath)
{
localpath_ = localpath;
setParameter("Localpath", localpath);
}
std::string UploadFilesRequest::getAppId()const
{
return appId_;
}
void UploadFilesRequest::setAppId(const std::string& appId)
{
appId_ = appId;
setParameter("AppId", appId);
}

View File

@@ -0,0 +1,86 @@
/*
* 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/sae/model/UploadFilesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Sae;
using namespace AlibabaCloud::Sae::Model;
UploadFilesResult::UploadFilesResult() :
ServiceResult()
{}
UploadFilesResult::UploadFilesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UploadFilesResult::~UploadFilesResult()
{}
void UploadFilesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["TraceId"].isNull())
traceId_ = value["TraceId"].asString();
if(!value["Data"].isNull())
data_ = value["Data"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string UploadFilesResult::getMessage()const
{
return message_;
}
std::string UploadFilesResult::getTraceId()const
{
return traceId_;
}
std::string UploadFilesResult::getData()const
{
return data_;
}
std::string UploadFilesResult::getErrorCode()const
{
return errorCode_;
}
std::string UploadFilesResult::getCode()const
{
return code_;
}
bool UploadFilesResult::getSuccess()const
{
return success_;
}