@@ -31,62 +31,26 @@ PushClient::PushClient(const Credentials &credentials, const ClientConfiguration
|
||||
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, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "push");
|
||||
}
|
||||
|
||||
PushClient::PushClient(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, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "push");
|
||||
}
|
||||
|
||||
PushClient::PushClient(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, "");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "push");
|
||||
}
|
||||
|
||||
PushClient::~PushClient()
|
||||
{}
|
||||
|
||||
PushClient::UnbindTagOutcome PushClient::unbindTag(const UnbindTagRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UnbindTagOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UnbindTagOutcome(UnbindTagResult(outcome.result()));
|
||||
else
|
||||
return UnbindTagOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void PushClient::unbindTagAsync(const UnbindTagRequest& request, const UnbindTagAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, unbindTag(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
PushClient::UnbindTagOutcomeCallable PushClient::unbindTagCallable(const UnbindTagRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UnbindTagOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->unbindTag(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PushClient::QueryDeviceStatOutcome PushClient::queryDeviceStat(const QueryDeviceStatRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -123,6 +87,42 @@ PushClient::QueryDeviceStatOutcomeCallable PushClient::queryDeviceStatCallable(c
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PushClient::UnbindTagOutcome PushClient::unbindTag(const UnbindTagRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UnbindTagOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UnbindTagOutcome(UnbindTagResult(outcome.result()));
|
||||
else
|
||||
return UnbindTagOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void PushClient::unbindTagAsync(const UnbindTagRequest& request, const UnbindTagAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, unbindTag(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
PushClient::UnbindTagOutcomeCallable PushClient::unbindTagCallable(const UnbindTagRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UnbindTagOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->unbindTag(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PushClient::QueryPushStatByAppOutcome PushClient::queryPushStatByApp(const QueryPushStatByAppRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -195,42 +195,6 @@ PushClient::CheckDeviceOutcomeCallable PushClient::checkDeviceCallable(const Che
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PushClient::ListPushRecordsOutcome PushClient::listPushRecords(const ListPushRecordsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListPushRecordsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListPushRecordsOutcome(ListPushRecordsResult(outcome.result()));
|
||||
else
|
||||
return ListPushRecordsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void PushClient::listPushRecordsAsync(const ListPushRecordsRequest& request, const ListPushRecordsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listPushRecords(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
PushClient::ListPushRecordsOutcomeCallable PushClient::listPushRecordsCallable(const ListPushRecordsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListPushRecordsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listPushRecords(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PushClient::QueryDevicesByAliasOutcome PushClient::queryDevicesByAlias(const QueryDevicesByAliasRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -303,6 +267,42 @@ PushClient::PushOutcomeCallable PushClient::pushCallable(const PushRequest &requ
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PushClient::ListPushRecordsOutcome PushClient::listPushRecords(const ListPushRecordsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListPushRecordsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListPushRecordsOutcome(ListPushRecordsResult(outcome.result()));
|
||||
else
|
||||
return ListPushRecordsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void PushClient::listPushRecordsAsync(const ListPushRecordsRequest& request, const ListPushRecordsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listPushRecords(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
PushClient::ListPushRecordsOutcomeCallable PushClient::listPushRecordsCallable(const ListPushRecordsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListPushRecordsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listPushRecords(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PushClient::QueryTagsOutcome PushClient::queryTags(const QueryTagsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string BindAliasRequest::getAliasName()const
|
||||
void BindAliasRequest::setAliasName(const std::string& aliasName)
|
||||
{
|
||||
aliasName_ = aliasName;
|
||||
setParameter("AliasName", aliasName);
|
||||
setCoreParameter("AliasName", aliasName);
|
||||
}
|
||||
|
||||
long BindAliasRequest::getAppKey()const
|
||||
@@ -44,7 +44,7 @@ long BindAliasRequest::getAppKey()const
|
||||
void BindAliasRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string BindAliasRequest::getDeviceId()const
|
||||
@@ -55,7 +55,7 @@ std::string BindAliasRequest::getDeviceId()const
|
||||
void BindAliasRequest::setDeviceId(const std::string& deviceId)
|
||||
{
|
||||
deviceId_ = deviceId;
|
||||
setParameter("DeviceId", deviceId);
|
||||
setCoreParameter("DeviceId", deviceId);
|
||||
}
|
||||
|
||||
std::string BindAliasRequest::getAccessKeyId()const
|
||||
@@ -66,6 +66,6 @@ std::string BindAliasRequest::getAccessKeyId()const
|
||||
void BindAliasRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ BindAliasResult::~BindAliasResult()
|
||||
|
||||
void BindAliasResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string BindPhoneRequest::getPhoneNumber()const
|
||||
void BindPhoneRequest::setPhoneNumber(const std::string& phoneNumber)
|
||||
{
|
||||
phoneNumber_ = phoneNumber;
|
||||
setParameter("PhoneNumber", phoneNumber);
|
||||
setCoreParameter("PhoneNumber", phoneNumber);
|
||||
}
|
||||
|
||||
long BindPhoneRequest::getAppKey()const
|
||||
@@ -44,7 +44,7 @@ long BindPhoneRequest::getAppKey()const
|
||||
void BindPhoneRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string BindPhoneRequest::getDeviceId()const
|
||||
@@ -55,7 +55,7 @@ std::string BindPhoneRequest::getDeviceId()const
|
||||
void BindPhoneRequest::setDeviceId(const std::string& deviceId)
|
||||
{
|
||||
deviceId_ = deviceId;
|
||||
setParameter("DeviceId", deviceId);
|
||||
setCoreParameter("DeviceId", deviceId);
|
||||
}
|
||||
|
||||
std::string BindPhoneRequest::getAccessKeyId()const
|
||||
@@ -66,6 +66,6 @@ std::string BindPhoneRequest::getAccessKeyId()const
|
||||
void BindPhoneRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ BindPhoneResult::~BindPhoneResult()
|
||||
|
||||
void BindPhoneResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string BindTagRequest::getTagName()const
|
||||
void BindTagRequest::setTagName(const std::string& tagName)
|
||||
{
|
||||
tagName_ = tagName;
|
||||
setParameter("TagName", tagName);
|
||||
setCoreParameter("TagName", tagName);
|
||||
}
|
||||
|
||||
std::string BindTagRequest::getClientKey()const
|
||||
@@ -44,7 +44,7 @@ std::string BindTagRequest::getClientKey()const
|
||||
void BindTagRequest::setClientKey(const std::string& clientKey)
|
||||
{
|
||||
clientKey_ = clientKey;
|
||||
setParameter("ClientKey", clientKey);
|
||||
setCoreParameter("ClientKey", clientKey);
|
||||
}
|
||||
|
||||
long BindTagRequest::getAppKey()const
|
||||
@@ -55,7 +55,7 @@ long BindTagRequest::getAppKey()const
|
||||
void BindTagRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string BindTagRequest::getKeyType()const
|
||||
@@ -66,7 +66,7 @@ std::string BindTagRequest::getKeyType()const
|
||||
void BindTagRequest::setKeyType(const std::string& keyType)
|
||||
{
|
||||
keyType_ = keyType;
|
||||
setParameter("KeyType", keyType);
|
||||
setCoreParameter("KeyType", keyType);
|
||||
}
|
||||
|
||||
std::string BindTagRequest::getAccessKeyId()const
|
||||
@@ -77,6 +77,6 @@ std::string BindTagRequest::getAccessKeyId()const
|
||||
void BindTagRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ BindTagResult::~BindTagResult()
|
||||
|
||||
void BindTagResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ long CancelPushRequest::getMessageId()const
|
||||
void CancelPushRequest::setMessageId(long messageId)
|
||||
{
|
||||
messageId_ = messageId;
|
||||
setParameter("MessageId", std::to_string(messageId));
|
||||
setCoreParameter("MessageId", std::to_string(messageId));
|
||||
}
|
||||
|
||||
long CancelPushRequest::getAppKey()const
|
||||
@@ -44,7 +44,7 @@ long CancelPushRequest::getAppKey()const
|
||||
void CancelPushRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string CancelPushRequest::getAccessKeyId()const
|
||||
@@ -55,6 +55,6 @@ std::string CancelPushRequest::getAccessKeyId()const
|
||||
void CancelPushRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ CancelPushResult::~CancelPushResult()
|
||||
|
||||
void CancelPushResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ long CheckDeviceRequest::getAppKey()const
|
||||
void CheckDeviceRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string CheckDeviceRequest::getDeviceId()const
|
||||
@@ -44,7 +44,7 @@ std::string CheckDeviceRequest::getDeviceId()const
|
||||
void CheckDeviceRequest::setDeviceId(const std::string& deviceId)
|
||||
{
|
||||
deviceId_ = deviceId;
|
||||
setParameter("DeviceId", deviceId);
|
||||
setCoreParameter("DeviceId", deviceId);
|
||||
}
|
||||
|
||||
std::string CheckDeviceRequest::getAccessKeyId()const
|
||||
@@ -55,6 +55,6 @@ std::string CheckDeviceRequest::getAccessKeyId()const
|
||||
void CheckDeviceRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ CheckDeviceResult::~CheckDeviceResult()
|
||||
|
||||
void CheckDeviceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Available"].isNull())
|
||||
available_ = value["Available"].asString() == "true";
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string CheckDevicesRequest::getDeviceIds()const
|
||||
void CheckDevicesRequest::setDeviceIds(const std::string& deviceIds)
|
||||
{
|
||||
deviceIds_ = deviceIds;
|
||||
setParameter("DeviceIds", deviceIds);
|
||||
setCoreParameter("DeviceIds", deviceIds);
|
||||
}
|
||||
|
||||
long CheckDevicesRequest::getAppKey()const
|
||||
@@ -44,7 +44,7 @@ long CheckDevicesRequest::getAppKey()const
|
||||
void CheckDevicesRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string CheckDevicesRequest::getAccessKeyId()const
|
||||
@@ -55,6 +55,6 @@ std::string CheckDevicesRequest::getAccessKeyId()const
|
||||
void CheckDevicesRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ CheckDevicesResult::~CheckDevicesResult()
|
||||
|
||||
void CheckDevicesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDeviceCheckInfos = value["DeviceCheckInfos"]["DeviceCheckInfo"];
|
||||
for (auto value : allDeviceCheckInfos)
|
||||
|
||||
@@ -33,7 +33,7 @@ int ListPushRecordsRequest::getPageSize()const
|
||||
void ListPushRecordsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListPushRecordsRequest::getEndTime()const
|
||||
@@ -44,7 +44,7 @@ std::string ListPushRecordsRequest::getEndTime()const
|
||||
void ListPushRecordsRequest::setEndTime(const std::string& endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", endTime);
|
||||
setCoreParameter("EndTime", endTime);
|
||||
}
|
||||
|
||||
long ListPushRecordsRequest::getAppKey()const
|
||||
@@ -55,7 +55,7 @@ long ListPushRecordsRequest::getAppKey()const
|
||||
void ListPushRecordsRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string ListPushRecordsRequest::getStartTime()const
|
||||
@@ -66,7 +66,7 @@ std::string ListPushRecordsRequest::getStartTime()const
|
||||
void ListPushRecordsRequest::setStartTime(const std::string& startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", startTime);
|
||||
setCoreParameter("StartTime", startTime);
|
||||
}
|
||||
|
||||
int ListPushRecordsRequest::getPage()const
|
||||
@@ -77,7 +77,7 @@ int ListPushRecordsRequest::getPage()const
|
||||
void ListPushRecordsRequest::setPage(int page)
|
||||
{
|
||||
page_ = page;
|
||||
setParameter("Page", std::to_string(page));
|
||||
setCoreParameter("Page", std::to_string(page));
|
||||
}
|
||||
|
||||
std::string ListPushRecordsRequest::getPushType()const
|
||||
@@ -88,7 +88,7 @@ std::string ListPushRecordsRequest::getPushType()const
|
||||
void ListPushRecordsRequest::setPushType(const std::string& pushType)
|
||||
{
|
||||
pushType_ = pushType;
|
||||
setParameter("PushType", pushType);
|
||||
setCoreParameter("PushType", pushType);
|
||||
}
|
||||
|
||||
std::string ListPushRecordsRequest::getAccessKeyId()const
|
||||
@@ -99,6 +99,6 @@ std::string ListPushRecordsRequest::getAccessKeyId()const
|
||||
void ListPushRecordsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ ListPushRecordsResult::~ListPushRecordsResult()
|
||||
|
||||
void ListPushRecordsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allPushMessageInfos = value["PushMessageInfos"]["PushMessageInfo"];
|
||||
for (auto value : allPushMessageInfos)
|
||||
|
||||
@@ -33,6 +33,6 @@ std::string ListSummaryAppsRequest::getAccessKeyId()const
|
||||
void ListSummaryAppsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ ListSummaryAppsResult::~ListSummaryAppsResult()
|
||||
|
||||
void ListSummaryAppsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allSummaryAppInfos = value["SummaryAppInfos"]["SummaryAppInfo"];
|
||||
for (auto value : allSummaryAppInfos)
|
||||
|
||||
@@ -33,7 +33,7 @@ long ListTagsRequest::getAppKey()const
|
||||
void ListTagsRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string ListTagsRequest::getAccessKeyId()const
|
||||
@@ -44,6 +44,6 @@ std::string ListTagsRequest::getAccessKeyId()const
|
||||
void ListTagsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ ListTagsResult::~ListTagsResult()
|
||||
|
||||
void ListTagsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allTagInfos = value["TagInfos"]["TagInfo"];
|
||||
for (auto value : allTagInfos)
|
||||
|
||||
@@ -33,7 +33,7 @@ long PushMessageToAndroidRequest::getAppKey()const
|
||||
void PushMessageToAndroidRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string PushMessageToAndroidRequest::getTargetValue()const
|
||||
@@ -44,7 +44,7 @@ std::string PushMessageToAndroidRequest::getTargetValue()const
|
||||
void PushMessageToAndroidRequest::setTargetValue(const std::string& targetValue)
|
||||
{
|
||||
targetValue_ = targetValue;
|
||||
setParameter("TargetValue", targetValue);
|
||||
setCoreParameter("TargetValue", targetValue);
|
||||
}
|
||||
|
||||
std::string PushMessageToAndroidRequest::getTitle()const
|
||||
@@ -55,7 +55,7 @@ std::string PushMessageToAndroidRequest::getTitle()const
|
||||
void PushMessageToAndroidRequest::setTitle(const std::string& title)
|
||||
{
|
||||
title_ = title;
|
||||
setParameter("Title", title);
|
||||
setCoreParameter("Title", title);
|
||||
}
|
||||
|
||||
std::string PushMessageToAndroidRequest::getBody()const
|
||||
@@ -66,7 +66,7 @@ std::string PushMessageToAndroidRequest::getBody()const
|
||||
void PushMessageToAndroidRequest::setBody(const std::string& body)
|
||||
{
|
||||
body_ = body;
|
||||
setParameter("Body", body);
|
||||
setCoreParameter("Body", body);
|
||||
}
|
||||
|
||||
std::string PushMessageToAndroidRequest::getJobKey()const
|
||||
@@ -77,7 +77,7 @@ std::string PushMessageToAndroidRequest::getJobKey()const
|
||||
void PushMessageToAndroidRequest::setJobKey(const std::string& jobKey)
|
||||
{
|
||||
jobKey_ = jobKey;
|
||||
setParameter("JobKey", jobKey);
|
||||
setCoreParameter("JobKey", jobKey);
|
||||
}
|
||||
|
||||
std::string PushMessageToAndroidRequest::getAccessKeyId()const
|
||||
@@ -88,7 +88,7 @@ std::string PushMessageToAndroidRequest::getAccessKeyId()const
|
||||
void PushMessageToAndroidRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string PushMessageToAndroidRequest::getTarget()const
|
||||
@@ -99,6 +99,6 @@ std::string PushMessageToAndroidRequest::getTarget()const
|
||||
void PushMessageToAndroidRequest::setTarget(const std::string& target)
|
||||
{
|
||||
target_ = target;
|
||||
setParameter("Target", target);
|
||||
setCoreParameter("Target", target);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ PushMessageToAndroidResult::~PushMessageToAndroidResult()
|
||||
|
||||
void PushMessageToAndroidResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["MessageId"].isNull())
|
||||
messageId_ = value["MessageId"].asString();
|
||||
|
||||
@@ -33,7 +33,7 @@ long PushMessageToiOSRequest::getAppKey()const
|
||||
void PushMessageToiOSRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string PushMessageToiOSRequest::getTargetValue()const
|
||||
@@ -44,7 +44,7 @@ std::string PushMessageToiOSRequest::getTargetValue()const
|
||||
void PushMessageToiOSRequest::setTargetValue(const std::string& targetValue)
|
||||
{
|
||||
targetValue_ = targetValue;
|
||||
setParameter("TargetValue", targetValue);
|
||||
setCoreParameter("TargetValue", targetValue);
|
||||
}
|
||||
|
||||
std::string PushMessageToiOSRequest::getTitle()const
|
||||
@@ -55,7 +55,7 @@ std::string PushMessageToiOSRequest::getTitle()const
|
||||
void PushMessageToiOSRequest::setTitle(const std::string& title)
|
||||
{
|
||||
title_ = title;
|
||||
setParameter("Title", title);
|
||||
setCoreParameter("Title", title);
|
||||
}
|
||||
|
||||
std::string PushMessageToiOSRequest::getBody()const
|
||||
@@ -66,7 +66,7 @@ std::string PushMessageToiOSRequest::getBody()const
|
||||
void PushMessageToiOSRequest::setBody(const std::string& body)
|
||||
{
|
||||
body_ = body;
|
||||
setParameter("Body", body);
|
||||
setCoreParameter("Body", body);
|
||||
}
|
||||
|
||||
std::string PushMessageToiOSRequest::getJobKey()const
|
||||
@@ -77,7 +77,7 @@ std::string PushMessageToiOSRequest::getJobKey()const
|
||||
void PushMessageToiOSRequest::setJobKey(const std::string& jobKey)
|
||||
{
|
||||
jobKey_ = jobKey;
|
||||
setParameter("JobKey", jobKey);
|
||||
setCoreParameter("JobKey", jobKey);
|
||||
}
|
||||
|
||||
std::string PushMessageToiOSRequest::getAccessKeyId()const
|
||||
@@ -88,7 +88,7 @@ std::string PushMessageToiOSRequest::getAccessKeyId()const
|
||||
void PushMessageToiOSRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string PushMessageToiOSRequest::getTarget()const
|
||||
@@ -99,6 +99,6 @@ std::string PushMessageToiOSRequest::getTarget()const
|
||||
void PushMessageToiOSRequest::setTarget(const std::string& target)
|
||||
{
|
||||
target_ = target;
|
||||
setParameter("Target", target);
|
||||
setCoreParameter("Target", target);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ PushMessageToiOSResult::~PushMessageToiOSResult()
|
||||
|
||||
void PushMessageToiOSResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["MessageId"].isNull())
|
||||
messageId_ = value["MessageId"].asString();
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string PushNoticeToAndroidRequest::getExtParameters()const
|
||||
void PushNoticeToAndroidRequest::setExtParameters(const std::string& extParameters)
|
||||
{
|
||||
extParameters_ = extParameters;
|
||||
setParameter("ExtParameters", extParameters);
|
||||
setCoreParameter("ExtParameters", extParameters);
|
||||
}
|
||||
|
||||
long PushNoticeToAndroidRequest::getAppKey()const
|
||||
@@ -44,7 +44,7 @@ long PushNoticeToAndroidRequest::getAppKey()const
|
||||
void PushNoticeToAndroidRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string PushNoticeToAndroidRequest::getTargetValue()const
|
||||
@@ -55,7 +55,7 @@ std::string PushNoticeToAndroidRequest::getTargetValue()const
|
||||
void PushNoticeToAndroidRequest::setTargetValue(const std::string& targetValue)
|
||||
{
|
||||
targetValue_ = targetValue;
|
||||
setParameter("TargetValue", targetValue);
|
||||
setCoreParameter("TargetValue", targetValue);
|
||||
}
|
||||
|
||||
std::string PushNoticeToAndroidRequest::getTitle()const
|
||||
@@ -66,7 +66,7 @@ std::string PushNoticeToAndroidRequest::getTitle()const
|
||||
void PushNoticeToAndroidRequest::setTitle(const std::string& title)
|
||||
{
|
||||
title_ = title;
|
||||
setParameter("Title", title);
|
||||
setCoreParameter("Title", title);
|
||||
}
|
||||
|
||||
std::string PushNoticeToAndroidRequest::getBody()const
|
||||
@@ -77,7 +77,7 @@ std::string PushNoticeToAndroidRequest::getBody()const
|
||||
void PushNoticeToAndroidRequest::setBody(const std::string& body)
|
||||
{
|
||||
body_ = body;
|
||||
setParameter("Body", body);
|
||||
setCoreParameter("Body", body);
|
||||
}
|
||||
|
||||
std::string PushNoticeToAndroidRequest::getJobKey()const
|
||||
@@ -88,7 +88,7 @@ std::string PushNoticeToAndroidRequest::getJobKey()const
|
||||
void PushNoticeToAndroidRequest::setJobKey(const std::string& jobKey)
|
||||
{
|
||||
jobKey_ = jobKey;
|
||||
setParameter("JobKey", jobKey);
|
||||
setCoreParameter("JobKey", jobKey);
|
||||
}
|
||||
|
||||
std::string PushNoticeToAndroidRequest::getAccessKeyId()const
|
||||
@@ -99,7 +99,7 @@ std::string PushNoticeToAndroidRequest::getAccessKeyId()const
|
||||
void PushNoticeToAndroidRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string PushNoticeToAndroidRequest::getTarget()const
|
||||
@@ -110,6 +110,6 @@ std::string PushNoticeToAndroidRequest::getTarget()const
|
||||
void PushNoticeToAndroidRequest::setTarget(const std::string& target)
|
||||
{
|
||||
target_ = target;
|
||||
setParameter("Target", target);
|
||||
setCoreParameter("Target", target);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ PushNoticeToAndroidResult::~PushNoticeToAndroidResult()
|
||||
|
||||
void PushNoticeToAndroidResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["MessageId"].isNull())
|
||||
messageId_ = value["MessageId"].asString();
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string PushNoticeToiOSRequest::getExtParameters()const
|
||||
void PushNoticeToiOSRequest::setExtParameters(const std::string& extParameters)
|
||||
{
|
||||
extParameters_ = extParameters;
|
||||
setParameter("ExtParameters", extParameters);
|
||||
setCoreParameter("ExtParameters", extParameters);
|
||||
}
|
||||
|
||||
std::string PushNoticeToiOSRequest::getApnsEnv()const
|
||||
@@ -44,7 +44,7 @@ std::string PushNoticeToiOSRequest::getApnsEnv()const
|
||||
void PushNoticeToiOSRequest::setApnsEnv(const std::string& apnsEnv)
|
||||
{
|
||||
apnsEnv_ = apnsEnv;
|
||||
setParameter("ApnsEnv", apnsEnv);
|
||||
setCoreParameter("ApnsEnv", apnsEnv);
|
||||
}
|
||||
|
||||
long PushNoticeToiOSRequest::getAppKey()const
|
||||
@@ -55,7 +55,7 @@ long PushNoticeToiOSRequest::getAppKey()const
|
||||
void PushNoticeToiOSRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string PushNoticeToiOSRequest::getTargetValue()const
|
||||
@@ -66,7 +66,7 @@ std::string PushNoticeToiOSRequest::getTargetValue()const
|
||||
void PushNoticeToiOSRequest::setTargetValue(const std::string& targetValue)
|
||||
{
|
||||
targetValue_ = targetValue;
|
||||
setParameter("TargetValue", targetValue);
|
||||
setCoreParameter("TargetValue", targetValue);
|
||||
}
|
||||
|
||||
std::string PushNoticeToiOSRequest::getTitle()const
|
||||
@@ -77,7 +77,7 @@ std::string PushNoticeToiOSRequest::getTitle()const
|
||||
void PushNoticeToiOSRequest::setTitle(const std::string& title)
|
||||
{
|
||||
title_ = title;
|
||||
setParameter("Title", title);
|
||||
setCoreParameter("Title", title);
|
||||
}
|
||||
|
||||
std::string PushNoticeToiOSRequest::getBody()const
|
||||
@@ -88,7 +88,7 @@ std::string PushNoticeToiOSRequest::getBody()const
|
||||
void PushNoticeToiOSRequest::setBody(const std::string& body)
|
||||
{
|
||||
body_ = body;
|
||||
setParameter("Body", body);
|
||||
setCoreParameter("Body", body);
|
||||
}
|
||||
|
||||
std::string PushNoticeToiOSRequest::getJobKey()const
|
||||
@@ -99,7 +99,7 @@ std::string PushNoticeToiOSRequest::getJobKey()const
|
||||
void PushNoticeToiOSRequest::setJobKey(const std::string& jobKey)
|
||||
{
|
||||
jobKey_ = jobKey;
|
||||
setParameter("JobKey", jobKey);
|
||||
setCoreParameter("JobKey", jobKey);
|
||||
}
|
||||
|
||||
std::string PushNoticeToiOSRequest::getAccessKeyId()const
|
||||
@@ -110,7 +110,7 @@ std::string PushNoticeToiOSRequest::getAccessKeyId()const
|
||||
void PushNoticeToiOSRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string PushNoticeToiOSRequest::getTarget()const
|
||||
@@ -121,6 +121,6 @@ std::string PushNoticeToiOSRequest::getTarget()const
|
||||
void PushNoticeToiOSRequest::setTarget(const std::string& target)
|
||||
{
|
||||
target_ = target;
|
||||
setParameter("Target", target);
|
||||
setCoreParameter("Target", target);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ PushNoticeToiOSResult::~PushNoticeToiOSResult()
|
||||
|
||||
void PushNoticeToiOSResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["MessageId"].isNull())
|
||||
messageId_ = value["MessageId"].asString();
|
||||
|
||||
@@ -33,7 +33,7 @@ int PushRequest::getAndroidNotificationBarType()const
|
||||
void PushRequest::setAndroidNotificationBarType(int androidNotificationBarType)
|
||||
{
|
||||
androidNotificationBarType_ = androidNotificationBarType;
|
||||
setParameter("AndroidNotificationBarType", std::to_string(androidNotificationBarType));
|
||||
setCoreParameter("AndroidNotificationBarType", std::to_string(androidNotificationBarType));
|
||||
}
|
||||
|
||||
int PushRequest::getSmsSendPolicy()const
|
||||
@@ -44,7 +44,7 @@ int PushRequest::getSmsSendPolicy()const
|
||||
void PushRequest::setSmsSendPolicy(int smsSendPolicy)
|
||||
{
|
||||
smsSendPolicy_ = smsSendPolicy;
|
||||
setParameter("SmsSendPolicy", std::to_string(smsSendPolicy));
|
||||
setCoreParameter("SmsSendPolicy", std::to_string(smsSendPolicy));
|
||||
}
|
||||
|
||||
std::string PushRequest::getAndroidExtParameters()const
|
||||
@@ -55,7 +55,7 @@ std::string PushRequest::getAndroidExtParameters()const
|
||||
void PushRequest::setAndroidExtParameters(const std::string& androidExtParameters)
|
||||
{
|
||||
androidExtParameters_ = androidExtParameters;
|
||||
setParameter("AndroidExtParameters", androidExtParameters);
|
||||
setCoreParameter("AndroidExtParameters", androidExtParameters);
|
||||
}
|
||||
|
||||
int PushRequest::getIOSBadge()const
|
||||
@@ -66,7 +66,7 @@ int PushRequest::getIOSBadge()const
|
||||
void PushRequest::setIOSBadge(int iOSBadge)
|
||||
{
|
||||
iOSBadge_ = iOSBadge;
|
||||
setParameter("IOSBadge", std::to_string(iOSBadge));
|
||||
setCoreParameter("IOSBadge", std::to_string(iOSBadge));
|
||||
}
|
||||
|
||||
bool PushRequest::getIOSBadgeAutoIncrement()const
|
||||
@@ -77,7 +77,7 @@ bool PushRequest::getIOSBadgeAutoIncrement()const
|
||||
void PushRequest::setIOSBadgeAutoIncrement(bool iOSBadgeAutoIncrement)
|
||||
{
|
||||
iOSBadgeAutoIncrement_ = iOSBadgeAutoIncrement;
|
||||
setParameter("IOSBadgeAutoIncrement", std::to_string(iOSBadgeAutoIncrement));
|
||||
setCoreParameter("IOSBadgeAutoIncrement", iOSBadgeAutoIncrement ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string PushRequest::getAndroidOpenType()const
|
||||
@@ -88,7 +88,7 @@ std::string PushRequest::getAndroidOpenType()const
|
||||
void PushRequest::setAndroidOpenType(const std::string& androidOpenType)
|
||||
{
|
||||
androidOpenType_ = androidOpenType;
|
||||
setParameter("AndroidOpenType", androidOpenType);
|
||||
setCoreParameter("AndroidOpenType", androidOpenType);
|
||||
}
|
||||
|
||||
std::string PushRequest::getTitle()const
|
||||
@@ -99,7 +99,7 @@ std::string PushRequest::getTitle()const
|
||||
void PushRequest::setTitle(const std::string& title)
|
||||
{
|
||||
title_ = title;
|
||||
setParameter("Title", title);
|
||||
setCoreParameter("Title", title);
|
||||
}
|
||||
|
||||
std::string PushRequest::getBody()const
|
||||
@@ -110,7 +110,7 @@ std::string PushRequest::getBody()const
|
||||
void PushRequest::setBody(const std::string& body)
|
||||
{
|
||||
body_ = body;
|
||||
setParameter("Body", body);
|
||||
setCoreParameter("Body", body);
|
||||
}
|
||||
|
||||
std::string PushRequest::getDeviceType()const
|
||||
@@ -121,7 +121,7 @@ std::string PushRequest::getDeviceType()const
|
||||
void PushRequest::setDeviceType(const std::string& deviceType)
|
||||
{
|
||||
deviceType_ = deviceType;
|
||||
setParameter("DeviceType", deviceType);
|
||||
setCoreParameter("DeviceType", deviceType);
|
||||
}
|
||||
|
||||
std::string PushRequest::getPushTime()const
|
||||
@@ -132,7 +132,7 @@ std::string PushRequest::getPushTime()const
|
||||
void PushRequest::setPushTime(const std::string& pushTime)
|
||||
{
|
||||
pushTime_ = pushTime;
|
||||
setParameter("PushTime", pushTime);
|
||||
setCoreParameter("PushTime", pushTime);
|
||||
}
|
||||
|
||||
std::string PushRequest::getAccessKeyId()const
|
||||
@@ -143,7 +143,7 @@ std::string PushRequest::getAccessKeyId()const
|
||||
void PushRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
int PushRequest::getSmsDelaySecs()const
|
||||
@@ -154,7 +154,7 @@ int PushRequest::getSmsDelaySecs()const
|
||||
void PushRequest::setSmsDelaySecs(int smsDelaySecs)
|
||||
{
|
||||
smsDelaySecs_ = smsDelaySecs;
|
||||
setParameter("SmsDelaySecs", std::to_string(smsDelaySecs));
|
||||
setCoreParameter("SmsDelaySecs", std::to_string(smsDelaySecs));
|
||||
}
|
||||
|
||||
int PushRequest::getSendSpeed()const
|
||||
@@ -165,7 +165,7 @@ int PushRequest::getSendSpeed()const
|
||||
void PushRequest::setSendSpeed(int sendSpeed)
|
||||
{
|
||||
sendSpeed_ = sendSpeed;
|
||||
setParameter("SendSpeed", std::to_string(sendSpeed));
|
||||
setCoreParameter("SendSpeed", std::to_string(sendSpeed));
|
||||
}
|
||||
|
||||
std::string PushRequest::getAndroidPopupActivity()const
|
||||
@@ -176,7 +176,7 @@ std::string PushRequest::getAndroidPopupActivity()const
|
||||
void PushRequest::setAndroidPopupActivity(const std::string& androidPopupActivity)
|
||||
{
|
||||
androidPopupActivity_ = androidPopupActivity;
|
||||
setParameter("AndroidPopupActivity", androidPopupActivity);
|
||||
setCoreParameter("AndroidPopupActivity", androidPopupActivity);
|
||||
}
|
||||
|
||||
std::string PushRequest::getIOSRemindBody()const
|
||||
@@ -187,7 +187,7 @@ std::string PushRequest::getIOSRemindBody()const
|
||||
void PushRequest::setIOSRemindBody(const std::string& iOSRemindBody)
|
||||
{
|
||||
iOSRemindBody_ = iOSRemindBody;
|
||||
setParameter("IOSRemindBody", iOSRemindBody);
|
||||
setCoreParameter("IOSRemindBody", iOSRemindBody);
|
||||
}
|
||||
|
||||
std::string PushRequest::getIOSExtParameters()const
|
||||
@@ -198,7 +198,7 @@ std::string PushRequest::getIOSExtParameters()const
|
||||
void PushRequest::setIOSExtParameters(const std::string& iOSExtParameters)
|
||||
{
|
||||
iOSExtParameters_ = iOSExtParameters;
|
||||
setParameter("IOSExtParameters", iOSExtParameters);
|
||||
setCoreParameter("IOSExtParameters", iOSExtParameters);
|
||||
}
|
||||
|
||||
std::string PushRequest::getAndroidNotifyType()const
|
||||
@@ -209,7 +209,7 @@ std::string PushRequest::getAndroidNotifyType()const
|
||||
void PushRequest::setAndroidNotifyType(const std::string& androidNotifyType)
|
||||
{
|
||||
androidNotifyType_ = androidNotifyType;
|
||||
setParameter("AndroidNotifyType", androidNotifyType);
|
||||
setCoreParameter("AndroidNotifyType", androidNotifyType);
|
||||
}
|
||||
|
||||
std::string PushRequest::getAndroidPopupTitle()const
|
||||
@@ -220,7 +220,7 @@ std::string PushRequest::getAndroidPopupTitle()const
|
||||
void PushRequest::setAndroidPopupTitle(const std::string& androidPopupTitle)
|
||||
{
|
||||
androidPopupTitle_ = androidPopupTitle;
|
||||
setParameter("AndroidPopupTitle", androidPopupTitle);
|
||||
setCoreParameter("AndroidPopupTitle", androidPopupTitle);
|
||||
}
|
||||
|
||||
std::string PushRequest::getIOSMusic()const
|
||||
@@ -231,7 +231,7 @@ std::string PushRequest::getIOSMusic()const
|
||||
void PushRequest::setIOSMusic(const std::string& iOSMusic)
|
||||
{
|
||||
iOSMusic_ = iOSMusic;
|
||||
setParameter("IOSMusic", iOSMusic);
|
||||
setCoreParameter("IOSMusic", iOSMusic);
|
||||
}
|
||||
|
||||
std::string PushRequest::getIOSApnsEnv()const
|
||||
@@ -242,7 +242,7 @@ std::string PushRequest::getIOSApnsEnv()const
|
||||
void PushRequest::setIOSApnsEnv(const std::string& iOSApnsEnv)
|
||||
{
|
||||
iOSApnsEnv_ = iOSApnsEnv;
|
||||
setParameter("IOSApnsEnv", iOSApnsEnv);
|
||||
setCoreParameter("IOSApnsEnv", iOSApnsEnv);
|
||||
}
|
||||
|
||||
bool PushRequest::getIOSMutableContent()const
|
||||
@@ -253,7 +253,7 @@ bool PushRequest::getIOSMutableContent()const
|
||||
void PushRequest::setIOSMutableContent(bool iOSMutableContent)
|
||||
{
|
||||
iOSMutableContent_ = iOSMutableContent;
|
||||
setParameter("IOSMutableContent", std::to_string(iOSMutableContent));
|
||||
setCoreParameter("IOSMutableContent", iOSMutableContent ? "true" : "false");
|
||||
}
|
||||
|
||||
int PushRequest::getAndroidNotificationBarPriority()const
|
||||
@@ -264,7 +264,7 @@ int PushRequest::getAndroidNotificationBarPriority()const
|
||||
void PushRequest::setAndroidNotificationBarPriority(int androidNotificationBarPriority)
|
||||
{
|
||||
androidNotificationBarPriority_ = androidNotificationBarPriority;
|
||||
setParameter("AndroidNotificationBarPriority", std::to_string(androidNotificationBarPriority));
|
||||
setCoreParameter("AndroidNotificationBarPriority", std::to_string(androidNotificationBarPriority));
|
||||
}
|
||||
|
||||
std::string PushRequest::getExpireTime()const
|
||||
@@ -275,7 +275,7 @@ std::string PushRequest::getExpireTime()const
|
||||
void PushRequest::setExpireTime(const std::string& expireTime)
|
||||
{
|
||||
expireTime_ = expireTime;
|
||||
setParameter("ExpireTime", expireTime);
|
||||
setCoreParameter("ExpireTime", expireTime);
|
||||
}
|
||||
|
||||
std::string PushRequest::getSmsTemplateName()const
|
||||
@@ -286,7 +286,7 @@ std::string PushRequest::getSmsTemplateName()const
|
||||
void PushRequest::setSmsTemplateName(const std::string& smsTemplateName)
|
||||
{
|
||||
smsTemplateName_ = smsTemplateName;
|
||||
setParameter("SmsTemplateName", smsTemplateName);
|
||||
setCoreParameter("SmsTemplateName", smsTemplateName);
|
||||
}
|
||||
|
||||
std::string PushRequest::getAndroidPopupBody()const
|
||||
@@ -297,7 +297,7 @@ std::string PushRequest::getAndroidPopupBody()const
|
||||
void PushRequest::setAndroidPopupBody(const std::string& androidPopupBody)
|
||||
{
|
||||
androidPopupBody_ = androidPopupBody;
|
||||
setParameter("AndroidPopupBody", androidPopupBody);
|
||||
setCoreParameter("AndroidPopupBody", androidPopupBody);
|
||||
}
|
||||
|
||||
std::string PushRequest::getIOSNotificationCategory()const
|
||||
@@ -308,7 +308,7 @@ std::string PushRequest::getIOSNotificationCategory()const
|
||||
void PushRequest::setIOSNotificationCategory(const std::string& iOSNotificationCategory)
|
||||
{
|
||||
iOSNotificationCategory_ = iOSNotificationCategory;
|
||||
setParameter("IOSNotificationCategory", iOSNotificationCategory);
|
||||
setCoreParameter("IOSNotificationCategory", iOSNotificationCategory);
|
||||
}
|
||||
|
||||
bool PushRequest::getStoreOffline()const
|
||||
@@ -319,7 +319,7 @@ bool PushRequest::getStoreOffline()const
|
||||
void PushRequest::setStoreOffline(bool storeOffline)
|
||||
{
|
||||
storeOffline_ = storeOffline;
|
||||
setParameter("StoreOffline", std::to_string(storeOffline));
|
||||
setCoreParameter("StoreOffline", storeOffline ? "true" : "false");
|
||||
}
|
||||
|
||||
bool PushRequest::getIOSSilentNotification()const
|
||||
@@ -330,7 +330,7 @@ bool PushRequest::getIOSSilentNotification()const
|
||||
void PushRequest::setIOSSilentNotification(bool iOSSilentNotification)
|
||||
{
|
||||
iOSSilentNotification_ = iOSSilentNotification;
|
||||
setParameter("IOSSilentNotification", std::to_string(iOSSilentNotification));
|
||||
setCoreParameter("IOSSilentNotification", iOSSilentNotification ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string PushRequest::getSmsParams()const
|
||||
@@ -341,7 +341,7 @@ std::string PushRequest::getSmsParams()const
|
||||
void PushRequest::setSmsParams(const std::string& smsParams)
|
||||
{
|
||||
smsParams_ = smsParams;
|
||||
setParameter("SmsParams", smsParams);
|
||||
setCoreParameter("SmsParams", smsParams);
|
||||
}
|
||||
|
||||
std::string PushRequest::getJobKey()const
|
||||
@@ -352,7 +352,7 @@ std::string PushRequest::getJobKey()const
|
||||
void PushRequest::setJobKey(const std::string& jobKey)
|
||||
{
|
||||
jobKey_ = jobKey;
|
||||
setParameter("JobKey", jobKey);
|
||||
setCoreParameter("JobKey", jobKey);
|
||||
}
|
||||
|
||||
std::string PushRequest::getTarget()const
|
||||
@@ -363,7 +363,7 @@ std::string PushRequest::getTarget()const
|
||||
void PushRequest::setTarget(const std::string& target)
|
||||
{
|
||||
target_ = target;
|
||||
setParameter("Target", target);
|
||||
setCoreParameter("Target", target);
|
||||
}
|
||||
|
||||
std::string PushRequest::getAndroidOpenUrl()const
|
||||
@@ -374,7 +374,7 @@ std::string PushRequest::getAndroidOpenUrl()const
|
||||
void PushRequest::setAndroidOpenUrl(const std::string& androidOpenUrl)
|
||||
{
|
||||
androidOpenUrl_ = androidOpenUrl;
|
||||
setParameter("AndroidOpenUrl", androidOpenUrl);
|
||||
setCoreParameter("AndroidOpenUrl", androidOpenUrl);
|
||||
}
|
||||
|
||||
std::string PushRequest::getAndroidNotificationChannel()const
|
||||
@@ -385,7 +385,7 @@ std::string PushRequest::getAndroidNotificationChannel()const
|
||||
void PushRequest::setAndroidNotificationChannel(const std::string& androidNotificationChannel)
|
||||
{
|
||||
androidNotificationChannel_ = androidNotificationChannel;
|
||||
setParameter("AndroidNotificationChannel", androidNotificationChannel);
|
||||
setCoreParameter("AndroidNotificationChannel", androidNotificationChannel);
|
||||
}
|
||||
|
||||
bool PushRequest::getAndroidRemind()const
|
||||
@@ -396,7 +396,7 @@ bool PushRequest::getAndroidRemind()const
|
||||
void PushRequest::setAndroidRemind(bool androidRemind)
|
||||
{
|
||||
androidRemind_ = androidRemind;
|
||||
setParameter("AndroidRemind", std::to_string(androidRemind));
|
||||
setCoreParameter("AndroidRemind", androidRemind ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string PushRequest::getAndroidActivity()const
|
||||
@@ -407,7 +407,7 @@ std::string PushRequest::getAndroidActivity()const
|
||||
void PushRequest::setAndroidActivity(const std::string& androidActivity)
|
||||
{
|
||||
androidActivity_ = androidActivity;
|
||||
setParameter("AndroidActivity", androidActivity);
|
||||
setCoreParameter("AndroidActivity", androidActivity);
|
||||
}
|
||||
|
||||
std::string PushRequest::getAndroidXiaoMiNotifyBody()const
|
||||
@@ -418,7 +418,7 @@ std::string PushRequest::getAndroidXiaoMiNotifyBody()const
|
||||
void PushRequest::setAndroidXiaoMiNotifyBody(const std::string& androidXiaoMiNotifyBody)
|
||||
{
|
||||
androidXiaoMiNotifyBody_ = androidXiaoMiNotifyBody;
|
||||
setParameter("AndroidXiaoMiNotifyBody", androidXiaoMiNotifyBody);
|
||||
setCoreParameter("AndroidXiaoMiNotifyBody", androidXiaoMiNotifyBody);
|
||||
}
|
||||
|
||||
std::string PushRequest::getIOSSubtitle()const
|
||||
@@ -429,7 +429,7 @@ std::string PushRequest::getIOSSubtitle()const
|
||||
void PushRequest::setIOSSubtitle(const std::string& iOSSubtitle)
|
||||
{
|
||||
iOSSubtitle_ = iOSSubtitle;
|
||||
setParameter("IOSSubtitle", iOSSubtitle);
|
||||
setCoreParameter("IOSSubtitle", iOSSubtitle);
|
||||
}
|
||||
|
||||
std::string PushRequest::getSmsSignName()const
|
||||
@@ -440,7 +440,7 @@ std::string PushRequest::getSmsSignName()const
|
||||
void PushRequest::setSmsSignName(const std::string& smsSignName)
|
||||
{
|
||||
smsSignName_ = smsSignName;
|
||||
setParameter("SmsSignName", smsSignName);
|
||||
setCoreParameter("SmsSignName", smsSignName);
|
||||
}
|
||||
|
||||
bool PushRequest::getIOSRemind()const
|
||||
@@ -451,7 +451,7 @@ bool PushRequest::getIOSRemind()const
|
||||
void PushRequest::setIOSRemind(bool iOSRemind)
|
||||
{
|
||||
iOSRemind_ = iOSRemind;
|
||||
setParameter("IOSRemind", std::to_string(iOSRemind));
|
||||
setCoreParameter("IOSRemind", iOSRemind ? "true" : "false");
|
||||
}
|
||||
|
||||
long PushRequest::getAppKey()const
|
||||
@@ -462,7 +462,7 @@ long PushRequest::getAppKey()const
|
||||
void PushRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string PushRequest::getTargetValue()const
|
||||
@@ -473,7 +473,7 @@ std::string PushRequest::getTargetValue()const
|
||||
void PushRequest::setTargetValue(const std::string& targetValue)
|
||||
{
|
||||
targetValue_ = targetValue;
|
||||
setParameter("TargetValue", targetValue);
|
||||
setCoreParameter("TargetValue", targetValue);
|
||||
}
|
||||
|
||||
std::string PushRequest::getAndroidMusic()const
|
||||
@@ -484,7 +484,7 @@ std::string PushRequest::getAndroidMusic()const
|
||||
void PushRequest::setAndroidMusic(const std::string& androidMusic)
|
||||
{
|
||||
androidMusic_ = androidMusic;
|
||||
setParameter("AndroidMusic", androidMusic);
|
||||
setCoreParameter("AndroidMusic", androidMusic);
|
||||
}
|
||||
|
||||
std::string PushRequest::getAndroidXiaoMiActivity()const
|
||||
@@ -495,7 +495,7 @@ std::string PushRequest::getAndroidXiaoMiActivity()const
|
||||
void PushRequest::setAndroidXiaoMiActivity(const std::string& androidXiaoMiActivity)
|
||||
{
|
||||
androidXiaoMiActivity_ = androidXiaoMiActivity;
|
||||
setParameter("AndroidXiaoMiActivity", androidXiaoMiActivity);
|
||||
setCoreParameter("AndroidXiaoMiActivity", androidXiaoMiActivity);
|
||||
}
|
||||
|
||||
std::string PushRequest::getAndroidXiaoMiNotifyTitle()const
|
||||
@@ -506,7 +506,7 @@ std::string PushRequest::getAndroidXiaoMiNotifyTitle()const
|
||||
void PushRequest::setAndroidXiaoMiNotifyTitle(const std::string& androidXiaoMiNotifyTitle)
|
||||
{
|
||||
androidXiaoMiNotifyTitle_ = androidXiaoMiNotifyTitle;
|
||||
setParameter("AndroidXiaoMiNotifyTitle", androidXiaoMiNotifyTitle);
|
||||
setCoreParameter("AndroidXiaoMiNotifyTitle", androidXiaoMiNotifyTitle);
|
||||
}
|
||||
|
||||
std::string PushRequest::getPushType()const
|
||||
@@ -517,6 +517,6 @@ std::string PushRequest::getPushType()const
|
||||
void PushRequest::setPushType(const std::string& pushType)
|
||||
{
|
||||
pushType_ = pushType;
|
||||
setParameter("PushType", pushType);
|
||||
setCoreParameter("PushType", pushType);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ PushResult::~PushResult()
|
||||
|
||||
void PushResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["MessageId"].isNull())
|
||||
messageId_ = value["MessageId"].asString();
|
||||
|
||||
@@ -33,7 +33,7 @@ long QueryAliasesRequest::getAppKey()const
|
||||
void QueryAliasesRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string QueryAliasesRequest::getDeviceId()const
|
||||
@@ -44,7 +44,7 @@ std::string QueryAliasesRequest::getDeviceId()const
|
||||
void QueryAliasesRequest::setDeviceId(const std::string& deviceId)
|
||||
{
|
||||
deviceId_ = deviceId;
|
||||
setParameter("DeviceId", deviceId);
|
||||
setCoreParameter("DeviceId", deviceId);
|
||||
}
|
||||
|
||||
std::string QueryAliasesRequest::getAccessKeyId()const
|
||||
@@ -55,6 +55,6 @@ std::string QueryAliasesRequest::getAccessKeyId()const
|
||||
void QueryAliasesRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryAliasesResult::~QueryAliasesResult()
|
||||
|
||||
void QueryAliasesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allAliasInfos = value["AliasInfos"]["AliasInfo"];
|
||||
for (auto value : allAliasInfos)
|
||||
|
||||
@@ -33,7 +33,7 @@ long QueryDeviceInfoRequest::getAppKey()const
|
||||
void QueryDeviceInfoRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string QueryDeviceInfoRequest::getDeviceId()const
|
||||
@@ -44,7 +44,7 @@ std::string QueryDeviceInfoRequest::getDeviceId()const
|
||||
void QueryDeviceInfoRequest::setDeviceId(const std::string& deviceId)
|
||||
{
|
||||
deviceId_ = deviceId;
|
||||
setParameter("DeviceId", deviceId);
|
||||
setCoreParameter("DeviceId", deviceId);
|
||||
}
|
||||
|
||||
std::string QueryDeviceInfoRequest::getAccessKeyId()const
|
||||
@@ -55,6 +55,6 @@ std::string QueryDeviceInfoRequest::getAccessKeyId()const
|
||||
void QueryDeviceInfoRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryDeviceInfoResult::~QueryDeviceInfoResult()
|
||||
|
||||
void QueryDeviceInfoResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto deviceInfoNode = value["DeviceInfo"];
|
||||
if(!deviceInfoNode["DeviceId"].isNull())
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string QueryDeviceStatRequest::getEndTime()const
|
||||
void QueryDeviceStatRequest::setEndTime(const std::string& endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", endTime);
|
||||
setCoreParameter("EndTime", endTime);
|
||||
}
|
||||
|
||||
long QueryDeviceStatRequest::getAppKey()const
|
||||
@@ -44,7 +44,7 @@ long QueryDeviceStatRequest::getAppKey()const
|
||||
void QueryDeviceStatRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string QueryDeviceStatRequest::getStartTime()const
|
||||
@@ -55,7 +55,7 @@ std::string QueryDeviceStatRequest::getStartTime()const
|
||||
void QueryDeviceStatRequest::setStartTime(const std::string& startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", startTime);
|
||||
setCoreParameter("StartTime", startTime);
|
||||
}
|
||||
|
||||
std::string QueryDeviceStatRequest::getDeviceType()const
|
||||
@@ -66,7 +66,7 @@ std::string QueryDeviceStatRequest::getDeviceType()const
|
||||
void QueryDeviceStatRequest::setDeviceType(const std::string& deviceType)
|
||||
{
|
||||
deviceType_ = deviceType;
|
||||
setParameter("DeviceType", deviceType);
|
||||
setCoreParameter("DeviceType", deviceType);
|
||||
}
|
||||
|
||||
std::string QueryDeviceStatRequest::getQueryType()const
|
||||
@@ -77,7 +77,7 @@ std::string QueryDeviceStatRequest::getQueryType()const
|
||||
void QueryDeviceStatRequest::setQueryType(const std::string& queryType)
|
||||
{
|
||||
queryType_ = queryType;
|
||||
setParameter("QueryType", queryType);
|
||||
setCoreParameter("QueryType", queryType);
|
||||
}
|
||||
|
||||
std::string QueryDeviceStatRequest::getAccessKeyId()const
|
||||
@@ -88,6 +88,6 @@ std::string QueryDeviceStatRequest::getAccessKeyId()const
|
||||
void QueryDeviceStatRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryDeviceStatResult::~QueryDeviceStatResult()
|
||||
|
||||
void QueryDeviceStatResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allAppDeviceStats = value["AppDeviceStats"]["AppDeviceStat"];
|
||||
for (auto value : allAppDeviceStats)
|
||||
|
||||
@@ -33,7 +33,7 @@ long QueryDevicesByAccountRequest::getAppKey()const
|
||||
void QueryDevicesByAccountRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string QueryDevicesByAccountRequest::getAccount()const
|
||||
@@ -44,7 +44,7 @@ std::string QueryDevicesByAccountRequest::getAccount()const
|
||||
void QueryDevicesByAccountRequest::setAccount(const std::string& account)
|
||||
{
|
||||
account_ = account;
|
||||
setParameter("Account", account);
|
||||
setCoreParameter("Account", account);
|
||||
}
|
||||
|
||||
std::string QueryDevicesByAccountRequest::getAccessKeyId()const
|
||||
@@ -55,6 +55,6 @@ std::string QueryDevicesByAccountRequest::getAccessKeyId()const
|
||||
void QueryDevicesByAccountRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryDevicesByAccountResult::~QueryDevicesByAccountResult()
|
||||
|
||||
void QueryDevicesByAccountResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDeviceIds = value["DeviceIds"]["DeviceId"];
|
||||
for (const auto &item : allDeviceIds)
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string QueryDevicesByAliasRequest::getAlias()const
|
||||
void QueryDevicesByAliasRequest::setAlias(const std::string& alias)
|
||||
{
|
||||
alias_ = alias;
|
||||
setParameter("Alias", alias);
|
||||
setCoreParameter("Alias", alias);
|
||||
}
|
||||
|
||||
long QueryDevicesByAliasRequest::getAppKey()const
|
||||
@@ -44,7 +44,7 @@ long QueryDevicesByAliasRequest::getAppKey()const
|
||||
void QueryDevicesByAliasRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string QueryDevicesByAliasRequest::getAccessKeyId()const
|
||||
@@ -55,6 +55,6 @@ std::string QueryDevicesByAliasRequest::getAccessKeyId()const
|
||||
void QueryDevicesByAliasRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryDevicesByAliasResult::~QueryDevicesByAliasResult()
|
||||
|
||||
void QueryDevicesByAliasResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDeviceIds = value["DeviceIds"]["DeviceId"];
|
||||
for (const auto &item : allDeviceIds)
|
||||
|
||||
@@ -33,7 +33,7 @@ int QueryPushListRequest::getPageSize()const
|
||||
void QueryPushListRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string QueryPushListRequest::getEndTime()const
|
||||
@@ -44,7 +44,7 @@ std::string QueryPushListRequest::getEndTime()const
|
||||
void QueryPushListRequest::setEndTime(const std::string& endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", endTime);
|
||||
setCoreParameter("EndTime", endTime);
|
||||
}
|
||||
|
||||
long QueryPushListRequest::getAppKey()const
|
||||
@@ -55,7 +55,7 @@ long QueryPushListRequest::getAppKey()const
|
||||
void QueryPushListRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string QueryPushListRequest::getStartTime()const
|
||||
@@ -66,7 +66,7 @@ std::string QueryPushListRequest::getStartTime()const
|
||||
void QueryPushListRequest::setStartTime(const std::string& startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", startTime);
|
||||
setCoreParameter("StartTime", startTime);
|
||||
}
|
||||
|
||||
int QueryPushListRequest::getPage()const
|
||||
@@ -77,7 +77,7 @@ int QueryPushListRequest::getPage()const
|
||||
void QueryPushListRequest::setPage(int page)
|
||||
{
|
||||
page_ = page;
|
||||
setParameter("Page", std::to_string(page));
|
||||
setCoreParameter("Page", std::to_string(page));
|
||||
}
|
||||
|
||||
std::string QueryPushListRequest::getPushType()const
|
||||
@@ -88,7 +88,7 @@ std::string QueryPushListRequest::getPushType()const
|
||||
void QueryPushListRequest::setPushType(const std::string& pushType)
|
||||
{
|
||||
pushType_ = pushType;
|
||||
setParameter("PushType", pushType);
|
||||
setCoreParameter("PushType", pushType);
|
||||
}
|
||||
|
||||
std::string QueryPushListRequest::getAccessKeyId()const
|
||||
@@ -99,6 +99,6 @@ std::string QueryPushListRequest::getAccessKeyId()const
|
||||
void QueryPushListRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryPushListResult::~QueryPushListResult()
|
||||
|
||||
void QueryPushListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allPushMessageInfos = value["PushMessageInfos"]["PushMessageInfo"];
|
||||
for (auto value : allPushMessageInfos)
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string QueryPushStatByAppRequest::getGranularity()const
|
||||
void QueryPushStatByAppRequest::setGranularity(const std::string& granularity)
|
||||
{
|
||||
granularity_ = granularity;
|
||||
setParameter("Granularity", granularity);
|
||||
setCoreParameter("Granularity", granularity);
|
||||
}
|
||||
|
||||
std::string QueryPushStatByAppRequest::getEndTime()const
|
||||
@@ -44,7 +44,7 @@ std::string QueryPushStatByAppRequest::getEndTime()const
|
||||
void QueryPushStatByAppRequest::setEndTime(const std::string& endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", endTime);
|
||||
setCoreParameter("EndTime", endTime);
|
||||
}
|
||||
|
||||
long QueryPushStatByAppRequest::getAppKey()const
|
||||
@@ -55,7 +55,7 @@ long QueryPushStatByAppRequest::getAppKey()const
|
||||
void QueryPushStatByAppRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string QueryPushStatByAppRequest::getStartTime()const
|
||||
@@ -66,7 +66,7 @@ std::string QueryPushStatByAppRequest::getStartTime()const
|
||||
void QueryPushStatByAppRequest::setStartTime(const std::string& startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", startTime);
|
||||
setCoreParameter("StartTime", startTime);
|
||||
}
|
||||
|
||||
std::string QueryPushStatByAppRequest::getAccessKeyId()const
|
||||
@@ -77,6 +77,6 @@ std::string QueryPushStatByAppRequest::getAccessKeyId()const
|
||||
void QueryPushStatByAppRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryPushStatByAppResult::~QueryPushStatByAppResult()
|
||||
|
||||
void QueryPushStatByAppResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allAppPushStats = value["AppPushStats"]["AppPushStat"];
|
||||
for (auto value : allAppPushStats)
|
||||
|
||||
@@ -33,7 +33,7 @@ long QueryPushStatByMsgRequest::getMessageId()const
|
||||
void QueryPushStatByMsgRequest::setMessageId(long messageId)
|
||||
{
|
||||
messageId_ = messageId;
|
||||
setParameter("MessageId", std::to_string(messageId));
|
||||
setCoreParameter("MessageId", std::to_string(messageId));
|
||||
}
|
||||
|
||||
long QueryPushStatByMsgRequest::getAppKey()const
|
||||
@@ -44,7 +44,7 @@ long QueryPushStatByMsgRequest::getAppKey()const
|
||||
void QueryPushStatByMsgRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string QueryPushStatByMsgRequest::getAccessKeyId()const
|
||||
@@ -55,6 +55,6 @@ std::string QueryPushStatByMsgRequest::getAccessKeyId()const
|
||||
void QueryPushStatByMsgRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryPushStatByMsgResult::~QueryPushStatByMsgResult()
|
||||
|
||||
void QueryPushStatByMsgResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allPushStats = value["PushStats"]["PushStat"];
|
||||
for (auto value : allPushStats)
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string QueryTagsRequest::getClientKey()const
|
||||
void QueryTagsRequest::setClientKey(const std::string& clientKey)
|
||||
{
|
||||
clientKey_ = clientKey;
|
||||
setParameter("ClientKey", clientKey);
|
||||
setCoreParameter("ClientKey", clientKey);
|
||||
}
|
||||
|
||||
long QueryTagsRequest::getAppKey()const
|
||||
@@ -44,7 +44,7 @@ long QueryTagsRequest::getAppKey()const
|
||||
void QueryTagsRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string QueryTagsRequest::getKeyType()const
|
||||
@@ -55,7 +55,7 @@ std::string QueryTagsRequest::getKeyType()const
|
||||
void QueryTagsRequest::setKeyType(const std::string& keyType)
|
||||
{
|
||||
keyType_ = keyType;
|
||||
setParameter("KeyType", keyType);
|
||||
setCoreParameter("KeyType", keyType);
|
||||
}
|
||||
|
||||
std::string QueryTagsRequest::getAccessKeyId()const
|
||||
@@ -66,6 +66,6 @@ std::string QueryTagsRequest::getAccessKeyId()const
|
||||
void QueryTagsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryTagsResult::~QueryTagsResult()
|
||||
|
||||
void QueryTagsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allTagInfos = value["TagInfos"]["TagInfo"];
|
||||
for (auto value : allTagInfos)
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string QueryUniqueDeviceStatRequest::getGranularity()const
|
||||
void QueryUniqueDeviceStatRequest::setGranularity(const std::string& granularity)
|
||||
{
|
||||
granularity_ = granularity;
|
||||
setParameter("Granularity", granularity);
|
||||
setCoreParameter("Granularity", granularity);
|
||||
}
|
||||
|
||||
std::string QueryUniqueDeviceStatRequest::getEndTime()const
|
||||
@@ -44,7 +44,7 @@ std::string QueryUniqueDeviceStatRequest::getEndTime()const
|
||||
void QueryUniqueDeviceStatRequest::setEndTime(const std::string& endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", endTime);
|
||||
setCoreParameter("EndTime", endTime);
|
||||
}
|
||||
|
||||
long QueryUniqueDeviceStatRequest::getAppKey()const
|
||||
@@ -55,7 +55,7 @@ long QueryUniqueDeviceStatRequest::getAppKey()const
|
||||
void QueryUniqueDeviceStatRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string QueryUniqueDeviceStatRequest::getStartTime()const
|
||||
@@ -66,7 +66,7 @@ std::string QueryUniqueDeviceStatRequest::getStartTime()const
|
||||
void QueryUniqueDeviceStatRequest::setStartTime(const std::string& startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", startTime);
|
||||
setCoreParameter("StartTime", startTime);
|
||||
}
|
||||
|
||||
std::string QueryUniqueDeviceStatRequest::getAccessKeyId()const
|
||||
@@ -77,6 +77,6 @@ std::string QueryUniqueDeviceStatRequest::getAccessKeyId()const
|
||||
void QueryUniqueDeviceStatRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ QueryUniqueDeviceStatResult::~QueryUniqueDeviceStatResult()
|
||||
|
||||
void QueryUniqueDeviceStatResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allAppDeviceStats = value["AppDeviceStats"]["AppDeviceStat"];
|
||||
for (auto value : allAppDeviceStats)
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string RemoveTagRequest::getTagName()const
|
||||
void RemoveTagRequest::setTagName(const std::string& tagName)
|
||||
{
|
||||
tagName_ = tagName;
|
||||
setParameter("TagName", tagName);
|
||||
setCoreParameter("TagName", tagName);
|
||||
}
|
||||
|
||||
long RemoveTagRequest::getAppKey()const
|
||||
@@ -44,7 +44,7 @@ long RemoveTagRequest::getAppKey()const
|
||||
void RemoveTagRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string RemoveTagRequest::getAccessKeyId()const
|
||||
@@ -55,6 +55,6 @@ std::string RemoveTagRequest::getAccessKeyId()const
|
||||
void RemoveTagRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ RemoveTagResult::~RemoveTagResult()
|
||||
|
||||
void RemoveTagResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string UnbindAliasRequest::getAliasName()const
|
||||
void UnbindAliasRequest::setAliasName(const std::string& aliasName)
|
||||
{
|
||||
aliasName_ = aliasName;
|
||||
setParameter("AliasName", aliasName);
|
||||
setCoreParameter("AliasName", aliasName);
|
||||
}
|
||||
|
||||
long UnbindAliasRequest::getAppKey()const
|
||||
@@ -44,7 +44,7 @@ long UnbindAliasRequest::getAppKey()const
|
||||
void UnbindAliasRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string UnbindAliasRequest::getDeviceId()const
|
||||
@@ -55,7 +55,7 @@ std::string UnbindAliasRequest::getDeviceId()const
|
||||
void UnbindAliasRequest::setDeviceId(const std::string& deviceId)
|
||||
{
|
||||
deviceId_ = deviceId;
|
||||
setParameter("DeviceId", deviceId);
|
||||
setCoreParameter("DeviceId", deviceId);
|
||||
}
|
||||
|
||||
std::string UnbindAliasRequest::getAccessKeyId()const
|
||||
@@ -66,7 +66,7 @@ std::string UnbindAliasRequest::getAccessKeyId()const
|
||||
void UnbindAliasRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
bool UnbindAliasRequest::getUnbindAll()const
|
||||
@@ -77,6 +77,6 @@ bool UnbindAliasRequest::getUnbindAll()const
|
||||
void UnbindAliasRequest::setUnbindAll(bool unbindAll)
|
||||
{
|
||||
unbindAll_ = unbindAll;
|
||||
setParameter("UnbindAll", std::to_string(unbindAll));
|
||||
setCoreParameter("UnbindAll", unbindAll ? "true" : "false");
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ UnbindAliasResult::~UnbindAliasResult()
|
||||
|
||||
void UnbindAliasResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ long UnbindPhoneRequest::getAppKey()const
|
||||
void UnbindPhoneRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string UnbindPhoneRequest::getDeviceId()const
|
||||
@@ -44,7 +44,7 @@ std::string UnbindPhoneRequest::getDeviceId()const
|
||||
void UnbindPhoneRequest::setDeviceId(const std::string& deviceId)
|
||||
{
|
||||
deviceId_ = deviceId;
|
||||
setParameter("DeviceId", deviceId);
|
||||
setCoreParameter("DeviceId", deviceId);
|
||||
}
|
||||
|
||||
std::string UnbindPhoneRequest::getAccessKeyId()const
|
||||
@@ -55,6 +55,6 @@ std::string UnbindPhoneRequest::getAccessKeyId()const
|
||||
void UnbindPhoneRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ UnbindPhoneResult::~UnbindPhoneResult()
|
||||
|
||||
void UnbindPhoneResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ std::string UnbindTagRequest::getTagName()const
|
||||
void UnbindTagRequest::setTagName(const std::string& tagName)
|
||||
{
|
||||
tagName_ = tagName;
|
||||
setParameter("TagName", tagName);
|
||||
setCoreParameter("TagName", tagName);
|
||||
}
|
||||
|
||||
std::string UnbindTagRequest::getClientKey()const
|
||||
@@ -44,7 +44,7 @@ std::string UnbindTagRequest::getClientKey()const
|
||||
void UnbindTagRequest::setClientKey(const std::string& clientKey)
|
||||
{
|
||||
clientKey_ = clientKey;
|
||||
setParameter("ClientKey", clientKey);
|
||||
setCoreParameter("ClientKey", clientKey);
|
||||
}
|
||||
|
||||
long UnbindTagRequest::getAppKey()const
|
||||
@@ -55,7 +55,7 @@ long UnbindTagRequest::getAppKey()const
|
||||
void UnbindTagRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string UnbindTagRequest::getKeyType()const
|
||||
@@ -66,7 +66,7 @@ std::string UnbindTagRequest::getKeyType()const
|
||||
void UnbindTagRequest::setKeyType(const std::string& keyType)
|
||||
{
|
||||
keyType_ = keyType;
|
||||
setParameter("KeyType", keyType);
|
||||
setCoreParameter("KeyType", keyType);
|
||||
}
|
||||
|
||||
std::string UnbindTagRequest::getAccessKeyId()const
|
||||
@@ -77,6 +77,6 @@ std::string UnbindTagRequest::getAccessKeyId()const
|
||||
void UnbindTagRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ UnbindTagResult::~UnbindTagResult()
|
||||
|
||||
void UnbindTagResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::CharReader *reader = builder.newCharReader();
|
||||
Json::Value *val;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
JSONCPP_STRING *errs;
|
||||
reader->parse(payload.data(), payload.data() + payload.size(), val, errs);
|
||||
value = *val;
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user