由婉明发起的AFS SDK自动发布, BUILD_ID=385, 版本号:1.0.10

发布日志:
1, this version is new of captcha management and nvc analyze
This commit is contained in:
haowei.yao
2018-02-02 13:25:10 +08:00
parent 31a064d156
commit b0ac64dff3
55 changed files with 4063 additions and 2 deletions

493
afs/src/AfsClient.cc Normal file
View File

@@ -0,0 +1,493 @@
/*
* 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/afs/AfsClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::Afs;
using namespace AlibabaCloud::Afs::Model;
AfsClient::AfsClient(const Credentials &credentials, const ClientConfiguration &configuration) :
RpcServiceClient(std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), "");
}
AfsClient::AfsClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), "");
}
AfsClient::AfsClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), "");
}
AfsClient::~AfsClient()
{}
CoreClient::EndpointOutcome AfsClient::endpoint()const
{
if(!configuration().endpoint().empty())
return CoreClient::EndpointOutcome(configuration().endpoint());
auto endpoint = endpointProvider_->getEndpoint();
if (endpoint.empty())
return CoreClient::EndpointOutcome(Error("InvalidEndpoint",""));
else
return CoreClient::EndpointOutcome(endpoint);
}
AfsClient::DescribeEarlyWarningOutcome AfsClient::describeEarlyWarning(const DescribeEarlyWarningRequest &request) const
{
auto endpointOutcome = endpoint();
if (!endpointOutcome.isSuccess())
return DescribeEarlyWarningOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeEarlyWarningOutcome(DescribeEarlyWarningResult(outcome.result()));
else
return DescribeEarlyWarningOutcome(outcome.error());
}
void AfsClient::describeEarlyWarningAsync(const DescribeEarlyWarningRequest& request, const DescribeEarlyWarningAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeEarlyWarning(request), context);
};
asyncExecute(new Runnable(fn));
}
AfsClient::DescribeEarlyWarningOutcomeCallable AfsClient::describeEarlyWarningCallable(const DescribeEarlyWarningRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeEarlyWarningOutcome()>>(
[this, request]()
{
return this->describeEarlyWarning(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AfsClient::SetEarlyWarningOutcome AfsClient::setEarlyWarning(const SetEarlyWarningRequest &request) const
{
auto endpointOutcome = endpoint();
if (!endpointOutcome.isSuccess())
return SetEarlyWarningOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SetEarlyWarningOutcome(SetEarlyWarningResult(outcome.result()));
else
return SetEarlyWarningOutcome(outcome.error());
}
void AfsClient::setEarlyWarningAsync(const SetEarlyWarningRequest& request, const SetEarlyWarningAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, setEarlyWarning(request), context);
};
asyncExecute(new Runnable(fn));
}
AfsClient::SetEarlyWarningOutcomeCallable AfsClient::setEarlyWarningCallable(const SetEarlyWarningRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SetEarlyWarningOutcome()>>(
[this, request]()
{
return this->setEarlyWarning(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AfsClient::DescribeCaptchaIpCityOutcome AfsClient::describeCaptchaIpCity(const DescribeCaptchaIpCityRequest &request) const
{
auto endpointOutcome = endpoint();
if (!endpointOutcome.isSuccess())
return DescribeCaptchaIpCityOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeCaptchaIpCityOutcome(DescribeCaptchaIpCityResult(outcome.result()));
else
return DescribeCaptchaIpCityOutcome(outcome.error());
}
void AfsClient::describeCaptchaIpCityAsync(const DescribeCaptchaIpCityRequest& request, const DescribeCaptchaIpCityAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeCaptchaIpCity(request), context);
};
asyncExecute(new Runnable(fn));
}
AfsClient::DescribeCaptchaIpCityOutcomeCallable AfsClient::describeCaptchaIpCityCallable(const DescribeCaptchaIpCityRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeCaptchaIpCityOutcome()>>(
[this, request]()
{
return this->describeCaptchaIpCity(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AfsClient::ConfigurationStyleOutcome AfsClient::configurationStyle(const ConfigurationStyleRequest &request) const
{
auto endpointOutcome = endpoint();
if (!endpointOutcome.isSuccess())
return ConfigurationStyleOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ConfigurationStyleOutcome(ConfigurationStyleResult(outcome.result()));
else
return ConfigurationStyleOutcome(outcome.error());
}
void AfsClient::configurationStyleAsync(const ConfigurationStyleRequest& request, const ConfigurationStyleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, configurationStyle(request), context);
};
asyncExecute(new Runnable(fn));
}
AfsClient::ConfigurationStyleOutcomeCallable AfsClient::configurationStyleCallable(const ConfigurationStyleRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ConfigurationStyleOutcome()>>(
[this, request]()
{
return this->configurationStyle(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AfsClient::DescribeCaptchaMinOutcome AfsClient::describeCaptchaMin(const DescribeCaptchaMinRequest &request) const
{
auto endpointOutcome = endpoint();
if (!endpointOutcome.isSuccess())
return DescribeCaptchaMinOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeCaptchaMinOutcome(DescribeCaptchaMinResult(outcome.result()));
else
return DescribeCaptchaMinOutcome(outcome.error());
}
void AfsClient::describeCaptchaMinAsync(const DescribeCaptchaMinRequest& request, const DescribeCaptchaMinAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeCaptchaMin(request), context);
};
asyncExecute(new Runnable(fn));
}
AfsClient::DescribeCaptchaMinOutcomeCallable AfsClient::describeCaptchaMinCallable(const DescribeCaptchaMinRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeCaptchaMinOutcome()>>(
[this, request]()
{
return this->describeCaptchaMin(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AfsClient::DescribeCaptchaRiskOutcome AfsClient::describeCaptchaRisk(const DescribeCaptchaRiskRequest &request) const
{
auto endpointOutcome = endpoint();
if (!endpointOutcome.isSuccess())
return DescribeCaptchaRiskOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeCaptchaRiskOutcome(DescribeCaptchaRiskResult(outcome.result()));
else
return DescribeCaptchaRiskOutcome(outcome.error());
}
void AfsClient::describeCaptchaRiskAsync(const DescribeCaptchaRiskRequest& request, const DescribeCaptchaRiskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeCaptchaRisk(request), context);
};
asyncExecute(new Runnable(fn));
}
AfsClient::DescribeCaptchaRiskOutcomeCallable AfsClient::describeCaptchaRiskCallable(const DescribeCaptchaRiskRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeCaptchaRiskOutcome()>>(
[this, request]()
{
return this->describeCaptchaRisk(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AfsClient::AuthenticateSigOutcome AfsClient::authenticateSig(const AuthenticateSigRequest &request) const
{
auto endpointOutcome = endpoint();
if (!endpointOutcome.isSuccess())
return AuthenticateSigOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AuthenticateSigOutcome(AuthenticateSigResult(outcome.result()));
else
return AuthenticateSigOutcome(outcome.error());
}
void AfsClient::authenticateSigAsync(const AuthenticateSigRequest& request, const AuthenticateSigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, authenticateSig(request), context);
};
asyncExecute(new Runnable(fn));
}
AfsClient::AuthenticateSigOutcomeCallable AfsClient::authenticateSigCallable(const AuthenticateSigRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AuthenticateSigOutcome()>>(
[this, request]()
{
return this->authenticateSig(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AfsClient::DescribeConfigNameOutcome AfsClient::describeConfigName(const DescribeConfigNameRequest &request) const
{
auto endpointOutcome = endpoint();
if (!endpointOutcome.isSuccess())
return DescribeConfigNameOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeConfigNameOutcome(DescribeConfigNameResult(outcome.result()));
else
return DescribeConfigNameOutcome(outcome.error());
}
void AfsClient::describeConfigNameAsync(const DescribeConfigNameRequest& request, const DescribeConfigNameAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeConfigName(request), context);
};
asyncExecute(new Runnable(fn));
}
AfsClient::DescribeConfigNameOutcomeCallable AfsClient::describeConfigNameCallable(const DescribeConfigNameRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeConfigNameOutcome()>>(
[this, request]()
{
return this->describeConfigName(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AfsClient::DescribeCaptchaDayOutcome AfsClient::describeCaptchaDay(const DescribeCaptchaDayRequest &request) const
{
auto endpointOutcome = endpoint();
if (!endpointOutcome.isSuccess())
return DescribeCaptchaDayOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeCaptchaDayOutcome(DescribeCaptchaDayResult(outcome.result()));
else
return DescribeCaptchaDayOutcome(outcome.error());
}
void AfsClient::describeCaptchaDayAsync(const DescribeCaptchaDayRequest& request, const DescribeCaptchaDayAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeCaptchaDay(request), context);
};
asyncExecute(new Runnable(fn));
}
AfsClient::DescribeCaptchaDayOutcomeCallable AfsClient::describeCaptchaDayCallable(const DescribeCaptchaDayRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeCaptchaDayOutcome()>>(
[this, request]()
{
return this->describeCaptchaDay(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AfsClient::DescribePersonMachineListOutcome AfsClient::describePersonMachineList(const DescribePersonMachineListRequest &request) const
{
auto endpointOutcome = endpoint();
if (!endpointOutcome.isSuccess())
return DescribePersonMachineListOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribePersonMachineListOutcome(DescribePersonMachineListResult(outcome.result()));
else
return DescribePersonMachineListOutcome(outcome.error());
}
void AfsClient::describePersonMachineListAsync(const DescribePersonMachineListRequest& request, const DescribePersonMachineListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describePersonMachineList(request), context);
};
asyncExecute(new Runnable(fn));
}
AfsClient::DescribePersonMachineListOutcomeCallable AfsClient::describePersonMachineListCallable(const DescribePersonMachineListRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribePersonMachineListOutcome()>>(
[this, request]()
{
return this->describePersonMachineList(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AfsClient::CreateConfigurationOutcome AfsClient::createConfiguration(const CreateConfigurationRequest &request) const
{
auto endpointOutcome = endpoint();
if (!endpointOutcome.isSuccess())
return CreateConfigurationOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateConfigurationOutcome(CreateConfigurationResult(outcome.result()));
else
return CreateConfigurationOutcome(outcome.error());
}
void AfsClient::createConfigurationAsync(const CreateConfigurationRequest& request, const CreateConfigurationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createConfiguration(request), context);
};
asyncExecute(new Runnable(fn));
}
AfsClient::CreateConfigurationOutcomeCallable AfsClient::createConfigurationCallable(const CreateConfigurationRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateConfigurationOutcome()>>(
[this, request]()
{
return this->createConfiguration(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
AfsClient::AnalyzeNvcOutcome AfsClient::analyzeNvc(const AnalyzeNvcRequest &request) const
{
auto endpointOutcome = endpoint();
if (!endpointOutcome.isSuccess())
return AnalyzeNvcOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AnalyzeNvcOutcome(AnalyzeNvcResult(outcome.result()));
else
return AnalyzeNvcOutcome(outcome.error());
}
void AfsClient::analyzeNvcAsync(const AnalyzeNvcRequest& request, const AnalyzeNvcAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, analyzeNvc(request), context);
};
asyncExecute(new Runnable(fn));
}
AfsClient::AnalyzeNvcOutcomeCallable AfsClient::analyzeNvcCallable(const AnalyzeNvcRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AnalyzeNvcOutcome()>>(
[this, request]()
{
return this->analyzeNvc(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,71 @@
/*
* 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/afs/model/AnalyzeNvcRequest.h>
using AlibabaCloud::Afs::Model::AnalyzeNvcRequest;
AnalyzeNvcRequest::AnalyzeNvcRequest() :
RpcServiceRequest("afs", "2018-01-12", "AnalyzeNvc")
{}
AnalyzeNvcRequest::~AnalyzeNvcRequest()
{}
long AnalyzeNvcRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void AnalyzeNvcRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string AnalyzeNvcRequest::getSourceIp()const
{
return sourceIp_;
}
void AnalyzeNvcRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
std::string AnalyzeNvcRequest::getData()const
{
return data_;
}
void AnalyzeNvcRequest::setData(const std::string& data)
{
data_ = data;
setParameter("Data", data);
}
std::string AnalyzeNvcRequest::getScoreJsonStr()const
{
return scoreJsonStr_;
}
void AnalyzeNvcRequest::setScoreJsonStr(const std::string& scoreJsonStr)
{
scoreJsonStr_ = scoreJsonStr;
setParameter("ScoreJsonStr", scoreJsonStr);
}

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

View File

@@ -0,0 +1,115 @@
/*
* 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/afs/model/AuthenticateSigRequest.h>
using AlibabaCloud::Afs::Model::AuthenticateSigRequest;
AuthenticateSigRequest::AuthenticateSigRequest() :
RpcServiceRequest("afs", "2018-01-12", "AuthenticateSig")
{}
AuthenticateSigRequest::~AuthenticateSigRequest()
{}
std::string AuthenticateSigRequest::getSig()const
{
return sig_;
}
void AuthenticateSigRequest::setSig(const std::string& sig)
{
sig_ = sig;
setParameter("Sig", sig);
}
long AuthenticateSigRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void AuthenticateSigRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string AuthenticateSigRequest::getRemoteIp()const
{
return remoteIp_;
}
void AuthenticateSigRequest::setRemoteIp(const std::string& remoteIp)
{
remoteIp_ = remoteIp;
setParameter("RemoteIp", remoteIp);
}
std::string AuthenticateSigRequest::getSourceIp()const
{
return sourceIp_;
}
void AuthenticateSigRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
std::string AuthenticateSigRequest::getAppKey()const
{
return appKey_;
}
void AuthenticateSigRequest::setAppKey(const std::string& appKey)
{
appKey_ = appKey;
setParameter("AppKey", appKey);
}
std::string AuthenticateSigRequest::getSessionId()const
{
return sessionId_;
}
void AuthenticateSigRequest::setSessionId(const std::string& sessionId)
{
sessionId_ = sessionId;
setParameter("SessionId", sessionId);
}
std::string AuthenticateSigRequest::getToken()const
{
return token_;
}
void AuthenticateSigRequest::setToken(const std::string& token)
{
token_ = token;
setParameter("Token", token);
}
std::string AuthenticateSigRequest::getScene()const
{
return scene_;
}
void AuthenticateSigRequest::setScene(const std::string& scene)
{
scene_ = scene;
setParameter("Scene", scene);
}

View File

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

View File

@@ -0,0 +1,82 @@
/*
* 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/afs/model/ConfigurationStyleRequest.h>
using AlibabaCloud::Afs::Model::ConfigurationStyleRequest;
ConfigurationStyleRequest::ConfigurationStyleRequest() :
RpcServiceRequest("afs", "2018-01-12", "ConfigurationStyle")
{}
ConfigurationStyleRequest::~ConfigurationStyleRequest()
{}
long ConfigurationStyleRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void ConfigurationStyleRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string ConfigurationStyleRequest::getSourceIp()const
{
return sourceIp_;
}
void ConfigurationStyleRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
std::string ConfigurationStyleRequest::getConfigurationMethod()const
{
return configurationMethod_;
}
void ConfigurationStyleRequest::setConfigurationMethod(const std::string& configurationMethod)
{
configurationMethod_ = configurationMethod;
setParameter("ConfigurationMethod", configurationMethod);
}
std::string ConfigurationStyleRequest::getApplyType()const
{
return applyType_;
}
void ConfigurationStyleRequest::setApplyType(const std::string& applyType)
{
applyType_ = applyType;
setParameter("ApplyType", applyType);
}
std::string ConfigurationStyleRequest::getScene()const
{
return scene_;
}
void ConfigurationStyleRequest::setScene(const std::string& scene)
{
scene_ = scene;
setParameter("Scene", scene);
}

View File

@@ -0,0 +1,75 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/afs/model/ConfigurationStyleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Afs;
using namespace AlibabaCloud::Afs::Model;
ConfigurationStyleResult::ConfigurationStyleResult() :
ServiceResult()
{}
ConfigurationStyleResult::ConfigurationStyleResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ConfigurationStyleResult::~ConfigurationStyleResult()
{}
void ConfigurationStyleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allCodeData = value["CodeData"];
for (auto value : allCodeData)
{
CodeData codeDataObject;
if(!value["Html"].isNull())
codeDataObject.html = value["Html"].asString();
if(!value["Net"].isNull())
codeDataObject.net = value["Net"].asString();
if(!value["Php"].isNull())
codeDataObject.php = value["Php"].asString();
if(!value["Python"].isNull())
codeDataObject.python = value["Python"].asString();
if(!value["Java"].isNull())
codeDataObject.java = value["Java"].asString();
if(!value["NodeJs"].isNull())
codeDataObject.nodeJs = value["NodeJs"].asString();
codeData_.push_back(codeDataObject);
}
if(!value["BizCode"].isNull())
bizCode_ = value["BizCode"].asString();
}
std::vector<ConfigurationStyleResult::CodeData> ConfigurationStyleResult::getCodeData()const
{
return codeData_;
}
std::string ConfigurationStyleResult::getBizCode()const
{
return bizCode_;
}

View File

@@ -0,0 +1,104 @@
/*
* 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/afs/model/CreateConfigurationRequest.h>
using AlibabaCloud::Afs::Model::CreateConfigurationRequest;
CreateConfigurationRequest::CreateConfigurationRequest() :
RpcServiceRequest("afs", "2018-01-12", "CreateConfiguration")
{}
CreateConfigurationRequest::~CreateConfigurationRequest()
{}
long CreateConfigurationRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void CreateConfigurationRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string CreateConfigurationRequest::getSourceIp()const
{
return sourceIp_;
}
void CreateConfigurationRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
std::string CreateConfigurationRequest::getConfigurationName()const
{
return configurationName_;
}
void CreateConfigurationRequest::setConfigurationName(const std::string& configurationName)
{
configurationName_ = configurationName;
setParameter("ConfigurationName", configurationName);
}
std::string CreateConfigurationRequest::getMaxPV()const
{
return maxPV_;
}
void CreateConfigurationRequest::setMaxPV(const std::string& maxPV)
{
maxPV_ = maxPV;
setParameter("MaxPV", maxPV);
}
std::string CreateConfigurationRequest::getConfigurationMethod()const
{
return configurationMethod_;
}
void CreateConfigurationRequest::setConfigurationMethod(const std::string& configurationMethod)
{
configurationMethod_ = configurationMethod;
setParameter("ConfigurationMethod", configurationMethod);
}
std::string CreateConfigurationRequest::getApplyType()const
{
return applyType_;
}
void CreateConfigurationRequest::setApplyType(const std::string& applyType)
{
applyType_ = applyType;
setParameter("ApplyType", applyType);
}
std::string CreateConfigurationRequest::getScene()const
{
return scene_;
}
void CreateConfigurationRequest::setScene(const std::string& scene)
{
scene_ = scene;
setParameter("Scene", scene);
}

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

View File

@@ -0,0 +1,82 @@
/*
* 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/afs/model/DescribeCaptchaDayRequest.h>
using AlibabaCloud::Afs::Model::DescribeCaptchaDayRequest;
DescribeCaptchaDayRequest::DescribeCaptchaDayRequest() :
RpcServiceRequest("afs", "2018-01-12", "DescribeCaptchaDay")
{}
DescribeCaptchaDayRequest::~DescribeCaptchaDayRequest()
{}
long DescribeCaptchaDayRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribeCaptchaDayRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DescribeCaptchaDayRequest::getSourceIp()const
{
return sourceIp_;
}
void DescribeCaptchaDayRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
std::string DescribeCaptchaDayRequest::getConfigName()const
{
return configName_;
}
void DescribeCaptchaDayRequest::setConfigName(const std::string& configName)
{
configName_ = configName;
setParameter("ConfigName", configName);
}
std::string DescribeCaptchaDayRequest::getTime()const
{
return time_;
}
void DescribeCaptchaDayRequest::setTime(const std::string& time)
{
time_ = time;
setParameter("Time", time);
}
std::string DescribeCaptchaDayRequest::getType()const
{
return type_;
}
void DescribeCaptchaDayRequest::setType(const std::string& type)
{
type_ = type;
setParameter("Type", type);
}

View File

@@ -0,0 +1,88 @@
/*
* 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/afs/model/DescribeCaptchaDayResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Afs;
using namespace AlibabaCloud::Afs::Model;
DescribeCaptchaDayResult::DescribeCaptchaDayResult() :
ServiceResult()
{}
DescribeCaptchaDayResult::DescribeCaptchaDayResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeCaptchaDayResult::~DescribeCaptchaDayResult()
{}
void DescribeCaptchaDayResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allCaptchaDay = value["CaptchaDay"];
for (auto value : allCaptchaDay)
{
CaptchaDay captchaDayObject;
if(!value["Init"].isNull())
captchaDayObject.init = std::stoi(value["Init"].asString());
if(!value["AskForVerify"].isNull())
captchaDayObject.askForVerify = std::stoi(value["AskForVerify"].asString());
if(!value["DirecetStrategyInterception"].isNull())
captchaDayObject.direcetStrategyInterception = std::stoi(value["DirecetStrategyInterception"].asString());
if(!value["TwiceVerify"].isNull())
captchaDayObject.twiceVerify = std::stoi(value["TwiceVerify"].asString());
if(!value["Pass"].isNull())
captchaDayObject.pass = std::stoi(value["Pass"].asString());
if(!value["CheckTested"].isNull())
captchaDayObject.checkTested = std::stoi(value["CheckTested"].asString());
if(!value["UncheckTested"].isNull())
captchaDayObject.uncheckTested = std::stoi(value["UncheckTested"].asString());
if(!value["LegalSign"].isNull())
captchaDayObject.legalSign = std::stoi(value["LegalSign"].asString());
if(!value["MaliciousFlow"].isNull())
captchaDayObject.maliciousFlow = std::stoi(value["MaliciousFlow"].asString());
captchaDay_.push_back(captchaDayObject);
}
if(!value["BizCode"].isNull())
bizCode_ = value["BizCode"].asString();
if(!value["HasData"].isNull())
hasData_ = value["HasData"].asString() == "true";
}
std::vector<DescribeCaptchaDayResult::CaptchaDay> DescribeCaptchaDayResult::getCaptchaDay()const
{
return captchaDay_;
}
std::string DescribeCaptchaDayResult::getBizCode()const
{
return bizCode_;
}
bool DescribeCaptchaDayResult::getHasData()const
{
return hasData_;
}

View File

@@ -0,0 +1,82 @@
/*
* 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/afs/model/DescribeCaptchaIpCityRequest.h>
using AlibabaCloud::Afs::Model::DescribeCaptchaIpCityRequest;
DescribeCaptchaIpCityRequest::DescribeCaptchaIpCityRequest() :
RpcServiceRequest("afs", "2018-01-12", "DescribeCaptchaIpCity")
{}
DescribeCaptchaIpCityRequest::~DescribeCaptchaIpCityRequest()
{}
long DescribeCaptchaIpCityRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribeCaptchaIpCityRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DescribeCaptchaIpCityRequest::getSourceIp()const
{
return sourceIp_;
}
void DescribeCaptchaIpCityRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
std::string DescribeCaptchaIpCityRequest::getConfigName()const
{
return configName_;
}
void DescribeCaptchaIpCityRequest::setConfigName(const std::string& configName)
{
configName_ = configName;
setParameter("ConfigName", configName);
}
std::string DescribeCaptchaIpCityRequest::getTime()const
{
return time_;
}
void DescribeCaptchaIpCityRequest::setTime(const std::string& time)
{
time_ = time;
setParameter("Time", time);
}
std::string DescribeCaptchaIpCityRequest::getType()const
{
return type_;
}
void DescribeCaptchaIpCityRequest::setType(const std::string& type)
{
type_ = type;
setParameter("Type", type);
}

View File

@@ -0,0 +1,93 @@
/*
* 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/afs/model/DescribeCaptchaIpCityResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Afs;
using namespace AlibabaCloud::Afs::Model;
DescribeCaptchaIpCityResult::DescribeCaptchaIpCityResult() :
ServiceResult()
{}
DescribeCaptchaIpCityResult::DescribeCaptchaIpCityResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeCaptchaIpCityResult::~DescribeCaptchaIpCityResult()
{}
void DescribeCaptchaIpCityResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allCaptchaCities = value["CaptchaCities"]["CaptchaCitie"];
for (auto value : allCaptchaCities)
{
CaptchaCitie captchaCitiesObject;
if(!value["Location"].isNull())
captchaCitiesObject.location = value["Location"].asString();
if(!value["Lat"].isNull())
captchaCitiesObject.lat = value["Lat"].asString();
if(!value["Lng"].isNull())
captchaCitiesObject.lng = value["Lng"].asString();
if(!value["Pv"].isNull())
captchaCitiesObject.pv = std::stoi(value["Pv"].asString());
captchaCities_.push_back(captchaCitiesObject);
}
auto allCaptchaIps = value["CaptchaIps"]["CaptchaIp"];
for (auto value : allCaptchaIps)
{
CaptchaIp captchaIpsObject;
if(!value["Ip"].isNull())
captchaIpsObject.ip = value["Ip"].asString();
if(!value["Value"].isNull())
captchaIpsObject.value = std::stoi(value["Value"].asString());
captchaIps_.push_back(captchaIpsObject);
}
if(!value["BizCode"].isNull())
bizCode_ = value["BizCode"].asString();
if(!value["HasData"].isNull())
hasData_ = value["HasData"].asString() == "true";
}
std::vector<DescribeCaptchaIpCityResult::CaptchaIp> DescribeCaptchaIpCityResult::getCaptchaIps()const
{
return captchaIps_;
}
std::vector<DescribeCaptchaIpCityResult::CaptchaCitie> DescribeCaptchaIpCityResult::getCaptchaCities()const
{
return captchaCities_;
}
std::string DescribeCaptchaIpCityResult::getBizCode()const
{
return bizCode_;
}
bool DescribeCaptchaIpCityResult::getHasData()const
{
return hasData_;
}

View File

@@ -0,0 +1,82 @@
/*
* 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/afs/model/DescribeCaptchaMinRequest.h>
using AlibabaCloud::Afs::Model::DescribeCaptchaMinRequest;
DescribeCaptchaMinRequest::DescribeCaptchaMinRequest() :
RpcServiceRequest("afs", "2018-01-12", "DescribeCaptchaMin")
{}
DescribeCaptchaMinRequest::~DescribeCaptchaMinRequest()
{}
long DescribeCaptchaMinRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribeCaptchaMinRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DescribeCaptchaMinRequest::getSourceIp()const
{
return sourceIp_;
}
void DescribeCaptchaMinRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
std::string DescribeCaptchaMinRequest::getConfigName()const
{
return configName_;
}
void DescribeCaptchaMinRequest::setConfigName(const std::string& configName)
{
configName_ = configName;
setParameter("ConfigName", configName);
}
std::string DescribeCaptchaMinRequest::getTime()const
{
return time_;
}
void DescribeCaptchaMinRequest::setTime(const std::string& time)
{
time_ = time;
setParameter("Time", time);
}
std::string DescribeCaptchaMinRequest::getType()const
{
return type_;
}
void DescribeCaptchaMinRequest::setType(const std::string& type)
{
type_ = type;
setParameter("Type", type);
}

View File

@@ -0,0 +1,76 @@
/*
* 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/afs/model/DescribeCaptchaMinResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Afs;
using namespace AlibabaCloud::Afs::Model;
DescribeCaptchaMinResult::DescribeCaptchaMinResult() :
ServiceResult()
{}
DescribeCaptchaMinResult::DescribeCaptchaMinResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeCaptchaMinResult::~DescribeCaptchaMinResult()
{}
void DescribeCaptchaMinResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allCaptchaMins = value["CaptchaMins"]["CaptchaMin"];
for (auto value : allCaptchaMins)
{
CaptchaMin captchaMinsObject;
if(!value["Time"].isNull())
captchaMinsObject.time = value["Time"].asString();
if(!value["Pass"].isNull())
captchaMinsObject.pass = value["Pass"].asString();
if(!value["Interception"].isNull())
captchaMinsObject.interception = value["Interception"].asString();
captchaMins_.push_back(captchaMinsObject);
}
if(!value["BizCode"].isNull())
bizCode_ = value["BizCode"].asString();
if(!value["HasData"].isNull())
hasData_ = value["HasData"].asString() == "true";
}
std::vector<DescribeCaptchaMinResult::CaptchaMin> DescribeCaptchaMinResult::getCaptchaMins()const
{
return captchaMins_;
}
std::string DescribeCaptchaMinResult::getBizCode()const
{
return bizCode_;
}
bool DescribeCaptchaMinResult::getHasData()const
{
return hasData_;
}

View File

@@ -0,0 +1,71 @@
/*
* 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/afs/model/DescribeCaptchaRiskRequest.h>
using AlibabaCloud::Afs::Model::DescribeCaptchaRiskRequest;
DescribeCaptchaRiskRequest::DescribeCaptchaRiskRequest() :
RpcServiceRequest("afs", "2018-01-12", "DescribeCaptchaRisk")
{}
DescribeCaptchaRiskRequest::~DescribeCaptchaRiskRequest()
{}
long DescribeCaptchaRiskRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribeCaptchaRiskRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DescribeCaptchaRiskRequest::getSourceIp()const
{
return sourceIp_;
}
void DescribeCaptchaRiskRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
std::string DescribeCaptchaRiskRequest::getConfigName()const
{
return configName_;
}
void DescribeCaptchaRiskRequest::setConfigName(const std::string& configName)
{
configName_ = configName;
setParameter("ConfigName", configName);
}
std::string DescribeCaptchaRiskRequest::getTime()const
{
return time_;
}
void DescribeCaptchaRiskRequest::setTime(const std::string& time)
{
time_ = time;
setParameter("Time", time);
}

View File

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

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/afs/model/DescribeConfigNameRequest.h>
using AlibabaCloud::Afs::Model::DescribeConfigNameRequest;
DescribeConfigNameRequest::DescribeConfigNameRequest() :
RpcServiceRequest("afs", "2018-01-12", "DescribeConfigName")
{}
DescribeConfigNameRequest::~DescribeConfigNameRequest()
{}
long DescribeConfigNameRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribeConfigNameRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DescribeConfigNameRequest::getSourceIp()const
{
return sourceIp_;
}
void DescribeConfigNameRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}

View File

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

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/afs/model/DescribeEarlyWarningRequest.h>
using AlibabaCloud::Afs::Model::DescribeEarlyWarningRequest;
DescribeEarlyWarningRequest::DescribeEarlyWarningRequest() :
RpcServiceRequest("afs", "2018-01-12", "DescribeEarlyWarning")
{}
DescribeEarlyWarningRequest::~DescribeEarlyWarningRequest()
{}
long DescribeEarlyWarningRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribeEarlyWarningRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DescribeEarlyWarningRequest::getSourceIp()const
{
return sourceIp_;
}
void DescribeEarlyWarningRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}

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/afs/model/DescribeEarlyWarningResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Afs;
using namespace AlibabaCloud::Afs::Model;
DescribeEarlyWarningResult::DescribeEarlyWarningResult() :
ServiceResult()
{}
DescribeEarlyWarningResult::DescribeEarlyWarningResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeEarlyWarningResult::~DescribeEarlyWarningResult()
{}
void DescribeEarlyWarningResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allEarlyWarnings = value["EarlyWarnings"]["EarlyWarning"];
for (auto value : allEarlyWarnings)
{
EarlyWarning earlyWarningsObject;
if(!value["WarnOpen"].isNull())
earlyWarningsObject.warnOpen = value["WarnOpen"].asString() == "true";
if(!value["Title"].isNull())
earlyWarningsObject.title = value["Title"].asString();
if(!value["Content"].isNull())
earlyWarningsObject.content = value["Content"].asString();
if(!value["Frequency"].isNull())
earlyWarningsObject.frequency = value["Frequency"].asString();
if(!value["TimeOpen"].isNull())
earlyWarningsObject.timeOpen = value["TimeOpen"].asString() == "true";
if(!value["TimeBegin"].isNull())
earlyWarningsObject.timeBegin = value["TimeBegin"].asString();
if(!value["TimeEnd"].isNull())
earlyWarningsObject.timeEnd = value["TimeEnd"].asString();
if(!value["Channel"].isNull())
earlyWarningsObject.channel = value["Channel"].asString();
earlyWarnings_.push_back(earlyWarningsObject);
}
if(!value["HasWarning"].isNull())
hasWarning_ = value["HasWarning"].asString() == "true";
if(!value["BizCode"].isNull())
bizCode_ = value["BizCode"].asString();
}
bool DescribeEarlyWarningResult::getHasWarning()const
{
return hasWarning_;
}
std::vector<DescribeEarlyWarningResult::EarlyWarning> DescribeEarlyWarningResult::getEarlyWarnings()const
{
return earlyWarnings_;
}
std::string DescribeEarlyWarningResult::getBizCode()const
{
return bizCode_;
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/afs/model/DescribePersonMachineListRequest.h>
using AlibabaCloud::Afs::Model::DescribePersonMachineListRequest;
DescribePersonMachineListRequest::DescribePersonMachineListRequest() :
RpcServiceRequest("afs", "2018-01-12", "DescribePersonMachineList")
{}
DescribePersonMachineListRequest::~DescribePersonMachineListRequest()
{}
long DescribePersonMachineListRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DescribePersonMachineListRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DescribePersonMachineListRequest::getSourceIp()const
{
return sourceIp_;
}
void DescribePersonMachineListRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}

View File

@@ -0,0 +1,83 @@
/*
* 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/afs/model/DescribePersonMachineListResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Afs;
using namespace AlibabaCloud::Afs::Model;
DescribePersonMachineListResult::DescribePersonMachineListResult() :
ServiceResult()
{}
DescribePersonMachineListResult::DescribePersonMachineListResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribePersonMachineListResult::~DescribePersonMachineListResult()
{}
void DescribePersonMachineListResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allPersonMachineRes = value["PersonMachineRes"];
for (auto value : allPersonMachineRes)
{
PersonMachineRes personMachineResObject;
if(!value["HasConfiguration"].isNull())
personMachineResObject.hasConfiguration = value["HasConfiguration"].asString();
auto allPersonMachines = value["PersonMachines"]["PersonMachine"];
for (auto value : allPersonMachines)
{
PersonMachineRes::PersonMachine personMachineObject;
if(!value["ConfigurationName"].isNull())
personMachineObject.configurationName = value["ConfigurationName"].asString();
if(!value["Appkey"].isNull())
personMachineObject.appkey = value["Appkey"].asString();
if(!value["ConfigurationMethod"].isNull())
personMachineObject.configurationMethod = value["ConfigurationMethod"].asString();
if(!value["ApplyType"].isNull())
personMachineObject.applyType = value["ApplyType"].asString();
if(!value["Scene"].isNull())
personMachineObject.scene = value["Scene"].asString();
if(!value["LastUpdate"].isNull())
personMachineObject.lastUpdate = value["LastUpdate"].asString();
personMachineResObject.personMachines.push_back(personMachineObject);
}
personMachineRes_.push_back(personMachineResObject);
}
if(!value["BizCode"].isNull())
bizCode_ = value["BizCode"].asString();
}
std::vector<DescribePersonMachineListResult::PersonMachineRes> DescribePersonMachineListResult::getPersonMachineRes()const
{
return personMachineRes_;
}
std::string DescribePersonMachineListResult::getBizCode()const
{
return bizCode_;
}

View File

@@ -0,0 +1,126 @@
/*
* 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/afs/model/SetEarlyWarningRequest.h>
using AlibabaCloud::Afs::Model::SetEarlyWarningRequest;
SetEarlyWarningRequest::SetEarlyWarningRequest() :
RpcServiceRequest("afs", "2018-01-12", "SetEarlyWarning")
{}
SetEarlyWarningRequest::~SetEarlyWarningRequest()
{}
std::string SetEarlyWarningRequest::getTimeEnd()const
{
return timeEnd_;
}
void SetEarlyWarningRequest::setTimeEnd(const std::string& timeEnd)
{
timeEnd_ = timeEnd;
setParameter("TimeEnd", timeEnd);
}
long SetEarlyWarningRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void SetEarlyWarningRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
bool SetEarlyWarningRequest::getWarnOpen()const
{
return warnOpen_;
}
void SetEarlyWarningRequest::setWarnOpen(bool warnOpen)
{
warnOpen_ = warnOpen;
setParameter("WarnOpen", std::to_string(warnOpen));
}
std::string SetEarlyWarningRequest::getSourceIp()const
{
return sourceIp_;
}
void SetEarlyWarningRequest::setSourceIp(const std::string& sourceIp)
{
sourceIp_ = sourceIp;
setParameter("SourceIp", sourceIp);
}
std::string SetEarlyWarningRequest::getChannel()const
{
return channel_;
}
void SetEarlyWarningRequest::setChannel(const std::string& channel)
{
channel_ = channel;
setParameter("Channel", channel);
}
std::string SetEarlyWarningRequest::getTitle()const
{
return title_;
}
void SetEarlyWarningRequest::setTitle(const std::string& title)
{
title_ = title;
setParameter("Title", title);
}
bool SetEarlyWarningRequest::getTimeOpen()const
{
return timeOpen_;
}
void SetEarlyWarningRequest::setTimeOpen(bool timeOpen)
{
timeOpen_ = timeOpen;
setParameter("TimeOpen", std::to_string(timeOpen));
}
std::string SetEarlyWarningRequest::getTimeBegin()const
{
return timeBegin_;
}
void SetEarlyWarningRequest::setTimeBegin(const std::string& timeBegin)
{
timeBegin_ = timeBegin;
setParameter("TimeBegin", timeBegin);
}
std::string SetEarlyWarningRequest::getFrequency()const
{
return frequency_;
}
void SetEarlyWarningRequest::setFrequency(const std::string& frequency)
{
frequency_ = frequency;
setParameter("Frequency", frequency);
}

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