PushRequest.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing,
  13. * software distributed under the License is distributed on an
  14. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. * KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations
  17. * under the License.
  18. */
  19. using Aliyun.Acs.Core;
  20. using Aliyun.Acs.Core.Http;
  21. using Aliyun.Acs.Core.Transform;
  22. using Aliyun.Acs.Core.Utils;
  23. using Aliyun.Acs.Push.Transform;
  24. using Aliyun.Acs.Push.Transform.V20160801;
  25. using System.Collections.Generic;
  26. namespace Aliyun.Acs.Push.Model.V20160801
  27. {
  28. public class PushRequest : RpcAcsRequest<PushResponse>
  29. {
  30. public PushRequest()
  31. : base("Push", "2016-08-01", "Push")
  32. {
  33. }
  34. private long? appKey;
  35. private string target;
  36. private string targetValue;
  37. private string pushType;
  38. private string deviceType;
  39. private string title;
  40. private string body;
  41. private string jobKey;
  42. private string pushTime;
  43. private string expireTime;
  44. private bool? storeOffline;
  45. private string batchNumber;
  46. private string androidNotifyType;
  47. private string androidOpenType;
  48. private string androidActivity;
  49. private string androidOpenUrl;
  50. private string androidXiaoMiActivity;
  51. private string androidXiaoMiNotifyTitle;
  52. private string androidXiaoMiNotifyBody;
  53. private string androidPopupActivity;
  54. private string androidPopupTitle;
  55. private string androidPopupBody;
  56. private string androidMusic;
  57. private int? androidNotificationBarType;
  58. private int? androidNotificationBarPriority;
  59. private string androidExtParameters;
  60. private bool? androidRemind;
  61. private string androidNotificationChannel;
  62. private string iOSApnsEnv;
  63. private bool? iOSRemind;
  64. private string iOSRemindBody;
  65. private string iOSMusic;
  66. private int? iOSBadge;
  67. private bool? iOSSilentNotification;
  68. private string iOSSubtitle;
  69. private string iOSNotificationCategory;
  70. private bool? iOSMutableContent;
  71. private string iOSExtParameters;
  72. public long? AppKey
  73. {
  74. get
  75. {
  76. return appKey;
  77. }
  78. set
  79. {
  80. appKey = value;
  81. DictionaryUtil.Add(QueryParameters, "AppKey", value.ToString());
  82. }
  83. }
  84. public string Target
  85. {
  86. get
  87. {
  88. return target;
  89. }
  90. set
  91. {
  92. target = value;
  93. DictionaryUtil.Add(QueryParameters, "Target", value);
  94. }
  95. }
  96. public string TargetValue
  97. {
  98. get
  99. {
  100. return targetValue;
  101. }
  102. set
  103. {
  104. targetValue = value;
  105. DictionaryUtil.Add(QueryParameters, "TargetValue", value);
  106. }
  107. }
  108. public string PushType
  109. {
  110. get
  111. {
  112. return pushType;
  113. }
  114. set
  115. {
  116. pushType = value;
  117. DictionaryUtil.Add(QueryParameters, "PushType", value);
  118. }
  119. }
  120. public string DeviceType
  121. {
  122. get
  123. {
  124. return deviceType;
  125. }
  126. set
  127. {
  128. deviceType = value;
  129. DictionaryUtil.Add(QueryParameters, "DeviceType", value);
  130. }
  131. }
  132. public string Title
  133. {
  134. get
  135. {
  136. return title;
  137. }
  138. set
  139. {
  140. title = value;
  141. DictionaryUtil.Add(QueryParameters, "Title", value);
  142. }
  143. }
  144. public string Body
  145. {
  146. get
  147. {
  148. return body;
  149. }
  150. set
  151. {
  152. body = value;
  153. DictionaryUtil.Add(QueryParameters, "Body", value);
  154. }
  155. }
  156. public string JobKey
  157. {
  158. get
  159. {
  160. return jobKey;
  161. }
  162. set
  163. {
  164. jobKey = value;
  165. DictionaryUtil.Add(QueryParameters, "JobKey", value);
  166. }
  167. }
  168. public string PushTime
  169. {
  170. get
  171. {
  172. return pushTime;
  173. }
  174. set
  175. {
  176. pushTime = value;
  177. DictionaryUtil.Add(QueryParameters, "PushTime", value);
  178. }
  179. }
  180. public string ExpireTime
  181. {
  182. get
  183. {
  184. return expireTime;
  185. }
  186. set
  187. {
  188. expireTime = value;
  189. DictionaryUtil.Add(QueryParameters, "ExpireTime", value);
  190. }
  191. }
  192. public bool? StoreOffline
  193. {
  194. get
  195. {
  196. return storeOffline;
  197. }
  198. set
  199. {
  200. storeOffline = value;
  201. DictionaryUtil.Add(QueryParameters, "StoreOffline", value.ToString());
  202. }
  203. }
  204. public string BatchNumber
  205. {
  206. get
  207. {
  208. return batchNumber;
  209. }
  210. set
  211. {
  212. batchNumber = value;
  213. DictionaryUtil.Add(QueryParameters, "BatchNumber", value);
  214. }
  215. }
  216. public string AndroidNotifyType
  217. {
  218. get
  219. {
  220. return androidNotifyType;
  221. }
  222. set
  223. {
  224. androidNotifyType = value;
  225. DictionaryUtil.Add(QueryParameters, "AndroidNotifyType", value);
  226. }
  227. }
  228. public string AndroidOpenType
  229. {
  230. get
  231. {
  232. return androidOpenType;
  233. }
  234. set
  235. {
  236. androidOpenType = value;
  237. DictionaryUtil.Add(QueryParameters, "AndroidOpenType", value);
  238. }
  239. }
  240. public string AndroidActivity
  241. {
  242. get
  243. {
  244. return androidActivity;
  245. }
  246. set
  247. {
  248. androidActivity = value;
  249. DictionaryUtil.Add(QueryParameters, "AndroidActivity", value);
  250. }
  251. }
  252. public string AndroidOpenUrl
  253. {
  254. get
  255. {
  256. return androidOpenUrl;
  257. }
  258. set
  259. {
  260. androidOpenUrl = value;
  261. DictionaryUtil.Add(QueryParameters, "AndroidOpenUrl", value);
  262. }
  263. }
  264. public string AndroidXiaoMiActivity
  265. {
  266. get
  267. {
  268. return androidXiaoMiActivity;
  269. }
  270. set
  271. {
  272. androidXiaoMiActivity = value;
  273. DictionaryUtil.Add(QueryParameters, "AndroidXiaoMiActivity", value);
  274. }
  275. }
  276. public string AndroidXiaoMiNotifyTitle
  277. {
  278. get
  279. {
  280. return androidXiaoMiNotifyTitle;
  281. }
  282. set
  283. {
  284. androidXiaoMiNotifyTitle = value;
  285. DictionaryUtil.Add(QueryParameters, "AndroidXiaoMiNotifyTitle", value);
  286. }
  287. }
  288. public string AndroidXiaoMiNotifyBody
  289. {
  290. get
  291. {
  292. return androidXiaoMiNotifyBody;
  293. }
  294. set
  295. {
  296. androidXiaoMiNotifyBody = value;
  297. DictionaryUtil.Add(QueryParameters, "AndroidXiaoMiNotifyBody", value);
  298. }
  299. }
  300. public string AndroidPopupActivity
  301. {
  302. get
  303. {
  304. return androidPopupActivity;
  305. }
  306. set
  307. {
  308. androidPopupActivity = value;
  309. DictionaryUtil.Add(QueryParameters, "AndroidPopupActivity", value);
  310. }
  311. }
  312. public string AndroidPopupTitle
  313. {
  314. get
  315. {
  316. return androidPopupTitle;
  317. }
  318. set
  319. {
  320. androidPopupTitle = value;
  321. DictionaryUtil.Add(QueryParameters, "AndroidPopupTitle", value);
  322. }
  323. }
  324. public string AndroidPopupBody
  325. {
  326. get
  327. {
  328. return androidPopupBody;
  329. }
  330. set
  331. {
  332. androidPopupBody = value;
  333. DictionaryUtil.Add(QueryParameters, "AndroidPopupBody", value);
  334. }
  335. }
  336. public string AndroidMusic
  337. {
  338. get
  339. {
  340. return androidMusic;
  341. }
  342. set
  343. {
  344. androidMusic = value;
  345. DictionaryUtil.Add(QueryParameters, "AndroidMusic", value);
  346. }
  347. }
  348. public int? AndroidNotificationBarType
  349. {
  350. get
  351. {
  352. return androidNotificationBarType;
  353. }
  354. set
  355. {
  356. androidNotificationBarType = value;
  357. DictionaryUtil.Add(QueryParameters, "AndroidNotificationBarType", value.ToString());
  358. }
  359. }
  360. public int? AndroidNotificationBarPriority
  361. {
  362. get
  363. {
  364. return androidNotificationBarPriority;
  365. }
  366. set
  367. {
  368. androidNotificationBarPriority = value;
  369. DictionaryUtil.Add(QueryParameters, "AndroidNotificationBarPriority", value.ToString());
  370. }
  371. }
  372. public string AndroidExtParameters
  373. {
  374. get
  375. {
  376. return androidExtParameters;
  377. }
  378. set
  379. {
  380. androidExtParameters = value;
  381. DictionaryUtil.Add(QueryParameters, "AndroidExtParameters", value);
  382. }
  383. }
  384. public bool? AndroidRemind
  385. {
  386. get
  387. {
  388. return androidRemind;
  389. }
  390. set
  391. {
  392. androidRemind = value;
  393. DictionaryUtil.Add(QueryParameters, "AndroidRemind", value.ToString());
  394. }
  395. }
  396. public string AndroidNotificationChannel
  397. {
  398. get
  399. {
  400. return androidNotificationChannel;
  401. }
  402. set
  403. {
  404. androidNotificationChannel = value;
  405. DictionaryUtil.Add(QueryParameters, "AndroidNotificationChannel", value.ToString());
  406. }
  407. }
  408. public string IOSApnsEnv
  409. {
  410. get
  411. {
  412. return iOSApnsEnv;
  413. }
  414. set
  415. {
  416. iOSApnsEnv = value;
  417. DictionaryUtil.Add(QueryParameters, "iOSApnsEnv", value);
  418. }
  419. }
  420. public bool? IOSRemind
  421. {
  422. get
  423. {
  424. return iOSRemind;
  425. }
  426. set
  427. {
  428. iOSRemind = value;
  429. DictionaryUtil.Add(QueryParameters, "iOSRemind", value.ToString());
  430. }
  431. }
  432. public string IOSRemindBody
  433. {
  434. get
  435. {
  436. return iOSRemindBody;
  437. }
  438. set
  439. {
  440. iOSRemindBody = value;
  441. DictionaryUtil.Add(QueryParameters, "iOSRemindBody", value);
  442. }
  443. }
  444. public string IOSMusic
  445. {
  446. get
  447. {
  448. return iOSMusic;
  449. }
  450. set
  451. {
  452. iOSMusic = value;
  453. DictionaryUtil.Add(QueryParameters, "iOSMusic", value);
  454. }
  455. }
  456. public int? IOSBadge
  457. {
  458. get
  459. {
  460. return iOSBadge;
  461. }
  462. set
  463. {
  464. iOSBadge = value;
  465. DictionaryUtil.Add(QueryParameters, "iOSBadge", value.ToString());
  466. }
  467. }
  468. public bool? IOSSilentNotification
  469. {
  470. get
  471. {
  472. return iOSSilentNotification;
  473. }
  474. set
  475. {
  476. iOSSilentNotification = value;
  477. DictionaryUtil.Add(QueryParameters, "iOSSilentNotification", value.ToString());
  478. }
  479. }
  480. public string IOSSubtitle
  481. {
  482. get
  483. {
  484. return iOSSubtitle;
  485. }
  486. set
  487. {
  488. iOSSubtitle = value;
  489. DictionaryUtil.Add(QueryParameters, "iOSSubtitle", value);
  490. }
  491. }
  492. public string IOSNotificationCategory
  493. {
  494. get
  495. {
  496. return iOSNotificationCategory;
  497. }
  498. set
  499. {
  500. iOSNotificationCategory = value;
  501. DictionaryUtil.Add(QueryParameters, "iOSNotificationCategory", value);
  502. }
  503. }
  504. public bool? IOSMutableContent
  505. {
  506. get
  507. {
  508. return iOSMutableContent;
  509. }
  510. set
  511. {
  512. iOSMutableContent = value;
  513. DictionaryUtil.Add(QueryParameters, "iOSMutableContent", value.ToString());
  514. }
  515. }
  516. public string IOSExtParameters
  517. {
  518. get
  519. {
  520. return iOSExtParameters;
  521. }
  522. set
  523. {
  524. iOSExtParameters = value;
  525. DictionaryUtil.Add(QueryParameters, "iOSExtParameters", value);
  526. }
  527. }
  528. public override PushResponse GetResponse(Core.Transform.UnmarshallerContext unmarshallerContext)
  529. {
  530. return PushResponseUnmarshaller.Unmarshall(unmarshallerContext);
  531. }
  532. }
  533. }