PushRequest.cc 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  1. /*
  2. * Copyright 2009-2017 Alibaba Cloud All rights reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #include <alibabacloud/push/model/PushRequest.h>
  17. using AlibabaCloud::Push::Model::PushRequest;
  18. PushRequest::PushRequest() :
  19. RpcServiceRequest("push", "2016-08-01", "Push")
  20. {}
  21. PushRequest::~PushRequest()
  22. {}
  23. int PushRequest::getAndroidNotificationBarType()const
  24. {
  25. return androidNotificationBarType_;
  26. }
  27. void PushRequest::setAndroidNotificationBarType(int androidNotificationBarType)
  28. {
  29. androidNotificationBarType_ = androidNotificationBarType;
  30. setParameter("AndroidNotificationBarType", std::to_string(androidNotificationBarType));
  31. }
  32. int PushRequest::getSmsSendPolicy()const
  33. {
  34. return smsSendPolicy_;
  35. }
  36. void PushRequest::setSmsSendPolicy(int smsSendPolicy)
  37. {
  38. smsSendPolicy_ = smsSendPolicy;
  39. setParameter("SmsSendPolicy", std::to_string(smsSendPolicy));
  40. }
  41. std::string PushRequest::getAndroidExtParameters()const
  42. {
  43. return androidExtParameters_;
  44. }
  45. void PushRequest::setAndroidExtParameters(const std::string& androidExtParameters)
  46. {
  47. androidExtParameters_ = androidExtParameters;
  48. setParameter("AndroidExtParameters", androidExtParameters);
  49. }
  50. int PushRequest::getIOSBadge()const
  51. {
  52. return iOSBadge_;
  53. }
  54. void PushRequest::setIOSBadge(int iOSBadge)
  55. {
  56. iOSBadge_ = iOSBadge;
  57. setParameter("IOSBadge", std::to_string(iOSBadge));
  58. }
  59. bool PushRequest::getIOSBadgeAutoIncrement()const
  60. {
  61. return iOSBadgeAutoIncrement_;
  62. }
  63. void PushRequest::setIOSBadgeAutoIncrement(bool iOSBadgeAutoIncrement)
  64. {
  65. iOSBadgeAutoIncrement_ = iOSBadgeAutoIncrement;
  66. setParameter("IOSBadgeAutoIncrement", std::to_string(iOSBadgeAutoIncrement));
  67. }
  68. std::string PushRequest::getAndroidOpenType()const
  69. {
  70. return androidOpenType_;
  71. }
  72. void PushRequest::setAndroidOpenType(const std::string& androidOpenType)
  73. {
  74. androidOpenType_ = androidOpenType;
  75. setParameter("AndroidOpenType", androidOpenType);
  76. }
  77. std::string PushRequest::getTitle()const
  78. {
  79. return title_;
  80. }
  81. void PushRequest::setTitle(const std::string& title)
  82. {
  83. title_ = title;
  84. setParameter("Title", title);
  85. }
  86. std::string PushRequest::getBody()const
  87. {
  88. return body_;
  89. }
  90. void PushRequest::setBody(const std::string& body)
  91. {
  92. body_ = body;
  93. setParameter("Body", body);
  94. }
  95. std::string PushRequest::getDeviceType()const
  96. {
  97. return deviceType_;
  98. }
  99. void PushRequest::setDeviceType(const std::string& deviceType)
  100. {
  101. deviceType_ = deviceType;
  102. setParameter("DeviceType", deviceType);
  103. }
  104. std::string PushRequest::getPushTime()const
  105. {
  106. return pushTime_;
  107. }
  108. void PushRequest::setPushTime(const std::string& pushTime)
  109. {
  110. pushTime_ = pushTime;
  111. setParameter("PushTime", pushTime);
  112. }
  113. std::string PushRequest::getAccessKeyId()const
  114. {
  115. return accessKeyId_;
  116. }
  117. void PushRequest::setAccessKeyId(const std::string& accessKeyId)
  118. {
  119. accessKeyId_ = accessKeyId;
  120. setParameter("AccessKeyId", accessKeyId);
  121. }
  122. int PushRequest::getSmsDelaySecs()const
  123. {
  124. return smsDelaySecs_;
  125. }
  126. void PushRequest::setSmsDelaySecs(int smsDelaySecs)
  127. {
  128. smsDelaySecs_ = smsDelaySecs;
  129. setParameter("SmsDelaySecs", std::to_string(smsDelaySecs));
  130. }
  131. int PushRequest::getSendSpeed()const
  132. {
  133. return sendSpeed_;
  134. }
  135. void PushRequest::setSendSpeed(int sendSpeed)
  136. {
  137. sendSpeed_ = sendSpeed;
  138. setParameter("SendSpeed", std::to_string(sendSpeed));
  139. }
  140. std::string PushRequest::getAndroidPopupActivity()const
  141. {
  142. return androidPopupActivity_;
  143. }
  144. void PushRequest::setAndroidPopupActivity(const std::string& androidPopupActivity)
  145. {
  146. androidPopupActivity_ = androidPopupActivity;
  147. setParameter("AndroidPopupActivity", androidPopupActivity);
  148. }
  149. std::string PushRequest::getIOSRemindBody()const
  150. {
  151. return iOSRemindBody_;
  152. }
  153. void PushRequest::setIOSRemindBody(const std::string& iOSRemindBody)
  154. {
  155. iOSRemindBody_ = iOSRemindBody;
  156. setParameter("IOSRemindBody", iOSRemindBody);
  157. }
  158. std::string PushRequest::getIOSExtParameters()const
  159. {
  160. return iOSExtParameters_;
  161. }
  162. void PushRequest::setIOSExtParameters(const std::string& iOSExtParameters)
  163. {
  164. iOSExtParameters_ = iOSExtParameters;
  165. setParameter("IOSExtParameters", iOSExtParameters);
  166. }
  167. std::string PushRequest::getAndroidNotifyType()const
  168. {
  169. return androidNotifyType_;
  170. }
  171. void PushRequest::setAndroidNotifyType(const std::string& androidNotifyType)
  172. {
  173. androidNotifyType_ = androidNotifyType;
  174. setParameter("AndroidNotifyType", androidNotifyType);
  175. }
  176. std::string PushRequest::getAndroidPopupTitle()const
  177. {
  178. return androidPopupTitle_;
  179. }
  180. void PushRequest::setAndroidPopupTitle(const std::string& androidPopupTitle)
  181. {
  182. androidPopupTitle_ = androidPopupTitle;
  183. setParameter("AndroidPopupTitle", androidPopupTitle);
  184. }
  185. std::string PushRequest::getIOSMusic()const
  186. {
  187. return iOSMusic_;
  188. }
  189. void PushRequest::setIOSMusic(const std::string& iOSMusic)
  190. {
  191. iOSMusic_ = iOSMusic;
  192. setParameter("IOSMusic", iOSMusic);
  193. }
  194. std::string PushRequest::getIOSApnsEnv()const
  195. {
  196. return iOSApnsEnv_;
  197. }
  198. void PushRequest::setIOSApnsEnv(const std::string& iOSApnsEnv)
  199. {
  200. iOSApnsEnv_ = iOSApnsEnv;
  201. setParameter("IOSApnsEnv", iOSApnsEnv);
  202. }
  203. bool PushRequest::getIOSMutableContent()const
  204. {
  205. return iOSMutableContent_;
  206. }
  207. void PushRequest::setIOSMutableContent(bool iOSMutableContent)
  208. {
  209. iOSMutableContent_ = iOSMutableContent;
  210. setParameter("IOSMutableContent", std::to_string(iOSMutableContent));
  211. }
  212. int PushRequest::getAndroidNotificationBarPriority()const
  213. {
  214. return androidNotificationBarPriority_;
  215. }
  216. void PushRequest::setAndroidNotificationBarPriority(int androidNotificationBarPriority)
  217. {
  218. androidNotificationBarPriority_ = androidNotificationBarPriority;
  219. setParameter("AndroidNotificationBarPriority", std::to_string(androidNotificationBarPriority));
  220. }
  221. std::string PushRequest::getExpireTime()const
  222. {
  223. return expireTime_;
  224. }
  225. void PushRequest::setExpireTime(const std::string& expireTime)
  226. {
  227. expireTime_ = expireTime;
  228. setParameter("ExpireTime", expireTime);
  229. }
  230. std::string PushRequest::getSmsTemplateName()const
  231. {
  232. return smsTemplateName_;
  233. }
  234. void PushRequest::setSmsTemplateName(const std::string& smsTemplateName)
  235. {
  236. smsTemplateName_ = smsTemplateName;
  237. setParameter("SmsTemplateName", smsTemplateName);
  238. }
  239. std::string PushRequest::getAndroidPopupBody()const
  240. {
  241. return androidPopupBody_;
  242. }
  243. void PushRequest::setAndroidPopupBody(const std::string& androidPopupBody)
  244. {
  245. androidPopupBody_ = androidPopupBody;
  246. setParameter("AndroidPopupBody", androidPopupBody);
  247. }
  248. std::string PushRequest::getIOSNotificationCategory()const
  249. {
  250. return iOSNotificationCategory_;
  251. }
  252. void PushRequest::setIOSNotificationCategory(const std::string& iOSNotificationCategory)
  253. {
  254. iOSNotificationCategory_ = iOSNotificationCategory;
  255. setParameter("IOSNotificationCategory", iOSNotificationCategory);
  256. }
  257. bool PushRequest::getStoreOffline()const
  258. {
  259. return storeOffline_;
  260. }
  261. void PushRequest::setStoreOffline(bool storeOffline)
  262. {
  263. storeOffline_ = storeOffline;
  264. setParameter("StoreOffline", std::to_string(storeOffline));
  265. }
  266. bool PushRequest::getIOSSilentNotification()const
  267. {
  268. return iOSSilentNotification_;
  269. }
  270. void PushRequest::setIOSSilentNotification(bool iOSSilentNotification)
  271. {
  272. iOSSilentNotification_ = iOSSilentNotification;
  273. setParameter("IOSSilentNotification", std::to_string(iOSSilentNotification));
  274. }
  275. std::string PushRequest::getSmsParams()const
  276. {
  277. return smsParams_;
  278. }
  279. void PushRequest::setSmsParams(const std::string& smsParams)
  280. {
  281. smsParams_ = smsParams;
  282. setParameter("SmsParams", smsParams);
  283. }
  284. std::string PushRequest::getJobKey()const
  285. {
  286. return jobKey_;
  287. }
  288. void PushRequest::setJobKey(const std::string& jobKey)
  289. {
  290. jobKey_ = jobKey;
  291. setParameter("JobKey", jobKey);
  292. }
  293. std::string PushRequest::getTarget()const
  294. {
  295. return target_;
  296. }
  297. void PushRequest::setTarget(const std::string& target)
  298. {
  299. target_ = target;
  300. setParameter("Target", target);
  301. }
  302. std::string PushRequest::getAndroidOpenUrl()const
  303. {
  304. return androidOpenUrl_;
  305. }
  306. void PushRequest::setAndroidOpenUrl(const std::string& androidOpenUrl)
  307. {
  308. androidOpenUrl_ = androidOpenUrl;
  309. setParameter("AndroidOpenUrl", androidOpenUrl);
  310. }
  311. std::string PushRequest::getAndroidNotificationChannel()const
  312. {
  313. return androidNotificationChannel_;
  314. }
  315. void PushRequest::setAndroidNotificationChannel(const std::string& androidNotificationChannel)
  316. {
  317. androidNotificationChannel_ = androidNotificationChannel;
  318. setParameter("AndroidNotificationChannel", androidNotificationChannel);
  319. }
  320. bool PushRequest::getAndroidRemind()const
  321. {
  322. return androidRemind_;
  323. }
  324. void PushRequest::setAndroidRemind(bool androidRemind)
  325. {
  326. androidRemind_ = androidRemind;
  327. setParameter("AndroidRemind", std::to_string(androidRemind));
  328. }
  329. std::string PushRequest::getAndroidActivity()const
  330. {
  331. return androidActivity_;
  332. }
  333. void PushRequest::setAndroidActivity(const std::string& androidActivity)
  334. {
  335. androidActivity_ = androidActivity;
  336. setParameter("AndroidActivity", androidActivity);
  337. }
  338. std::string PushRequest::getAndroidXiaoMiNotifyBody()const
  339. {
  340. return androidXiaoMiNotifyBody_;
  341. }
  342. void PushRequest::setAndroidXiaoMiNotifyBody(const std::string& androidXiaoMiNotifyBody)
  343. {
  344. androidXiaoMiNotifyBody_ = androidXiaoMiNotifyBody;
  345. setParameter("AndroidXiaoMiNotifyBody", androidXiaoMiNotifyBody);
  346. }
  347. std::string PushRequest::getIOSSubtitle()const
  348. {
  349. return iOSSubtitle_;
  350. }
  351. void PushRequest::setIOSSubtitle(const std::string& iOSSubtitle)
  352. {
  353. iOSSubtitle_ = iOSSubtitle;
  354. setParameter("IOSSubtitle", iOSSubtitle);
  355. }
  356. std::string PushRequest::getSmsSignName()const
  357. {
  358. return smsSignName_;
  359. }
  360. void PushRequest::setSmsSignName(const std::string& smsSignName)
  361. {
  362. smsSignName_ = smsSignName;
  363. setParameter("SmsSignName", smsSignName);
  364. }
  365. bool PushRequest::getIOSRemind()const
  366. {
  367. return iOSRemind_;
  368. }
  369. void PushRequest::setIOSRemind(bool iOSRemind)
  370. {
  371. iOSRemind_ = iOSRemind;
  372. setParameter("IOSRemind", std::to_string(iOSRemind));
  373. }
  374. long PushRequest::getAppKey()const
  375. {
  376. return appKey_;
  377. }
  378. void PushRequest::setAppKey(long appKey)
  379. {
  380. appKey_ = appKey;
  381. setParameter("AppKey", std::to_string(appKey));
  382. }
  383. std::string PushRequest::getTargetValue()const
  384. {
  385. return targetValue_;
  386. }
  387. void PushRequest::setTargetValue(const std::string& targetValue)
  388. {
  389. targetValue_ = targetValue;
  390. setParameter("TargetValue", targetValue);
  391. }
  392. std::string PushRequest::getAndroidMusic()const
  393. {
  394. return androidMusic_;
  395. }
  396. void PushRequest::setAndroidMusic(const std::string& androidMusic)
  397. {
  398. androidMusic_ = androidMusic;
  399. setParameter("AndroidMusic", androidMusic);
  400. }
  401. std::string PushRequest::getAndroidXiaoMiActivity()const
  402. {
  403. return androidXiaoMiActivity_;
  404. }
  405. void PushRequest::setAndroidXiaoMiActivity(const std::string& androidXiaoMiActivity)
  406. {
  407. androidXiaoMiActivity_ = androidXiaoMiActivity;
  408. setParameter("AndroidXiaoMiActivity", androidXiaoMiActivity);
  409. }
  410. std::string PushRequest::getAndroidXiaoMiNotifyTitle()const
  411. {
  412. return androidXiaoMiNotifyTitle_;
  413. }
  414. void PushRequest::setAndroidXiaoMiNotifyTitle(const std::string& androidXiaoMiNotifyTitle)
  415. {
  416. androidXiaoMiNotifyTitle_ = androidXiaoMiNotifyTitle;
  417. setParameter("AndroidXiaoMiNotifyTitle", androidXiaoMiNotifyTitle);
  418. }
  419. std::string PushRequest::getPushType()const
  420. {
  421. return pushType_;
  422. }
  423. void PushRequest::setPushType(const std::string& pushType)
  424. {
  425. pushType_ = pushType;
  426. setParameter("PushType", pushType);
  427. }