Add CheckCertificate Api.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2021-07-09 Version: 1.36.816
|
||||
- Add `CheckCertificate` Api.
|
||||
- Supported AndroidRenderStyle, AndroidBigTitle, AndroidBigBody, AndroidXiaomiBigPictureUrl for Push and MassPush.
|
||||
|
||||
2021-07-09 Version: 1.36.815
|
||||
- Fix ListPIpelineTemplates.
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@ set(push_public_header_model
|
||||
include/alibabacloud/push/model/BindTagResult.h
|
||||
include/alibabacloud/push/model/CancelPushRequest.h
|
||||
include/alibabacloud/push/model/CancelPushResult.h
|
||||
include/alibabacloud/push/model/CheckCertificateRequest.h
|
||||
include/alibabacloud/push/model/CheckCertificateResult.h
|
||||
include/alibabacloud/push/model/CheckDeviceRequest.h
|
||||
include/alibabacloud/push/model/CheckDeviceResult.h
|
||||
include/alibabacloud/push/model/CheckDevicesRequest.h
|
||||
@@ -94,6 +96,8 @@ set(push_src
|
||||
src/model/BindTagResult.cc
|
||||
src/model/CancelPushRequest.cc
|
||||
src/model/CancelPushResult.cc
|
||||
src/model/CheckCertificateRequest.cc
|
||||
src/model/CheckCertificateResult.cc
|
||||
src/model/CheckDeviceRequest.cc
|
||||
src/model/CheckDeviceResult.cc
|
||||
src/model/CheckDevicesRequest.cc
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#include "model/BindTagResult.h"
|
||||
#include "model/CancelPushRequest.h"
|
||||
#include "model/CancelPushResult.h"
|
||||
#include "model/CheckCertificateRequest.h"
|
||||
#include "model/CheckCertificateResult.h"
|
||||
#include "model/CheckDeviceRequest.h"
|
||||
#include "model/CheckDeviceResult.h"
|
||||
#include "model/CheckDevicesRequest.h"
|
||||
@@ -105,6 +107,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::CancelPushResult> CancelPushOutcome;
|
||||
typedef std::future<CancelPushOutcome> CancelPushOutcomeCallable;
|
||||
typedef std::function<void(const PushClient*, const Model::CancelPushRequest&, const CancelPushOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CancelPushAsyncHandler;
|
||||
typedef Outcome<Error, Model::CheckCertificateResult> CheckCertificateOutcome;
|
||||
typedef std::future<CheckCertificateOutcome> CheckCertificateOutcomeCallable;
|
||||
typedef std::function<void(const PushClient*, const Model::CheckCertificateRequest&, const CheckCertificateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CheckCertificateAsyncHandler;
|
||||
typedef Outcome<Error, Model::CheckDeviceResult> CheckDeviceOutcome;
|
||||
typedef std::future<CheckDeviceOutcome> CheckDeviceOutcomeCallable;
|
||||
typedef std::function<void(const PushClient*, const Model::CheckDeviceRequest&, const CheckDeviceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CheckDeviceAsyncHandler;
|
||||
@@ -203,6 +208,9 @@ namespace AlibabaCloud
|
||||
CancelPushOutcome cancelPush(const Model::CancelPushRequest &request)const;
|
||||
void cancelPushAsync(const Model::CancelPushRequest& request, const CancelPushAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CancelPushOutcomeCallable cancelPushCallable(const Model::CancelPushRequest& request) const;
|
||||
CheckCertificateOutcome checkCertificate(const Model::CheckCertificateRequest &request)const;
|
||||
void checkCertificateAsync(const Model::CheckCertificateRequest& request, const CheckCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CheckCertificateOutcomeCallable checkCertificateCallable(const Model::CheckCertificateRequest& request) const;
|
||||
CheckDeviceOutcome checkDevice(const Model::CheckDeviceRequest &request)const;
|
||||
void checkDeviceAsync(const Model::CheckDeviceRequest& request, const CheckDeviceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CheckDeviceOutcomeCallable checkDeviceCallable(const Model::CheckDeviceRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_PUSH_MODEL_CHECKCERTIFICATEREQUEST_H_
|
||||
#define ALIBABACLOUD_PUSH_MODEL_CHECKCERTIFICATEREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/push/PushExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Push
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_PUSH_EXPORT CheckCertificateRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
CheckCertificateRequest();
|
||||
~CheckCertificateRequest();
|
||||
|
||||
std::string getAccessKeyId()const;
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
long getAppKey()const;
|
||||
void setAppKey(long appKey);
|
||||
|
||||
private:
|
||||
std::string accessKeyId_;
|
||||
long appKey_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_PUSH_MODEL_CHECKCERTIFICATEREQUEST_H_
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_PUSH_MODEL_CHECKCERTIFICATERESULT_H_
|
||||
#define ALIBABACLOUD_PUSH_MODEL_CHECKCERTIFICATERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/push/PushExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Push
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_PUSH_EXPORT CheckCertificateResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct ProductionCertInfo
|
||||
{
|
||||
std::string status;
|
||||
long exipreTime;
|
||||
};
|
||||
struct DevelopmentCertInfo
|
||||
{
|
||||
std::string status;
|
||||
long exipreTime;
|
||||
};
|
||||
|
||||
|
||||
CheckCertificateResult();
|
||||
explicit CheckCertificateResult(const std::string &payload);
|
||||
~CheckCertificateResult();
|
||||
DevelopmentCertInfo getDevelopmentCertInfo()const;
|
||||
bool getIOS()const;
|
||||
ProductionCertInfo getProductionCertInfo()const;
|
||||
bool getAndroid()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
DevelopmentCertInfo developmentCertInfo_;
|
||||
bool iOS_;
|
||||
ProductionCertInfo productionCertInfo_;
|
||||
bool android_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_PUSH_MODEL_CHECKCERTIFICATERESULT_H_
|
||||
@@ -36,6 +36,7 @@ namespace AlibabaCloud
|
||||
int androidNotificationBarType;
|
||||
std::string androidExtParameters;
|
||||
int iOSBadge;
|
||||
std::string androidBigBody;
|
||||
bool iOSBadgeAutoIncrement;
|
||||
std::string androidOpenType;
|
||||
std::string title;
|
||||
@@ -46,6 +47,7 @@ namespace AlibabaCloud
|
||||
std::string androidNotificationHuaweiChannel;
|
||||
std::string androidPopupActivity;
|
||||
std::string iOSRemindBody;
|
||||
std::string androidRenderStyle;
|
||||
std::string iOSExtParameters;
|
||||
std::string androidNotifyType;
|
||||
std::string androidPopupTitle;
|
||||
@@ -62,12 +64,14 @@ namespace AlibabaCloud
|
||||
bool iOSSilentNotification;
|
||||
std::string jobKey;
|
||||
std::string target;
|
||||
std::string androidBigTitle;
|
||||
std::string androidOpenUrl;
|
||||
std::string androidNotificationChannel;
|
||||
bool androidRemind;
|
||||
std::string androidActivity;
|
||||
std::string androidXiaoMiNotifyBody;
|
||||
std::string iOSSubtitle;
|
||||
std::string androidXiaomiBigPictureUrl;
|
||||
bool iOSRemind;
|
||||
int androidNotificationNotifyId;
|
||||
std::string targetValue;
|
||||
|
||||
@@ -85,6 +85,8 @@ namespace AlibabaCloud
|
||||
void setAndroidXiaoMiNotifyBody(const std::string& androidXiaoMiNotifyBody);
|
||||
std::string getIOSSubtitle()const;
|
||||
void setIOSSubtitle(const std::string& iOSSubtitle);
|
||||
std::string getAndroidXiaomiBigPictureUrl()const;
|
||||
void setAndroidXiaomiBigPictureUrl(const std::string& androidXiaomiBigPictureUrl);
|
||||
bool getIOSRemind()const;
|
||||
void setIOSRemind(bool iOSRemind);
|
||||
std::string getAndroidMusic()const;
|
||||
@@ -97,6 +99,8 @@ namespace AlibabaCloud
|
||||
void setAndroidExtParameters(const std::string& androidExtParameters);
|
||||
int getIOSBadge()const;
|
||||
void setIOSBadge(int iOSBadge);
|
||||
std::string getAndroidBigBody()const;
|
||||
void setAndroidBigBody(const std::string& androidBigBody);
|
||||
bool getIOSBadgeAutoIncrement()const;
|
||||
void setIOSBadgeAutoIncrement(bool iOSBadgeAutoIncrement);
|
||||
std::string getAndroidOpenType()const;
|
||||
@@ -107,6 +111,8 @@ namespace AlibabaCloud
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
int getSmsDelaySecs()const;
|
||||
void setSmsDelaySecs(int smsDelaySecs);
|
||||
int getAndroidRenderStyle()const;
|
||||
void setAndroidRenderStyle(int androidRenderStyle);
|
||||
std::string getIOSExtParameters()const;
|
||||
void setIOSExtParameters(const std::string& iOSExtParameters);
|
||||
std::string getSmsTemplateName()const;
|
||||
@@ -117,6 +123,8 @@ namespace AlibabaCloud
|
||||
void setIOSSilentNotification(bool iOSSilentNotification);
|
||||
std::string getTarget()const;
|
||||
void setTarget(const std::string& target);
|
||||
std::string getAndroidBigTitle()const;
|
||||
void setAndroidBigTitle(const std::string& androidBigTitle);
|
||||
std::string getAndroidNotificationChannel()const;
|
||||
void setAndroidNotificationChannel(const std::string& androidNotificationChannel);
|
||||
bool getAndroidRemind()const;
|
||||
@@ -162,22 +170,26 @@ namespace AlibabaCloud
|
||||
std::string androidOpenUrl_;
|
||||
std::string androidXiaoMiNotifyBody_;
|
||||
std::string iOSSubtitle_;
|
||||
std::string androidXiaomiBigPictureUrl_;
|
||||
bool iOSRemind_;
|
||||
std::string androidMusic_;
|
||||
std::string iOSNotificationCollapseId_;
|
||||
std::string pushType_;
|
||||
std::string androidExtParameters_;
|
||||
int iOSBadge_;
|
||||
std::string androidBigBody_;
|
||||
bool iOSBadgeAutoIncrement_;
|
||||
std::string androidOpenType_;
|
||||
std::string title_;
|
||||
std::string accessKeyId_;
|
||||
int smsDelaySecs_;
|
||||
int androidRenderStyle_;
|
||||
std::string iOSExtParameters_;
|
||||
std::string smsTemplateName_;
|
||||
std::string androidPopupBody_;
|
||||
bool iOSSilentNotification_;
|
||||
std::string target_;
|
||||
std::string androidBigTitle_;
|
||||
std::string androidNotificationChannel_;
|
||||
bool androidRemind_;
|
||||
std::string androidActivity_;
|
||||
|
||||
@@ -53,6 +53,8 @@ namespace AlibabaCloud
|
||||
void setTarget(const std::string& target);
|
||||
long getAppKey()const;
|
||||
void setAppKey(long appKey);
|
||||
int getPage()const;
|
||||
void setPage(int page);
|
||||
std::string getPushType()const;
|
||||
void setPushType(const std::string& pushType);
|
||||
|
||||
@@ -66,6 +68,7 @@ namespace AlibabaCloud
|
||||
std::string endTime_;
|
||||
std::string target_;
|
||||
long appKey_;
|
||||
int page_;
|
||||
std::string pushType_;
|
||||
|
||||
};
|
||||
|
||||
@@ -53,6 +53,8 @@ namespace AlibabaCloud
|
||||
std::vector<PushInfo> getPushInfos()const;
|
||||
std::string getNextToken()const;
|
||||
int getPageSize()const;
|
||||
int getTotal()const;
|
||||
int getPage()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
@@ -60,6 +62,8 @@ namespace AlibabaCloud
|
||||
std::vector<PushInfo> pushInfos_;
|
||||
std::string nextToken_;
|
||||
int pageSize_;
|
||||
int total_;
|
||||
int page_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -195,6 +195,42 @@ PushClient::CancelPushOutcomeCallable PushClient::cancelPushCallable(const Cance
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PushClient::CheckCertificateOutcome PushClient::checkCertificate(const CheckCertificateRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CheckCertificateOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CheckCertificateOutcome(CheckCertificateResult(outcome.result()));
|
||||
else
|
||||
return CheckCertificateOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void PushClient::checkCertificateAsync(const CheckCertificateRequest& request, const CheckCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, checkCertificate(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
PushClient::CheckCertificateOutcomeCallable PushClient::checkCertificateCallable(const CheckCertificateRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CheckCertificateOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->checkCertificate(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PushClient::CheckDeviceOutcome PushClient::checkDevice(const CheckDeviceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
51
push/src/model/CheckCertificateRequest.cc
Normal file
51
push/src/model/CheckCertificateRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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/push/model/CheckCertificateRequest.h>
|
||||
|
||||
using AlibabaCloud::Push::Model::CheckCertificateRequest;
|
||||
|
||||
CheckCertificateRequest::CheckCertificateRequest() :
|
||||
RpcServiceRequest("push", "2016-08-01", "CheckCertificate")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CheckCertificateRequest::~CheckCertificateRequest()
|
||||
{}
|
||||
|
||||
std::string CheckCertificateRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void CheckCertificateRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
long CheckCertificateRequest::getAppKey()const
|
||||
{
|
||||
return appKey_;
|
||||
}
|
||||
|
||||
void CheckCertificateRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
78
push/src/model/CheckCertificateResult.cc
Normal file
78
push/src/model/CheckCertificateResult.cc
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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/push/model/CheckCertificateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Push;
|
||||
using namespace AlibabaCloud::Push::Model;
|
||||
|
||||
CheckCertificateResult::CheckCertificateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CheckCertificateResult::CheckCertificateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CheckCertificateResult::~CheckCertificateResult()
|
||||
{}
|
||||
|
||||
void CheckCertificateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto productionCertInfoNode = value["ProductionCertInfo"];
|
||||
if(!productionCertInfoNode["ExipreTime"].isNull())
|
||||
productionCertInfo_.exipreTime = std::stol(productionCertInfoNode["ExipreTime"].asString());
|
||||
if(!productionCertInfoNode["Status"].isNull())
|
||||
productionCertInfo_.status = productionCertInfoNode["Status"].asString();
|
||||
auto developmentCertInfoNode = value["DevelopmentCertInfo"];
|
||||
if(!developmentCertInfoNode["ExipreTime"].isNull())
|
||||
developmentCertInfo_.exipreTime = std::stol(developmentCertInfoNode["ExipreTime"].asString());
|
||||
if(!developmentCertInfoNode["Status"].isNull())
|
||||
developmentCertInfo_.status = developmentCertInfoNode["Status"].asString();
|
||||
if(!value["Android"].isNull())
|
||||
android_ = value["Android"].asString() == "true";
|
||||
if(!value["IOS"].isNull())
|
||||
iOS_ = value["IOS"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
CheckCertificateResult::DevelopmentCertInfo CheckCertificateResult::getDevelopmentCertInfo()const
|
||||
{
|
||||
return developmentCertInfo_;
|
||||
}
|
||||
|
||||
bool CheckCertificateResult::getIOS()const
|
||||
{
|
||||
return iOS_;
|
||||
}
|
||||
|
||||
CheckCertificateResult::ProductionCertInfo CheckCertificateResult::getProductionCertInfo()const
|
||||
{
|
||||
return productionCertInfo_;
|
||||
}
|
||||
|
||||
bool CheckCertificateResult::getAndroid()const
|
||||
{
|
||||
return android_;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ void MassPushRequest::setPushTask(const std::vector<PushTask>& pushTask)
|
||||
setParameter(pushTaskObjStr + ".AndroidNotificationBarType", std::to_string(pushTaskObj.androidNotificationBarType));
|
||||
setParameter(pushTaskObjStr + ".AndroidExtParameters", pushTaskObj.androidExtParameters);
|
||||
setParameter(pushTaskObjStr + ".IOSBadge", std::to_string(pushTaskObj.iOSBadge));
|
||||
setParameter(pushTaskObjStr + ".AndroidBigBody", pushTaskObj.androidBigBody);
|
||||
setParameter(pushTaskObjStr + ".IOSBadgeAutoIncrement", pushTaskObj.iOSBadgeAutoIncrement ? "true" : "false");
|
||||
setParameter(pushTaskObjStr + ".AndroidOpenType", pushTaskObj.androidOpenType);
|
||||
setParameter(pushTaskObjStr + ".Title", pushTaskObj.title);
|
||||
@@ -62,6 +63,7 @@ void MassPushRequest::setPushTask(const std::vector<PushTask>& pushTask)
|
||||
setParameter(pushTaskObjStr + ".AndroidNotificationHuaweiChannel", pushTaskObj.androidNotificationHuaweiChannel);
|
||||
setParameter(pushTaskObjStr + ".AndroidPopupActivity", pushTaskObj.androidPopupActivity);
|
||||
setParameter(pushTaskObjStr + ".IOSRemindBody", pushTaskObj.iOSRemindBody);
|
||||
setParameter(pushTaskObjStr + ".AndroidRenderStyle", pushTaskObj.androidRenderStyle);
|
||||
setParameter(pushTaskObjStr + ".IOSExtParameters", pushTaskObj.iOSExtParameters);
|
||||
setParameter(pushTaskObjStr + ".AndroidNotifyType", pushTaskObj.androidNotifyType);
|
||||
setParameter(pushTaskObjStr + ".AndroidPopupTitle", pushTaskObj.androidPopupTitle);
|
||||
@@ -78,12 +80,14 @@ void MassPushRequest::setPushTask(const std::vector<PushTask>& pushTask)
|
||||
setParameter(pushTaskObjStr + ".IOSSilentNotification", pushTaskObj.iOSSilentNotification ? "true" : "false");
|
||||
setParameter(pushTaskObjStr + ".JobKey", pushTaskObj.jobKey);
|
||||
setParameter(pushTaskObjStr + ".Target", pushTaskObj.target);
|
||||
setParameter(pushTaskObjStr + ".AndroidBigTitle", pushTaskObj.androidBigTitle);
|
||||
setParameter(pushTaskObjStr + ".AndroidOpenUrl", pushTaskObj.androidOpenUrl);
|
||||
setParameter(pushTaskObjStr + ".AndroidNotificationChannel", pushTaskObj.androidNotificationChannel);
|
||||
setParameter(pushTaskObjStr + ".AndroidRemind", pushTaskObj.androidRemind ? "true" : "false");
|
||||
setParameter(pushTaskObjStr + ".AndroidActivity", pushTaskObj.androidActivity);
|
||||
setParameter(pushTaskObjStr + ".AndroidXiaoMiNotifyBody", pushTaskObj.androidXiaoMiNotifyBody);
|
||||
setParameter(pushTaskObjStr + ".IOSSubtitle", pushTaskObj.iOSSubtitle);
|
||||
setParameter(pushTaskObjStr + ".AndroidXiaomiBigPictureUrl", pushTaskObj.androidXiaomiBigPictureUrl);
|
||||
setParameter(pushTaskObjStr + ".IOSRemind", pushTaskObj.iOSRemind ? "true" : "false");
|
||||
setParameter(pushTaskObjStr + ".AndroidNotificationNotifyId", std::to_string(pushTaskObj.androidNotificationNotifyId));
|
||||
setParameter(pushTaskObjStr + ".TargetValue", pushTaskObj.targetValue);
|
||||
|
||||
@@ -302,6 +302,17 @@ void PushRequest::setIOSSubtitle(const std::string& iOSSubtitle)
|
||||
setParameter("IOSSubtitle", iOSSubtitle);
|
||||
}
|
||||
|
||||
std::string PushRequest::getAndroidXiaomiBigPictureUrl()const
|
||||
{
|
||||
return androidXiaomiBigPictureUrl_;
|
||||
}
|
||||
|
||||
void PushRequest::setAndroidXiaomiBigPictureUrl(const std::string& androidXiaomiBigPictureUrl)
|
||||
{
|
||||
androidXiaomiBigPictureUrl_ = androidXiaomiBigPictureUrl;
|
||||
setParameter("AndroidXiaomiBigPictureUrl", androidXiaomiBigPictureUrl);
|
||||
}
|
||||
|
||||
bool PushRequest::getIOSRemind()const
|
||||
{
|
||||
return iOSRemind_;
|
||||
@@ -368,6 +379,17 @@ void PushRequest::setIOSBadge(int iOSBadge)
|
||||
setParameter("IOSBadge", std::to_string(iOSBadge));
|
||||
}
|
||||
|
||||
std::string PushRequest::getAndroidBigBody()const
|
||||
{
|
||||
return androidBigBody_;
|
||||
}
|
||||
|
||||
void PushRequest::setAndroidBigBody(const std::string& androidBigBody)
|
||||
{
|
||||
androidBigBody_ = androidBigBody;
|
||||
setParameter("AndroidBigBody", androidBigBody);
|
||||
}
|
||||
|
||||
bool PushRequest::getIOSBadgeAutoIncrement()const
|
||||
{
|
||||
return iOSBadgeAutoIncrement_;
|
||||
@@ -423,6 +445,17 @@ void PushRequest::setSmsDelaySecs(int smsDelaySecs)
|
||||
setParameter("SmsDelaySecs", std::to_string(smsDelaySecs));
|
||||
}
|
||||
|
||||
int PushRequest::getAndroidRenderStyle()const
|
||||
{
|
||||
return androidRenderStyle_;
|
||||
}
|
||||
|
||||
void PushRequest::setAndroidRenderStyle(int androidRenderStyle)
|
||||
{
|
||||
androidRenderStyle_ = androidRenderStyle;
|
||||
setParameter("AndroidRenderStyle", std::to_string(androidRenderStyle));
|
||||
}
|
||||
|
||||
std::string PushRequest::getIOSExtParameters()const
|
||||
{
|
||||
return iOSExtParameters_;
|
||||
@@ -478,6 +511,17 @@ void PushRequest::setTarget(const std::string& target)
|
||||
setParameter("Target", target);
|
||||
}
|
||||
|
||||
std::string PushRequest::getAndroidBigTitle()const
|
||||
{
|
||||
return androidBigTitle_;
|
||||
}
|
||||
|
||||
void PushRequest::setAndroidBigTitle(const std::string& androidBigTitle)
|
||||
{
|
||||
androidBigTitle_ = androidBigTitle;
|
||||
setParameter("AndroidBigTitle", androidBigTitle);
|
||||
}
|
||||
|
||||
std::string PushRequest::getAndroidNotificationChannel()const
|
||||
{
|
||||
return androidNotificationChannel_;
|
||||
|
||||
@@ -126,6 +126,17 @@ void QueryPushRecordsRequest::setAppKey(long appKey)
|
||||
setParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
int QueryPushRecordsRequest::getPage()const
|
||||
{
|
||||
return page_;
|
||||
}
|
||||
|
||||
void QueryPushRecordsRequest::setPage(int page)
|
||||
{
|
||||
page_ = page;
|
||||
setParameter("Page", std::to_string(page));
|
||||
}
|
||||
|
||||
std::string QueryPushRecordsRequest::getPushType()const
|
||||
{
|
||||
return pushType_;
|
||||
|
||||
@@ -69,6 +69,10 @@ void QueryPushRecordsResult::parse(const std::string &payload)
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["Page"].isNull())
|
||||
page_ = std::stoi(value["Page"].asString());
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stoi(value["Total"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -87,3 +91,13 @@ int QueryPushRecordsResult::getPageSize()const
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int QueryPushRecordsResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
int QueryPushRecordsResult::getPage()const
|
||||
{
|
||||
return page_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user