SAS-API SDK Auto Released By shenshi,Version:1.34.22
Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
485
sas-api/src/Sas-apiClient.cc
Normal file
485
sas-api/src/Sas-apiClient.cc
Normal file
@@ -0,0 +1,485 @@
|
||||
/*
|
||||
* 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/sas-api/Sas-apiClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::Sas-api;
|
||||
using namespace AlibabaCloud::Sas-api::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "Sas-api";
|
||||
}
|
||||
|
||||
Sas-apiClient::Sas-apiClient(const Credentials &credentials, const ClientConfiguration &configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "sas-api");
|
||||
}
|
||||
|
||||
Sas-apiClient::Sas-apiClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "sas-api");
|
||||
}
|
||||
|
||||
Sas-apiClient::Sas-apiClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "sas-api");
|
||||
}
|
||||
|
||||
Sas-apiClient::~Sas-apiClient()
|
||||
{}
|
||||
|
||||
Sas-apiClient::DescribeAccountProfileByKeyWordOutcome Sas-apiClient::describeAccountProfileByKeyWord(const DescribeAccountProfileByKeyWordRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeAccountProfileByKeyWordOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeAccountProfileByKeyWordOutcome(DescribeAccountProfileByKeyWordResult(outcome.result()));
|
||||
else
|
||||
return DescribeAccountProfileByKeyWordOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Sas-apiClient::describeAccountProfileByKeyWordAsync(const DescribeAccountProfileByKeyWordRequest& request, const DescribeAccountProfileByKeyWordAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeAccountProfileByKeyWord(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Sas-apiClient::DescribeAccountProfileByKeyWordOutcomeCallable Sas-apiClient::describeAccountProfileByKeyWordCallable(const DescribeAccountProfileByKeyWordRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeAccountProfileByKeyWordOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeAccountProfileByKeyWord(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Sas-apiClient::DescribeThreatTypeLinesOutcome Sas-apiClient::describeThreatTypeLines(const DescribeThreatTypeLinesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeThreatTypeLinesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeThreatTypeLinesOutcome(DescribeThreatTypeLinesResult(outcome.result()));
|
||||
else
|
||||
return DescribeThreatTypeLinesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Sas-apiClient::describeThreatTypeLinesAsync(const DescribeThreatTypeLinesRequest& request, const DescribeThreatTypeLinesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeThreatTypeLines(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Sas-apiClient::DescribeThreatTypeLinesOutcomeCallable Sas-apiClient::describeThreatTypeLinesCallable(const DescribeThreatTypeLinesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeThreatTypeLinesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeThreatTypeLines(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Sas-apiClient::DescribeThreatDistributeOutcome Sas-apiClient::describeThreatDistribute(const DescribeThreatDistributeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeThreatDistributeOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeThreatDistributeOutcome(DescribeThreatDistributeResult(outcome.result()));
|
||||
else
|
||||
return DescribeThreatDistributeOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Sas-apiClient::describeThreatDistributeAsync(const DescribeThreatDistributeRequest& request, const DescribeThreatDistributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeThreatDistribute(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Sas-apiClient::DescribeThreatDistributeOutcomeCallable Sas-apiClient::describeThreatDistributeCallable(const DescribeThreatDistributeRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeThreatDistributeOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeThreatDistribute(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Sas-apiClient::GetPhoneProfileOutcome Sas-apiClient::getPhoneProfile(const GetPhoneProfileRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetPhoneProfileOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetPhoneProfileOutcome(GetPhoneProfileResult(outcome.result()));
|
||||
else
|
||||
return GetPhoneProfileOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Sas-apiClient::getPhoneProfileAsync(const GetPhoneProfileRequest& request, const GetPhoneProfileAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getPhoneProfile(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Sas-apiClient::GetPhoneProfileOutcomeCallable Sas-apiClient::getPhoneProfileCallable(const GetPhoneProfileRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetPhoneProfileOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getPhoneProfile(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Sas-apiClient::DescribeAccountProfileByKeyOutcome Sas-apiClient::describeAccountProfileByKey(const DescribeAccountProfileByKeyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeAccountProfileByKeyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeAccountProfileByKeyOutcome(DescribeAccountProfileByKeyResult(outcome.result()));
|
||||
else
|
||||
return DescribeAccountProfileByKeyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Sas-apiClient::describeAccountProfileByKeyAsync(const DescribeAccountProfileByKeyRequest& request, const DescribeAccountProfileByKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeAccountProfileByKey(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Sas-apiClient::DescribeAccountProfileByKeyOutcomeCallable Sas-apiClient::describeAccountProfileByKeyCallable(const DescribeAccountProfileByKeyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeAccountProfileByKeyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeAccountProfileByKey(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Sas-apiClient::GetInstanceCountOutcome Sas-apiClient::getInstanceCount(const GetInstanceCountRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetInstanceCountOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetInstanceCountOutcome(GetInstanceCountResult(outcome.result()));
|
||||
else
|
||||
return GetInstanceCountOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Sas-apiClient::getInstanceCountAsync(const GetInstanceCountRequest& request, const GetInstanceCountAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getInstanceCount(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Sas-apiClient::GetInstanceCountOutcomeCallable Sas-apiClient::getInstanceCountCallable(const GetInstanceCountRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetInstanceCountOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getInstanceCount(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Sas-apiClient::DescribePerDateDataOutcome Sas-apiClient::describePerDateData(const DescribePerDateDataRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribePerDateDataOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribePerDateDataOutcome(DescribePerDateDataResult(outcome.result()));
|
||||
else
|
||||
return DescribePerDateDataOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Sas-apiClient::describePerDateDataAsync(const DescribePerDateDataRequest& request, const DescribePerDateDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describePerDateData(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Sas-apiClient::DescribePerDateDataOutcomeCallable Sas-apiClient::describePerDateDataCallable(const DescribePerDateDataRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribePerDateDataOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describePerDateData(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Sas-apiClient::GetAccountProfileOutcome Sas-apiClient::getAccountProfile(const GetAccountProfileRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetAccountProfileOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetAccountProfileOutcome(GetAccountProfileResult(outcome.result()));
|
||||
else
|
||||
return GetAccountProfileOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Sas-apiClient::getAccountProfileAsync(const GetAccountProfileRequest& request, const GetAccountProfileAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getAccountProfile(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Sas-apiClient::GetAccountProfileOutcomeCallable Sas-apiClient::getAccountProfileCallable(const GetAccountProfileRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetAccountProfileOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getAccountProfile(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Sas-apiClient::DescribeTotalAndRateLineOutcome Sas-apiClient::describeTotalAndRateLine(const DescribeTotalAndRateLineRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeTotalAndRateLineOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeTotalAndRateLineOutcome(DescribeTotalAndRateLineResult(outcome.result()));
|
||||
else
|
||||
return DescribeTotalAndRateLineOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Sas-apiClient::describeTotalAndRateLineAsync(const DescribeTotalAndRateLineRequest& request, const DescribeTotalAndRateLineAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeTotalAndRateLine(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Sas-apiClient::DescribeTotalAndRateLineOutcomeCallable Sas-apiClient::describeTotalAndRateLineCallable(const DescribeTotalAndRateLineRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeTotalAndRateLineOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeTotalAndRateLine(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Sas-apiClient::GetIpProfileOutcome Sas-apiClient::getIpProfile(const GetIpProfileRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetIpProfileOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetIpProfileOutcome(GetIpProfileResult(outcome.result()));
|
||||
else
|
||||
return GetIpProfileOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Sas-apiClient::getIpProfileAsync(const GetIpProfileRequest& request, const GetIpProfileAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getIpProfile(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Sas-apiClient::GetIpProfileOutcomeCallable Sas-apiClient::getIpProfileCallable(const GetIpProfileRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetIpProfileOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getIpProfile(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Sas-apiClient::DescribeHitRateColumnOutcome Sas-apiClient::describeHitRateColumn(const DescribeHitRateColumnRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeHitRateColumnOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeHitRateColumnOutcome(DescribeHitRateColumnResult(outcome.result()));
|
||||
else
|
||||
return DescribeHitRateColumnOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Sas-apiClient::describeHitRateColumnAsync(const DescribeHitRateColumnRequest& request, const DescribeHitRateColumnAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeHitRateColumn(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Sas-apiClient::DescribeHitRateColumnOutcomeCallable Sas-apiClient::describeHitRateColumnCallable(const DescribeHitRateColumnRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeHitRateColumnOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeHitRateColumn(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Sas-apiClient::DescribeHitRatePieOutcome Sas-apiClient::describeHitRatePie(const DescribeHitRatePieRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeHitRatePieOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeHitRatePieOutcome(DescribeHitRatePieResult(outcome.result()));
|
||||
else
|
||||
return DescribeHitRatePieOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Sas-apiClient::describeHitRatePieAsync(const DescribeHitRatePieRequest& request, const DescribeHitRatePieAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeHitRatePie(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Sas-apiClient::DescribeHitRatePieOutcomeCallable Sas-apiClient::describeHitRatePieCallable(const DescribeHitRatePieRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeHitRatePieOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeHitRatePie(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
49
sas-api/src/model/DescribeAccountProfileByKeyRequest.cc
Normal file
49
sas-api/src/model/DescribeAccountProfileByKeyRequest.cc
Normal 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/sas-api/model/DescribeAccountProfileByKeyRequest.h>
|
||||
|
||||
using AlibabaCloud::Sas-api::Model::DescribeAccountProfileByKeyRequest;
|
||||
|
||||
DescribeAccountProfileByKeyRequest::DescribeAccountProfileByKeyRequest() :
|
||||
RpcServiceRequest("sas-api", "2017-07-05", "DescribeAccountProfileByKey")
|
||||
{}
|
||||
|
||||
DescribeAccountProfileByKeyRequest::~DescribeAccountProfileByKeyRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeAccountProfileByKeyRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeAccountProfileByKeyRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string DescribeAccountProfileByKeyRequest::getKeyword()const
|
||||
{
|
||||
return keyword_;
|
||||
}
|
||||
|
||||
void DescribeAccountProfileByKeyRequest::setKeyword(const std::string& keyword)
|
||||
{
|
||||
keyword_ = keyword;
|
||||
setParameter("Keyword", keyword);
|
||||
}
|
||||
|
||||
87
sas-api/src/model/DescribeAccountProfileByKeyResult.cc
Normal file
87
sas-api/src/model/DescribeAccountProfileByKeyResult.cc
Normal 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/sas-api/model/DescribeAccountProfileByKeyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Sas-api;
|
||||
using namespace AlibabaCloud::Sas-api::Model;
|
||||
|
||||
DescribeAccountProfileByKeyResult::DescribeAccountProfileByKeyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeAccountProfileByKeyResult::DescribeAccountProfileByKeyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeAccountProfileByKeyResult::~DescribeAccountProfileByKeyResult()
|
||||
{}
|
||||
|
||||
void DescribeAccountProfileByKeyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Ip"].isNull())
|
||||
ip_ = value["Ip"].asString();
|
||||
if(!value["IpInfo"].isNull())
|
||||
ipInfo_ = value["IpInfo"].asString();
|
||||
if(!value["Phone"].isNull())
|
||||
phone_ = value["Phone"].asString();
|
||||
if(!value["PhoneInfo"].isNull())
|
||||
phoneInfo_ = value["PhoneInfo"].asString();
|
||||
if(!value["KeywordCount"].isNull())
|
||||
keywordCount_ = std::stoi(value["KeywordCount"].asString());
|
||||
if(!value["KeywordLimit"].isNull())
|
||||
keywordLimit_ = std::stoi(value["KeywordLimit"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeAccountProfileByKeyResult::getPhone()const
|
||||
{
|
||||
return phone_;
|
||||
}
|
||||
|
||||
std::string DescribeAccountProfileByKeyResult::getIp()const
|
||||
{
|
||||
return ip_;
|
||||
}
|
||||
|
||||
std::string DescribeAccountProfileByKeyResult::getIpInfo()const
|
||||
{
|
||||
return ipInfo_;
|
||||
}
|
||||
|
||||
std::string DescribeAccountProfileByKeyResult::getPhoneInfo()const
|
||||
{
|
||||
return phoneInfo_;
|
||||
}
|
||||
|
||||
int DescribeAccountProfileByKeyResult::getKeywordCount()const
|
||||
{
|
||||
return keywordCount_;
|
||||
}
|
||||
|
||||
int DescribeAccountProfileByKeyResult::getKeywordLimit()const
|
||||
{
|
||||
return keywordLimit_;
|
||||
}
|
||||
|
||||
49
sas-api/src/model/DescribeAccountProfileByKeyWordRequest.cc
Normal file
49
sas-api/src/model/DescribeAccountProfileByKeyWordRequest.cc
Normal 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/sas-api/model/DescribeAccountProfileByKeyWordRequest.h>
|
||||
|
||||
using AlibabaCloud::Sas-api::Model::DescribeAccountProfileByKeyWordRequest;
|
||||
|
||||
DescribeAccountProfileByKeyWordRequest::DescribeAccountProfileByKeyWordRequest() :
|
||||
RpcServiceRequest("sas-api", "2017-07-05", "DescribeAccountProfileByKeyWord")
|
||||
{}
|
||||
|
||||
DescribeAccountProfileByKeyWordRequest::~DescribeAccountProfileByKeyWordRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeAccountProfileByKeyWordRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeAccountProfileByKeyWordRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string DescribeAccountProfileByKeyWordRequest::getKeyword()const
|
||||
{
|
||||
return keyword_;
|
||||
}
|
||||
|
||||
void DescribeAccountProfileByKeyWordRequest::setKeyword(const std::string& keyword)
|
||||
{
|
||||
keyword_ = keyword;
|
||||
setParameter("Keyword", keyword);
|
||||
}
|
||||
|
||||
73
sas-api/src/model/DescribeAccountProfileByKeyWordResult.cc
Normal file
73
sas-api/src/model/DescribeAccountProfileByKeyWordResult.cc
Normal 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/sas-api/model/DescribeAccountProfileByKeyWordResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Sas-api;
|
||||
using namespace AlibabaCloud::Sas-api::Model;
|
||||
|
||||
DescribeAccountProfileByKeyWordResult::DescribeAccountProfileByKeyWordResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeAccountProfileByKeyWordResult::DescribeAccountProfileByKeyWordResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeAccountProfileByKeyWordResult::~DescribeAccountProfileByKeyWordResult()
|
||||
{}
|
||||
|
||||
void DescribeAccountProfileByKeyWordResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Ip"].isNull())
|
||||
ip_ = value["Ip"].asString();
|
||||
if(!value["IpInfo"].isNull())
|
||||
ipInfo_ = value["IpInfo"].asString();
|
||||
if(!value["Phone"].isNull())
|
||||
phone_ = value["Phone"].asString();
|
||||
if(!value["PhoneInfo"].isNull())
|
||||
phoneInfo_ = value["PhoneInfo"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeAccountProfileByKeyWordResult::getPhone()const
|
||||
{
|
||||
return phone_;
|
||||
}
|
||||
|
||||
std::string DescribeAccountProfileByKeyWordResult::getIp()const
|
||||
{
|
||||
return ip_;
|
||||
}
|
||||
|
||||
std::string DescribeAccountProfileByKeyWordResult::getIpInfo()const
|
||||
{
|
||||
return ipInfo_;
|
||||
}
|
||||
|
||||
std::string DescribeAccountProfileByKeyWordResult::getPhoneInfo()const
|
||||
{
|
||||
return phoneInfo_;
|
||||
}
|
||||
|
||||
82
sas-api/src/model/DescribeHitRateColumnRequest.cc
Normal file
82
sas-api/src/model/DescribeHitRateColumnRequest.cc
Normal 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/sas-api/model/DescribeHitRateColumnRequest.h>
|
||||
|
||||
using AlibabaCloud::Sas-api::Model::DescribeHitRateColumnRequest;
|
||||
|
||||
DescribeHitRateColumnRequest::DescribeHitRateColumnRequest() :
|
||||
RpcServiceRequest("sas-api", "2017-07-05", "DescribeHitRateColumn")
|
||||
{}
|
||||
|
||||
DescribeHitRateColumnRequest::~DescribeHitRateColumnRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeHitRateColumnRequest::getEndDate()const
|
||||
{
|
||||
return endDate_;
|
||||
}
|
||||
|
||||
void DescribeHitRateColumnRequest::setEndDate(const std::string& endDate)
|
||||
{
|
||||
endDate_ = endDate;
|
||||
setParameter("EndDate", endDate);
|
||||
}
|
||||
|
||||
std::string DescribeHitRateColumnRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeHitRateColumnRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
int DescribeHitRateColumnRequest::getHitDay()const
|
||||
{
|
||||
return hitDay_;
|
||||
}
|
||||
|
||||
void DescribeHitRateColumnRequest::setHitDay(int hitDay)
|
||||
{
|
||||
hitDay_ = hitDay;
|
||||
setParameter("HitDay", std::to_string(hitDay));
|
||||
}
|
||||
|
||||
std::string DescribeHitRateColumnRequest::getStartDate()const
|
||||
{
|
||||
return startDate_;
|
||||
}
|
||||
|
||||
void DescribeHitRateColumnRequest::setStartDate(const std::string& startDate)
|
||||
{
|
||||
startDate_ = startDate;
|
||||
setParameter("StartDate", startDate);
|
||||
}
|
||||
|
||||
int DescribeHitRateColumnRequest::getApiType()const
|
||||
{
|
||||
return apiType_;
|
||||
}
|
||||
|
||||
void DescribeHitRateColumnRequest::setApiType(int apiType)
|
||||
{
|
||||
apiType_ = apiType;
|
||||
setParameter("ApiType", std::to_string(apiType));
|
||||
}
|
||||
|
||||
72
sas-api/src/model/DescribeHitRateColumnResult.cc
Normal file
72
sas-api/src/model/DescribeHitRateColumnResult.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/sas-api/model/DescribeHitRateColumnResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Sas-api;
|
||||
using namespace AlibabaCloud::Sas-api::Model;
|
||||
|
||||
DescribeHitRateColumnResult::DescribeHitRateColumnResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeHitRateColumnResult::DescribeHitRateColumnResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeHitRateColumnResult::~DescribeHitRateColumnResult()
|
||||
{}
|
||||
|
||||
void DescribeHitRateColumnResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allItems = value["Items"]["Item"];
|
||||
for (auto value : allItems)
|
||||
{
|
||||
Item itemsObject;
|
||||
if(!value["Data"].isNull())
|
||||
itemsObject.data = std::stol(value["Data"].asString());
|
||||
if(!value["Id"].isNull())
|
||||
itemsObject.id = value["Id"].asString();
|
||||
if(!value["Name"].isNull())
|
||||
itemsObject.name = value["Name"].asString();
|
||||
items_.push_back(itemsObject);
|
||||
}
|
||||
auto timeScopeNode = value["TimeScope"];
|
||||
if(!timeScopeNode["Interval"].isNull())
|
||||
timeScope_.interval = std::stol(timeScopeNode["Interval"].asString());
|
||||
if(!timeScopeNode["Start"].isNull())
|
||||
timeScope_.start = std::stol(timeScopeNode["Start"].asString());
|
||||
|
||||
}
|
||||
|
||||
DescribeHitRateColumnResult::TimeScope DescribeHitRateColumnResult::getTimeScope()const
|
||||
{
|
||||
return timeScope_;
|
||||
}
|
||||
|
||||
std::vector<DescribeHitRateColumnResult::Item> DescribeHitRateColumnResult::getItems()const
|
||||
{
|
||||
return items_;
|
||||
}
|
||||
|
||||
82
sas-api/src/model/DescribeHitRatePieRequest.cc
Normal file
82
sas-api/src/model/DescribeHitRatePieRequest.cc
Normal 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/sas-api/model/DescribeHitRatePieRequest.h>
|
||||
|
||||
using AlibabaCloud::Sas-api::Model::DescribeHitRatePieRequest;
|
||||
|
||||
DescribeHitRatePieRequest::DescribeHitRatePieRequest() :
|
||||
RpcServiceRequest("sas-api", "2017-07-05", "DescribeHitRatePie")
|
||||
{}
|
||||
|
||||
DescribeHitRatePieRequest::~DescribeHitRatePieRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeHitRatePieRequest::getEndDate()const
|
||||
{
|
||||
return endDate_;
|
||||
}
|
||||
|
||||
void DescribeHitRatePieRequest::setEndDate(const std::string& endDate)
|
||||
{
|
||||
endDate_ = endDate;
|
||||
setParameter("EndDate", endDate);
|
||||
}
|
||||
|
||||
std::string DescribeHitRatePieRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeHitRatePieRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string DescribeHitRatePieRequest::getStartDate()const
|
||||
{
|
||||
return startDate_;
|
||||
}
|
||||
|
||||
void DescribeHitRatePieRequest::setStartDate(const std::string& startDate)
|
||||
{
|
||||
startDate_ = startDate;
|
||||
setParameter("StartDate", startDate);
|
||||
}
|
||||
|
||||
int DescribeHitRatePieRequest::getHitDay()const
|
||||
{
|
||||
return hitDay_;
|
||||
}
|
||||
|
||||
void DescribeHitRatePieRequest::setHitDay(int hitDay)
|
||||
{
|
||||
hitDay_ = hitDay;
|
||||
setParameter("HitDay", std::to_string(hitDay));
|
||||
}
|
||||
|
||||
int DescribeHitRatePieRequest::getApiType()const
|
||||
{
|
||||
return apiType_;
|
||||
}
|
||||
|
||||
void DescribeHitRatePieRequest::setApiType(int apiType)
|
||||
{
|
||||
apiType_ = apiType;
|
||||
setParameter("ApiType", std::to_string(apiType));
|
||||
}
|
||||
|
||||
60
sas-api/src/model/DescribeHitRatePieResult.cc
Normal file
60
sas-api/src/model/DescribeHitRatePieResult.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/sas-api/model/DescribeHitRatePieResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Sas-api;
|
||||
using namespace AlibabaCloud::Sas-api::Model;
|
||||
|
||||
DescribeHitRatePieResult::DescribeHitRatePieResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeHitRatePieResult::DescribeHitRatePieResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeHitRatePieResult::~DescribeHitRatePieResult()
|
||||
{}
|
||||
|
||||
void DescribeHitRatePieResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allItems = value["Items"]["Item"];
|
||||
for (auto value : allItems)
|
||||
{
|
||||
Item itemsObject;
|
||||
if(!value["Data"].isNull())
|
||||
itemsObject.data = std::stol(value["Data"].asString());
|
||||
if(!value["Name"].isNull())
|
||||
itemsObject.name = value["Name"].asString();
|
||||
items_.push_back(itemsObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeHitRatePieResult::Item> DescribeHitRatePieResult::getItems()const
|
||||
{
|
||||
return items_;
|
||||
}
|
||||
|
||||
49
sas-api/src/model/DescribePerDateDataRequest.cc
Normal file
49
sas-api/src/model/DescribePerDateDataRequest.cc
Normal 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/sas-api/model/DescribePerDateDataRequest.h>
|
||||
|
||||
using AlibabaCloud::Sas-api::Model::DescribePerDateDataRequest;
|
||||
|
||||
DescribePerDateDataRequest::DescribePerDateDataRequest() :
|
||||
RpcServiceRequest("sas-api", "2017-07-05", "DescribePerDateData")
|
||||
{}
|
||||
|
||||
DescribePerDateDataRequest::~DescribePerDateDataRequest()
|
||||
{}
|
||||
|
||||
std::string DescribePerDateDataRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribePerDateDataRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
int DescribePerDateDataRequest::getApiType()const
|
||||
{
|
||||
return apiType_;
|
||||
}
|
||||
|
||||
void DescribePerDateDataRequest::setApiType(int apiType)
|
||||
{
|
||||
apiType_ = apiType;
|
||||
setParameter("ApiType", std::to_string(apiType));
|
||||
}
|
||||
|
||||
118
sas-api/src/model/DescribePerDateDataResult.cc
Normal file
118
sas-api/src/model/DescribePerDateDataResult.cc
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* 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/sas-api/model/DescribePerDateDataResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Sas-api;
|
||||
using namespace AlibabaCloud::Sas-api::Model;
|
||||
|
||||
DescribePerDateDataResult::DescribePerDateDataResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribePerDateDataResult::DescribePerDateDataResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribePerDateDataResult::~DescribePerDateDataResult()
|
||||
{}
|
||||
|
||||
void DescribePerDateDataResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDataView = value["DataView"]["dataViewItem"];
|
||||
for (auto value : allDataView)
|
||||
{
|
||||
DataViewItem dataViewObject;
|
||||
if(!value["DataTime"].isNull())
|
||||
dataViewObject.dataTime = value["DataTime"].asString();
|
||||
if(!value["CallTimes"].isNull())
|
||||
dataViewObject.callTimes = std::stol(value["CallTimes"].asString());
|
||||
if(!value["TotalHit"].isNull())
|
||||
dataViewObject.totalHit = std::stol(value["TotalHit"].asString());
|
||||
if(!value["HitRate"].isNull())
|
||||
dataViewObject.hitRate = std::stol(value["HitRate"].asString());
|
||||
if(!value["IsGreyPhone"].isNull())
|
||||
dataViewObject.isGreyPhone = std::stol(value["IsGreyPhone"].asString());
|
||||
if(!value["IsBlackPhone"].isNull())
|
||||
dataViewObject.isBlackPhone = std::stol(value["IsBlackPhone"].asString());
|
||||
if(!value["IsVirtualOperator"].isNull())
|
||||
dataViewObject.isVirtualOperator = std::stol(value["IsVirtualOperator"].asString());
|
||||
if(!value["IsOpenCommonPort1d"].isNull())
|
||||
dataViewObject.isOpenCommonPort1d = std::stol(value["IsOpenCommonPort1d"].asString());
|
||||
if(!value["IsOpenCommonPort7d"].isNull())
|
||||
dataViewObject.isOpenCommonPort7d = std::stol(value["IsOpenCommonPort7d"].asString());
|
||||
if(!value["IsOpenCommonPort30d"].isNull())
|
||||
dataViewObject.isOpenCommonPort30d = std::stol(value["IsOpenCommonPort30d"].asString());
|
||||
if(!value["IsCheatFlow1d"].isNull())
|
||||
dataViewObject.isCheatFlow1d = std::stol(value["IsCheatFlow1d"].asString());
|
||||
if(!value["IsCheatFlow7d"].isNull())
|
||||
dataViewObject.isCheatFlow7d = std::stol(value["IsCheatFlow7d"].asString());
|
||||
if(!value["IsCheatFlow30d"].isNull())
|
||||
dataViewObject.isCheatFlow30d = std::stol(value["IsCheatFlow30d"].asString());
|
||||
if(!value["IsProxy1d"].isNull())
|
||||
dataViewObject.isProxy1d = std::stol(value["IsProxy1d"].asString());
|
||||
if(!value["IsProxy7d"].isNull())
|
||||
dataViewObject.isProxy7d = std::stol(value["IsProxy7d"].asString());
|
||||
if(!value["IsProxy30d"].isNull())
|
||||
dataViewObject.isProxy30d = std::stol(value["IsProxy30d"].asString());
|
||||
if(!value["IsHiJack1d"].isNull())
|
||||
dataViewObject.isHiJack1d = std::stol(value["IsHiJack1d"].asString());
|
||||
if(!value["IsHiJack7d"].isNull())
|
||||
dataViewObject.isHiJack7d = std::stol(value["IsHiJack7d"].asString());
|
||||
if(!value["IsHiJack30d"].isNull())
|
||||
dataViewObject.isHiJack30d = std::stol(value["IsHiJack30d"].asString());
|
||||
if(!value["IsC21d"].isNull())
|
||||
dataViewObject.isC21d = std::stol(value["IsC21d"].asString());
|
||||
if(!value["IsC27d"].isNull())
|
||||
dataViewObject.isC27d = std::stol(value["IsC27d"].asString());
|
||||
if(!value["IsC230d"].isNull())
|
||||
dataViewObject.isC230d = std::stol(value["IsC230d"].asString());
|
||||
if(!value["IsBotnet1d"].isNull())
|
||||
dataViewObject.isBotnet1d = std::stol(value["IsBotnet1d"].asString());
|
||||
if(!value["IsBotnet7d"].isNull())
|
||||
dataViewObject.isBotnet7d = std::stol(value["IsBotnet7d"].asString());
|
||||
if(!value["IsBotnet30d"].isNull())
|
||||
dataViewObject.isBotnet30d = std::stol(value["IsBotnet30d"].asString());
|
||||
if(!value["IsNetAttack1d"].isNull())
|
||||
dataViewObject.isNetAttack1d = std::stol(value["IsNetAttack1d"].asString());
|
||||
if(!value["IsNetAttack7d"].isNull())
|
||||
dataViewObject.isNetAttack7d = std::stol(value["IsNetAttack7d"].asString());
|
||||
if(!value["IsNetAttack30d"].isNull())
|
||||
dataViewObject.isNetAttack30d = std::stol(value["IsNetAttack30d"].asString());
|
||||
if(!value["IsBlackCampaign1d"].isNull())
|
||||
dataViewObject.isBlackCampaign1d = std::stol(value["IsBlackCampaign1d"].asString());
|
||||
if(!value["IsBlackCampaign7d"].isNull())
|
||||
dataViewObject.isBlackCampaign7d = std::stol(value["IsBlackCampaign7d"].asString());
|
||||
if(!value["IsBlackCampaign30d"].isNull())
|
||||
dataViewObject.isBlackCampaign30d = std::stol(value["IsBlackCampaign30d"].asString());
|
||||
dataView_.push_back(dataViewObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribePerDateDataResult::DataViewItem> DescribePerDateDataResult::getDataView()const
|
||||
{
|
||||
return dataView_;
|
||||
}
|
||||
|
||||
82
sas-api/src/model/DescribeThreatDistributeRequest.cc
Normal file
82
sas-api/src/model/DescribeThreatDistributeRequest.cc
Normal 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/sas-api/model/DescribeThreatDistributeRequest.h>
|
||||
|
||||
using AlibabaCloud::Sas-api::Model::DescribeThreatDistributeRequest;
|
||||
|
||||
DescribeThreatDistributeRequest::DescribeThreatDistributeRequest() :
|
||||
RpcServiceRequest("sas-api", "2017-07-05", "DescribeThreatDistribute")
|
||||
{}
|
||||
|
||||
DescribeThreatDistributeRequest::~DescribeThreatDistributeRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeThreatDistributeRequest::getEndDate()const
|
||||
{
|
||||
return endDate_;
|
||||
}
|
||||
|
||||
void DescribeThreatDistributeRequest::setEndDate(const std::string& endDate)
|
||||
{
|
||||
endDate_ = endDate;
|
||||
setParameter("EndDate", endDate);
|
||||
}
|
||||
|
||||
std::string DescribeThreatDistributeRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeThreatDistributeRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
int DescribeThreatDistributeRequest::getHitDay()const
|
||||
{
|
||||
return hitDay_;
|
||||
}
|
||||
|
||||
void DescribeThreatDistributeRequest::setHitDay(int hitDay)
|
||||
{
|
||||
hitDay_ = hitDay;
|
||||
setParameter("HitDay", std::to_string(hitDay));
|
||||
}
|
||||
|
||||
std::string DescribeThreatDistributeRequest::getStartDate()const
|
||||
{
|
||||
return startDate_;
|
||||
}
|
||||
|
||||
void DescribeThreatDistributeRequest::setStartDate(const std::string& startDate)
|
||||
{
|
||||
startDate_ = startDate;
|
||||
setParameter("StartDate", startDate);
|
||||
}
|
||||
|
||||
int DescribeThreatDistributeRequest::getApiType()const
|
||||
{
|
||||
return apiType_;
|
||||
}
|
||||
|
||||
void DescribeThreatDistributeRequest::setApiType(int apiType)
|
||||
{
|
||||
apiType_ = apiType;
|
||||
setParameter("ApiType", std::to_string(apiType));
|
||||
}
|
||||
|
||||
70
sas-api/src/model/DescribeThreatDistributeResult.cc
Normal file
70
sas-api/src/model/DescribeThreatDistributeResult.cc
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/sas-api/model/DescribeThreatDistributeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Sas-api;
|
||||
using namespace AlibabaCloud::Sas-api::Model;
|
||||
|
||||
DescribeThreatDistributeResult::DescribeThreatDistributeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeThreatDistributeResult::DescribeThreatDistributeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeThreatDistributeResult::~DescribeThreatDistributeResult()
|
||||
{}
|
||||
|
||||
void DescribeThreatDistributeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allItems = value["Items"]["Item"];
|
||||
for (auto value : allItems)
|
||||
{
|
||||
Item itemsObject;
|
||||
if(!value["Data"].isNull())
|
||||
itemsObject.data = std::stof(value["Data"].asString());
|
||||
if(!value["Id"].isNull())
|
||||
itemsObject.id = value["Id"].asString();
|
||||
if(!value["Name"].isNull())
|
||||
itemsObject.name = value["Name"].asString();
|
||||
items_.push_back(itemsObject);
|
||||
}
|
||||
auto allCategories = value["Categories"]["CategoriesItem"];
|
||||
for (const auto &item : allCategories)
|
||||
categories_.push_back(item.asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeThreatDistributeResult::getCategories()const
|
||||
{
|
||||
return categories_;
|
||||
}
|
||||
|
||||
std::vector<DescribeThreatDistributeResult::Item> DescribeThreatDistributeResult::getItems()const
|
||||
{
|
||||
return items_;
|
||||
}
|
||||
|
||||
49
sas-api/src/model/DescribeThreatTypeLinesRequest.cc
Normal file
49
sas-api/src/model/DescribeThreatTypeLinesRequest.cc
Normal 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/sas-api/model/DescribeThreatTypeLinesRequest.h>
|
||||
|
||||
using AlibabaCloud::Sas-api::Model::DescribeThreatTypeLinesRequest;
|
||||
|
||||
DescribeThreatTypeLinesRequest::DescribeThreatTypeLinesRequest() :
|
||||
RpcServiceRequest("sas-api", "2017-07-05", "DescribeThreatTypeLines")
|
||||
{}
|
||||
|
||||
DescribeThreatTypeLinesRequest::~DescribeThreatTypeLinesRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeThreatTypeLinesRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeThreatTypeLinesRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
int DescribeThreatTypeLinesRequest::getApiType()const
|
||||
{
|
||||
return apiType_;
|
||||
}
|
||||
|
||||
void DescribeThreatTypeLinesRequest::setApiType(int apiType)
|
||||
{
|
||||
apiType_ = apiType;
|
||||
setParameter("ApiType", std::to_string(apiType));
|
||||
}
|
||||
|
||||
70
sas-api/src/model/DescribeThreatTypeLinesResult.cc
Normal file
70
sas-api/src/model/DescribeThreatTypeLinesResult.cc
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/sas-api/model/DescribeThreatTypeLinesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Sas-api;
|
||||
using namespace AlibabaCloud::Sas-api::Model;
|
||||
|
||||
DescribeThreatTypeLinesResult::DescribeThreatTypeLinesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeThreatTypeLinesResult::DescribeThreatTypeLinesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeThreatTypeLinesResult::~DescribeThreatTypeLinesResult()
|
||||
{}
|
||||
|
||||
void DescribeThreatTypeLinesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allItems = value["Items"]["Item"];
|
||||
for (auto value : allItems)
|
||||
{
|
||||
Item itemsObject;
|
||||
if(!value["Data"].isNull())
|
||||
itemsObject.data = std::stof(value["Data"].asString());
|
||||
if(!value["Id"].isNull())
|
||||
itemsObject.id = value["Id"].asString();
|
||||
if(!value["Name"].isNull())
|
||||
itemsObject.name = value["Name"].asString();
|
||||
items_.push_back(itemsObject);
|
||||
}
|
||||
auto allCategories = value["Categories"]["CategoriesItem"];
|
||||
for (const auto &item : allCategories)
|
||||
categories_.push_back(item.asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeThreatTypeLinesResult::getCategories()const
|
||||
{
|
||||
return categories_;
|
||||
}
|
||||
|
||||
std::vector<DescribeThreatTypeLinesResult::Item> DescribeThreatTypeLinesResult::getItems()const
|
||||
{
|
||||
return items_;
|
||||
}
|
||||
|
||||
49
sas-api/src/model/DescribeTotalAndRateLineRequest.cc
Normal file
49
sas-api/src/model/DescribeTotalAndRateLineRequest.cc
Normal 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/sas-api/model/DescribeTotalAndRateLineRequest.h>
|
||||
|
||||
using AlibabaCloud::Sas-api::Model::DescribeTotalAndRateLineRequest;
|
||||
|
||||
DescribeTotalAndRateLineRequest::DescribeTotalAndRateLineRequest() :
|
||||
RpcServiceRequest("sas-api", "2017-07-05", "DescribeTotalAndRateLine")
|
||||
{}
|
||||
|
||||
DescribeTotalAndRateLineRequest::~DescribeTotalAndRateLineRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeTotalAndRateLineRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeTotalAndRateLineRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
int DescribeTotalAndRateLineRequest::getApiType()const
|
||||
{
|
||||
return apiType_;
|
||||
}
|
||||
|
||||
void DescribeTotalAndRateLineRequest::setApiType(int apiType)
|
||||
{
|
||||
apiType_ = apiType;
|
||||
setParameter("ApiType", std::to_string(apiType));
|
||||
}
|
||||
|
||||
70
sas-api/src/model/DescribeTotalAndRateLineResult.cc
Normal file
70
sas-api/src/model/DescribeTotalAndRateLineResult.cc
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/sas-api/model/DescribeTotalAndRateLineResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Sas-api;
|
||||
using namespace AlibabaCloud::Sas-api::Model;
|
||||
|
||||
DescribeTotalAndRateLineResult::DescribeTotalAndRateLineResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeTotalAndRateLineResult::DescribeTotalAndRateLineResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeTotalAndRateLineResult::~DescribeTotalAndRateLineResult()
|
||||
{}
|
||||
|
||||
void DescribeTotalAndRateLineResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allItems = value["Items"]["Item"];
|
||||
for (auto value : allItems)
|
||||
{
|
||||
Item itemsObject;
|
||||
if(!value["Data"].isNull())
|
||||
itemsObject.data = std::stof(value["Data"].asString());
|
||||
if(!value["Id"].isNull())
|
||||
itemsObject.id = value["Id"].asString();
|
||||
if(!value["Name"].isNull())
|
||||
itemsObject.name = value["Name"].asString();
|
||||
items_.push_back(itemsObject);
|
||||
}
|
||||
auto allCategories = value["Categories"]["CategoriesItem"];
|
||||
for (const auto &item : allCategories)
|
||||
categories_.push_back(item.asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeTotalAndRateLineResult::getCategories()const
|
||||
{
|
||||
return categories_;
|
||||
}
|
||||
|
||||
std::vector<DescribeTotalAndRateLineResult::Item> DescribeTotalAndRateLineResult::getItems()const
|
||||
{
|
||||
return items_;
|
||||
}
|
||||
|
||||
159
sas-api/src/model/GetAccountProfileRequest.cc
Normal file
159
sas-api/src/model/GetAccountProfileRequest.cc
Normal file
@@ -0,0 +1,159 @@
|
||||
/*
|
||||
* 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/sas-api/model/GetAccountProfileRequest.h>
|
||||
|
||||
using AlibabaCloud::Sas-api::Model::GetAccountProfileRequest;
|
||||
|
||||
GetAccountProfileRequest::GetAccountProfileRequest() :
|
||||
RpcServiceRequest("sas-api", "2017-07-05", "GetAccountProfile")
|
||||
{}
|
||||
|
||||
GetAccountProfileRequest::~GetAccountProfileRequest()
|
||||
{}
|
||||
|
||||
std::string GetAccountProfileRequest::getDeviceIdMd5()const
|
||||
{
|
||||
return deviceIdMd5_;
|
||||
}
|
||||
|
||||
void GetAccountProfileRequest::setDeviceIdMd5(const std::string& deviceIdMd5)
|
||||
{
|
||||
deviceIdMd5_ = deviceIdMd5;
|
||||
setParameter("DeviceIdMd5", deviceIdMd5);
|
||||
}
|
||||
|
||||
int GetAccountProfileRequest::getCarrier()const
|
||||
{
|
||||
return carrier_;
|
||||
}
|
||||
|
||||
void GetAccountProfileRequest::setCarrier(int carrier)
|
||||
{
|
||||
carrier_ = carrier;
|
||||
setParameter("Carrier", std::to_string(carrier));
|
||||
}
|
||||
|
||||
std::string GetAccountProfileRequest::getOs()const
|
||||
{
|
||||
return os_;
|
||||
}
|
||||
|
||||
void GetAccountProfileRequest::setOs(const std::string& os)
|
||||
{
|
||||
os_ = os;
|
||||
setParameter("Os", os);
|
||||
}
|
||||
|
||||
std::string GetAccountProfileRequest::getPhone()const
|
||||
{
|
||||
return phone_;
|
||||
}
|
||||
|
||||
void GetAccountProfileRequest::setPhone(const std::string& phone)
|
||||
{
|
||||
phone_ = phone;
|
||||
setParameter("Phone", phone);
|
||||
}
|
||||
|
||||
std::string GetAccountProfileRequest::getRequestUrl()const
|
||||
{
|
||||
return requestUrl_;
|
||||
}
|
||||
|
||||
void GetAccountProfileRequest::setRequestUrl(const std::string& requestUrl)
|
||||
{
|
||||
requestUrl_ = requestUrl;
|
||||
setParameter("RequestUrl", requestUrl);
|
||||
}
|
||||
|
||||
std::string GetAccountProfileRequest::getIp()const
|
||||
{
|
||||
return ip_;
|
||||
}
|
||||
|
||||
void GetAccountProfileRequest::setIp(const std::string& ip)
|
||||
{
|
||||
ip_ = ip;
|
||||
setParameter("Ip", ip);
|
||||
}
|
||||
|
||||
std::string GetAccountProfileRequest::getUserAgent()const
|
||||
{
|
||||
return userAgent_;
|
||||
}
|
||||
|
||||
void GetAccountProfileRequest::setUserAgent(const std::string& userAgent)
|
||||
{
|
||||
userAgent_ = userAgent;
|
||||
setParameter("UserAgent", userAgent);
|
||||
}
|
||||
|
||||
int GetAccountProfileRequest::getConnectionType()const
|
||||
{
|
||||
return connectionType_;
|
||||
}
|
||||
|
||||
void GetAccountProfileRequest::setConnectionType(int connectionType)
|
||||
{
|
||||
connectionType_ = connectionType;
|
||||
setParameter("ConnectionType", std::to_string(connectionType));
|
||||
}
|
||||
|
||||
int GetAccountProfileRequest::getSensType()const
|
||||
{
|
||||
return sensType_;
|
||||
}
|
||||
|
||||
void GetAccountProfileRequest::setSensType(int sensType)
|
||||
{
|
||||
sensType_ = sensType;
|
||||
setParameter("SensType", std::to_string(sensType));
|
||||
}
|
||||
|
||||
int GetAccountProfileRequest::getDeviceType()const
|
||||
{
|
||||
return deviceType_;
|
||||
}
|
||||
|
||||
void GetAccountProfileRequest::setDeviceType(int deviceType)
|
||||
{
|
||||
deviceType_ = deviceType;
|
||||
setParameter("DeviceType", std::to_string(deviceType));
|
||||
}
|
||||
|
||||
long GetAccountProfileRequest::getAccessTimestamp()const
|
||||
{
|
||||
return accessTimestamp_;
|
||||
}
|
||||
|
||||
void GetAccountProfileRequest::setAccessTimestamp(long accessTimestamp)
|
||||
{
|
||||
accessTimestamp_ = accessTimestamp;
|
||||
setParameter("AccessTimestamp", std::to_string(accessTimestamp));
|
||||
}
|
||||
|
||||
int GetAccountProfileRequest::getBusinessType()const
|
||||
{
|
||||
return businessType_;
|
||||
}
|
||||
|
||||
void GetAccountProfileRequest::setBusinessType(int businessType)
|
||||
{
|
||||
businessType_ = businessType;
|
||||
setParameter("BusinessType", std::to_string(businessType));
|
||||
}
|
||||
|
||||
80
sas-api/src/model/GetAccountProfileResult.cc
Normal file
80
sas-api/src/model/GetAccountProfileResult.cc
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* 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/sas-api/model/GetAccountProfileResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Sas-api;
|
||||
using namespace AlibabaCloud::Sas-api::Model;
|
||||
|
||||
GetAccountProfileResult::GetAccountProfileResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAccountProfileResult::GetAccountProfileResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAccountProfileResult::~GetAccountProfileResult()
|
||||
{}
|
||||
|
||||
void GetAccountProfileResult::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["Ip"].isNull())
|
||||
data_.ip = dataNode["Ip"].asString();
|
||||
if(!dataNode["Phone"].isNull())
|
||||
data_.phone = dataNode["Phone"].asString();
|
||||
if(!dataNode["IpInfo"].isNull())
|
||||
data_.ipInfo = dataNode["IpInfo"].asString();
|
||||
if(!dataNode["PhoneInfo"].isNull())
|
||||
data_.phoneInfo = dataNode["PhoneInfo"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string GetAccountProfileResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
GetAccountProfileResult::Data GetAccountProfileResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
int GetAccountProfileResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetAccountProfileResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
38
sas-api/src/model/GetInstanceCountRequest.cc
Normal file
38
sas-api/src/model/GetInstanceCountRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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/sas-api/model/GetInstanceCountRequest.h>
|
||||
|
||||
using AlibabaCloud::Sas-api::Model::GetInstanceCountRequest;
|
||||
|
||||
GetInstanceCountRequest::GetInstanceCountRequest() :
|
||||
RpcServiceRequest("sas-api", "2017-07-05", "GetInstanceCount")
|
||||
{}
|
||||
|
||||
GetInstanceCountRequest::~GetInstanceCountRequest()
|
||||
{}
|
||||
|
||||
long GetInstanceCountRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void GetInstanceCountRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
73
sas-api/src/model/GetInstanceCountResult.cc
Normal file
73
sas-api/src/model/GetInstanceCountResult.cc
Normal 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/sas-api/model/GetInstanceCountResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Sas-api;
|
||||
using namespace AlibabaCloud::Sas-api::Model;
|
||||
|
||||
GetInstanceCountResult::GetInstanceCountResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetInstanceCountResult::GetInstanceCountResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetInstanceCountResult::~GetInstanceCountResult()
|
||||
{}
|
||||
|
||||
void GetInstanceCountResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].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["Data"].isNull())
|
||||
data_ = std::stoi(value["Data"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string GetInstanceCountResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int GetInstanceCountResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetInstanceCountResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetInstanceCountResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
137
sas-api/src/model/GetIpProfileRequest.cc
Normal file
137
sas-api/src/model/GetIpProfileRequest.cc
Normal file
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
* 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/sas-api/model/GetIpProfileRequest.h>
|
||||
|
||||
using AlibabaCloud::Sas-api::Model::GetIpProfileRequest;
|
||||
|
||||
GetIpProfileRequest::GetIpProfileRequest() :
|
||||
RpcServiceRequest("sas-api", "2017-07-05", "GetIpProfile")
|
||||
{}
|
||||
|
||||
GetIpProfileRequest::~GetIpProfileRequest()
|
||||
{}
|
||||
|
||||
std::string GetIpProfileRequest::getDeviceIdMd5()const
|
||||
{
|
||||
return deviceIdMd5_;
|
||||
}
|
||||
|
||||
void GetIpProfileRequest::setDeviceIdMd5(const std::string& deviceIdMd5)
|
||||
{
|
||||
deviceIdMd5_ = deviceIdMd5;
|
||||
setParameter("DeviceIdMd5", deviceIdMd5);
|
||||
}
|
||||
|
||||
int GetIpProfileRequest::getCarrier()const
|
||||
{
|
||||
return carrier_;
|
||||
}
|
||||
|
||||
void GetIpProfileRequest::setCarrier(int carrier)
|
||||
{
|
||||
carrier_ = carrier;
|
||||
setParameter("Carrier", std::to_string(carrier));
|
||||
}
|
||||
|
||||
std::string GetIpProfileRequest::getOs()const
|
||||
{
|
||||
return os_;
|
||||
}
|
||||
|
||||
void GetIpProfileRequest::setOs(const std::string& os)
|
||||
{
|
||||
os_ = os;
|
||||
setParameter("Os", os);
|
||||
}
|
||||
|
||||
std::string GetIpProfileRequest::getRequestUrl()const
|
||||
{
|
||||
return requestUrl_;
|
||||
}
|
||||
|
||||
void GetIpProfileRequest::setRequestUrl(const std::string& requestUrl)
|
||||
{
|
||||
requestUrl_ = requestUrl;
|
||||
setParameter("RequestUrl", requestUrl);
|
||||
}
|
||||
|
||||
std::string GetIpProfileRequest::getIp()const
|
||||
{
|
||||
return ip_;
|
||||
}
|
||||
|
||||
void GetIpProfileRequest::setIp(const std::string& ip)
|
||||
{
|
||||
ip_ = ip;
|
||||
setParameter("Ip", ip);
|
||||
}
|
||||
|
||||
std::string GetIpProfileRequest::getUserAgent()const
|
||||
{
|
||||
return userAgent_;
|
||||
}
|
||||
|
||||
void GetIpProfileRequest::setUserAgent(const std::string& userAgent)
|
||||
{
|
||||
userAgent_ = userAgent;
|
||||
setParameter("UserAgent", userAgent);
|
||||
}
|
||||
|
||||
int GetIpProfileRequest::getConnectionType()const
|
||||
{
|
||||
return connectionType_;
|
||||
}
|
||||
|
||||
void GetIpProfileRequest::setConnectionType(int connectionType)
|
||||
{
|
||||
connectionType_ = connectionType;
|
||||
setParameter("ConnectionType", std::to_string(connectionType));
|
||||
}
|
||||
|
||||
int GetIpProfileRequest::getSensType()const
|
||||
{
|
||||
return sensType_;
|
||||
}
|
||||
|
||||
void GetIpProfileRequest::setSensType(int sensType)
|
||||
{
|
||||
sensType_ = sensType;
|
||||
setParameter("SensType", std::to_string(sensType));
|
||||
}
|
||||
|
||||
int GetIpProfileRequest::getDeviceType()const
|
||||
{
|
||||
return deviceType_;
|
||||
}
|
||||
|
||||
void GetIpProfileRequest::setDeviceType(int deviceType)
|
||||
{
|
||||
deviceType_ = deviceType;
|
||||
setParameter("DeviceType", std::to_string(deviceType));
|
||||
}
|
||||
|
||||
int GetIpProfileRequest::getBusinessType()const
|
||||
{
|
||||
return businessType_;
|
||||
}
|
||||
|
||||
void GetIpProfileRequest::setBusinessType(int businessType)
|
||||
{
|
||||
businessType_ = businessType;
|
||||
setParameter("BusinessType", std::to_string(businessType));
|
||||
}
|
||||
|
||||
76
sas-api/src/model/GetIpProfileResult.cc
Normal file
76
sas-api/src/model/GetIpProfileResult.cc
Normal 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/sas-api/model/GetIpProfileResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Sas-api;
|
||||
using namespace AlibabaCloud::Sas-api::Model;
|
||||
|
||||
GetIpProfileResult::GetIpProfileResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetIpProfileResult::GetIpProfileResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetIpProfileResult::~GetIpProfileResult()
|
||||
{}
|
||||
|
||||
void GetIpProfileResult::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["Ip"].isNull())
|
||||
data_.ip = dataNode["Ip"].asString();
|
||||
if(!dataNode["Info"].isNull())
|
||||
data_.info = dataNode["Info"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string GetIpProfileResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
GetIpProfileResult::Data GetIpProfileResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
int GetIpProfileResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetIpProfileResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
71
sas-api/src/model/GetPhoneProfileRequest.cc
Normal file
71
sas-api/src/model/GetPhoneProfileRequest.cc
Normal 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/sas-api/model/GetPhoneProfileRequest.h>
|
||||
|
||||
using AlibabaCloud::Sas-api::Model::GetPhoneProfileRequest;
|
||||
|
||||
GetPhoneProfileRequest::GetPhoneProfileRequest() :
|
||||
RpcServiceRequest("sas-api", "2017-07-05", "GetPhoneProfile")
|
||||
{}
|
||||
|
||||
GetPhoneProfileRequest::~GetPhoneProfileRequest()
|
||||
{}
|
||||
|
||||
std::string GetPhoneProfileRequest::getPhone()const
|
||||
{
|
||||
return phone_;
|
||||
}
|
||||
|
||||
void GetPhoneProfileRequest::setPhone(const std::string& phone)
|
||||
{
|
||||
phone_ = phone;
|
||||
setParameter("Phone", phone);
|
||||
}
|
||||
|
||||
int GetPhoneProfileRequest::getSensType()const
|
||||
{
|
||||
return sensType_;
|
||||
}
|
||||
|
||||
void GetPhoneProfileRequest::setSensType(int sensType)
|
||||
{
|
||||
sensType_ = sensType;
|
||||
setParameter("SensType", std::to_string(sensType));
|
||||
}
|
||||
|
||||
std::string GetPhoneProfileRequest::getDataVersion()const
|
||||
{
|
||||
return dataVersion_;
|
||||
}
|
||||
|
||||
void GetPhoneProfileRequest::setDataVersion(const std::string& dataVersion)
|
||||
{
|
||||
dataVersion_ = dataVersion;
|
||||
setParameter("DataVersion", dataVersion);
|
||||
}
|
||||
|
||||
int GetPhoneProfileRequest::getBusinessType()const
|
||||
{
|
||||
return businessType_;
|
||||
}
|
||||
|
||||
void GetPhoneProfileRequest::setBusinessType(int businessType)
|
||||
{
|
||||
businessType_ = businessType;
|
||||
setParameter("BusinessType", std::to_string(businessType));
|
||||
}
|
||||
|
||||
76
sas-api/src/model/GetPhoneProfileResult.cc
Normal file
76
sas-api/src/model/GetPhoneProfileResult.cc
Normal 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/sas-api/model/GetPhoneProfileResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Sas-api;
|
||||
using namespace AlibabaCloud::Sas-api::Model;
|
||||
|
||||
GetPhoneProfileResult::GetPhoneProfileResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetPhoneProfileResult::GetPhoneProfileResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetPhoneProfileResult::~GetPhoneProfileResult()
|
||||
{}
|
||||
|
||||
void GetPhoneProfileResult::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["Phone"].isNull())
|
||||
data_.phone = dataNode["Phone"].asString();
|
||||
if(!dataNode["Info"].isNull())
|
||||
data_.info = dataNode["Info"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string GetPhoneProfileResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
GetPhoneProfileResult::Data GetPhoneProfileResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
int GetPhoneProfileResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetPhoneProfileResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user