AlibabaAliqinFcIotDevicePostRequest.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. /**
  3. * TOP API: alibaba.aliqin.fc.iot.device.post request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2017.03.15
  7. */
  8. class AlibabaAliqinFcIotDevicePostRequest
  9. {
  10. /**
  11. * 备注
  12. **/
  13. private $comments;
  14. /**
  15. * 设备类型(将来扩展)
  16. **/
  17. private $deviceType;
  18. /**
  19. * 15位imei号
  20. **/
  21. private $imei;
  22. /**
  23. * 扩展字段
  24. **/
  25. private $midPatChannel;
  26. private $apiParas = array();
  27. public function setComments($comments)
  28. {
  29. $this->comments = $comments;
  30. $this->apiParas["comments"] = $comments;
  31. }
  32. public function getComments()
  33. {
  34. return $this->comments;
  35. }
  36. public function setDeviceType($deviceType)
  37. {
  38. $this->deviceType = $deviceType;
  39. $this->apiParas["device_type"] = $deviceType;
  40. }
  41. public function getDeviceType()
  42. {
  43. return $this->deviceType;
  44. }
  45. public function setImei($imei)
  46. {
  47. $this->imei = $imei;
  48. $this->apiParas["imei"] = $imei;
  49. }
  50. public function getImei()
  51. {
  52. return $this->imei;
  53. }
  54. public function setMidPatChannel($midPatChannel)
  55. {
  56. $this->midPatChannel = $midPatChannel;
  57. $this->apiParas["mid_pat_channel"] = $midPatChannel;
  58. }
  59. public function getMidPatChannel()
  60. {
  61. return $this->midPatChannel;
  62. }
  63. public function getApiMethodName()
  64. {
  65. return "alibaba.aliqin.fc.iot.device.post";
  66. }
  67. public function getApiParas()
  68. {
  69. return $this->apiParas;
  70. }
  71. public function check()
  72. {
  73. RequestCheckUtil::checkNotNull($this->imei,"imei");
  74. }
  75. public function putOtherTextParam($key, $value) {
  76. $this->apiParas[$key] = $value;
  77. $this->$key = $value;
  78. }
  79. }