Add CheckCertificate Api.

This commit is contained in:
sdk-team
2021-07-09 10:26:45 +00:00
parent 0dc704dbaa
commit de7176c25c
17 changed files with 396 additions and 1 deletions

View File

@@ -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;

View 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.
*/
#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_

View File

@@ -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_

View File

@@ -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;

View File

@@ -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_;

View File

@@ -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_;
};

View File

@@ -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_;
};
}